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

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

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.