TinyPortal

Development => Support => Topic started by: keng_113 on January 15, 2009, 12:16:02 PM

Title: How to do this?
Post by: keng_113 on January 15, 2009, 12:16:02 PM
I'm wondering If I can put the "Users Online Today Mod" in one of the blocks?
I tried to put the codes using phpbox but only the block is shown no user stats are shown?

Can anyone help me?? Thanks!
Title: Re: How to do this?
Post by: Ken. on January 15, 2009, 12:23:27 PM
Block Code Snippets Board.html (http://www.tinyportal.net/index.php/board,46.0)

Check out the Block Code Snippets board keng_113, you can find lots of codes there including one for users online today.
Title: Re: How to do this?
Post by: keng_113 on January 15, 2009, 01:09:56 PM
^Thanks for your reply =)

I think I almost got it?

but i'm confused with this code:

require("/home/********PATH_TO_YOUR_FILE/public_html/forum/SSI.php");

ssi_whosOnline();


I'm not sure what will i type in directory of my SSI.php
here's a screenshot

Title: Re: How to do this?
Post by: G6Cad on January 15, 2009, 03:01:51 PM
Just add this part ssi_whosOnline(); in an Forum SSI function block and save it
Title: Re: How to do this?
Post by: fussilet on January 15, 2009, 03:08:54 PM
users online today blok

echo '
<span class="smalltext">' , ssi_logOnline() , '</span>';
Title: Re: How to do this?
Post by: keng_113 on January 15, 2009, 03:09:09 PM
yes! it worked! wwoooooo!

Thank you very very very much
Title: Re: How to do this?
Post by: Xarcell on January 15, 2009, 03:09:29 PM
This part
require("/home/********PATH_TO_YOUR_FILE/public_html/forum/SSI.php");

You need to enter your own URL address to the location of the file. For example:

require("/home/xarcell.coml/forum/SSI.php");

If your not sure, in your SMF installation, go to: "admin > server settings". Down at the bottom it will show you your "SMF DIrectory". Use the same URL there, just make sure you add "SSI.php" to the end of the URL when using it in the script. Like in the example given.
Title: Re: How to do this?
Post by: JPDeni on January 15, 2009, 03:44:43 PM
Actually, all you need to do is


require("SSI.php");


That file is in the SMF home directory, so if you're running SMF, you don't need to put in the whole path to the file.