The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
[New Posts | New Thread | Search] on Index page Details »» | |||||||||||||||||||||||||||
[New Posts | New Thread | Search] on Index page
Developer Last Online: Feb 2007
This adds forum section-specific New Posts, New Thread and Search links to the index page.
New Posts will only appear when there are new posts in that section and will only list new posts from the section. New Thread will start a new thread in that section. Search will start a search for only that section. A search did bring up something similar but it was neither as complete nor as aesthetically pleasing (to me). I apologise if this is duplicated. Open your forumhome_forumbit_level1/2_post template. FIND: Code:
<if condition="$show['forumdescription']"> <div class="smallfont">$forum[description]</div> </if> Code:
<if condition="$forum[statusicon]=='new' OR $forum[statusicon]=='old'"> <div class="smallfont"> <if condition="$forum[statusicon]=='new'"><a href="search.php?$session[sessionurl]do=getnew&include=$forum[forumid]">$vbphrase[new_posts_nav]</a> | </if> <a href="newthread.php?$session[sessionurl]do=newthread&f=$forum[forumid]" rel="nofollow">New Thread</a> <if condition="$show['searchbuttons']">| <a href="search.php?$session[sessionurl]f=$forum[forumid]" rel="nofollow">$vbphrase[search]</a></if> </div> </if> Optional extras: - Subscription code for each feed type, all conditionals so they'll only appear if you've turned that type on. - Unsubscribe moved to the linkfest since it seems to fit better there. Be sure to delete the very similar code which appears immediately below where this code is inserted, everything between <if condition="$show['forumsubscription']"> and </if>. Code:
<if condition="$forum[statusicon]=='new' OR $forum[statusicon]=='old'"> <div class="smallfont"> <if condition="$forum[statusicon]=='new'"><a href="search.php?$session[sessionurl]do=getnew&include=$forum[forumid]">$vbphrase[new_posts_nav]</a> | </if> <a href="newthread.php?$session[sessionurl]do=newthread&f=$forum[forumid]" rel="nofollow">New Thread</a> <if condition="$show['searchbuttons']">| <a href="search.php?$session[sessionurl]f=$forum[forumid]" rel="nofollow">$vbphrase[search]</a></if> <if condition="$vbulletin->options['externalrss']">| <a href="external.php?type=rss2&forumids=$forum[forumid]">RSS Feed</a></if> <if condition="$vbulletin->options['externalxml']">| <a href="external.php?type=xml&forumids=$forum[forumid]">XML Feed</a></if> <if condition="$vbulletin->options['externaljs']">| <a href="external.php?type=js&forumids=$forum[forumid]">JS Feed</a></if> <if condition="$show['forumsubscription']">| <a href="subscription.php?$session[sessionurl]do=removesubscription&f=$forum[forumid]">$vbphrase[unsubscribe_from_this_forum]</a></if> </if> Update: - The conditional should now be correct so the links will only appear for open forums. It's up to you if you want to change that. - The search link is now wrapped in a conditional so it doesn't appear when it's not wanted, most likely for Guests, New Thread is also now controlled as far as is possible by the statusicon conditional. Permission to start a new thread is only checked after clicking the link as far as I can tell, so it can't be done perfectly. - Not a big deal, but added rel="nofollow" in a couple of places where the links aren't any use to search engines. Known Issues: - If there is no permission to start a new thread or search and there are no new posts to view but the unsubscribe link or a feed link appears then the line will begin with a |. It could be solved with a loooooooot of conditionals but it's not worth it. Change the formatting (use of |) if it bothers you. Show Your Support
|
Comments |
#22
|
|||
|
|||
Quote:
the original code showed the "New Thread", the new one doesnt. if i change this line in the new code from Code:
<a href="newthread.php?$session[sessionurl]do=newthread&f=$forum[forumid]" rel="nofollow">$vbphrase[newthread]</a> Code:
<a href="newthread.php?$session[sessionurl]do=newthread&f=$forum[forumid]" rel="nofollow">Start New Thread</a> $vbphrase[newthread] wrong?? |
#23
|
|||
|
|||
I can't reproduce that issue. Works fine either way for me.
|
#24
|
|||
|
|||
Quote:
thanks for your efforts. |
#25
|
||||
|
||||
Quote:
I hadn't looked through the code, I just know it works.. BTW, what do u think about the RSS link thats in the code I posted I know a lot of ppl like that part of it, you may consider adding it to yours cheers -Brandon |
#26
|
|||
|
|||
Quote:
Well spotted, fixed thank you. Changed it back to ordinary text so it works on either forumbit. Quote:
Quote:
|
#27
|
|||
|
|||
i just tried to do the update, but now new posts is not working
Code:
Invalid Forum specified. If you followed a valid link, please notify the administrator |
#28
|
|||
|
|||
Quote:
Use the first set of code (labelled AFTER, ADD if you want to reproduce the same function as the original code did, with the bugfix. Use the second, longer bit of code (labelled Optional Extras) if you would also like the above, plus links to be added for RSS/XML/JS feeds and Unsubscribe from this forum in the Subscribe part of the UserCP. |
#29
|
|||
|
|||
OK... it works now. But, is there any way to fix the issue of the search not working for subforums on the forumhome? In another words, if a forum is not active, and you click search... of course no results will show... but is there anyway to either disable it for non active forums or have it search all subforums also?
|
#30
|
||||
|
||||
i never ever say anything negative about a hack.. as i am not smart enough to write one... but this hack.... scared the hell ouf of me... i loaded it.. and it looked good.. but something about it was right.... i went to delete the code.. and it duplicated on me....
i had to revert back to the original code. thankfully i didnt have any other scripts enbedded on that template.... |
#31
|
|||
|
|||
Hm. Don't know what happened to my subscription notification.
Quote:
Change this: Code:
<if condition="$show['searchbuttons']">| <a href="search.php?$session[sessionurl]f=$forum[forumid]" rel="nofollow">$vbphrase[search]</a></if> Code:
<if condition="$show['searchbuttons']">| <a href="search.php?$session[sessionurl]f=$forum[forumid]&childforums=1" rel="nofollow">$vbphrase[search]</a></if> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|