Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Anchor and Jump BBCode! Details »»
Anchor and Jump BBCode!
Version: 1.00, by pimpery pimpery is offline
Developer Last Online: Aug 2006 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 07-03-2005 Last Update: 07-31-2005 Installs: 4
 
No support by the author.

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 )



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

Supporters / CoAuthors

Show Your Support

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

Comments
  #2  
Old 07-04-2005, 07:18 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice, thanks for sharing.

Could you please also provide these instructions in a textfile, so people can keep that for future reference and upgrades.
Reply With Quote
  #3  
Old 07-04-2005, 07:00 PM
Floris Floris is offline
 
Join Date: Jan 2002
Posts: 1,898
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know js that well, so have no clue what that code does. Not using it on my site .. using other bbcodes that works without file modifications.

http://www.vbulletin-tutorials.com/showthread.php?t=2
Reply With Quote
  #4  
Old 07-05-2005, 12:16 AM
pimpery pimpery is offline
 
Join Date: Nov 2004
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by floris
I don't know js that well, so have no clue what that code does. Not using it on my site .. using other bbcodes that works without file modifications.

http://www.vbulletin-tutorials.com/showthread.php?t=2
Well it can work without file modifications by including the code in the bbcode thing by using script tags...BUT...lots of bandwith will be sucked up. I don't see whats so bad about 1 small file modification.

Instructions put in a zipped txt as for Marco's request. Thanks Marco!
Reply With Quote
  #5  
Old 07-05-2005, 05:45 AM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh dear lord. I love you. This is incredible... my website compiles lists of working glitches on various video games. I've moved them all into one post and have always wanted a way so that users could simply click a glitch's name from a list and they would be pointed to the appropriate glitch. Did I mention I love you?

Edit: It makes perfect sense that the hack I've been dreaming of finally arrives and I can't get it to work. Ha! I've cleared my cache, but still no go. I've tried in Firefox, Opera, and Internet Explorer. Will this work across most common browsers, or is it limited to IE only? Perhaps I'm not properly clearing my cache. In Firefox and Opera, there's an option that specifically states, "Clear Cache". However, in IE, there is no similar option. Perhaps an auto-installer isn't such a bad idea... for those of us not gifted with intelligence, lol. :nervous:
Reply With Quote
  #6  
Old 07-06-2005, 02:39 AM
pimpery pimpery is offline
 
Join Date: Nov 2004
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by acidburn0520
Oh dear lord. I love you. This is incredible... my website compiles lists of working glitches on various video games. I've moved them all into one post and have always wanted a way so that users could simply click a glitch's name from a list and they would be pointed to the appropriate glitch. Did I mention I love you?

Edit: It makes perfect sense that the hack I've been dreaming of finally arrives and I can't get it to work. Ha! I've cleared my cache, but still no go. I've tried in Firefox, Opera, and Internet Explorer. Will this work across most common browsers, or is it limited to IE only? Perhaps I'm not properly clearing my cache. In Firefox and Opera, there's an option that specifically states, "Clear Cache". However, in IE, there is no similar option. Perhaps an auto-installer isn't such a bad idea... for those of us not gifted with intelligence, lol. :nervous:
It was tested on FireFox, Opera, Internet Explorer, and Safari - and it works on all of them. The code is simple and fast. Goto Tools --> Internet Options --> Delete Files (Check 'Delete all offline content') and press 'OK' for Internet Explorer cache deletion. In IE - refreshing the page should work just as well.
Reply With Quote
  #7  
Old 07-06-2005, 02:51 AM
pimpery pimpery is offline
 
Join Date: Nov 2004
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh yes, Acidburn - I forgot to tell you that for your purpose another hack I made might be better - it's called Accordion BBCode: (https://vborg.vbsupport.ru/showthrea...t=76405&page=4)
Reply With Quote
  #8  
Old 07-06-2005, 06:41 AM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, it's still not working. I've seen the Accordian BBCode before, it's cool, but this BBCode works the best, in my opinion... plus it's like extra super-special cool. I just wish I could get it to work. I've rechecked the BBCode replacements, they're correct... I'm putting the provided code at the bottom of my vbulletin_global.js file.

Code:
				tds[i].origclass = tds[i].className;
				tds[i].swapclass = iif(tds[i].className == "alt1Active", "alt2Active", "alt1Active");
				tds[i].onmouseover = activecells_mouseover;
				tds[i].onmouseout = activecells_mouseout;
				tds[i].onclick = activecells_click;
			}
			break;
		}
	}
}
function jump(a){var b=document.getElementById(a);if(b){var c=b.offsetTop;while(b.offsetParent){c=c+b.offsetParent.offsetTop;b=b.offsetParen t;}var d=document.documentElement;var e;if(c<d.scrollTop){e=-1;}else{e=1;}while(c!==d.scrollTop){scroll(0,d.scrollTop+Math.pow(Math.abs(c-d.scrollTop),1/3)*e);}}else{alert("Jump Error: '"+a+"' does not exist");}}
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 15:34, Wed May 4th 2005
|| # CVS: $RCSfile: vbulletin_global.js,v $ - $Revision: 1.89 $
|| ####################################################################
\*======================================================================*/
I've cleared my cache... for all intents and purposes this BBCode should be working... but for whatever reason, it's not. Could you have perhaps mistyped or mispasted the Javascript code in the above instructions?

By the way, I've noticed that when I place the Javascript code into the .js file, some things on my Forum mess up. Like I cannot type in the New Reply box and I cannot click on a drop-down menu.
Reply With Quote
  #9  
Old 07-08-2005, 01:15 AM
pimpery pimpery is offline
 
Join Date: Nov 2004
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Acid,

Ahhh - figured it out. For some reason the install instructions within the code tags in my post were being screwed up. The code tag added spaces as shown between the n and the t:

"b=b.offsetParen t"

Now I only have the instructions in the zip attached. Please just download the zipped txt and copy the function from there. Sorry for the inconvenience - I guess code tags aren't suited for pasting in javascript
Reply With Quote
  #10  
Old 07-08-2005, 01:18 AM
pimpery pimpery is offline
 
Join Date: Nov 2004
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh ya - If it does work after copying, please tell me so I can move the hack into the regular section.
Reply With Quote
Reply

Thread Tools

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 02:58 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.10095 seconds
  • Memory Usage 2,299KB
  • 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
  • (1)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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
  • (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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete