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
Details »»

Version: , by mister mister is offline
Developer Last Online: May 2015 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 11-08-2001 Last Update: Never Installs: 4
 
No support by the author.

New Posts in Subscribed Forums
Originaly Released: 11-09-2001
Last Updated: 11-09-2001
Author: mister
Demo: Sorry, no demo...
Installation Instructions are as follows:

1) Backup your database and all forum files, just in case
2) Add this new template

name: error_not_subscribed

stuff:
You are not subscribed to any forums. This search is only for those who are subscribed to forums. You can subscribe to forums by clicking on the 'Subscribe to this forum' link at the top of each individual forum.

3) Edit search.php as noted below

NOTE: All Additions happen in this if-block: if ($action=="getnew") {
If you put them in the other if's (i.e. newdaily, etc) it won't work properly.



FIND:

PHP Code:
if ($action=="getnew") {
  
// generate query
  // do it!
  
if ($bbuserinfo[userid]!=or $bbuserinfo[lastvisit]!=0) {
    
$forumsql=getallforumsql(); 
AFTER IT, PUT THIS:

PHP Code:
//New Subscribed Posts Hack
if ($getsubscribed) {
  
$subscr_where=getsubscribedforumsql();
  if (!
$subscr_where) {
    eval(
"standarderror(\"".gettemplate("error_not_subscribed")."\");");
    exit;
  }
}
//End New Subscribed Posts Hack 

IN THAT SAME "getnew" IF-BLOCK FIND:

PHP Code:
$wheresql="1=1".$forumsql.$datesql;
$wheresql.=" AND thread.open<>10"

AFTER IT, PUT THIS:

PHP Code:
//New Subscribed Posts Hack
if ($getsubscribed) {
  
$wheresql.=" AND thread.forumid IN ".$subscr_where;
}
//End New Subscribed Posts Hack 
PUT THIS SOMEWHERE IN THE FILE:
PHP Code:
// ###################### Start get subscribed forum sql #############
function getsubscribedforumsql() {
   global 
$bbuserinfo,$DB_site;
   
$forums=$DB_site->query("SELECT * FROM forum,subscribeforum WHERE subscribeforum.forumid=forum.forumid AND userid=$bbuserinfo[userid] ORDER BY title");
      
   if (
$DB_site->num_rows($forums)) {
      
$ret '(';
      while (
$forum=$DB_site->fetch_array($forums)) {
         
$ret .= $forum[forumid] . ',';
      }
      
$ret substr($ret,0,strlen($ret)-1);
      
$ret .= ')';
   } else {
      
$ret '';
   }
   return 
$ret;  

4) Edit your forumhome_newposts template

Add this

PHP Code:
 | <a href="search.php?s=$session[sessionhash]&action=getnew&getsubscribed=1">View New Subscribed Posts</a
5) Enjoy!

Show Your Support

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

Comments
  #2  
Old 11-14-2001, 04:08 AM
LuBi LuBi is offline
 
Join Date: Oct 2001
Posts: 416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So what's this do? Search thread your subsribed to..? How do I select which forum to search..? no demo or ss... sounds great but I need more info I'll be sure to install..
Reply With Quote
  #3  
Old 11-14-2001, 09:50 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LuBi, it just shows you all threads you are subscribed to that have new posts in them.
Like the "View New Posts" search, only this only returns subscribed threads.

mister, I think you forgot a function you wrote, getsubscribedforumsql().
Reply With Quote
  #4  
Old 11-14-2001, 05:50 PM
LuBi LuBi is offline
 
Join Date: Oct 2001
Posts: 416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
LuBi, it just shows you all threads you are subscribed to that have new posts in them.
All the time when you search or is it selectable?
Reply With Quote
  #5  
Old 11-14-2001, 06:07 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by LuBi
All the time when you search or is it selectable?
Reply With Quote
  #6  
Old 04-05-2003, 06:30 AM
red_baron2000's Avatar
red_baron2000 red_baron2000 is offline
 
Join Date: Jul 2002
Location: EU
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone mind finishing this ?
please
Reply With Quote
  #7  
Old 04-05-2003, 05:03 PM
mister mister is offline
 
Join Date: Oct 2001
Location: Detroit, MI
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry about forgetting to add that one function.
My bad. Thanks for reminding me, red_barron2000.

Should work now once you add that function to search.php
Reply With Quote
  #8  
Old 04-05-2003, 05:18 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm getting this error after adding the function.

Parse error: parse error, unexpected ',' in /home/bear/public_html/forum/search.php on line 578

It has to do with this line.

$ret = $ret,0,$ret)-1);
Reply With Quote
  #9  
Old 04-05-2003, 07:46 PM
red_baron2000's Avatar
red_baron2000 red_baron2000 is offline
 
Join Date: Jul 2002
Location: EU
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 07:18 PM Boofo said this in Post #8
I'm getting this error after adding the function.

Parse error: parse error, unexpected ',' in /home/bear/public_html/forum/search.php on line 578

It has to do with this line.

$ret = $ret,0,$ret)-1);

same here
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 01:21 PM.


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.04637 seconds
  • Memory Usage 2,302KB
  • Queries Executed 24 (?)
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
  • (6)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete