Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Contextual Forum Subscriptions Hack Details »»
Contextual Forum Subscriptions Hack
Version: 1.00, by kippesp kippesp is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-19-2002 Last Update: Never Installs: 7
 
No support by the author.

This hack is similar to the "2.0 Email new thread notifictions to subscribed users" hack by chrispadfield. My hack is an enhanced replacement to the Padfield hack.

Without this hack, subscribing to a forum does nothing but add the forum to one's user CP. By installing this hack, an email will be sent with the post's content when a new thread is posted.

The major differences between this hack and the Padfield hack are:[list=1][*]Email notification contains the posted text.[*]When posting a new thread to moderated forums, notification will be delayed until the thread is approved. This also works with Wayne Luke's moderate user hack.[/list=1]This hack has been tested on vBulletin 2.2.1 through 2.2.5.

Post any problems/suggestions here. My users like it as is but would appreciate any improvement.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 11-01-2002, 03:48 PM
mkunichi mkunichi is offline
 
Join Date: Oct 2002
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Given that it had been almost 6 months since the last post, I was just wondering if this hack had been superceded by another, better one.
Reply With Quote
  #33  
Old 11-01-2002, 09:21 PM
kippesp kippesp is offline
 
Join Date: Jan 2002
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've made no updates. The only enhancement I can think of would be to fix it to work with polls. Creating a new poll doesn't send out an email.
Reply With Quote
  #34  
Old 12-02-2002, 05:41 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

STEP 2
(newthread.php) Find the following code
PHP Code:
              eval("\$emailmsg = \"".gettemplate("email_moderator",1,0)."\";");
              eval(
"\$emailsubject = \"".gettemplate("emailsubject_moderator",1,0)."\";");
              
mail($toemail,$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>");
            }
          }
        }
      } 
That is no longer how this code appears. It is now
PHP Code:
              eval("\$emailmsg = \"".gettemplate("email_moderator",1,0)."\";");
              eval(
"\$emailsubject = \"".gettemplate("emailsubject_moderator",1,0)."\";");
              
mail($val,$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>");
            }
          }
          
$bbuserinfo['username'] = htmlspecialchars($bbuserinfo['username']);
        }
      } 
Will the current hack work with 2.2.9?
Reply With Quote
  #35  
Old 12-02-2002, 06:10 AM
kippesp kippesp is offline
 
Join Date: Jan 2002
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, it should work fine. I think the code in this area was first changed in 2.2.7. At least that's what my logs show without tracking down the real ZIP file.

So this line was added between 2.2.6 and 2.2.7:
$bbuserinfo['username'] = htmlspecialchars($bbuserinfo['username']);

The hack addition would still go after the 4th brace in that area--the 2nd brace after the above, quoted line.

Although I have yet to upgrade my forums--don't tell anyone--from your post, at least this area should be fine.

I'm very glad to see that this hack will no longer be necessary in vb3! I think vb3 has its own version anyway.

Paul
Reply With Quote
  #36  
Old 12-02-2002, 06:24 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've had this hack in my forums since 2.2.1 up to 2.2.7. For some reason I just noticed that extra line of code and wanted to check after I upgraded to 2.2.9
Reply With Quote
  #37  
Old 01-25-2003, 10:38 PM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great except for one problem
see below how would someone get the thread to send out links instead of the vb code url and /url

take out the a's before url and that is what shows up in email, shows up with the url vb code tags, anyway to fix that


Quote:
Hello Sparky,

RWH Admin has just started the following thread, "Servers Back Online", in the forum "Important Notices / Outages / Virus Alerts" on RWH Forums.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Update: - Some reports are coming in that there is a major US DOS attack that seems to off orginated or has affected Microsoft SQL servers, and its affecting the rest of the net. We will keep you informed and hope to see this fixed as quickly as you do.
We are monitoring massive Distributed Denial of Service attacks all over the U.S. tonight starting at around 11:30 PM CST. As many as 5 of the 13 root name server have been down, up to 10 with massive packet loss (xx%):
All servers should be back up to full speed now.

- [aURL=http://abcnews.go.com/wire/Politics/ap20030125_423.html]ABC[/aURL]
- [aURL=http://europe.cnn.com/2003/TECH/internet/01/25/internet.attack/index.html]CNN[/aURL]
- [aURL=http://www.cbsnews.com/stories/2003/01/25/tech/main537959.shtml]CBS[/aURL]
- [aURL=http://news.bbc.co.uk/1/hi/technology/2693925.stm]BBC[/aURL]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This thread is located at:
http://forums.realwebhost.net/showth...8&goto=newpost

To unsubscribe from this forum, please visit this page:
http://forums.realwebhost.net/member...usub&forumid=3

Yours,
RWH Forums Team

Reply With Quote
  #38  
Old 01-27-2003, 03:17 AM
kippesp kippesp is offline
 
Join Date: Jan 2002
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Personally, I like the markup since it doesn't change the meaning. But this should do the trick:

In newthread.php, find my hacked like:
Code:
$postcontents=unhtmlspecialchars($message);
and change it to:
Code:
$postcontents=strip_tags(bbcodeparse2(unhtmlspecialchars($message),1,1,0,1));
I've not tested this, but it may get you what you want. If you've changed it to send out HTML email, you'll want to not use the strip_tags function.
Reply With Quote
  #39  
Old 02-14-2003, 01:51 PM
VBullDC VBullDC is offline
 
Join Date: Jan 2003
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a question for the forum. I installed this Hack and love it -- it worked a few weeks ago when someone posted a very short message (like 300 characters). All who were subscribed to the specific forum received the email alert.

Today, however, someone posted a message (which was about 12,000 characters) and the message wasn't emailed out to folks subscribed to the forum.

The only difference in the messages that I can see is the length of the posting.

Does anyone have *any* insight into what might have happened this time around?

I haven't changed any of the vBulletin set-up in the time between the first post and the second. I installed the Hack on 1/17/2003 and am running vBulletin 2.2.8.

Thanks!
Reply With Quote
  #40  
Old 03-05-2003, 07:34 PM
VBullDC VBullDC is offline
 
Join Date: Jan 2003
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I posted #38 and didn't hear back from anyone....

I installed this hack and it worked several times. Nothing has changed on my board (it's just been running along, all fine), and I haven't installed any hacks or anything new.

But now the hack doesn't work. If someone posts to a forum I'm subscribed to, I don't get the email alert.

If anyone is out there and can help me I'd really appreciate it.

Thanks a lot.
Reply With Quote
  #41  
Old 03-11-2003, 01:19 PM
mashby's Avatar
mashby mashby is offline
 
Join Date: Jan 2002
Location: Nashville, TN - USA
Posts: 736
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just installed on my board [link] and it works like a charm! Nice work, thank you very much.

Any chance of adding the Poll feature soon. If so, this would be a perfect hack!
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 05:14 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.04577 seconds
  • Memory Usage 2,322KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete