Support Forums

Old 11-09-2006, 01:12 AM   #1
Senior Member
 
frommarcq's Avatar
 
Join Date: Mar 2006
Location: Lille (France)
Posts: 120
Rep Power: 16
frommarcq is on a distinguished road
Arrow ##sitetitle## in 'New User Registration Email'

Hi,

I want to send an automatic Voucher, when a member is registered.
I'll use the 3rd email template for that ('New User Registration Email').
But I wish to have the name of the site, and if possible the URL (I'm managing 5 websites with a common database). Is it possible... and how to ?

Pascal
__________________
68classifieds (V4.0.9Developer)
frommarcq is offline   Reply With Quote
Old 11-09-2006, 07:36 AM   #2
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 2,208
Rep Power: 61
juven14 is a jewel in the rough
Default

For starters you will have to access these templates and add your own replacement text:

<a href="####siteurl####">####sitename####</a>

Then you will have to edit the code in userjoin.php:
PHP Code:
$htmlContent str_replace("##firstname##"$_POST['firstname'], $htmlContent);
$htmlContent str_replace("##lastname##"$_POST['lastname'], $htmlContent);
$htmlContent str_replace("##username##"$_POST['username'], $htmlContent);
$htmlContent str_replace("##password##"$_POST['password'], $htmlContent);
$htmlContent str_replace("##sitename##"$title$htmlContent);
$htmlContent str_replace("##siteurl##"URL$htmlContent);

$textContent str_replace("##firstname##"$_POST['firstname'], $textContent);
$textContent str_replace("##lastname##"$_POST['lastname'], $textContent);
$textContent str_replace("##username##"$title$textContent);
$textContent str_replace("##siteurl##"URL$textContent); 
I'm not sure how you are getting different site names and urls if they are all sharing the same db, but you could do a switch and test for a value which tells you which site your are at and use it to define $title and replace URL with the newly defined $url.

Hope this makes sense it is early and my mind isn't 100% just yet.
__________________
John Snyder
PHP Developer
juven14 is offline   Reply With Quote
Old 11-09-2006, 08:38 AM   #3
Senior Member
 
frommarcq's Avatar
 
Join Date: Mar 2006
Location: Lille (France)
Posts: 120
Rep Power: 16
frommarcq is on a distinguished road
Thumbs up Yesssss !!!!!

it works fine :-)


...And the thursday standing ovation is for John !!!

(Just a little mistake in the code :

Please replace
PHP Code:
$textContent str_replace("##username##"$title$textContent); 
with
PHP Code:
$textContent str_replace("##sitename##"$title$textContent); 
)

Now, when a member is registered, s/he receives 25 � Voucher (5 Vouchers of 5�)... I hope it will generate new ads...
__________________
68classifieds (V4.0.9Developer)
frommarcq is offline   Reply With Quote
Old 11-09-2006, 08:54 AM   #4
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 2,208
Rep Power: 61
juven14 is a jewel in the rough
Default

Yes and I seem to have added a couple extra # in the email template, . Glad it works.
__________________
John Snyder
PHP Developer
juven14 is offline   Reply With Quote
Old 11-09-2006, 10:58 AM   #5
Senior Member
 
frommarcq's Avatar
 
Join Date: Mar 2006
Location: Lille (France)
Posts: 120
Rep Power: 16
frommarcq is on a distinguished road
Default

I wasn't anxious for that !
__________________
68classifieds (V4.0.9Developer)
frommarcq is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Registration email question GSP v3.0 Questions & Support 3 12-20-2007 07:07 PM
User Registration Options BigOrange v3.1 Modules & Modifications 5 10-25-2006 02:24 PM
Direct link to user listing in contact email SkGold v3.1 Questions & Support 2 07-10-2006 02:42 PM
New User Registration e-mail missing in 3.1.x fjarabeck v3.1 Questions & Support 2 05-25-2006 03:28 PM
New user email validation Bucketman v3.0 Questions & Support 3 04-06-2006 10:05 AM


All times are GMT -4. The time now is 04:02 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0