coppermine-gallery.com/forum

Support => cpg1.6.x Support => cpg1.6 plugins => Topic started by: Hanna. on December 01, 2017, 08:16:18 PM

Title: onlinestats plugin
Post by: Hanna. on December 01, 2017, 08:16:18 PM
Hello everyone! Just checking to see if this one is an easy fix with cpg 1.6? The plugin onlinestats that appears on the bottom?

This plugin is essential to my web pages and it gives out (because I used to have an older cpg)
Fatal error: Uncaught Error: Call to undefined function mysql_fetch_row() in /home/minowncu/public_html/addons/kristincavallari.net/gallery/plugins/onlinestats/codebase.php:137 Stack trace: #0 /home/minowncu/public_html/addons/kristincavallari.net/gallery/include/plugin_api.inc.php(218): online_mainpage(Array) #1 /home/minowncu/public_html/addons/kristincavallari.net/gallery/index.php(1128): CPGPluginAPI::filter('plugin_block', Array) #2 {main} thrown in /home/minowncu/public_html/addons/kristincavallari.net/gallery/plugins/onlinestats/codebase.php on line 137
Title: Re: onlinestats plugin
Post by: ron4mac on December 01, 2017, 11:09:35 PM
Find plugins updated for CPG 1.6 here:  https://github.com/coppermine-gallery/cpg1.6.x-plugins
Title: Re: onlinestats plugin
Post by: JohannM on March 13, 2019, 12:19:11 AM
Hello

How can I change to see the date format as e.g.  6 Jun 2019 ?

Any help please ?
Title: Re: onlinestats plugin
Post by: ΑndrĂ© on May 10, 2019, 04:04:33 PM
Open codebase.php, find
printf($lang_plugin_onlinestats['record'], '<strong>'.$CONFIG['record_online_users'].'</strong>', localised_date($CONFIG['record_online_date'], $lang_date['lastcom']));
and replace with
printf($lang_plugin_onlinestats['record'], '<strong>'.$CONFIG['record_online_users'].'</strong>', localised_date($CONFIG['record_online_date'], '%e %b %Y'));
Title: Re: onlinestats plugin
Post by: panhead on December 04, 2024, 12:29:24 PM
I get this error after installig this plugin:

Fatal error: Uncaught TypeError: Unsupported operand types: string + int in /home/-/domains/xxx.net/public_html/cpg/include/functions.inc.php:573 Stack trace: #0 /home/-/domains/xxx.net/public_html/cpg/include/functions.inc.php(543): localised_timestamp() #1 /home/-/domains/xxx.net/public_html/cpg/plugins/onlinestats/codebase.php(192): localised_date() #2 /home/-/domains/xxx.net/public_html/cpg/include/plugin_api.inc.php(215): online_mainpage() #3 /home/-/domains/xxx.net/public_html/cpg/index.php(1125): CPGPluginAPI::filter() #4 {main} thrown in /home/-/domains/xxx.net/public_html/cpg/include/functions.inc.php on line 573
Title: Re: onlinestats plugin
Post by: ron4mac on December 05, 2024, 02:29:30 PM
Quote from: panhead on December 04, 2024, 12:29:24 PMI get this error after installig this plugin:

I installed the Onlinestats plugin ( v2.8 ) in the latest release version of CPG ( v1.6.26 ) and experienced no issues.
Title: Re: onlinestats plugin
Post by: panhead on December 05, 2024, 04:40:05 PM
I installed v2.8 (from github), is there another source?
Title: Re: onlinestats plugin
Post by: ron4mac on December 05, 2024, 06:10:47 PM
Quote from: panhead on December 05, 2024, 04:40:05 PMI installed v2.8 (from github), is there another source?
[ Re-entered my previous post to combat smilies ]
No .. that is the most recent (and necessary) version.

I don't know why it should be failing for you .. PHP version maybe? ( my test bed is using 8.3.14 )

if you can modify a file, you might try making this change to include/functions.inc.php at line(s) 573:
    $timestamp = (INT)$timestamp;
    $timestamp += ((INT)$CONFIG['time_offset'] - $diff_to_GMT) * 3600;
Title: Re: onlinestats plugin
Post by: panhead on December 06, 2024, 12:21:45 PM
That seems to work, thank you!
Title: Re: onlinestats plugin
Post by: ron4mac on December 06, 2024, 05:11:19 PM
Quote from: panhead on December 06, 2024, 12:21:45 PMThat seems to work, thank you!
That change will not likely be in any new version of CPG. Your gallery may have been around a while. Check your Config->General Settings that the timezone difference seems correctly set. If you are in Nederland it should likely be 0 (zero).