Online plugin

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

lck
Posts: 3358
Joined: Wed Mar 23, 2011 11:43 am
Contact:

Re: Online plugin

Post by lck » Tue Oct 29, 2024 6:01 pm

jop wrote:
Tue Oct 29, 2024 4:55 pm
Yes using fhs-simple-2019 and everything works perfectly now - thank you so much (again).
👍🏻
Please test extensively. I am not a PHP expert.
👉 Ludwig's Templates for MultiPage & OnePage.   „Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“

jop
Posts: 107
Joined: Sun Sep 20, 2009 1:05 pm

Re: Online plugin

Post by jop » Mon Dec 09, 2024 6:18 pm

Online plugin unfortunately does not count the number of online visitors (but no longer destroys the website). Does anyone know if it works?

lck
Posts: 3358
Joined: Wed Mar 23, 2011 11:43 am
Contact:

Re: Online plugin

Post by lck » Tue Dec 10, 2024 1:29 pm

jop wrote:
Mon Dec 09, 2024 6:18 pm
Online plugin unfortunately does not count the number of online visitors
Are there any error messages in debug mode or in the browser console? The plugin is already very old, could also be a PHP problem.
👉 Ludwig's Templates for MultiPage & OnePage.   „Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“

jop
Posts: 107
Joined: Sun Sep 20, 2009 1:05 pm

Re: Online plugin

Post by jop » Tue Dec 10, 2024 4:52 pm

No error messages in the browser console unfortunately.
No useful messages in debug mode I assume [6]:
XHdebug.txt.png
This forum also shows "Who is online" and "In total there are x users online" - is it possible to use this solution in CMSimple_XH?
You do not have the required permissions to view the files attached to this post.

lck
Posts: 3358
Joined: Wed Mar 23, 2011 11:43 am
Contact:

Re: Online plugin

Post by lck » Tue Dec 10, 2024 5:17 pm

jop wrote:
Tue Dec 10, 2024 4:52 pm
No error messages in the browser console unfortunately.
No useful messages in debug mode I assume [6]:
Have you activated debug mode? You have to rename the XHdebug.txt to _XHdebug.txt.
jop wrote:
Tue Dec 10, 2024 4:52 pm
This forum also shows "Who is online" and "In total there are x users online" - is it possible to use this solution in CMSimple_XH?
I don't know, maybe Olaf.

You can also test this customized version.
online_1.0.7_mod-lck_v2.zip
Last edited by lck on Wed Dec 11, 2024 11:21 am, edited 1 time in total.
👉 Ludwig's Templates for MultiPage & OnePage.   „Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“

olape
Posts: 3256
Joined: Fri Mar 13, 2015 8:47 am
Contact:

Re: Online plugin

Post by olape » Tue Dec 10, 2024 7:57 pm

jop wrote:
Tue Dec 10, 2024 4:52 pm
This forum also shows "Who is online" and "In total there are x users online" - is it possible to use this solution in CMSimple_XH?
I don't think so.
phpBB is not CMSimple_XH.
Gruß Olaf, Plugins for CMSimple_XH

Ich habe schon lange den Verdacht, dass so viele so eifrig auf Gender, Trans und Queer machen:
Weil sie für das Fachliche ganz einfach zu doof sind.

Tata
Posts: 3626
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Online plugin

Post by Tata » Tue Dec 10, 2024 10:48 pm

Yet, all named ones online are registered in this forum. And the data are read from the database. How shall the CMSimple_XH know the nick of a visitor? It would require register plugin at least and rewrite the the online plugin so it would read the registered members.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

olape
Posts: 3256
Joined: Fri Mar 13, 2015 8:47 am
Contact:

Re: Online plugin

Post by olape » Wed Dec 11, 2024 10:19 am

online_1_08_dev_b.zip
You do not have the required permissions to view the files attached to this post.
Gruß Olaf, Plugins for CMSimple_XH

Ich habe schon lange den Verdacht, dass so viele so eifrig auf Gender, Trans und Queer machen:
Weil sie für das Fachliche ganz einfach zu doof sind.

jop
Posts: 107
Joined: Sun Sep 20, 2009 1:05 pm

Re: Online plugin

Post by jop » Wed Dec 11, 2024 11:14 am

This one seems to work fine with me: "online_1_08_dev_b.zip".
Unfortunately couldn't get this to work: "online_1.0.7_mod-lck_v2.zip!"
Thank you very much for all your quick and qualified responses. It's a pleasure.

Tata
Posts: 3626
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Online plugin

Post by Tata » Wed Dec 11, 2024 2:23 pm

This has been discussed here in forum more times in various plugins.
The point are different rules for using plurals in eastern languages. In gneral, eastern languages have two forms:
- plural form for 2,3,4
- plural form for 5+
If the plugin shall be used on such pages, the index.php shall be adjusted:
The code

Code: Select all

    // $o muss initialisiert werden
    $o = "<span class='online'>";
    if ($users == 1) {
        $o .= $plugin_tx['online']['first_part_singular'];
        $o.=" <u>" . $users . "</u> "; // lck
        $o .= $plugin_tx['online']['last_part_singular'];
    } else {
        $o .= $plugin_tx['online']['first_part_plural'];
        $o.=" <u>" . $users . "</u> "; // lck
        $o .= $plugin_tx['online']['last_part_plural'];
    }
    $o .= "</span>";
shall be replaced by

Code: Select all

    $o = "<span class='online'>";
     if ($users==1){
    	$o.=$plugin_tx['online']['first_part_singular'];
    	$o.=" " . $users . " ";
    	$o.= $plugin_tx['online']['last_part_singular'];
    }
    elseif (($users>1)&&($users<5)) {
    	$o.=$plugin_tx['online']['first_part_plural24'];
    	$o.=" " . $users . " ";
    	$o.= $plugin_tx['online']['last_part_plural24'];
    }
    else {
    	$o.=$plugin_tx['online']['first_part_plural5'];
    	$o.=" " . $users . " ";
    	$o.= $plugin_tx['online']['last_part_plural5'];
    }
    $o .= "</span>";
and the language files shall be respectively extended

Code: Select all

$plugin_tx['online']['first_part_singular']="There is";
$plugin_tx['online']['last_part_singular']="online visitor";
$plugin_tx['online']['first_part_plural24']="There are";
$plugin_tx['online']['last_part_plural24']="online visitors";
$plugin_tx['online']['first_part_plural5']="There are"; 
$plugin_tx['online']['last_part_plural5']="online visitors";
In western languages the strings for plural are the same for "24" and "5".
online_1_08_dev_b-eastern-langs.zip
You do not have the required permissions to view the files attached to this post.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Post Reply