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)
-   -   Link directly to a post (https://vborg.vbsupport.ru/showthread.php?t=95381)

welo 08-30-2005 10:00 PM

Link directly to a post
 
What it does:
This minor template change adds a nice little subsection symbol (?) right next to the post time, which is a url that can now either be clicked or copied, providing the ability for users to conveniently link directly to a post's anchor so you jump to a post within a thread, rather than opening its own window.

Rationale:
Although VB provides a nice way to open a single post in its own window by clicking the post number at the upper right of replies, this sometimes becomes inconvenient for subsequent surfers when someone has posted a link to a single post on mutiple page threads.

By default, to get the anchor location you must click the post number then copy the url at the upper right of the single-post window. This modification adds the anchor location as a url unobtrusively to every post so the post location can be obtained in one click, while retaining the single window link for the post number so folks immediately have both options.

Template Edits: 2; postbit and postbit_legacy

Code Additions:

1) In both templates find:

Code:

<!-- / status icon and date -->
2) Directly BELOW add:

Code:

<!-- Link for post anchor -->
&nbsp;<a href="showthread.php?$session[sessionurl]p=$post[postid]#post$post[postid]" title="Anchor location for this post" style="text-decoration: none">&sect;</a>
<!-- /Link for post anchor -->

3) Done! :)

Thanks to liwo for posting the most recent fix :). This replaced the original code of:

Code:

&nbsp;<a href="showthread.php?$session[sessionurl]t=$thread[threadid]#post$post[postid]" title="Anchor location for this post" style="text-decoration: none">&sect;</a>
...which apparently stopped working somewhere around VB 3.5.3.

TTG 08-31-2005 05:10 PM

Thanks .. simple but useful.
Clicked install.

welo 09-01-2005 12:43 AM

Quote:

Originally Posted by TTG
Thanks .. simple but useful.

Indeed. It's just one of those little things that's nice to have available. Prior to VB 3.5, if you clicked the post number and opened that post's window, the Thread: [thread title] link wouldn't take you to the post anchor at all, and you had to sift through the thread to find it. Try it on this board. 3.5 makes this a little easier but it's still helpful to have the anchor handy for copying without clicking anything.

KuRi 09-01-2005 01:21 AM

i like.... not much else to say.... cheers

Boofo 09-01-2005 03:12 AM

I already do this but I use the status icon as the anchor image. ;)

welo 09-01-2005 03:59 AM

I kinda thought about that - or even using an additional small image, although this might be simpler because you're just adding a little code rather than replacing it, and it won't potentially conflict with something VB might link to the existing icon later. Your method obviously works just as well though.

Been meaning to tell you: That's a clever signature. :up:

Boofo 09-01-2005 04:17 AM

Quote:

Originally Posted by welo
I kinda thought about that - or even using an additional small image, although this might be simpler because you're just adding a little code rather than replacing it, and it won't potentially conflict with something VB might link to the existing icon later. Your method obviously works just as well though.

Been meaning to tell you: That's a clever signature. :up:

I just used an old 3.0 hack I did for it.

Thanks for the kind words on the sig. It seems I've had that one forever. ;)

carrie31 09-29-2005 10:46 AM

simple and useful ! thank you su much !
I pot it next to the post number :P

user02934123123 04-12-2006 12:38 PM

Exactly what I was looking for ... simple and perfect. Many thanks.

welo 04-12-2006 01:15 PM

You're welcome. I've been considering adding an optional JS link that allows you to copy the link location directly to the clipboard, although Mozilla security settings means it doesn't work too well in Moz/FF without the enduser making some browser adjustments. Think I'll just leave it how it is for now :).


All times are GMT. The time now is 06:53 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.01001 seconds
  • Memory Usage 1,739KB
  • 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_code_printable
  • (2)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