PDA

View Full Version : Link to post with Jump instead of opening it as stand alone


voter
01 Mar 2007, 15:18
Go following steps if you want that the link with postcount shown at right-up corner of each post, provides the possibility of opening the post as a part of thread - jumping to post instead of opening a new window with post only.

Find in your postbit_legacy

<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a></if>

And change the showpost.php to showthread.php or replace it with code below

<if condition="$show['postcount']">#<a href="showthread.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a></if>

Alternativly, just add the new version with showthread.php above or below the old code and you will have both possibilities, I would recommend in second link define and use a vbphrase instead of <strong>$post[postcount]</strong>.



Life Demo (http://viparmenia.com/)

PhoneiX
01 Mar 2007, 16:02
This is more easy i think, when you click on it, doesn't refresh the page.

<a href="#post$post[postid]" title="Link to this post"><strong>Link</strong></a>

But i think you shouldn't change "showpost.php". However, you can add this code near it.

And thanks a lot for giving me this idea.:)

voter
02 Mar 2007, 12:56
This is more easy i think, when you click on it, doesn't refresh the page.

<a href="#post$post[postid]" title="Link to this post"><strong>Link</strong></a>

But i think you shouldn't change "showpost.php". However, you can add this code near it.

And thanks a lot for giving me this idea.:)
Nice tip Phoneix. Sure when one clicks on the version I suggested, a new window or refresh will happen.

But the goal of modification is to give people possibility to use Rightmouse Button and Copy Link which could be used later to go directly to Post staying inside the thread.

If use like you suggested a code that adds something to "session's current url", then with the Rightclick-Copy will not be possible to have the full address of post. Sure one can make a click on your type of link -> useless jump happens -> full link in URL Box of Browser appears AND only then one can copy the direct link from that box by mark&copy...

I am lazy guy and like simple ways, but in this case your suggestion is not the simplest one ;)

I was even thought to put a script, that opens a form where on could see the link, but again it wouldn't be simpler

voter
05 Mar 2007, 13:17
Sure it is hack available on vb.org
I hope author will release sometime an update, till that it is unsupported, but very useful

http://www.vbulletin.org/forum/showthread.php?t=100589

Tralala
06 Mar 2007, 09:08
Nice tip Phoneix. Sure when one clicks on the version I suggested, a new window or refresh will happen.

But the goal of modification is to give people possibility to use Rightmouse Button and Copy Link which could be used later to go directly to Post staying inside the thread.

If use like you suggested a code that adds something to "session's current url", then with the Rightclick-Copy will not be possible to have the full address of post. Sure one can make a click on your type of link -> useless jump happens -> full link in URL Box of Browser appears AND only then one can copy the direct link from that box by mark&copy...


This isn't true. I changed to PhoneiX's method, and am able to right-click to copy the URL (which works just fine when pasted in a new browser instance.)

Also, when I click the "post number" link in that thread, it brings that post to the top of the web page, no refresh needed.

PhoneiX's method works better for me, and I see no downside.

Tralala
16 Mar 2007, 20:51
This isn't true. I changed to PhoneiX's method, and am able to right-click to copy the URL (which works just fine when pasted in a new browser instance.)

Also, when I click the "post number" link in that thread, it brings that post to the top of the web page, no refresh needed.

PhoneiX's method works better for me, and I see no downside.

I respectfully withdraw this comment -- I reported too soon and see what voter was talking about. PhoneiX's method only works for the current session, as an anchor of sorts, it's not useful if a poster wants to share the link in a later post for other users to click... it also includes the styleid which may switch a user's chosen style. The "no refresh" was cool and all, but not worth losing the functionality and flexibility of voter's mod.

Thanks for clarifying, voter, I now see the wisdom of your advice.

voter
19 Mar 2007, 14:27
I respectfully withdraw this comment -- I reported too soon and see what voter was talking about. PhoneiX's method only works for the current session, as an anchor of sorts, it's not useful if a poster wants to share the link in a later post for other users to click... it also includes the styleid which may switch a user's chosen style. The "no refresh" was cool and all, but not worth losing the functionality and flexibility of voter's mod.

Thanks for clarifying, voter, I now see the wisdom of your advice.
To be honest the vB developers did the wisdomst job and when one want a directURL to post then the Post must appear and not whole topic however I think here are mostly the admins of boards are and they prefere that when somebody uses Urls to their board browser shows more than one Post https://www.vbulletin.org/forum/external/2007/03/13.gif

I will think about, may be there is a way to have some hybrid verions from what I suggest and what Phonix's version is...

Tralala
19 Mar 2007, 15:26
The way I did it on my board is I split the "#" character from the post number itself. So clicking the "#" opens the single post in a window on it's own, and clicking the post number reloads the thread with that post as the anchor. That makes it useful as a reference URL to share elsewhere... and keeps the context of the post around it, by way of including the rest of the thread.

Atakan KOC
26 Mar 2007, 08:43
Thanks........