OpenCATS 0.9.4-3

Free, Open-Source Applicant Tracking System including job-board. Entirely customisable!

Please describe the issue you're having
If you accept the answer, please mark the topic as [SOLVED] by clicking the tick.

Moderators: RussH, cptr13

Forum rules: Just please remember to play nicely once you walk through the door. You can disagree with us, or any other commenters in this forum, but respect our space and keep your comments directed to the topic at hand.
Varables don't appear to work in opencats/modules/candidates/CandidatesUI.php?

$stringsToFind = array(
$replacementStrings = array(
$candidateData['firstName'] . ' ' . $candidateData['lastName'],
$statusChangeTemplate = str_replace(

- Update: After looking at the code and trying the change ownership option in edit, I see that the variable replacement routine is applied to the change ownership template which is automatically emailed. I’ll try replicating the change variable section elsewhere in cantidatesui.php, unless there is already a suggested modification?
I'm no developer, although I can handle minor HTML and PHP tweaks etc. However, I have now spent about 30 hours trying to setup variables in emails sent from the candidate selection grid. I readily confess that I am way out of my depth and have now given up. After trying simpler iterations, my last 'attempt' is:

Public function defined in mailer.php, just above "public function mail(":

public function candid($recipients)
$em = $recipients[$key][1];

$sql = sprintf(
email1 = '$em'",

return $this->_db->query($sql);

$this->_mailer->Body = '<div style="font: normal normal 12px Arial, Tahoma, sans-serif">'
. str_replace("firstname", $this, $body) . '</div>';

Code added to "public function mail(":

$this->_mailer->AddReplyTo($replyTo[0], $replyTo[1]);

candid($recipients, $cid);

$this->_mailer->Body = '<div style="font: normal normal 12px Arial, Tahoma, sans-serif">'
. str_replace("firstname", $cid, $body) . '</div>';

if (!$this->_mailer->Send())

All I require is a variable for candidate_ID and first_name from the candidate table. I have been using CandidATS and it appears that I will need to keep using it as it allows variables in a custom template. :(
Okay, I have finally created my variables. Even though I could not get EMail Templates Support #231 ( to display the selected template in the message body box, I was still able to paste in a template and send the emails. On the EMail Template Configuration page, I then changed the Candidate Owner button to Candidate ID by finding references to %CANDOWNER% here ,and changing them to %CANDID% (my new template variable). At some point I will add Candidate Owner back in by copying and adding where required, however, for now, I have my candidate_ID (name of field in candidate table) variable.

At some point, I hope that someone else addresses the templates not actually appearing in the message body box. I also notice that emails sent are not logged in the candidate's activity. As a workaround for the latter, I have also added a bcc in mailer.php which sends emails to At least I therefore have a record in my email of everything sent.

Please excuse the roughness of this email , it has been a long 4 days........
User avatar
By RussH
Sorry - I've replied to a separate thread on this.. How are things working for you now?
How to enable and use ACL

Not sure if still needed, I found this as I am wor[…]

现在玩 北美传奇 的人都讲究情怀什么的,也对啊,传奇从画面上来说现在可能并不出众,甚至已经远远落[…]

Automatic database Backup

Read all the trending news in India in Hindi. Know[…]

Bulk resume upload not working

Hi there I tried to install the openCATS in my loc[…]

Quick Search BOX

unique gifts for dad , best gifts for couples, gif[…]

PPS. .... we have changed all the login .. applica[…]

PS.... Also you will notice the below in the orig[…]