I made a simple mod to only allow registered users to email a story. I did this since the email comes from the pligg email address in the language file. You never know what kind of crap might end up being sent by anonymous users and associated with your pligg email address.
Check it out at: favester.com
Just click "Email this Website"
I also changed the code to produce a much friendlier email. If you have looked at what gets generated by the install, you know it is pretty ugly. You will have to register at my site and send yourself and email of a story to see how it works. That mod will work for registered or anonymous users if you decide to not implement the mod above.
Anyway, if anyone wants it, let me know and I will post it.
kb
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| |
| The Following User Says Thank You to kahunabear For This Useful Post: | ||
| ||||
|
you can change the email address the email comes from. And you really didn't have to write a mod to let only registered users use the tell a friend. All you would have had to do is use an if statement around the tell a friend link. Like {if authenticated eq "true"} tell a friend link {/if}
__________________ I accept donations for my time helping users like you on the forum and IRC. |
| |||
|
kbeeveer46, Nice. What does that do when they try to click it ? This displays a message that they need to register. And it is a three liner too, so no biggie. Others may want the changes I made to the message itself, since the standard one is pretty ugly. Again, simple mod, but makes a much nicer message. Thanks kb |
| |||
|
I made these changes to recommend.php: To display a message that you must be logged in: Before: Code: if(isset($requestTitle)){
$requestID = $db->get_var("SELECT link_id FROM " . table_links . " WHERE `link_title_url` = '$requestTitle';");
}else{
if(!is_numeric($requestID)){
$requestID = $db->get_var("SELECT link_id FROM " . table_links . " WHERE `link_title_url` = '$requestID';");
}
}
if(!isset($_REQUEST['email_to_submit'])){ // we're not submitting the form
After: Code: if(isset($requestTitle)){
$requestID = $db->get_var("SELECT link_id FROM " . table_links . " WHERE `link_title_url` = '$requestTitle';");
}else{
if(!is_numeric($requestID)){
$requestID = $db->get_var("SELECT link_id FROM " . table_links . " WHERE `link_title_url` = '$requestID';");
}
}
if (!$current_user->user_login){
echo "<br>Must be logged in to email.<br>";
return;
}
if(!isset($_REQUEST['email_to_submit'])){ // we're not submitting the form
To make a more readable email message: Before: Code: $body = $message . "\r\n" . Included_Text_Part1 . $current_user->user_login . Included_Text_Part2 . $link_url . ' "' . $link->title . '" ' . $link->content; Code: if ($current_user->user_login){
$body = $message . "\r\n\r\n" . Included_Text_Part1 ."\r\n\r\n". $current_user->user_login .", ". Included_Text_Part2 ." ".$link->title." - " .$link->content."\r\n\r\n" ."Here is a link to the story: ". $link_url;
}
else{
$body = $message . "\r\n\r\n" . Included_Text_Part1 ."\r\n\r\nAnonymous, ". Included_Text_Part2 ." ".$link->title." - " .$link->content."\r\n\r\n" ."Here is a link to the story: ". $link_url;
}
kb favester.com Last edited by kahunabear; 02-06-2007 at 08:47 PM.. |
| The Following 5 Users Say Thank You to kahunabear For This Useful Post: | ||
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| mail: "there is a new comment in your story" | inggenia | Modification Tutorials | 73 | 10-30-2008 05:03 PM |
| No users on YGET Manage Users page | JAPUNDIT | Bug Report | 2 | 08-02-2008 01:09 AM |
| How to check if a registering user's email is valid? | rhythm | General Help | 26 | 01-10-2008 06:58 PM |
| users email on "send to friend" | chad90382 | Suggestions | 9 | 11-18-2007 12:46 PM |
| I can populate your site with users | Pligglet | Off-topic | 0 | 10-10-2007 12:49 AM |




Linear Mode

