Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-02-2003, 06:56 AM
imported_nightwalk8r imported_nightwalk8r is offline
 
Join Date: Sep 2003
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default VB header on an external page....

i need help including the header and footer from my vb forums to a script that is outside the forums dir.
P.S. i've been trying to find the solution to it for hecka long time......search the board and everything.....so please help me out =(


Ex:

http://www.site.com/forums <<------Forums dir
http://www.site.com/page.php <<------Page to include the header and footer
Reply With Quote
  #2  
Old 10-02-2003, 10:43 AM
Tony G's Avatar
Tony G Tony G is offline
 
Join Date: Nov 2001
Location: Melbourne, Australia
Posts: 8,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="http://www.vbulletintemplates.com/mods/showthread.php?t=4564" target="_blank">http://www.vbulletintemplates.com/mo...ead.php?t=4564</a>

Then include $header and $footer in your template code and use the template to code the whole page.
Reply With Quote
  #3  
Old 10-02-2003, 12:32 PM
imported_nightwalk8r imported_nightwalk8r is offline
 
Join Date: Sep 2003
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm.......i seems to keep on getting this error

Warning: main(./admin/config.php): failed to open stream: No such file or directory in /home/anim3df/public_html/global.php on line 129


My Code:

<?php
include("./global.php");
eval("dooutput(\"".gettemplate('header')."\");");
?>


Forums Dir:
http://www.site.com/forums

Test.php Dir
http://www.site.com/test.php
Reply With Quote
  #4  
Old 10-02-2003, 12:38 PM
Tony G's Avatar
Tony G Tony G is offline
 
Join Date: Nov 2001
Location: Melbourne, Australia
Posts: 8,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That is wrong. You call a new template. Lets say it's called 'site' and put it into the file code. Then make a new template through your ACP called 'site'. So now the file name will call that template. Input the variable $header for the header to show, but use this with the stuff you'd like to display on the page.
Reply With Quote
  #5  
Old 10-02-2003, 12:44 PM
imported_nightwalk8r imported_nightwalk8r is offline
 
Join Date: Sep 2003
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

should i include the full path/or URL to the global.php?

include("./global.php"); <<--- in here

b/c if i put the site.php in the forums dir, it works......but i dont want it to be in the forums dir tho =/
Reply With Quote
  #6  
Old 10-02-2003, 01:11 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok then try this


oh wait vb2 hmmm
lol hadda think for a moment, that should work
PHP Code:
<?php
 
// ## Changes the Directory so it will grab vb ##
chdir("/full/path/to/forum/");
// ## Grabs global.php so it will use vb2 functions ##
require("./global.php");
// ## Grabs a Sepecific Template ##
eval("dooutput(\"".gettemplate('templatename')."\");");
?>
Reply With Quote
  #7  
Old 10-02-2003, 04:23 PM
imported_nightwalk8r imported_nightwalk8r is offline
 
Join Date: Sep 2003
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Faranth
ok then try this


oh wait vb2 hmmm
lol hadda think for a moment, that should work
PHP Code:
<?php
 
// ## Changes the Directory so it will grab vb ##
chdir("/full/path/to/forum/");
// ## Grabs global.php so it will use vb2 functions ##
require("./global.php");
// ## Grabs a Sepecific Template ##
eval("dooutput(\"".gettemplate('templatename')."\");");
?>


got another problem...u can see it here:

http://anim3.com/site.php
Reply With Quote
  #8  
Old 10-02-2003, 04:25 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

go into the ACP and define the image paths like

http://yourforums.com/forumsdir/imgdir/
Reply With Quote
  #9  
Old 10-03-2003, 12:05 AM
Tony G's Avatar
Tony G Tony G is offline
 
Join Date: Nov 2001
Location: Melbourne, Australia
Posts: 8,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Eep, didn't realise this was in the wrong forum. Moving to vB2 support..
Reply With Quote
  #10  
Old 10-03-2003, 03:57 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i already thought this was in vb2 lol
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 01:31 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.04329 seconds
  • Memory Usage 2,249KB
  • 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
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete