PDA

View Full Version : Anchor and Jump BBCode!


pimpery
07-09-2005, 10:00 PM
This hack adds 2 BBCodes to your forum: [anchor] and [jump]
Demo: http://www.socomcity.net/forum/showthread.php?p=7353
Cross-Page Jump Demo: http://www.socomcity.net/forum/index.php (below the header, Latest Glitches Added)

[username:test][password:test] (thanks to acidburn0520 :D)



Functions
--------------

If you can't already tell from the example, you can set anchors in your posts via the [anchor] tag, and create a link that enables the user to jump to them via the [jump] tag. This comes very handy if you want to make a navigation for your forum rules, tutorials, or any other list-type post. Best of all, using cube root, the javascript function I made allows for a smooth/exponential jump.



Features
------------

prioritization: if there are multiple anchors - it uses DOM nesting detection to choose the anchor which is within the post containing the jump tag being clicked
optional cross-page jumping (hyper-link to anchors!)
optional key-shortcuts (remembers last anchor and last jump)
uses setInterval as oppose to a loop for best performance
works on all internet browsers
works on every version of vBulletin


Installation
------------------

Just download the zipped txt attached to this post with the 3 easy installation steps. Follow them and it's as easy as cake. Enjoy!


Hyperlinking Anchors
-----------------------------

To hyperlink anchors, your link must contain a reference to the post the anchor is in and the anchor of which to jump to
Heres the 2 possible ways (order of paramters doesn't matter - as long as the link contains the anchor parameter and a hash(#) to the post, or the p parameter to the post):
nameofanchor is the name of the anchor
1337 is the number of the post which contains the anchor
http://site.com/etcetcetc?anchor=nameofanchor&p=1337
http://site.com/etcetcetc?anchor=nameofanchor#post1336


Key-Shortcuts
-----------------------------

There are two keyshortcuts: Alt+A and Alt+J
Alt+A (Anchor Shortcut) jumps you to the last anchor that you previously jumped to
Alt+J (Jump Shortcut) jumps you to the last jump tag you previously clicked

sirbutts
07-10-2005, 12:56 AM
Ahh - see you also posted the hack in the 3.5 forum. I guess after 3.5 becomes official, I'll install it again after upgrading to 3.5 :D

Cap'n Steve
07-10-2005, 03:53 AM
Ooooh, that scrolling is nice. Thanks for the hack!

Kirk Y
07-10-2005, 04:12 AM
Yeah I'm waiting for the supported release of 3.5.0 before I begin to install plugins and hacks. I don't want to lose all my work because of a bux fix.

pimpery
07-10-2005, 03:45 PM
Yeah I'm waiting for the supported release of 3.5.0 before I begin to install plugins and hacks. I don't want to lose all my work because of a bux fix.
Yeh, it's best to do that. Sirbutts looks like he's doing the same thing - from what he posted.

tamarian
07-10-2005, 03:59 PM
Good one :up: /installs

pimpery
07-11-2005, 01:41 PM
Updated!
Few bugs fixed.
Optional cross-page jumping feature added (hyperlink an anchor!) :D

sirbutts
07-11-2005, 06:39 PM
Updated!
Few bugs fixed.
Optional cross-page jumping feature added (hyperlink an anchor!) :D
I know I posted the same thing in the other thread but incase you don't check there:
Ver nice feature! My members love it :D
Thanks for the update pimpery! :)

pimpery
07-15-2005, 05:01 PM
I know I posted the same thing in the other thread but incase you don't check there:
Ver nice feature! My members love it :D
Thanks for the update pimpery! :)

Updated = Infinite bottom surface scroll bug fixed.

pimpery
07-22-2005, 03:51 AM
Update..did some tests.
Haven't tested on Safari tho because I can't get to a mac.

Tested so far on:
Konqueror
Internet Explorer
Opera
Mozilla
Firefox
Camino

Supported on all the browsers above with no bugs/problems.

sirbutts
07-29-2005, 10:05 AM
Camino? Didn't know what that was until I googled it. Turns out its a Mozilla browser for Macs. Niice :D

Boofo
07-29-2005, 10:12 AM
I must be blind. I can't see what this does. ;)

pimpery
07-29-2005, 11:33 AM
I must be blind. I can't see what this does. ;)

Look at the demo using test:test.
It basically lets you put bookmarks in your posts using the [anchor] BBcode.
then you can make a link which jumps to the bookmarks using the [jump] tag

Boofo
07-29-2005, 07:41 PM
I looked at it using the name and password you gave. I just didn't see where the places where you have there to click to show what it does. ;)

Zero Tolerance
07-29-2005, 07:49 PM
I looked at it using the name and password you gave. I just didn't see where the places where you have there to click to show what it does. ;)

Look at the long list of red links, and click one of those.

Also a very nice method of scrolling, the decreation of speed as it gets closer is a very nice effect :)

- Zero Tolerance

Boofo
07-29-2005, 07:58 PM
Ooooohhhhh, I like that now that I see it work. ;)

You have to use thew jump to go where the anchor is right?

JohnBee
07-29-2005, 11:44 PM
That is so cool, is there a way to return to the point of origin?

FD929
07-30-2005, 01:31 PM
Is anybody else having hyperlinking anchor problems on RC1?

jump test

anchor test (post #31274)

Javascript error:
Jump Error: 'http://www.forums.530riders.net/showthread.php?anchor=test&p=31274' does not exist.

Also tried substituting showpost.php for showthread
Great hack pimpery, pretty too!

sirbutts
07-30-2005, 01:58 PM
Heya Fat Dadday :p ,

The jump tag only takes an anchor name as a parameter, and is only used for single-page jumping.

To crossjump use :
http://www.forums.530riders.net/showthread.php?anchor=test&p=31274

as the url itself.

Like this:
http://www.forums.530riders.net/showthread.php?anchor=test&p=31274

Or like this:
Click here (http://www.forums.530riders.net/showthread.php?anchor=test&p=31274)

Hope I helped ya :D

pimpery
07-30-2005, 02:03 PM
Sorry for the delayed response - I was taking the LIRR from Stonybrook University back to my home in Brooklyn.

Boofo: Yes - you use the jump tag to jump to an anchor with the specified name
JohnBee - If you'd like I could add a key shortcut (such as Alt+J) to jump back to the last place a jump was clicked. Tell me if you'd like this idea and I'll do it for you.

FD929 (or Fat Daddy as sirbutts called ya) :p,
I guess he answered your question - thanks sirbutts!

FD929
07-30-2005, 03:47 PM
Oh I see, so the jump won't be used, only the anchor with a url linking to it. Thanks sirbutts! (and it's Fire Dawg, not fat dadday lol)

Thanks pimp, great hack. You rock. :) The alt+J is a good idea too.

pimpery
07-31-2005, 06:38 AM
BIG UPDATE!

Smoothness made better - no more of the little jerks!
KEY SHORTCUTS ADDED!



Key-Shortcuts
-----------------------------

There are two keyshortcuts: Alt+A and Alt+J
Alt+A (Anchor Shortcut) jumps you to the last anchor that you previously jumped to
Alt+J (Jump Shortcut) jumps you to the last jump tag you previously clicked


Update now if you use this hack!

FD929
07-31-2005, 04:37 PM
Sweeet. Thanks for the hard work pimpness.

FD929
07-31-2005, 04:50 PM
The alt shortcuts aren't working for me on IE 6 - Windows 2000 pro.
Anybody else having issues?

Edit: I think it's just this computer. I'll try again when I get home. :)

FD929
07-31-2005, 08:55 PM
Footer script causes javascript error when typing in posting box. Can I get the previous footer script? That one wasn't causing any errors for me and it works fine without the alt code. :)

pimpery
08-01-2005, 03:01 AM
Footer script causes javascript error when typing in posting box. Can I get the previous footer script? That one wasn't causing any errors for me and it works fine without the alt code. :)

Aye sorry. I mistakenly didn't make it cross-browser for IE. Fixed now.
Please redownload and install again. Thanks.

sirbutts
08-02-2005, 12:01 AM
Aye sorry. I mistakenly didn't make it cross-browser for IE. Fixed now.
Please redownload and install again. Thanks.

Nice update pimpery.
Works great for menus.
That way they can press Alt+J to go back to the menu of the tutorial they are viewing :D

The Wise One
10-06-2005, 08:36 PM
very nice. been looking for something like this. works well with 3.5.0.

*installed

vibe
10-09-2005, 07:21 AM
holy smoke
Installed!!!

vibe
12-22-2005, 10:37 PM
How do you crossjump to, for example page 2? links in Sirbutts' post don't work.

Borgs8472
03-26-2006, 10:23 AM
Anyone got a demo of this?

donnie_ogm
04-03-2007, 09:06 PM
in 3.6.4 this bbcode don't give problema but it doesn't work... Installed ok but at the end you are not able to use it while writing a post... any ideas?:confused:

donnie_ogm
04-15-2007, 04:53 PM
ok it works but you must follow the step 1B if you have my version :up:

Dr. Bantham
05-13-2007, 12:34 PM
I have installed this mod and it works well. I am using it for footnote functionality, and have even used it within GARS integrated with multiple page content using the cross-page jumping technique. Thanks!

I do have a desire to either increase the scroll speed or eliminate the scroll effect in entirety. Could someone help me with either/both? Perhaps defaulting to scrolling at an accelerated rate with same-page anchors and eliminating the scroll within cross-page jumping would be a nice feature. Considering that different browsers and styles result in different scroll speeds, my end preference may be to eliminate scrolling entirely. As I am using this with large literature documents with extensive footnote references, the scrolling effect can become quite tedious.

ArnyVee
07-19-2009, 12:51 PM
I see that there hasn't been much activity on this for a couple of years. Does anyone use this with 3.7 or is there another way to do an "Anchor"?

ArnyVee
07-19-2009, 02:10 PM
After a little more research, looks like I can take care of it by using the thread over at vb.com

http://www.vbulletin.com/forum/showthread.php?t=224630