Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-14-2003, 03:33 AM
soccerclue soccerclue is offline
 
Join Date: Mar 2003
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 08-14-2003, 03:45 AM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #3  
Old 08-14-2003, 03:58 AM
soccerclue soccerclue is offline
 
Join Date: Mar 2003
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #4  
Old 08-14-2003, 06:29 AM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 08-14-2003, 06:36 AM
soccerclue soccerclue is offline
 
Join Date: Mar 2003
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #6  
Old 09-03-2003, 09:51 PM
soccerclue soccerclue is offline
 
Join Date: Mar 2003
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #7  
Old 09-04-2003, 10:54 AM
SVTBlackLight01's Avatar
SVTBlackLight01 SVTBlackLight01 is offline
 
Join Date: Jan 2003
Location: Texas
Posts: 504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 09-04-2003, 09:24 PM
soccerclue soccerclue is offline
 
Join Date: Mar 2003
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 09-05-2003, 10:59 AM
SVTBlackLight01's Avatar
SVTBlackLight01 SVTBlackLight01 is offline
 
Join Date: Jan 2003
Location: Texas
Posts: 504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There are a few of each here: https://vborg.vbsupport.ru/search.ph...der=descending
Reply With Quote
  #10  
Old 09-05-2003, 11:17 AM
soccerclue soccerclue is offline
 
Join Date: Mar 2003
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:01 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04408 seconds
  • Memory Usage 2,251KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete