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

Reply
 
Thread Tools Display Modes
  #21  
Old 05-01-2004, 09:52 PM
hollyboy's Avatar
hollyboy hollyboy is offline
 
Join Date: Mar 2004
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

should I copy this?
and in the template?
Reply With Quote
  #22  
Old 05-31-2004, 05:07 AM
Oleks Oleks is offline
 
Join Date: Apr 2004
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jakeman
Re: http://www.vbulletin.com/forum/showthread.php?t=101325

Create a PHP file with this code. Change the red code appropriately. This will display a page within your forum layout where the page contents are the contents of the template you specify.

Code:
<?php

// GO TO FORUM DIR
chdir('/full/path/to/forum/directory');

// STANDARD VBULLETIN STUFF
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'script_name');
require_once('./global.php');

// GENERIC_SHELL VARS
$pagetitle = "Title of Page";
$HTML = ""; // PIECED TOGETHER IN SCRIPT

eval('$HTML = "' . fetch_template('name of template') . '";');

eval('print_output("' . fetch_template('GENERIC_SHELL') . '");');

?>




Jakeman,
This php file is working fine.

But, I wand to display ?control panel?. I mean this
Board "tree" and Welcome, UserName
User CP FAQ Members List Calendar New Posts Search Quick Links Log Out

How I can do this? What I should add to your code?

Thank you.
Reply With Quote
  #23  
Old 09-09-2004, 06:13 PM
Allen Mead Allen Mead is offline
 
Join Date: Jul 2004
Location: London
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

I'm having a little trouble with this. I've created a php file called Untitled.php which can be seen here:

http://www.astra-mk2.com/Untitled.php

contents of the file are as follows:

PHP Code:
<?php

// GO TO FORUM DIR
chdir('./forum');

// STANDARD VBULLETIN STUFF
define('NO_REGISTER_GLOBALS'1);
define('THIS_SCRIPT''script_name');
require_once(
'./global.php');

// GENERIC_SHELL VARS
$pagetitle "Title of Page";
$HTML ""// PIECED TOGETHER IN SCRIPT

eval('$HTML = "' fetch_template('name of template') . '";');

$navbits = array(); 
$navbits[$parent] = 'Meganman'

$navbits construct_navbits($navbits); 
eval(
'$navbar = "' fetch_template('navbar') . '";');
eval(
'print_output("' fetch_template('GENERIC_SHELL') . '");');

?>
I can work out how to change the title but not how to insert an html page myhtmlpage.html

The code that's above works beautifully, but it's just the linking to an html as the template and everything that it uses is as I want it.

Any help would be much appreciated.
Reply With Quote
  #24  
Old 09-09-2004, 09:52 PM
Allen Mead Allen Mead is offline
 
Join Date: Jul 2004
Location: London
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, I'm a bit thick when it comes to this sort of thing.

I think i've nailed it down a bit further.

Do i understand it right that I need a script? How and what? and that I obviously need to create the file. Should this have the php or html extension?

Cheers in advanced
Reply With Quote
  #25  
Old 09-10-2004, 11:24 AM
Allen Mead Allen Mead is offline
 
Join Date: Jul 2004
Location: London
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone fancy helping the thick??? :nervous:
Reply With Quote
  #26  
Old 09-10-2004, 01:54 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

php extension
Reply With Quote
  #27  
Old 09-10-2004, 07:00 PM
Allen Mead Allen Mead is offline
 
Join Date: Jul 2004
Location: London
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

still not getting anywhere no matter what i change here, nothing happens

PHP Code:
eval('$HTML = "' fetch_template('name of template') . '";'); 
Lets say I change it to

PHP Code:
eval('$HTML = "' fetch_template('./Articles/Articles_Main.php') . '";'); 
still nothing happens, so obviously i need to change something else but what?

I know I'm terrible, I really need things spelt out!
Reply With Quote
  #28  
Old 09-11-2004, 05:51 PM
Allen Mead Allen Mead is offline
 
Join Date: Jul 2004
Location: London
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone??
Reply With Quote
  #29  
Old 09-13-2004, 06:49 PM
Allen Mead Allen Mead is offline
 
Join Date: Jul 2004
Location: London
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmmm, I've had me another go at this, still can't get it, I give up
Reply With Quote
  #30  
Old 09-15-2004, 05:48 PM
Allen Mead Allen Mead is offline
 
Join Date: Jul 2004
Location: London
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Right, I'm having another pop at this and at the mo, I still can't get it to work this is what I have:

PHP Code:
<?php 

// GO TO FORUM DIR 
chdir('./forum'); 

// STANDARD VBULLETIN STUFF 
define('NO_REGISTER_GLOBALS'1); 
define('THIS_SCRIPT''Articles_Main'); 
require_once(
'./global.php'); 

// GENERIC_SHELL VARS 
$pagetitle "Title of Page"
$HTML ""// PIECED TOGETHER IN SCRIPT 

eval('$HTML = "' fetch_template('./forum/Articles_Main.php') . '";'); 

$navbits = array(); 
$navbits[$parent] = 'Meganman'

$navbits construct_navbits($navbits); 
eval(
'$navbar = "' fetch_template('navbar') . '";'); 
eval(
'print_output("' fetch_template('GENERIC_SHELL') . '");'); 

?>
Can anyone see where I am going wrong?

Cheers
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 04:49 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.04068 seconds
  • Memory Usage 2,268KB
  • 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
  • (1)bbcode_code
  • (4)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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