vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Trick to using VB variables on Non-vb pages... (https://vborg.vbsupport.ru/showthread.php?t=47855)

stryka 01-19-2003 03:17 PM

does the following command solve your problems... it might not cuz i still have probs... see below...

Quote:

<?php
include(getenv('DOCUMENT_ROOT').'/forum/global.php');
?>
.....

I have another question though.... i have includes for my HEADER, STYLES and FOOTER.... i put the above command in my HEADER includes file and nothing shows up... the moment i remove it... then I get the proper output...

here's a quick sample... any ideas what is going wrong? Also... check my final question after this quote...

Quote:

<?
include(getenv('DOCUMENT_ROOT').'/includes/hdrtags-inc.php')
?>
</head>

<!-- <body bgcolor="#B5BECE" id="all" link="#000020" vlink="#000020" alink="#000020"> -->
<!-- OUTSIDE CONTAINER w/ border -->
<table align="center" border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#6C8193" width="758">
<tr>
<td>

<!--BEGIN HEADER-->
<table align="center" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="755">
<tr>
<td>
<?
include(getenv('DOCUMENT_ROOT').'/includes/header-inc.php')
?></td>
</tr>
</table>
My Footer tag is just a copy of my VB forum footer... what is the best way to include the variables... how do you write the 'echo' syntax for the following

Quote:

<a title="$bbtitle; ?>" href="index.php?s=$session[sessionhash]">Home</a>&nbsp; |&nbsp;
<a title="Edit your Profile" href="usercp.php?s=$session[sessionhash]">Profile</a>&nbsp; |&nbsp;
<a title="View ChatCon Members." href="memberlist.php?s=$session[sessionhash]">Members</a>&nbsp; |&nbsp;

Link14716 01-19-2003 04:01 PM

Quote:

Originally posted by Sketch
wouldn't fix paths. I'd have to copy EVERYTHING over or at leas tthe files it's trying to include. That just doesn't seem like a valid solution to me. :(

Aaron

Actually, here is a list of files that are needed. These are the ONLY files you'll need to make it work :)

global.php, admin/db_mysql.php, admin/functions.php, admin/sessions.php, admin/config.php

I hope I didn't leave one out. Anyways, those are the files you need. I did the same thing and got my whole site running off vB. :)

stryka 01-19-2003 04:46 PM

so you did multiple includes for each of those files before your HTML? Also, are your non-vb pages outside of the Forum directories?

thanx

Link14716 01-19-2003 04:51 PM

No, you just include global.php and it includes the rest of them. And actually, I used PHP to make it run off the templates instead of hard-coding the HTML into the file, I like that flexibility and power. :D

stryka 01-19-2003 05:00 PM

hmm... ok.. i am willing to try anything to make this work... cuz when I use the include before my HTML, it doesn't load the page or doesn't get the variables... etc... anyhow... I'll gladly throw away the HTML and use templates... but how do you do it?

Can you show a simple example of this in regards to what you mentioned below...

Quote:

actually, I used PHP to make it run off the templates instead of hard-coding the HTML into the file
all the newbies are actively reading this thread so your example will be appreciated...

Davey 01-19-2003 05:05 PM

Yes I'd be interested to know, too Link.
Cheers.

Dave.

Link14716 01-19-2003 05:06 PM

http://www.vggmn.com

Anyways, you don't HAVE to throw away HTML, the thing is, as long as you copy global.php into your main directory and the rest of the files into an admin folder in your main directory, just use
Code:

require ("./global.php");
and put in your HTML. As long as your files were copied right, it will work. :)

Sketch 01-19-2003 06:05 PM

Link, thanks mate. That works perfectly. Now I just have to figure out how to check to see if a user is loggewd on on a non-vb page.

Link14716 01-19-2003 06:53 PM

if ($bbuserinfo[userid]!=0) {
echo "Logged In.";
} else {
echo "Not Logged In.";
}

Davey 01-19-2003 09:22 PM

Link I don't get it.
Can you explain on MSN please mate.
david_james_g_2001@hotmail.com
Thanks.

Dave.


All times are GMT. The time now is 07:28 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.01047 seconds
  • Memory Usage 1,739KB
  • 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
  • (1)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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