![]() |
[New Posts | New Thread | Search] on Index page
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']"> Code:
<if condition="$forum[statusicon]=='new' OR $forum[statusicon]=='old'"> 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'"> 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. |
|
very nice thanks
|
Lovely it could be much better if they were using images. ;)
|
Installed :) Nice touch
|
piece of cake.. thank you for the mod, very nice!
|
Quote:
|
Seems to be nice. But in my installation i couldnot locate the forumhome_forumbit_level1/2_post template :-(
pls do update your steps keeping newbies also in mind:-( |
AdminCP > Styles & Templates > Search in Templates > Search for forumbit
In the results, forumhome_forumbit_level1 and 2 will appear, you want the post versions of each and not the nopost versions. Level 1 is the forum sections that show up on the index page, Level 2 is for subforums that show up on forum listing pages. :) |
I have installed this but had to remove because its not displaying correctly when using subforums... If my subforum structure is setup like this
-Forum Name --Forum (Locked) ---Child Forum1 ---Child Forum2 ---Child Forum3 Then locked forum show the New Thread- Search and when you click you get dont have access... |
Try replacing it with this:
Code:
<if condition="!$forum[statusicon] == 'new_lock' OR !$forum[statusicon] == 'old_lock' OR !$forum[statusicon] == 'link'"> |
Quote:
|
None. Not even a fairly large amount of conditionals will slow things down.
|
umm,,
http://forum.vbulletinsetup.com/f7/3...cribe-rss.html I got this code from Keith Cohen months ago ;) with his permission [New Thread] - [Search] - [Subscribe] - [RSS] if you like what we've added at vBulletin Setup and want it on your site here is your code.. Here's the code I use in forumbit level 1 and 2: Code:
<if condition="$forum[link] == ''"> and like on our site, the forum home view don't allow new threads, so it was all useless and we just needed it on the forumdisplay page.. this is how to achieve that.. Code:
<if condition="THIS_SCRIPT == 'index'"> Code:
.tinyfont { font-size: 9px;} |
This is great!!!
i have just changed it a bit (hope you dont mind :) ) Code:
<!-- [View New Posts | Start New Thread | Search] on Index page by ForumDog --> |
Quote:
|
you can use the code i posted ;)
it works just fine.. if you still can't get it, give me a PM and I'll help ya out :) |
Quote:
the code from the first post works like a charm it was just this 2nd posted code that has been posted that seems not to work. the one that should not display [New Posts | New Thread | Search] for link forums ect. |
Okee dokee, that'll teach me to post untested code! New version which is thoroughly tested and seems to work, if someone else gives it a whirl and it turns out to be the correct can they let me know so I can properly update.
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. Code:
<if condition="$forum[statusicon]=='new' OR $forum[statusicon]=='old'"> - 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'"> - 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. Quote:
- Mine uses conditionals so is automatically adaptable. - Mine is phrased (admittedly that's barely possible, but I did what I could :p) - I know what the THIS_SCRIPT code does, I don't know what it's there for or even where it goes. But I don't think it should be used, it will prevent the links from showing up anywhere else, in the Subscribed Threads forumbit for instance. Come to that I'm not sure that $forum[link] is the correct conditional to use either... - Mine will display as intended using the existing CSS. So, as I guessed it had been done before but enough reason to use this one instead. :D |
great!
i will give it a shot tomorrow :) |
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?? |
I can't reproduce that issue. Works fine either way for me.
|
Quote:
thanks for your efforts. |
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 |
Quote:
Well spotted, fixed thank you. Changed it back to ordinary text so it works on either forumbit. Quote:
Quote:
|
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 |
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. :) |
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?
|
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.... |
Hm. Don't know what happened to my subscription notification. :confused:
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> |
please ForumDog,
I want add some codes in this hack! only for use in our site any objection? Thanks, |
That's fine. :)
|
Thanks,
See the small pictures :cool: |
Very attractive! :cool:
|
Thank you for this, just what I was looking for! :)
|
thanks,
nice mod, but can i make the font of New Thread | Search smaller?? as the forum gets confused with so many "New Thread | Search" repeating everywhere if someone can help me plz. |
Awesome, thank you alot for this hack. :)
|
Nice, clicked installed.
|
All times are GMT. The time now is 04:57 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|