vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   How to include header and footer of the forum? (https://vborg.vbsupport.ru/showthread.php?t=56183)

soccerclue 08-14-2003 03:33 AM

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.

g-force2k2 08-14-2003 03:45 AM

your php file needs to have

Code:

require( './global.php' );
then it should eval a tempate ie:

Code:

eval( "dooutput( \"" . gettemplate( 'yourtemplatenamehere' ) . "\" );" );
then you have to create a new template ( admin cp > style options > add template ) and that template name needs to go in the eval function as in the code stated above "yourtemplatename"

then in that template for the header its
Code:

$header
and the footer is
Code:

$footer
regards,
g-force2k2

soccerclue 08-14-2003 03:58 AM

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?

g-force2k2 08-14-2003 06:29 AM

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(  );
}

regards,
g-force2k2

soccerclue 08-14-2003 06:36 AM

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?

soccerclue 09-03-2003 09:51 PM

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?

SVTBlackLight01 09-04-2003 10:54 AM

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")."\");");

?>

This would be competition.php in your case.

That should work.

As for the other two questions, I believe they have both been released here as hacks.

soccerclue 09-04-2003 09:24 PM

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.

SVTBlackLight01 09-05-2003 10:59 AM

There are a few of each here: https://vborg.vbsupport.ru/search.ph...der=descending

soccerclue 09-05-2003 11:17 AM

wow..really thanks a lot for your help..i really appreciate your help...it helps me now..thanks


All times are GMT. The time now is 01:46 PM.

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.01012 seconds
  • Memory Usage 1,737KB
  • 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
  • (6)bbcode_code_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