Page 1 of 1

Template variables replacing

Posted: 06 Sep 2017, 18:04
by Dpx
Hi !

I am looking for the files that include the string replacement fonctions to replace the %VARIABLES% form the template before sending the email.

I found the variables I wish to modify but can't find where the value is replaced.


In fact, what I am trying to do is change the links in the templates email to put an HTTPS instead of an HTTP in the link. maybe there is an easier way to do it !

The implied variable is %CANCATSURL%


thank you very much !


Daniel Pelletier

Re: Template variables replacing

Posted: 07 Sep 2017, 11:06
by RussH
Hi Daniel,

https://github.com/opencats/OpenCATS/bl ... atesUI.php - the section starts at line 1222
Code: Select all
                /* Replace e-mail template variables. */
                $stringsToFind = array(
                    '%CANDOWNER%',
                    '%CANDFIRSTNAME%',
                    '%CANDFULLNAME%',
                    '%CANDCATSURL%'
                );
                $replacementStrings = array(
                    $ownerDetails['fullName'],
                    $candidateDetails['firstName'],
                    $candidateDetails['firstName'] . ' ' . $candidateDetails['lastName'],
                    '<a href="http://' . $_SERVER['HTTP_HOST'] . substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], '?')) . '?m=candidates&a=show&candidateID=' . $candidateID . '">'.
                        'http://' . $_SERVER['HTTP_HOST'] . substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], '?')) . '?m=candidates&a=show&candidateID=' . $candidateID . '</a>'
                );

Re: Template variables replacing

Posted: 23 Sep 2017, 12:53
by cptr13
Documentation reminder