PDA

View Full Version : New Post Status Icon links to Getnew for that forum.


Wayne Luke
10 Jan 2006, 19:55
In order to simplify searching, I wanted to make the New Post status icon link to the search engine and retrieve only the new posts for that forum. If there are no new posts, the icon links to the forum itself.

Open forumhome_forumbit_levelX_post. In my example, I am using forumhome_forumbit_level2_post.

Find:

<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" />


Replace with:

<if condition="$forum[statusicon]=='new'">
<a href="search.php?do=getnew&include=$forum[forumid]"><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></a>
<else />
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></a>
</if>


You can apply similar modifications to any forumbit at any level.

A demo can be found at: http://www.dovguild.net/ (http://www.dovguild.net)

Distibuted under the "Wayne License". You may modify to suit your needs, No Attribution Necessary, Redistribution allowed on sites which can verify legitimate vBulletin License Holders only.

YLP1
10 Jan 2006, 22:29
Works great on vb 3.5.3

Daniel
10 Jan 2006, 22:51
A demo can be found at: http://www.dovguild.com/
Are you sure that's vBulletin?

Wayne Luke
10 Jan 2006, 23:09
Are you sure that's vBulletin?

oops.. sorry.. should proofread more. It is a .net.

www.dovguild.net

Bad Bunny
10 Jan 2006, 23:41
Clever. I really like this mod.

HaYLaZ
11 Jan 2006, 11:04
nice work :nervous:

agiacosa
11 Jan 2006, 17:39
What's the difference between level 1 and level 2?

lazyseller
11 Jan 2006, 18:04
Im a bit confused on where to look ... kinda difficult to see with the very nice custom template.

Wayne Luke
12 Jan 2006, 15:53
What's the difference between level 1 and level 2?

Level 1 is usually reserved for categories in most forums. Level 2 is the actual forums.

Wayne Luke
12 Jan 2006, 15:54
Im a bit confused on where to look ... kinda difficult to see with the very nice custom template.

This modification doesn't really change the look of a forum. It changes behavior. In the default style, the status icons do not do anything except show whether there are new posts or not. With my modification, the status icon becomes a link that shows all the new posts in that forum or loads the entire forum if there are no new posts.

lazyseller
12 Jan 2006, 16:04
I see it now... Nice addition

kregger
24 Jan 2006, 22:41
Doesn't work if the forum just has sub-forums. Any fix for that?

Craig

jeddah_eyes
25 Jan 2006, 05:59
thanks man .

it a geniss way .

Wayne Luke
25 Jan 2006, 17:26
Doesn't work if the forum just has sub-forums. Any fix for that?

Craig

Try this:

<if condition="$forum[statusicon]=='new'">
<a href="search.php?do=getnew&include=$forum[forumid]&childforums=1"><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></a>
<else />
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></a>
</if>

oldford
01 Feb 2006, 00:47
Great little add on. Thanks!

Is there any way to do something similar and combine the "status icon" with the "go to first new post icon"?

beernuts
08 Feb 2006, 09:59
Great mod Wayne!

If it's not too much trouble, could you point me towards the templates to modify to add this hack to sub forum listings in forum displays, as well as to the sub-forum icons on the main forum page?

Thanks much,

-Nick

dcarr
09 Feb 2006, 02:31
This was very helpful, thank you.

Oblivion Knight
20 Feb 2006, 23:54
This definately should be considered as a standard feature option for future versions of vBulletin.. I hadn't even thought of doing this until coming across this mod!

Many thanks, Wayne.

Thomas P
22 Jun 2006, 01:47
Nice :)