SMF, Coppermine, and Who's Online SMF, Coppermine, and Who's Online
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

SMF, Coppermine, and Who's Online

Started by kegobeer, July 07, 2004, 10:06:58 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kegobeer

I love SMF's ability to see who's visiting my forums and exactly where they are.  Unfortunately, once a visitor goes to my Coppermine gallery I lose them - all I see is "Viewing the main index" or something along those lines.  Well, here's how to fix that!

First, add a line like
$txt['whoall_coppermine'] = 'Viewing the Gallery.';
to your SMF theme's Who.english.php file.

Next, open up coppermine/bridge/smf.inc.php and change
cm_include_smf_funcs("$sourcedir/Subs.php", array("updateMemberData", "updateStats", "updateSettings"));
to
cm_include_smf_funcs("$sourcedir/Subs.php", array("updateMemberData", "updateStats", "updateSettings", "writeLog"));

Now, after
reloadSettings();
LoadUserSettings();

add
$_GET['action'] = 'coppermine'; writeLog();

Now you'll know if someone is visiting your gallery!
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

aravot

Tried it today and it worked very useful, thank you.