vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   vB3 menu on a non vb3 page (https://vborg.vbsupport.ru/showthread.php?t=69159)

Holidazed 09-06-2004 09:42 PM

vB3 menu on a non vb3 page
 
Can somebody please tell me how to add the vb3 menu on a standard html page?

I have a page I am adding to my site, but I want it to pull the navbar template and keep the cookie info from my vb3?

Ideas?

rake 09-06-2004 10:40 PM

first of all, you'd need some of the vbulletin functions, so you need to include the vb global file, then get the navbar, and then echo it.

<?php
chdir("path/to/my/forums");
include("./global.php");
eval('$navbar = "' . fetch_template('navbar') . '";');
echo $navbar;
?>

Holidazed 09-06-2004 11:23 PM

Is there anyway to do this without php?

rake 09-06-2004 11:29 PM

Copy & Paste from the navbar template and remove any variables or conditionals.

Holidazed 09-06-2004 11:31 PM

I did that, but the drop-down menus do not work.

Holidazed 09-06-2004 11:38 PM

Quote:

Originally Posted by rake
first of all, you'd need some of the vbulletin functions, so you need to include the vb global file, then get the navbar, and then echo it.

<?php
chdir("path/to/my/forums");
include("./global.php");
eval('$navbar = "' . fetch_template('navbar') . '";');
echo $navbar;
?>

I used the php you gave me annd it does not display the navbar. I then modified it to the following to include the header and got the same result.

<?php
chdir("/home/webbhelp/www/forums");
include("./global.php");
eval('$header = "' . fetch_template('header') . '";');
echo $header;
eval('$navbar = "' . fetch_template('navbar') . '";');
echo $navbar;
?>

Ideas?

rake 09-06-2004 11:38 PM

you'll also need the jscript and the headinclude

rake 09-06-2004 11:40 PM

I just tried the php code i gave you, and it works fine for me.

Holidazed 09-07-2004 12:22 AM

My code looks like this.
The link is as follows: http://hidingplace.com/BibleSearch/html/header.html. As you can see, the navbar template does not show the background colors that are usually behind the links, the drop-down menu images are not showing up and not working. The only reason it is pulling the title image and the background image is becuase I have hard coded them in the header template.

Ideas?

Code:

<meta http-equiv="Content-Type" content="text/html; charset=$stylevar[charset]" />
<meta name="generator" content="vBulletin $versionnumber" />
<meta name="keywords" content="$vboptions[keywords]" />
<meta name="description" content="$vboptions[description]" />
 
<!-- CSS Stylesheet -->
$style[css]
<if condition="is_browser('opera')">
<style type="text/css">
ul, ol { padding-left:20px; }
</style>
</if>
<!-- / CSS Stylesheet -->
 
<script type="text/javascript">
<!--
var SESSIONURL = "$session[sessionurl]";
var IMGDIR_MISC = "$stylevar[imgdir_misc]";
// -->
</script>
 
<script type="text/javascript" src="/forums/clientscript/vbulletin_global.js"></script>
<if condition="$show['popups']"><script type="text/javascript" src="/forums/clientscript/vbulletin_menu.js"></script></if>
 
<?php
chdir("/home2/webbhelp/www/forums");
include("./global.php");
eval('$header = "' . fetch_template('header') . '";');
echo $header;
eval('$navbar = "' . fetch_template('navbar') . '";');
echo $navbar;
?>


Bad Bunny 09-07-2004 08:00 AM

Quote:

Originally Posted by bitg
My code looks like this.
The link is as follows: http://hidingplace.com/BibleSearch/html/header.html. As you can see, the navbar template does not show the background colors that are usually behind the links, the drop-down menu images are not showing up and not working. The only reason it is pulling the title image and the background image is becuase I have hard coded them in the header template.

Ideas?

Code:

<meta http-equiv="Content-Type" content="text/html; charset=$stylevar[charset]" />
 <meta name="generator" content="vBulletin $versionnumber" />
 <meta name="keywords" content="$vboptions[keywords]" />
 <meta name="description" content="$vboptions[description]" />
 
 <!-- CSS Stylesheet -->
 $style[css]
 <if condition="is_browser('opera')">
 <style type="text/css">
 ul, ol { padding-left:20px; }
 </style>
 </if>
 <!-- / CSS Stylesheet -->
 
 <script type="text/javascript">
 <!--
 var SESSIONURL = "$session[sessionurl]";
 var IMGDIR_MISC = "$stylevar[imgdir_misc]";
 // -->
 </script>
 
 <script type="text/javascript" src="/forums/clientscript/vbulletin_global.js"></script>
 <if condition="$show['popups']"><script type="text/javascript" src="/forums/clientscript/vbulletin_menu.js"></script></if>
 
 <?php
 chdir("/home2/webbhelp/www/forums");
 include("./global.php");
 eval('$header = "' . fetch_template('header') . '";');
 echo $header;
 eval('$navbar = "' . fetch_template('navbar') . '";');
 echo $navbar;
 ?>


First of all, you're adding php into the middle of an html file. Unless you have changed your htaccess file to run html files as php, then this just doesn't work.
Secondly, I see you are placing vb if conditional statements right inside html. That just doesn't work.


All times are GMT. The time now is 10:06 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.01275 seconds
  • Memory Usage 1,741KB
  • 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
  • (2)bbcode_code_printable
  • (2)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