Plugin repository

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

Moderator: Tata

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

Plugin repository

Post by Tata » Thu May 28, 2020 9:41 pm

I have built locally a webpage with almost all available plugins. Some of them needed adjustment to work with v.1.7.2.
Now the administration of almost all plugins is accessible. Anyway, some of the plugins work not as expected or donät work at all.
More heads means more knowledge. So I have uploaded the website to http://cmsimple.sk/plugins-172. If you are interested, have a look evt. write me for the password.
Any comment/advise is appreciated.
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.

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

Re: Plugin repository

Post by Tata » Tue Jun 02, 2020 11:03 pm

After reviewwin installed plugins, I also reviewed and completed SK translation to all installed plugins.
I have found however, that the pdfviewer doesn't work. It either loads only the viewer and no file in it or returns the warning about failed writing in tmp file. The Gallery collection also shows some problems.
If you are interested, you may download language files from the page.
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.

mhz
Posts: 625
Joined: Tue Jun 25, 2013 8:46 pm
Location: Heusenstamm, Hessen
Contact:

Re: Plugin repository

Post by mhz » Wed Jun 10, 2020 7:20 pm

If I write the name of the working plugin "imgrotator" into the search field, this will happen:
Fatal error: Cannot declare class Mobile_Detect, because the name is already in use in /www/c/m/u13296/public_html/plugins-172/plugins/shariff/lib/Mobile_Detect.php on line 28
Cannot declare class Mobile_Detect, because the name is already in use in /www/c/m/u13296/public_html/plugins-172/plugins/shariff/lib/Mobile_Detect.php on line 28
And it also happens with other names.
Michael Zajusch (mhz)-- Mein Tutorial für CMSimple_XH. Früher

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

Re: Plugin repository

Post by Tata » Wed Jun 10, 2020 7:29 pm

Well, I haven't tested the search function. All plugins are sorted alphabetically and categoriezed by the author. So the search function is not necessary. I also can't say, what the message does mean. Will see, what I find.
But, anyway, thanks for the announce.
EDIT:
It seems to me that theere is something redundant in shariff plugin. And that's something I doubt to find, as I don't understand fully the plugin.
Also - one more time - not all plugins are fully compatible either with CMSimple_XH v1.7.2 or with all PHP versions. Right now I am testing them with PHP 7.3.9 and 7.4.2.
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.

mhz
Posts: 625
Joined: Tue Jun 25, 2013 8:46 pm
Location: Heusenstamm, Hessen
Contact:

Re: Plugin repository

Post by mhz » Wed Jun 10, 2020 8:18 pm

What do you mean with " the pdfviewer doesn't work"?
https://tutor-test.cmsimplexh.de/?neue-Plugins
Here it works. The only thing is the small iframe window. Click on the right side at > and there on the button "Präsentationsmodus".
I have the version 1.0.0
PHP 7.4 does not work or I get the announcement :Bad Gateway 502
Michael Zajusch (mhz)-- Mein Tutorial für CMSimple_XH. Früher

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

Re: Plugin repository

Post by Tata » Wed Jun 10, 2020 8:33 pm

Yes, it works already. With PHP v7.4.x, there are more serious problems.
See here: viewtopic.php?f=10&t=13307&p=75783&hilit=php+7.4#p75788
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.

dsteuer
Posts: 38
Joined: Mon Mar 08, 2010 3:09 pm

Re: Plugin repository

Post by dsteuer » Thu Jun 11, 2020 9:01 am

Thank you for the effort!
I find this an incredibly useful resource!

Detlef

cmb
Posts: 13341
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Plugin repository

Post by cmb » Thu Jun 11, 2020 12:03 pm

mhz wrote:
Wed Jun 10, 2020 7:20 pm
If I write the name of the working plugin "imgrotator" into the search field, this will happen:
Fatal error: Cannot declare class Mobile_Detect, because the name is already in use in /www/c/m/u13296/public_html/plugins-172/plugins/shariff/lib/Mobile_Detect.php on line 28
Cannot declare class Mobile_Detect, because the name is already in use in /www/c/m/u13296/public_html/plugins-172/plugins/shariff/lib/Mobile_Detect.php on line 28
And it also happens with other names.
The problem is that both cmsimplemobile and shariff use the same class Mobile_Detect, but both ship it as separate file. Both plugins appear to properly handle the file inclusion for themselves, but they are not compatible with each other.

A quick fix might be to replace the following line in plugins/shariff/index.php (there are two occurences):

Code: Select all

    require_once ($pth['folder']['plugins'] . 'shariff/lib/Mobile_Detect.php');
with

Code: Select all

if (!class_exists('Mobile_Detect', false)) {
    require_once ($pth['folder']['plugins'] . 'shariff/lib/Mobile_Detect.php');
}
So if Mobile_Detect is alreay loaded by cmsimplemobile, shariff won't attempt to load it, but rather to use cmsimplemobile's class instead.

A better (albeit not perfect) solution would be that both plugins actually rely on autoloading; i.e. place Mobile_Detect.php in plugins/cmsimplemobile/classes/ and plugins/shariff/classes/, and to not explicitly require_once the file.

Maybe even better, both plugins could place the Mobile_Detect class in their own namespace.

PS: oh! Autoloading requires namespacing anyway.
Last edited by cmb on Thu Jun 11, 2020 12:12 pm, edited 1 time in total.
Reason: added PS
Christoph M. Becker – Plugins for CMSimple_XH

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

Re: Plugin repository

Post by Tata » Fri Jun 12, 2020 9:13 am

cmb wrote:
Thu Jun 11, 2020 12:03 pm
A quick fix might be to replace the following line in plugins/shariff/index.php (there are two occurences):

Code: Select all

    require_once ($pth['folder']['plugins'] . 'shariff/lib/Mobile_Detect.php');
with

Code: Select all

if (!class_exists('Mobile_Detect', false)) {
    require_once ($pth['folder']['plugins'] . 'shariff/lib/Mobile_Detect.php');
}
This works perfectly. THX.
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.

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

Re: Plugin repository

Post by Tata » Fri Jun 12, 2020 3:44 pm

TEST: comments von jerry
Am localhost:
Warning: include_once(/Users/msereday/testhost/plugins/comments/languages/en.php): failed to open stream: No such file or directory in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 14

Warning: include_once(): Failed opening '/Users/msereday/testhost/plugins/comments/languages/en.php' for inclusion (include_path='.:/Applications/MAMP/bin/php/php7.3.9/lib/php') in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 14

Warning: include_once(/Users/msereday/testhost/plugins/comments/config/config.php): failed to open stream: No such file or directory in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 15

Warning: include_once(): Failed opening '/Users/msereday/testhost/plugins/comments/config/config.php' for inclusion (include_path='.:/Applications/MAMP/bin/php/php7.3.9/lib/php') in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 15

Notice: Undefined variable: plugin_cf in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 19

Notice: date_default_timezone_set(): Timezone ID '' is invalid in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 19

Notice: Undefined variable: plugin_cf in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 20

Warning: time() expects exactly 0 parameters, 1 given in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 20

Notice: Undefined variable: plugin_cf in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 29

Notice: Undefined variable: plugin_cf in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 45

Notice: Undefined variable: plugin_tx in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 53
Das gleiche am HostServer. Da fehlt der Ordner, wo die Installation steht. Am Localhost sollte es lauten z.B.:
/Users/msereday/testhost/plugins-172/plugins/comments/config/config.php
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