Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

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
      #22  
    Old 01-15-2011, 12:22 AM
    adwade adwade is offline
     
    Join Date: Aug 2006
    Location: SouthEast, TN
    Posts: 323
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    Quote:
    Originally Posted by Infopro View Post
    Why not just upload your image newthread.gif to replace firstnew.gif and call it a day?
    Infopro, I took your suggestion and did just that! S-W-E-E-T, Thanxx for the idea.
    Reply With Quote
    Reply


    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 02:36 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.07675 seconds
    • Memory Usage 2,319KB
    • Queries Executed 18 (?)
    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
    • (2)post_thanks_box
    • (2)post_thanks_button
    • (1)post_thanks_javascript
    • (1)post_thanks_navbar_search
    • (2)post_thanks_postbit_info
    • (1)postbit
    • (8)postbit_attachment
    • (2)postbit_onlinestatus
    • (2)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