The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Making a new "view new posts" link that only shows new posts in certain forums?
OK Firefly helped me with part of what my users wanted. They didn't want to click the "view new posts" and get all the news posts that don't have any replys in them. So FireFly helped me take those out. Now they want another button/link that will only show the new news posts, but they don't want it to replace the "view new posts" they want a new link for "view new news posts"
The way FireFly helped me before is just a few threads down in the forum currently, but is all he did was make it so that I could put in the forumid and exclude that forum from being in the "getnew" results. I was thinking I could just copy my search.php and do the exact opposite and exclude all the forums, except the news forums, but I was wondering if there was an easier way or if that WOULD be the easy way? Any help would be great. Thanks! |
#2
|
||||
|
||||
Next time post this in the same thread please.
Anyway, in search.php find this: Code:
$datesql=" AND thread.lastpost>=".$bbuserinfo[lastvisit]; $wheresql="1=1".$forumsql.$datesql; $wheresql.=" AND thread.open<>10"; Replace that with this: Code:
$datesql=" AND thread.lastpost>=".$bbuserinfo[lastvisit]; if ($newsonly) { $wheresql="1=1 AND forumid=XX".$datesql; } else { $wheresql="1=1".$forumsql.$datesql; } $wheresql.=" AND thread.open<>10"; Change XX to the ID of your news forum, then link to search.php?action=getnew&newsonly=1. |
#3
|
||||
|
||||
OK I am a little confused. So where do I put the forumid numbers for the news forum TO search? The ones that I have blocked where you helped me firsted, aren't the exact same ones that I want to be searched in the new news posts. I need two different sets of forumid places. Ones to exclude in the new posts link and one to include in the new news link.
Or did I not understand the instructions? Oh and I didn't post it in the same thread, because I didn't want you to feel like I was only asking for your help, but if you don't mind then I will always bug you for help. |
#4
|
||||
|
||||
Ok never mind my first post, I was tired last night.
Just link to search.php?action=getnew&forumid=XX where XX is your news forum's ID. |
#5
|
||||
|
||||
Quote:
and it still didn't work. it might help if you take a look what I have going on. :nervous: http://www.theforumz.com I don't have one single news forum, I have 13 news forums. I am starting to think my original idea with coping the search.php might not be so bad after all. Or are you sleepy again? |
#6
|
||||
|
||||
Just link to http://www.theforumz.com/forumz/sear...w&forumid=150. It will get subforums.
|
#7
|
||||
|
||||
Quote:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|