The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to include header and footer of the forum?
Hi,
I create a php file for my main page and I would like to have the header and footer of the forum to be included in that php file. What variable should I use? And, what should I add in order to have that php file having access from the username and password from vBulletin forum. What should I include in that file? Somewhere I read that we need to require global.php and verifyusername? Please help me. |
#2
|
|||
|
|||
your php file needs to have
Code:
require( './global.php' ); Code:
eval( "dooutput( \"" . gettemplate( 'yourtemplatenamehere' ) . "\" );" ); then in that template for the header its Code:
$header Code:
$footer g-force2k2 |
#3
|
|||
|
|||
Thanks a lot g-force2k2. I have one more question. Do we need to add verifyusername function for the authentication after adding the global.php?
|
#4
|
|||
|
|||
you don't really need to add any kind of authentication unless you wanted the script to be restricted...
for guest restriction you can use Code:
if( !$bbuserinfo['userid'] ) { show_nopermission( ); } g-force2k2 |
#5
|
|||
|
|||
All right..I am new actually. Let's say if I want to create a php processing form and using the current member's username and password from my forum..I would like to record each username's submission form values. Therefore, I need to make sure when the visitor submitting the form, he is already a member in my site. Can it be achieved with your solution above?
|
#6
|
|||
|
|||
Hi...I have just created a page and the header and the footer can display but without the image. Can you please help me what's wrong? The page is at http://www.asianguild.com/forum/competition.php
And one more question, how can I display number of members, threads, and posts on the page? And can you let me know what should I include to create the login and logout box on the page? |
#7
|
||||
|
||||
Since the page is in the forum directory it would be easier just to create a new template which would start out something like this:
{htmldoctype} <html> <head> <title>$bbtitle - whatever</title> $headinclude </head> <body> $header and end with: $footer </body> </html> The rest is just basic HTML. You can call the entire template with like file like this: Code:
<?php error_reporting(7); require('./global.php'); eval("dooutput(\"".gettemplate("templatename")."\");"); ?> That should work. As for the other two questions, I believe they have both been released here as hacks. |
#8
|
|||
|
|||
Thanks a lot for the help. I really appreciate your help. Do you know what is the exact code to display the login/logout box and the number of posts, threads, and members? or do you know what are the name of the hacks? But the pages I want to display is not related with vb pages.
|
#9
|
||||
|
||||
There are a few of each here: https://vborg.vbsupport.ru/search.ph...der=descending
|
#10
|
|||
|
|||
wow..really thanks a lot for your help..i really appreciate your help...it helps me now..thanks
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|