vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Show Thread Enhancements - Add "Top" to all Posts. (https://vborg.vbsupport.ru/showthread.php?t=260670)

Jack Jones 03-19-2011 10:00 PM

Add "Top" to all Posts.
 
1 Attachment(s)
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>


Internetcafe 03-21-2011 10:21 PM

Nice and simple .. Mmm .. reminds me of my Ex :D

OldSchoolDSL 03-21-2011 11:15 PM

Something like this should have been standard in vBulletin.

Nicely done :)

Installed & working

4.1.2

Phaedrus 03-22-2011 12:16 AM

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?

Phaedrus 03-22-2011 12:27 AM

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.

COL NIL SATIS 03-22-2011 07:50 PM

installed...works on 4.0.6 too ...thanks for this

Reedly 06-24-2011 08:04 PM

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?

EquinoxWorld 06-25-2011 01:58 AM

Quote:

Originally Posted by Reedly (Post 2212339)
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.

LisaArnold 07-24-2011 10:55 AM

Thanks, works nicely with 4.1.4 pl2 :)

Robru 10-19-2011 05:24 AM

Works good with 4.1.7 :)


All times are GMT. The time now is 09:40 PM.

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.01175 seconds
  • Memory Usage 1,729KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete