vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Mini Mods - Move forumjump to the navbar with javascript (https://vborg.vbsupport.ru/showthread.php?t=151574)

Lea Verou 07-06-2007 10:00 PM

Move forumjump to the navbar with javascript
 
I wanted as many others do, to move the forumjump menu to the navbar, in the pages that it appeared.
If you just put $forumjump in the navbar, it only works in showthread. I had to think of something else.

Pros:
  1. The original vbulletin's forumjump is used and not another re-created version.
  2. The template edits are only 3 and the templates edited just 2: navbar and forumjump!
  3. No vb html code is changed, the template edits are about adding code.
  4. Very little and simple code
  5. No plugins
Cons:
  1. This hack does not work if the forumjump is not meant to appear on a vb page, it just moves it in those pages that it would appear anyway.
  2. The page has to load till the bottom for the forumjump to appear in the navbar. In fact it is firstly loaded at its original position and then moved via javascript in the new one, so in order for the javascript to be executed it has to be loaded at the original postion. This causes the delay.
  3. <script> tags in the body and not in head as the standards command
  4. If javascript is disabled, the forumjump will remain at its original position.
Instructions
1. Put in the navbar where you want the forumjump to appear this code:
HTML Code:

<span id="forumjump_span"></span>
2. In template forumjump add in the start (before any code):
HTML Code:

<span id="forumjump_originalspan">
3. In template forumjump add in the end (after any code):
HTML Code:

</span>
        <script type="text/javascript">
        document.getElementById('forumjump_span').innerHTML = document.getElementById('forumjump_originalspan').innerHTML;
document.getElementById('forumjump_originalspan').innerHTML = '';
        </script> 

If you want it to remain at its original position as well remove the
HTML Code:

document.getElementById('forumjump_originalspan').innerHTML = '';
That's it!

Magnumutz 07-07-2007 03:50 AM

Could you post a screenshot please? I have an idea of what it would look like, but not sure if it would fit.

Lea Verou 07-07-2007 04:06 AM

Quote:

Originally Posted by Magnumutz (Post 1284914)
Could you post a screenshot please? I have an idea of what it would look like, but not sure if it would fit.

Sorry, I can't provide a screenshot as I'm working on a private style atm.
Scroll down to the bottom of this page and you will see a small form consisting of a dropdown and a button with the words "Forum Jump". This is forumjump.

Magnumutz 07-07-2007 04:29 AM

Yeah, i know what it is :D
But wasn't sure on how it would look on the navbar... visually.

Lea Verou 07-07-2007 05:02 AM

You wouldn't benefit from my screenshot about it, the templates on the style I'm working on are heavily modified...

Magnumutz 07-07-2007 07:28 AM

Oh... ok, thanks anyways.

obetyance 08-24-2007 06:13 AM

i Love it! ;)

Lea Verou 08-24-2007 06:14 AM

wow, somebody else installed it :P
thanks obetyance!

obetyance 08-24-2007 10:49 PM

yes, ma'am! look here. www.filairsoft.com .

what i don't like about it is that, its not permanent on the navbar. meaning, it only shows on the navbar when it shows on its original spot.

anyhow, its what i'm really looking for and its good enough. :D

FastCougar 11-01-2007 05:08 PM

The only downside to this hack is that the code block doesn't show until the page is fully loaded ... other than that ...great hack!


All times are GMT. The time now is 09: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.00991 seconds
  • Memory Usage 1,738KB
  • 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_html_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