Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications

Reply
 
Thread Tools
New button when new thread/post is made Details »»
New button when new thread/post is made
Version: 1.00, by pein87 pein87 is offline
Developer Last Online: Dec 2013 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.8.x Rating:
Released: 02-19-2009 Last Update: 02-25-2009 Installs: 32
Template Edits
Re-useable Code  
No support by the author.

My partner had a request for this mod on another site and I finally got around to doing it.

This is a simple edit that adds an icon to the end of each thread if theres a new post. I have added all possible options in which someone would use this edit for. Included is adding the new icon to the end of your threads title, replacing the lastposted by icon in the forumdisplay.php page, changing the icon of last posted in the index.php page, and switching out the small square with and arrow icon for a new one. I inluced the icon I used in the examples. I`ll post it here for those who wont to try it now and add a zip for those who will try it later on. Remember if you install show your support and click installed.

Adding a new thread icon on only the the post would add add
some sparkel to a dull forum. I have found the way thanks to
a fellow coder and a bit of searching in templates.This makes the new image a link to the new post for that thread. By default every newly created thread has a new post as well so this will show on new threads and posts.Make sure if you use this mod exactly as shown here to add the icon to the images/button dirctory or the button directory of the skin your doing this template mod for. If not make sure to add it to the images/misc or that styles misc directory and change the $stylevar[imgdir_misc]

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Open the template named: threadbit

find:

PHP Code:
            <if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$thread[threadid]id="thread_gotonew_$thread[realthreadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]border="0" /></a></if>
            
$thread[movedprefix]
            
$thread[typeprefix]
            
$thread[moderatedprefix]
            
$thread[prefix_rich]
            <
a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]id="thread_title_$thread[realthreadid]"<if condition="$show['gotonewpost']"style="font-weight:bold"</if>>$thread[threadtitle]</a
Add after:

PHP Code:
<!-- start new post/thread icon set up -->
<!-- 
add or subtract a code &nbspto add spacing just how you wont it to be -->
&
nbsp;&nbsp;<if condition="$show['gotonewpost']"><img src="<!-- add your own directory and delete this comment before you save this template -->$stylevar[imgdir_misc]/new_thread.gif" alt="" border="0" /></if>
<!-- /
start new post/thread icon set up --> 
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Theres more then one way to skin this cat and it really depends on your personal taste. You can always add this to the beginning to replace the icon that shows when theres a new post.

Open the template named: threadbit

Find:

PHP Code:
            <if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$thread[threadid]id="thread_gotonew_$thread[realthreadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]border="0" /></a></if> 
In there find:

PHP Code:
<img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]border="0" /> 
change:

PHP Code:
firstnew.gif 
To:

what ever image you wont to show instead of the default image.


If you dont wont a link simply delete this from the above code.

Find:

PHP Code:
<a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$thread[threadid]id="thread_gotonew_$thread[realthreadid]"
Delete this

Find:

</if>

Delete the </a> before this tag.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

If you like this idea and wont to change the image for the last posted as well if you havent saved the template add this else open the template named: threadbit

Find:

PHP Code:
<a href="showthread.php?$session[sessionurl]p=$thread[lastpostid]$thread[highlight]#post$thread[lastpostid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]border="0" /></a
Find in:

PHP Code:
src="$stylevar[imgdir_button]/lastpost.gif" 
Change the lastpost.gif to your desired image and save the template.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

If your really feeling this idea or just wont to change the icon for last posted on the index.php page this is how you would do that.

Open the template named: forumhome_lastpostedby

Find:(should be near the end)

PHP Code:
    <div align="$stylevar[right]style="white-space:nowrap">
        
$lastpostinfo[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$lastpostinfo[lastposttime]</span></if>
        <
a href="showthread.php?$session[sessionurl]p=$lastpostinfo[lastpostid]#post$lastpostinfo[lastpostid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]border="0" /></a>
    </
div>
</
div>
<else />
<
div class="smallfont" align="$stylevar[right]">
    
$lastpostinfo[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$lastpostinfo[lastposttime]</span></if>
    <
a href="showthread.php?$session[sessionurl]p=$lastpostinfo[lastpostid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]border="0" /></a>
</
div
Find:

If its easier search for two instances of this:

PHP Code:
$stylevar[imgdir_button]/lastpost.gif 
find all the instances(all the times you see) lastpost.gif and change this to the image you would like to be shown there instead. Remember to check the directory this follows the same rules as I stated at the top of the doc.

UPDATE:::::::revision by alexD)

inorder to get the image to appear infront of the extra info from a thread you must follow this program it shows you how to get the results of the image: new_thing

open your threadbit template and delete the info you added to which ever add on you did or leve it if you wont two images showing.

Find:

PHP Code:
            <if condition="$thread['pagenav']">$stylevar[dirmark]<span class="smallfont" style="white-space:nowrap">(<img class="inlineimg" src="$stylevar[imgdir_misc]/multipage.gif" alt="$vbphrase[multipage_thread]border="0" /> $thread[pagenav]<if condition="$show[pagenavmore]"> ... <a href="showthread.php?$session[sessionurl]t=$thread[threadid]&amp;page=$thread[totalpages]$thread[highlight]">$vbphrase[last_page]</a></if>)</span></if>

        [
B]</div>[/B
Add before the last </div> (at the end of the code to add)

PHP Code:
<!-- start new post/thread icon set up -->
<!-- 
add or subtract a code &nbspto add spacing just how you wont it to be -->
<if 
condition="$show['gotonewpost']"><img src="<!-- add your director or path and delete this comment -->$styleva[imgdir_misc]new_thread.gif" alt="" border="0" /></if>
<!-- /
start new post/thread icon set up --> 
there you go that fixes the issue of it showing up before the extra thread info and not after.

Left this out but you can incase the above img src in <a> tags to make it a link to the new post.

find:

PHP Code:
<img src="<!-- add your director or path and delete this comment -->$styleva[imgdir_misc]new_thread.gif" alt="" border="0" /> 
Add before:

PHP Code:
<a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$thread[threadid]id="thread_gotonew_$thread[realthreadid]"
Add after the above find:

</a>

UPDATED:02-27-09 Icons to inlude german version.
Please note that i did not do the original icon.

Download Now

File Type: zip newthread_and_post_icon.zip (280.7 KB, 256 views)
File Type: zip icons.zip (11.3 KB, 150 views)

Screenshots

File Type: jpg new-thread-icon.jpg (60.9 KB, 0 views)
File Type: jpg new-thread-icon2.jpg (54.1 KB, 0 views)
File Type: jpg new-thread-icon3.jpg (56.1 KB, 0 views)
File Type: jpg new-thread-icon4.jpg (54.3 KB, 0 views)
File Type: jpg new-thread-icon5.jpg (33.1 KB, 0 views)
File Type: jpg new_thing.JPG (85.4 KB, 0 views)

Supporters / CoAuthors

    Show Your Support

    • This modification may not be copied, reproduced or published elsewhere without author's permission.

    Comments
      #12  
    Old 02-25-2009, 08:51 PM
    pein87's Avatar
    pein87 pein87 is offline
     
    Join Date: Sep 2008
    Posts: 352
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    Sorry for the delay in tonight I`ll work on one for dark forums and for German.
    Reply With Quote
      #13  
    Old 02-26-2009, 09:11 PM
    Powlo Powlo is offline
     
    Join Date: Feb 2008
    Location: Sunderland UK
    Posts: 155
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    This looks to be almost exactly what im looking for but would it be possible to have it so that the 'NEW' image would appear ONLY for new threads and not for new posts??
    Reply With Quote
      #14  
    Old 02-27-2009, 02:20 PM
    pein87's Avatar
    pein87 pein87 is offline
     
    Join Date: Sep 2008
    Posts: 352
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    Thats a good question let me work on it and I`ll see what I can do
    Reply With Quote
      #15  
    Old 04-21-2009, 10:03 PM
    OllieT OllieT is offline
     
    Join Date: Nov 2008
    Posts: 10
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    Sorry, excuse ones stupidity..
    How can I do it so that it just shows for new thread, and NOT all the new posts?
    Reply With Quote
      #16  
    Old 04-22-2009, 01:53 AM
    pein87's Avatar
    pein87 pein87 is offline
     
    Join Date: Sep 2008
    Posts: 352
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    I havent found that out yet lol still searching for the code I'm sure theres away but it might involve some code.
    Reply With Quote
      #17  
    Old 04-24-2009, 08:36 PM
    Bowromir Bowromir is offline
     
    Join Date: Dec 2005
    Posts: 47
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    If you install this then you can remove the new post icons from the forumlist template! Which gives it a cleaner look.. So instead of an extra table which shows the newpost icon you can just use this image
    Reply With Quote
      #18  
    Old 04-25-2009, 12:23 PM
    Markos Markos is offline
     
    Join Date: Aug 2006
    Posts: 522
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    any one got a icon for a dark style ??
    Reply With Quote
      #19  
    Old 04-25-2010, 02:24 AM
    Naan-Kadavul's Avatar
    Naan-Kadavul Naan-Kadavul is offline
     
    Join Date: Sep 2009
    Location: Singpore
    Posts: 249
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    thx mate..
    Reply With Quote
      #20  
    Old 05-06-2010, 07:32 AM
    xsamet xsamet is offline
     
    Join Date: Oct 2006
    Posts: 22
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    Quote:
    Originally Posted by OllieT View Post
    Sorry, excuse ones stupidity..
    How can I do it so that it just shows for new thread, and NOT all the new posts?
    This is more beautiful ...
    Reply With Quote
      #21  
    Old 01-10-2011, 12:09 PM
    Ivelios Ivelios is offline
     
    Join Date: Jul 2009
    Location: Poland
    Posts: 5
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    A little work with it, but cool. Install.
    Reply With Quote
    Reply

    Thread Tools

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT. The time now is 08:03 PM.


    Powered by vBulletin® Version 3.8.12 by vBS
    Copyright ©2000 - 2024, vBulletin Solutions Inc.
    X vBulletin 3.8.12 by vBS Debug Information
    • Page Generation 0.05237 seconds
    • Memory Usage 2,409KB
    • Queries Executed 27 (?)
    More Information
    Template Usage:
    • (1)SHOWTHREAD
    • (1)ad_footer_end
    • (1)ad_footer_start
    • (1)ad_header_end
    • (1)ad_header_logo
    • (1)ad_navbar_below
    • (1)ad_showthread_beforeqr
    • (14)bbcode_php
    • (1)bbcode_quote
    • (1)footer
    • (1)forumjump
    • (1)forumrules
    • (1)gobutton
    • (1)header
    • (1)headinclude
    • (1)modsystem_post
    • (1)navbar
    • (4)navbar_link
    • (120)option
    • (1)pagenav
    • (1)pagenav_curpage
    • (2)pagenav_pagelink
    • (11)post_thanks_box
    • (11)post_thanks_button
    • (1)post_thanks_javascript
    • (1)post_thanks_navbar_search
    • (11)post_thanks_postbit_info
    • (10)postbit
    • (8)postbit_attachment
    • (11)postbit_onlinestatus
    • (11)postbit_wrapper
    • (1)spacer_close
    • (1)spacer_open
    • (1)tagbit_wrapper 

    Phrase Groups Available:
    • global
    • inlinemod
    • postbit
    • posting
    • reputationlevel
    • showthread
    Included Files:
    • ./showthread.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/functions_bigthree.php
    • ./includes/class_postbit.php
    • ./includes/class_bbcode.php
    • ./includes/functions_reputation.php
    • ./includes/functions_post_thanks.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
    • showthread_start
    • showthread_getinfo
    • forumjump
    • showthread_post_start
    • showthread_query_postids
    • showthread_query
    • bbcode_fetch_tags
    • bbcode_create
    • showthread_postbit_create
    • postbit_factory
    • postbit_display_start
    • post_thanks_function_post_thanks_off_start
    • post_thanks_function_post_thanks_off_end
    • post_thanks_function_fetch_thanks_start
    • post_thanks_function_fetch_thanks_end
    • post_thanks_function_thanked_already_start
    • post_thanks_function_thanked_already_end
    • fetch_musername
    • postbit_imicons
    • bbcode_parse_start
    • bbcode_parse_complete_precache
    • bbcode_parse_complete
    • postbit_attachment
    • postbit_display_complete
    • post_thanks_function_can_thank_this_post_start
    • pagenav_page
    • pagenav_complete
    • tag_fetchbit_complete
    • forumrules
    • navbits
    • navbits_complete
    • showthread_complete