1. Reverse any changes you made to the websignup.inc.php file.
2a. Create a new plugin named "Webuser_ref_link" (without the quotes) with the code below (note the <?php tag is there for highlighting purposes only and should not be included in the plugin).
<?php // do not include this line
// Handle event
$e = &$modx->Event;
switch ($e->name) {
case 'OnWebSaveUser':
if($mode =='new'){
$webuser_ref_string ='<a href="http://www.chollocity.com/?ref='.$userid.'">Use this link to invite friends</a>';
$modx->setPlaceholder('Webuser_ref_link', $webuser_ref_string);
// add the placeholder below to your signup form notification template in the spot where
// you want the string to print:
// [+Webuser_ref_link+]
}
break;
default: '';
return;
}
2b. On the System Events tab, make sure and add a check beside "OnWebSaveUser". Click Save.
3. Now just add the placeholder [+Webuser_ref_link+] to the signup notification section of the template you are using. I modified the websignup.inc.php file around line 496 just to make sure the concept worked, but a better method would be to create a new chunk with the signup template and modify. The chunk method would allow easier future upgrades.
ex:
<hr>
<!-- notification section -->
<span style="font-weight:bold;">Signup completed successfully</span><br />
Your account was successfully created.<br />
A copy of your signup information was sent to your email address.<br /><br />
<p>[+Webuser_ref_link+]</p>
<?php
$t = ob_get_contents();