Who Is Online Plugin Who Is Online Plugin
 

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

Who Is Online Plugin

Started by abbyleesprinkles, May 10, 2015, 12:38:59 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

abbyleesprinkles

Is there any cpg1.5.x Who Is Online plugin?

allvip

#1
It already comes with coppermine (is in the plugins folder of your coppermine).
Go to Config - Plugin manager and enable it then go to Config expand Album list view - the content of the main page and add onlinestats like this "breadcrumb/catlist/alblist/onlinestats" or similar.

Default plugins, how to enable, install etc http://documentation.coppermine-gallery.net/en/plugins.htm
The content of the main page http://documentation.coppermine-gallery.net/en/configuration.htm#admin_album_list_content

BTW the sample plugin from the plugins folder of your coppermine is just a sample in case you want to create a plugin for coppermine. It is just meant to demonstrate what plugins can do and how to code them http://documentation.coppermine-gallery.net/en/plugins.htm#plugin_bundled_sample

Ludger

I have a technical question concerning this plugin: Is there a good reason for setting the constant PLUGINMGR_PHP to true all the times in codebase.php, line 20?

if (!defined('PLUGINMGR_PHP')) {
    define('PLUGINMGR_PHP', true);

If I am not totally wrong, this defies the purpose of that constant. Other plugins cannot detect anymore if they are in Pluginmanager-Screen. The constant is always on. I cannot see the constant PLUGINMGR_PHP being used anywhere in that plugin except the language files...

ron4mac

#3
Quote from: Ludger on January 03, 2018, 12:12:13 AM
Is there a good reason for setting the constant PLUGINMGR_PHP to true all the times in codebase.php, line 20?
It is just for the language file(s) to be loaded. I had the same problem thinking I could use that to determine if I was being called by the plugin manager.
http://forum.coppermine-gallery.net/index.php/topic,75994.msg382158.html#msg382158
The truth is, that define (and others like it) was not designed to declare that a certain PHP script is loaded ... only that the language files need to be loaded.

I got around the issue by setting a flag for myself if some specific function from that manager is present:
// note whether we are being called from the plugin manager
$h5ss_ipm = function_exists('display_plugin_list');

Alternatively:
global $CPG_PHP_SELF;
$in_pm = (pathinfo($CPG_PHP_SELF, PATHINFO_BASENAME) == 'pluginmgr.php');

Ludger

Thank you, Ron.
Option 2 helped...