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

Reply
 
Thread Tools
Add "Top" to all Posts. Details »»
Add "Top" to all Posts.
Version: 1.00, by Jack Jones Jack Jones is offline
Developer Last Online: Mar 2012 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.1.1 Rating:
Released: 03-19-2011 Last Update: Never Installs: 55
Template Edits
Re-useable Code  
No support by the author.

A very simple template modification to add a "Top" on the right hand side of all posts.

In postbit_legacy find:
Code:
<span class="nodecontrols">
<vb:if condition="$post['postid'] AND $post['threadid'] AND !$show['moderated']">
Add this under it:
Code:
<a href="#top" onclick="self.scrollTo(0, 0); return false;">Top</a> |
It should look like this once added:

Code:
<span class="nodecontrols">
<vb:if condition="$post['postid'] AND $post['threadid'] AND !$show['moderated']">
<a href="#top" onclick="self.scrollTo(0, 0); return false;">Top</a> |
<a name="post{vb:raw post.postid}" href="{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_post}}#post{vb:raw post.postid}" class="<vb:if condition="$show['inlinemod']">ie</vb:if>postcounter">#{vb:raw post.postcount}</a><a id="postcount{vb:raw post.postid}" name="{vb:raw post.postcount}"></a>
</vb:if>

Screenshots

File Type: jpg TopScreen.jpg (104.0 KB, 0 views)

Show Your Support

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

Comments
  #2  
Old 03-21-2011, 10:21 PM
Internetcafe Internetcafe is offline
 
Join Date: May 2008
Location: London
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice and simple .. Mmm .. reminds me of my Ex
Reply With Quote
  #3  
Old 03-21-2011, 11:15 PM
OldSchoolDSL OldSchoolDSL is offline
 
Join Date: Oct 2010
Posts: 1,196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Something like this should have been standard in vBulletin.

Nicely done

Installed & working

4.1.2
Reply With Quote
  #4  
Old 03-22-2011, 12:16 AM
Phaedrus Phaedrus is offline
 
Join Date: Jul 2006
Location: Colorado
Posts: 617
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LOL. Well, I was just going to come here to see if this existed, if not I was going to write one. Wouldn't you have to do this in both postbit and postbit legacy?
Reply With Quote
  #5  
Old 03-22-2011, 12:27 AM
Phaedrus Phaedrus is offline
 
Join Date: Jul 2006
Location: Colorado
Posts: 617
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And if you want it to have the neat "top" button that shows up at the bottom of every thread instead of just a link that says "top", add this below:

Code:
<a href="{vb:raw relpath}#top" class="textcontrol" onclick="document.location.hash='top';return false;">{vb:rawphrase top}</a>
You no longer need the | after it if you do it this way, you get that button rather than a line to separate the two out. However the button is unreadable in some skins, so the link is betta..

I added it after the post number rather than before.
Reply With Quote
  #6  
Old 03-22-2011, 07:50 PM
COL NIL SATIS COL NIL SATIS is offline
 
Join Date: Aug 2009
Location: Liverpool UK
Posts: 802
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed...works on 4.0.6 too ...thanks for this
Reply With Quote
  #7  
Old 06-24-2011, 08:04 PM
Reedly Reedly is offline
 
Join Date: Oct 2006
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm using 4.1.3, and no matter what I put under the given text, nothing shows up after saving and refreshing.

I can even just type the word 'test' in the right spot and nothing shows up.

Any ideas?
Reply With Quote
  #8  
Old 06-25-2011, 01:58 AM
EquinoxWorld EquinoxWorld is offline
 
Join Date: Nov 2009
Location: Naples
Posts: 354
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Reedly View Post
I'm using 4.1.3, and no matter what I put under the given text, nothing shows up after saving and refreshing.

I can even just type the word 'test' in the right spot and nothing shows up.

Any ideas?
It may be a problem of your server not being able to save changes. Sometimes it may be as simply as a cookie issue.
Reply With Quote
  #9  
Old 07-24-2011, 10:55 AM
LisaArnold LisaArnold is offline
 
Join Date: May 2011
Location: Sydney, Australia
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, works nicely with 4.1.4 pl2
Reply With Quote
  #10  
Old 10-19-2011, 05:24 AM
Robru Robru is offline
 
Join Date: Aug 2005
Location: Netherlands
Posts: 368
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works good with 4.1.7
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 07:48 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.04506 seconds
  • Memory Usage 2,312KB
  • Queries Executed 24 (?)
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
  • (4)bbcode_code
  • (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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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