Forums

Activation URL in HTML changes when switch to editor

jj135 17 Jul, 2017
Hi! When I put this activation link in the email body to a new registered user:

<p><a href="{url.full:activate$code=(session:activation_code)}">Activate account</a></p>

And the switch to the editor vie and back again the URL has changed to:

<p><a href="https://www.domain.com/administrator/{url.full:activate$code=(session:activation_code)}">Klik om de account te activeren</a></p>

So the editor puts the site URL in front of the URL code. Can this be prevented? Or is there a workaround?

Kind regards,
Jip
Max_admin 20 Jul, 2017
Hi Jip,

I'm aware of this issue but the only fix for now is to keep the editor disabled after the link is inserted, hopefully a fix will be ready in the next update.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jj135 21 Jul, 2017
OK, thanks. I will try to keep away from the editor button for now;-)
Max_admin 21 Jul, 2017
Hi Jip,

No problems, that should be fixed in the next update!🙂

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jj135 24 Jul, 2017
Hi Max,

I am now trying to trigger an AcyMailing newsletter with the activation mail / text. This is working, but I need to get the activation URL in the acymailing newsletter using PHP.

I belive the actiovation code is {session:activation_code} but this is the 'tag' in Chronoforms. How do I use this as a PHP variable to send to Acymailing?

I tried:
$activationCode = $this->data['activation_code'];
$activationCode = $this->session['activation_code'];

But both did not seem to work.

Can you help me to get the activation code in PHP?

And how do I use this activation code in the activation link in the email? I need the full URL to trigger the form again to activate the user when he/she kliks on the link. In the demo form you did something like this:

<a href="https://www.domain.com/administrator/{url.full:activate$code=(session:activation_code)}">Activate</a>

But in Acymailing I can not use the chronoforms tag. So what URL would I need there? how do I replace {url.full:activate$code=(session:activation_code)} with an actual URL? I can use the value of the activation_code (see the first part of my question) but how do I link to the form without the tags? I don;t mind using a fixed URL, as long as I know whta it is ;-)

Hope you can help me out with this.

Kind regards,
Jip
jj135 24 Jul, 2017
I already figured out the URL to use:

https://www.domain.com/?option=com_chronoforms6&chronoform=gebruikersregistratie&action=activate&code=

Now I only need the code to make this complete. How do I get it? (session:activation_code)

Jip
Max_admin 24 Jul, 2017
Answer
1 Likes
Hi Jip,

If you need to get the variable you have in the debugger then you can use:
$this->get("joomla_user3.activation");

For the session you can use \GApp::session()->get("activation_code");

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jj135 25 Jul, 2017
Yep! Got it to work! 😀 Thanks very much.
This topic is locked and no more replies can be posted.