vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   New Post Status Icon links to Getnew for that forum. (https://vborg.vbsupport.ru/showthread.php?t=104993)

Wayne Luke 01-09-2006 10:00 PM

New Post Status Icon links to Getnew for that forum.
 
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:
HTML Code:

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

        <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/

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 01-10-2006 08:29 PM

Works great on vb 3.5.3

Daniel 01-10-2006 08:51 PM

Quote:

Originally Posted by Wayne Luke
A demo can be found at: http://www.dovguild.com/

Are you sure that's vBulletin?

Wayne Luke 01-10-2006 09:09 PM

Quote:

Originally Posted by Daniel
Are you sure that's vBulletin?

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

www.dovguild.net

Bad Bunny 01-10-2006 09:41 PM

Clever. I really like this mod.

HaYLaZ 01-11-2006 09:04 AM

nice work :nervous:

agiacosa 01-11-2006 03:39 PM

What's the difference between level 1 and level 2?

lazyseller 01-11-2006 04:04 PM

Im a bit confused on where to look ... kinda difficult to see with the very nice custom template.

Wayne Luke 01-12-2006 01:53 PM

Quote:

Originally Posted by agiacosa
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 01-12-2006 01:54 PM

Quote:

Originally Posted by lazyseller
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 01-12-2006 02:04 PM

I see it now... Nice addition

kregger 01-24-2006 08:41 PM

Doesn't work if the forum just has sub-forums. Any fix for that?

Craig

jeddah_eyes 01-25-2006 03:59 AM

thanks man .

it a geniss way .

Wayne Luke 01-25-2006 03:26 PM

Quote:

Originally Posted by kregger
Doesn't work if the forum just has sub-forums. Any fix for that?

Craig

Try this:
HTML Code:

        <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-31-2006 10:47 PM

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 02-08-2006 07:59 AM

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 02-09-2006 12:31 AM

This was very helpful, thank you.

Oblivion Knight 02-20-2006 09:54 PM

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 06-21-2006 11:47 PM

Nice :)


All times are GMT. The time now is 08:28 AM.

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.01157 seconds
  • Memory Usage 1,754KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_html_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (19)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete