Gossamer Forum
Home : Products : Gossamer Forum : Development, Plugins and Globals :

Re: [shiner] Add "You've got mail!" to your forum

Quote Reply
Re: [shiner] Add "You've got mail!" to your forum In reply to
using the table editor in the admin portion, I added a field called email_greet. By changing the template for user_profile_basic I was able to add the HTML for users to select via radio buttons what e-mail greeting they want. A quick look at MySQLMAN shows that all users have a selection of 0,1,2,3,4 or 5

Here is your code for user_profile_basic.html (edit in the admin console under TEMPLATES > USER TEMPLATES). You can put it anywhere in here after a table row is closed out (</tr>) - so I put it near the bottom.








<tr>
<td align=right>
Select Your E-mail Greeting:<br>
</TD>
<td>
</td>
</tr>

<tr>
<td align=right>
<%GForum::Config::tpl_get($email_greet)%>
<input type="radio" name="email_greet" value="0" <%if email_greet == 0%> checked <%endif%>>

</td>
<td>None</td>
</tr>
<tr>
<td align=right>
<input type="radio" name="email_greet" value="1" <%if email_greet == 1%> checked <%endif%>>
</td>
<td><a href="http://www.yoursite.com/sounds/1.wav">Carl Carlson: You've got mail, baby</a></td>
</tr>

<tr>
<td align=right>
<input type="radio" name="email_greet" value="2" <%if email_greet == 2%> checked <%endif%>>

</td>
<td><a href="http://www.yoursite.com/sounds/2.wav">Rosie the Robot (Jetsons): Mail call!</a>
</td>
</tr>

<tr>
<td align=right>
<input type="radio" name="email_greet" value="3" <%if email_greet == 3%> checked <%endif%>>
</td>
<td><a href="http://www.yoursite.com/sounds/3.wav">The sound of a mail
box door being opened and a woman saying &quot;You've got mail.&quot;</a></td>
</tr>

<tr>
<td align=right>
<input type="radio" name="email_greet" value="4" <%if email_greet == 4%> checked <%endif%>>

</td>
<td><a href="http://www.yoursite.com/sounds/4.wav">David Letterman: Congratulations Skippy, you've got mail.</a></td>
</tr>

<tr>
<td align=right>
<input type="radio" name="email_greet" value="5" <%if email_greet == 5%> checked <%endif%>>
</td>
<td colspan=2><a href="http://www.yoursite.com/sounds/5.wav">Homer Simpson: The
mail! The mail is here!</a></td>
</tr>






Notice, a value of 0 equals no sound. Here is the code for category_list.html - just under the <%body_tag%>. This actually plays the sound that the user selected.








<%unless current_email_greet == 0%>
<%if current_user_new_messages%>
<embed src="http://www.yoursite.com/...email_greet%>.wav" autostart=true hidden=true loop=false>
<%endif%>
<%endunless%>





Last edited by:

shiner: Dec 10, 2002, 7:49 PM
Subject Author Views Date
Thread Add "You've got mail!" to your forum shiner 6939 Jun 19, 2002, 12:44 PM
Thread Re: [shiner] Add "You've got mail!" to your forum
shiner 6712 Sep 12, 2002, 10:15 AM
Thread Post deleted by shiner
shiner 6706 Sep 12, 2002, 12:54 PM
Thread Re: [shiner] Add "You've got mail!" to your forum
ellipsiiis 6693 Sep 12, 2002, 11:24 PM
Thread Post deleted by shiner
shiner 6659 Sep 13, 2002, 7:44 AM
Thread Post deleted by shiner
shiner 6592 Sep 22, 2002, 9:33 PM
Thread Re: [shiner] Add "You've got mail!" to your forum
maxpico 6380 Nov 17, 2002, 7:34 AM
Thread Re: [maxpico] Add "You've got mail!" to your forum
shiner 6348 Nov 18, 2002, 8:09 AM
Thread Re: [shiner] Add "You've got mail!" to your forum
maxpico 6352 Nov 20, 2002, 3:45 AM
Post Re: [maxpico] Add "You've got mail!" to your forum
shiner 6201 Dec 10, 2002, 7:50 PM