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.

rake 09-07-2004 10:08 AM

quote from a couple of posts above.

Quote:

Originally Posted by rake
Copy & Paste from the navbar template and remove any variables or conditionals.


Holidazed 09-07-2004 12:12 PM

Quote:

Originally Posted by Bad Bunny
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.

Well then, how do I make it work? And yes, I have it set to allow php inside of html, otherwise you would not see what you are seeing.

Quote:

Originally Posted by rake
quote from a couple of posts above.

The goal here is to make it so when I change my navbar, it changes on this page too. If I do what you suggest, I would have to change this page seperately if my navbar were to change. That is not what I want.

Bad Bunny 09-07-2004 04:21 PM

Quote:

Originally Posted by bitg
Well then, how do I make it work? And yes, I have it set to allow php inside of html, otherwise you would not see what you are seeing.

The goal here is to make it so when I change my navbar, it changes on this page too. If I do what you suggest, I would have to change this page seperately if my navbar were to change. That is not what I want.

But the point is that I am not seeing anything. Also, if you are including the header templates as you say, why are you declaring the doctype yourself?

I recommend you use vba cmps. You can set it outside your forum, you can make as many pages as you want. It seems as though it will take far more effort to code your own thing.

Holidazed 09-08-2004 07:43 PM

I understand.

What I would like to see is the means to have any php page with the proper lines be able to fit within the vb3 format.

For example if you were to tell me EXACTLY what to put in the php page to make it work within VB3, then I could add my custom stuff to the middle to make my stuff work.

Eg.

Page code would be as follows
------------------------
vB3 header code

My text

vB3 footer code.
------------------------

Then everything I add to the "My text" area would atomatically be put between the vB3 header and footer.

Holidazed 09-08-2004 08:23 PM

1 Attachment(s)
A good example of what I have so far can be found at the following url.

http://www.dungeonkeepersdomain.com/forums/codetest.php

I have attached what I would like the header and footer to look like. These images are screen captures of what the primary site that is running the vb3 software looks like.

It is obvious that I am close, but it is not all there yet.

rake 09-08-2004 08:29 PM

You're missing the $headinclude
Either add that in, or copy and paste from the source of a vbulletin page. It's the style definition. That's what's missing.

Holidazed 09-08-2004 09:46 PM

Cool. So my code should look like this.

<?php
include("./global.php");
eval('$headinclude = "' . fetch_template('headinclude') . '";');
echo $headinclude;
eval('$header = "' . fetch_template('header') . '";');
echo $header;
eval('$navbar = "' . fetch_template('navbar') . '";');
echo $navbar;
echo "<center><table border=1 cellpadding=10 cellspacing=0><tr><td align=center>I want my own custom text or program to be in this spot</td></tr></table></center>";
eval('$footer = "' . fetch_template('footer') . '";');
echo $footer;
?>

Holidazed 09-09-2004 01:34 AM

OK, now how do I make this new page accept vb3 phrases?


All times are GMT. The time now is 04:10 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.01412 seconds
  • Memory Usage 1,764KB
  • 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
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (18)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete