Ok with my really bad PHP knowledge this is what I came up with:

First I changed current_page to varchar(50) because 20 characters was not long enough for some of my pages.

Then I added the code by line 56 of online.php:

    if ((@$lang_online[$user_data['current_page']]) == '')
    {
        $lang_online[$user_data['current_page']] = "<a href=\"http://www.website.com/".$user_data['current_page']."\">".$user_data['current_page']."</a>";
        echo"\t\t\t\t\t".'<td>'.$lang_online[$user_data['current_page']].'</td>'."\n";
    }     
    else
        echo"\t\t\t\t\t".'<td>'.$lang_online[$user_data['current_page']].'</td>'."\n";

I realize it's really ugly but it gets the job done. If you have any ideas for some nicer/cleaner code please share big_smile

Ignore everything I just wrote I managed to get it all working big_smile Thanks for the great mod!

Hey,

I installed it on my PunBB and it works very nicely. Very quick and easy to install. Nice work! One question I have though about it.

I include common.php on my website so that I can integrate users online on the forum with users online on the website. When I view the users online page from the mod it shows errors for people that are on my regular website pages and not the forums.

Notice: Undefined index: antileech.php in /full/path/to/online.php on line 56

Do I have to add a line to the lang file for each of my website pages (I have over 200)? Is there any way to just say "Viewing Website" or something like that if they are not on a forum page? Also I believe if they are on my webpage index.php it still says they are on my bb/index.php . I don't know for sure it just seemed like way too many people were on my forums main page. Maybe there is a way to store the full path to the file so that /index.php and /bb/index.php are different.

Great mod just wondering if any of those are possible big_smile

Thanks so much for making this available! Great work!


--------------------
Edit:

I changed line 56 in online.php to:

echo"\t\t\t\t\t".'<td>'.@$lang_online[$user_data['current_page']].'</td>'."\n";

and it fixed that error from showing up even though it's technically still there.


Would there be a way to set a default tag to use if the page the user is on is not in the list in the lang file?

Any news on the progess big_smile

I went to one of the websites and checked the stats afterwards and it showed all my information correctly except for my browser. Said I was using Netscape 7. I'm actually using Camino.

XuMiX wrote:

ok, i'll share it when i extract it from my site smile
BTW its just a small rewrite of punonline mod for punbb 1.1.5

Great! I can't wait big_smile

Maybe, I'm not quite sure. I don't read Russian tongue

Mind sharing what you did there though big_smile

Edit: After running it through Babelfish... yes, that is exactly what I was looking for big_smile

Right now on my website I'm using common.php so that it counts users online on the website as well as the forums. What I would like to do if it is even possible is have a page when you click on users online that will show what page all the guests/users are on.

I couldn't find any mods/hacks that do this type of thing. How would I go about even attempting to do this? I know some basic PHP but I'm by no means an expert at any of this. Anyone have any ideas where I could start?

Thank you that code is working perfectly. I must of been using code from an older version of PunBB.

I am using the extern.php file to output the users online. But that doesn't add people that are just on the website, it only counts people that are on the forums.

Edit:

I also tried setting PUN_ROOT to the full server path but when I do that it says:

The constant PUN_ROOT must be defined and point to a valid PunBB installation root directory.

I would like to use the PunBB users online on my website pages as well as the forums. So if a visitor is just on my website it would add them as a guest online on the forums. I searched through the forums and found a page that said to add this code:

define('PUN_TURN_OFF_MAINT', 1);
define('PUN_QUIET_VISIT', 1);

$PUN_ROOT = '../bb/';
@include $PUN_ROOT.'include/common.php';

// If PUN isn't defined, config.php is missing or corrupt
if (!defined('PUN'))
    exit('config.php doesn\'t exist or is corrupt. Please run install.php to install PunBB first.');

When I do that it tells me:

The constant PUN_ROOT must be defined and point to a valid PunBB installation root directory.

My directories are as follows:

/bb/ is where my PunBB is installed
/test/ is where I'm trying to use this script from

Any ideas what I'm doing wrong here?