Simplesolutions.dk plugins updated to CMSimple XH 1.7

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

Moderator: Tata

Holger
Site Admin
Posts: 2898
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany
Contact:

Bug in Newsletter-Plugin

Post by Holger » Fri Jul 20, 2018 5:55 pm

Hi jerry,

maybe you remember that I have made some paid installation with your Newsletter-Plugin.

Now I've made a test with your latest version 2.4.2. and there is a bug with the generated confirmation link in the mail. The link only contains "//example.com/...", without protocol.
The problem is in index.php, line 188:

Code: Select all

$subscribe.=newsletter_subscription_mail($subscribermail, $plugin_tx['newsletter']['subscribe_confirm_subject'],$plugin_tx['newsletter']['subscribe_confirm'],'//'.$_SERVER['HTTP_HOST'].$sn."?newsletterconfirm&cnf=".$confirm_str);

Fix:

Code: Select all

$subscribe.=newsletter_subscription_mail($subscribermail, $plugin_tx['newsletter']['subscribe_confirm_subject'],$plugin_tx['newsletter']['subscribe_confirm'],CMSIMPLE_URL."?newsletterconfirm&cnf=".$confirm_str);
Using CMSIMPLE_URL should do the trick ;) .

Edit: beside this, $subject is broken if it contains special characters (tested with PHP 7.2.0). Seems to be an issue with PHPMailer - Version :? .

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

Re: Simplesolutions.dk plugins updated to CMSimple XH 1.7

Post by Tata » Sat Oct 13, 2018 9:40 pm

How/where in add-comment.php shall be changed the path, so thet the plugin would work also if installed on a subdomain?
On my server all subdomains (mostly test-webpages) are installed as subfolders in /public_html/_sub, where the /public_html is the root of main CMSimple_XH installation and the _sub is the folder for created subdomains.
If installed in root, posts are only published if the none security is configured. Otherway the author receives the confirmation e-mail, but in backend nothing is to be approved, nor the comment is there. Both textareas (authorisations and comments) are empty.
Running with CMSimple_XH 1.7.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.

simpleSolutions.dk
Posts: 151
Joined: Thu Oct 06, 2011 7:00 am

Re: Simplesolutions.dk plugins updated to CMSimple XH 1.7

Post by simpleSolutions.dk » Sun Oct 14, 2018 10:02 pm

Hi Tata
It¨s now on mine todo list. I'm not sure it can bo solved in the easy way, as comments uses ajax which again requires an absolute path to your domain.

I have just tested the plugin with security level "user" enabled, and a new user was created after the new user replied an confirmation e-mail and the comment is visible on the list. To admin approve of the new user you have to use security level "admin". I need more information to help.

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

Re: Simplesolutions.dk plugins updated to CMSimple XH 1.7

Post by cmb » Tue Oct 16, 2018 9:04 am

simpleSolutions.dk wrote:
Sun Oct 14, 2018 10:02 pm
I'm not sure it can bo solved in the easy way, as comments uses ajax which again requires an absolute path to your domain.
It seems to me the generally simplest way to solve such issues is to avoid stand-alone PHP scripts; i.e. don't post to add-comments.php, but rather to "$sn?add_comment" or so, and handle these requests in index.php of the plugin, where all CMSimple_XH variables and functions are readily available. Before sending any output, just make sure that all existing output buffers are purged. See also https://wiki.cmsimple-xh.org/doku.php/p ... cript#ajax.
Christoph M. Becker –Plugins for CMSimple_XH

Post Reply