Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #21  
Old 01-04-2009, 07:37 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The eval line is php and you have it sitting in the middle of a bunch of html. You can probably put that eval line right after the require_once global.php line. Then, where you currently have the eval line, just put $navbar
Reply With Quote
  #22  
Old 01-04-2009, 07:54 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you're trying to insert the vbulletin navbar into an external app, be aware the navbar won't look like it does in vB with its pretty drill down folder view or anything. You'll also haev to make that happen yourself for any page you include it on.
Reply With Quote
  #23  
Old 01-04-2009, 08:03 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I didn't even think of that Zachery, you are right. You would really need to include the $header and $headerinclude templates also. Basically, you would want to follow one of these articles and insert your wiki text into them - How to create your own vBulletin-powered page! (uses vB templates) or [How-To] vBulletin API Basics: Creating Custom Pages & Misc.
Reply With Quote
  #24  
Old 01-04-2009, 08:35 PM
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Location: Essex, United Kingdom
Posts: 1,637
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by pjkcards View Post
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!
would something like this help??

Demo: http://www.ukbusinesslive.co.uk/forum/demo.html

https://vborg.vbsupport.ru/showthread.php?t=200686

Its html and an easy edit for your forum or alternative site
Reply With Quote
  #25  
Old 01-04-2009, 10:56 PM
pjkcards pjkcards is offline
 
Join Date: Jul 2007
Posts: 299
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne
I didn't even think of that Zachery, you are right. You would really need to include the $header and $headerinclude templates also. Basically, you would want to follow one of these articles and insert your wiki text into them - How to create your own vBulletin-powered page! (uses vB templates) or [How-To] vBulletin API Basics: Creating Custom Pages & Misc.
Would I use these to include the $headericnlue and $header templates?:
PHP Code:
eval('$headerinclude = "' fetch_template('headerinclude') . '";');  
eval(
'$header = "' fetch_template('header') . '";'); 
After I have done that, along with what you mentioned in regards to the $navbar, would that make the navbar format nicely? Would I need to put $headerinclude and $header variables with my $navbar variable that you mentioned above?

As far as the two links you gave me, I have created several vB powered pages with content for Premium Memberships and whatnot. However, the wiki is in /wiki, so simply inserting my wiki homepage code into a vB powered powered page wouldn't work, I don't think, since that would make no changes to /wiki files.

Quote:
Originally Posted by UKBusinessLive
would something like this help??

Demo: http://www.ukbusinesslive.co.uk/forum/demo.html

https://vborg.vbsupport.ru/showthread.php?t=200686

Its html and an easy edit for your forum or alternative site
That is nice, however, it isn't what I need. I want to copy my navbar. By using what you have, I'd have to change my existing navbar as well. Thanks though.
Reply With Quote
  #26  
Old 01-04-2009, 11:11 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by pjkcards View Post
Would I use these to include the $headericnlue and $header templates?:
PHP Code:
eval('$headerinclude = "' fetch_template('headerinclude') . '";');  
eval(
'$header = "' fetch_template('header') . '";'); 
After I have done that, along with what you mentioned in regards to the $navbar, would that make the navbar format nicely? Would I need to put $headerinclude and $header variables with my $navbar variable that you mentioned above?
I really don't know. I've never tried to do what you are doing. I think you are just going to have to do this by trial and error.
Reply With Quote
  #27  
Old 01-05-2009, 12:47 AM
pjkcards pjkcards is offline
 
Join Date: Jul 2007
Posts: 299
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay. I tried what you suggested in post #21, and I get this error:
Code:
Fatal error: Call to a member function query_first_slave() on a non-object in /home/user/public_html/domain/forum/includes/functions.php on line 1178
This seems like something that should be quite do-able. If I can at least make the navbar exist without errors, I can work toward formatting it. Why is the above error is occurring?
Reply With Quote
  #28  
Old 01-05-2009, 02:14 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was thinking about this some more and realized even if you get the head/headinclude/navbar to print out on that page, the links may all be wrong since they are going to assume you are in the vb directory. You really may have a much easier time just copying the page source of the navbar from one of your forum pages and putting it in your wiki page.
Reply With Quote
  #29  
Old 01-05-2009, 02:23 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
the links may all be wrong since they are going to assume you are in the vb directory.
The HTML base element comes to save the day!
HTML Code:
<base href="http://www.yoursite/forum" />
Reply With Quote
  #30  
Old 01-05-2009, 02:27 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah yes, I forgot about that (cuz it doesn't work on my test site - weird).

As for the error.... I'm not sure. Did you define the $navbits like in those articles I linked you to? I know those get used in the navbar and I'm not sure what would happen if you don't define them.
Reply With Quote
Reply

Thread Tools
Display Modes

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 05:38 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.06272 seconds
  • Memory Usage 2,267KB
  • 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_code
  • (1)bbcode_html
  • (2)bbcode_php
  • (5)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
  • (4)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