Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-22-2008, 11:30 PM
pjkcards pjkcards is offline
 
Join Date: Jul 2007
Posts: 299
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to copy the navbar?

I want to copy my forum's navbar to another page off the site. How do I do this?

There is a lot of PHP embedded into it, which may make it hard. Is there an easy way to do this?

Thanks in advance.
Reply With Quote
  #2  
Old 12-23-2008, 01:11 AM
RLShare RLShare is offline
 
Join Date: Jun 2008
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it a custom external page using Vbulletin templates? Either way, including global.php from the forum root will give you access to the $navbar variable which holds the navbar template code. But you should in all reality you should set the 'navbits' section and then rebuild it.
Reply With Quote
  #3  
Old 12-23-2008, 02:23 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="https://vborg.vbsupport.ru/showthread.php?t=62164" target="_blank">How to create your own vBulletin-powered page!</a>
Reply With Quote
  #4  
Old 12-23-2008, 03:55 AM
pjkcards pjkcards is offline
 
Join Date: Jul 2007
Posts: 299
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, it isn't an external page using vB templates. It is a wiki that is a sub-set of my site which uses vB. The wiki is in the /wiki directory, while vB is in the /forum directory. I want to include my navbar on the wiki, so I want to know how to copy it over.

Quote:
Either way, including global.php from the forum root will give you access to the $navbar variable which holds the navbar template code. But you should in all reality you should set the 'navbits' section and then rebuild it.
How do I go about that? Copy global.php into /wiki, and then copy the navbar code over? What do you mean set the 'navbits' section and rebuild? If you could give me more details, that would be greatly appreciated.

Thanks!
Reply With Quote
  #5  
Old 12-25-2008, 02:45 AM
pjkcards pjkcards is offline
 
Join Date: Jul 2007
Posts: 299
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do I go about that? Copy global.php into /wiki, and then copy the navbar code over? What do you mean set the 'navbits' section and rebuild? If you could give me more details, that would be greatly appreciated.
Reply With Quote
  #6  
Old 01-03-2009, 11:13 PM
pjkcards pjkcards is offline
 
Join Date: Jul 2007
Posts: 299
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any help with this would be great. I'd like to get this squared away ASAP so I can move onto the next project.

Thanks!
Reply With Quote
  #7  
Old 01-04-2009, 02:15 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

in the php of the other pages, you would chdir to the vb directory and then include global.php:

PHP Code:
chdir ('/path/to/your/vbforums');
require_once(
'./global.php'); 
Reply With Quote
  #8  
Old 01-04-2009, 02:59 AM
pjkcards pjkcards is offline
 
Join Date: Jul 2007
Posts: 299
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't quite understand. Do I simply copy all my navbar code, paste it into the /wiki page, and include the PHP code you pasted in it somewhere? Why chdir to the vb forums?
Reply With Quote
  #9  
Old 01-04-2009, 03:06 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, I thought you wanted to include that actual template and if you do, you need to include global.php in your pages and I was telling you the code to include global.php in the pages.

I am unfamiliar with whatever wiki you are trying to install, so I can't really comment on whether that is the right way to go about it or if it's better to just copy the navbar html itself.
Reply With Quote
  #10  
Old 01-04-2009, 03:21 AM
pjkcards pjkcards is offline
 
Join Date: Jul 2007
Posts: 299
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a Wiki installed as a sub-site of my forum. I want to create header so it looks very similar to the header of my forum, so users can navigate to the wiki without noticing too much of a difference. I have most of it complete, except I want the navbar displayed. It can be a custom navbar (HTML w/ links) that I will need to edit each time I add a link to the other navbar, but I simply want it to look the same. The navbar template has quite a bit of PHP (like if else statements) which would affect how the navbar looks. Hence, I am wondering if simply including the template would be easier. The navbar on my forum is actually built into the header, I can post the code if you can help me figure out what I need to do to make this work.

How would I go about this? Thanks!
Reply With Quote
Reply


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 01:36 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.11606 seconds
  • Memory Usage 2,252KB
  • Queries Executed 11 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)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
  • (10)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