vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Send Part of User's Reply with Email Notification (https://vborg.vbsupport.ru/showthread.php?t=34912)

Logician 02-08-2002 10:00 PM

Hiyas,

I dont like static email notifications and fancy coloring them up a bit. So this hack is one way to do it. (If I can spare time, more is likely to follow) ;)

This hack simply sends a small portion of user's reply to thread subscribers in their notification mail. It's also possible to send the whole reply, but I dont suggest this, because if they read it all, they wont visit the original thread. But just giving a hint and sending a few lines can be provoking to get them to your board ASAP.

It's an easy to install hack and you can easily customize it by choosing how many characters of the reply will be sent to the members.

I use this hack in V.2.2.2 and havent noticed any problems. Please report bugs in this thread..

Enjoy! \\=^))

Regards,
Logician

haas 02-09-2002 03:35 PM

Sounds interesting... Anything for get the members back :D

dost 02-09-2002 04:01 PM

Nice hack thanks, I'll try it. Does it strip vB code? If not, can you please add that feature.

Thanks

Logician 02-13-2002 08:51 AM

Hey there,

Quote:

Originally posted by dost
Does it strip vB code? If not, can you please add that feature.

Striping the VB code feature is not very easy to add. ;) I am adding other hacks to my board at the moment (and sharing them here) and if can find time for your request, I'll let you know.. :cool:

Regards,
Logician

djr 07-05-2002 10:32 PM

Logician,

Great hack! Very helpful to keep the users visiting the forums.

A question though: one of my mods is restricted to surf the web at his work, but is able to receive e-mail.

I want to enable full message posting for him, but limited to 50 chars for all other visitors.
I've tried the following code in newreply.php, but to no avail:
Code:

    if ($visible) {
                if ($bbuserinfo[userid]==xxx) {
                // LOGICIAN SEND PART OF USER REPLY WITH EMAIL NOTIFICATION HACK
                $logic_mes_sum= $message;
                } else {
                $logic_mes_sum= substr($message, 0, 50)."... ";
                }
                // LOGICIAN SEND PART OF USER REPLY WITH EMAIL NOTIFICATION HACK
                  sendnotification ($threadinfo['threadid'], $bbuserinfo['userid'], 0);
                    }

How can I enable full extracts for this specific user, but limited extracts for all others?

Logician 07-06-2002 07:26 AM

Quote:

Originally posted by djr
How can I enable full extracts for this specific user, but limited extracts for all others?
What you did it is uncorrect. (Revert your modification to original)You have to edit admin/functions:

Find:

PHP Code:

$touser['username']=unhtmlspecialchars($touser['username']); 

After that replace the part:

PHP Code:

 eval("\$emailmsg = \"".gettemplate("email_notify",1,0)."\";");
    eval(
"\$emailsubject = \"".gettemplate("emailsubject_notify",1,0)."\";");

    
mail($touser[email],$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>"); 

As:

PHP Code:


if ($touser['userid']==X){
eval(
"\$emailmsg = \"".gettemplate("email_notify_special",1,0)."\";");
    eval(
"\$emailsubject = \"".gettemplate("emailsubject_notify",1,0)."\";");

    
mail($touser[email],$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>");

}
else
{
eval(
"\$emailmsg = \"".gettemplate("email_notify",1,0)."\";");
    eval(
"\$emailsubject = \"".gettemplate("emailsubject_notify",1,0)."\";");

    
mail($touser[email],$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>");


(Replace X with userid of your special user.)

Now add a new template named email_notify_special, the content is same with email_notify template, just one modification:
Replace $logic_mes_sum as $message in the new template.

I didnt test this but it should work..

Enjoy.. :)
Logician

djr 07-06-2002 10:16 PM

Logician,

Thank you, that worked flawlessly! :cool:

I had ofcourse reverted all my changes to your hack, because it gave me some errors. With this update the whole contents of the reply is sent by e-mail (tested on myself).

Again, great hack and great update! Thank you for quick reponse.

- djr

Massiel 07-07-2002 11:47 AM

Does this work with 2.2.6??

djr 07-07-2002 12:41 PM

yep, got 2.2.6 installed myself

MalaK_3araby 09-12-2002 10:21 PM

Logician ... Thanks man.


All times are GMT. The time now is 01:53 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01042 seconds
  • Memory Usage 1,752KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete