vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   How to create your own vBulletin-powered page! (uses vB templates) (https://vborg.vbsupport.ru/showthread.php?t=62164)

Ghostsuit 08-03-2004 02:05 AM

Excellent guide.

Eagle Creek 08-11-2004 10:01 AM

Cool! I'm gonna install that I think!

SVTBlackLight01 08-11-2004 02:51 PM

Quote:

Originally Posted by sully02
Is there a way to get the functions_online.php file to differentiate between the two?

I would like to know this as well.

sully02 08-12-2004 02:41 PM

And while I'm at it, I would like a link to appear below their location of my new page. Every time I try to add one (Going off what I see in other conditions), I end up getting a parse error. Any suggestions?

wreck 08-14-2004 11:37 PM

would this be compatible with vB2 or can anybody make it so its compatible with vB2

DarkWarriorXII 08-15-2004 12:58 AM

I got my test page (test.php) to work, but it comes up without showing my forum style (it shows the original vB style). Here's the code of the page (oh yeah, the page is outside the vB directory):

PHP Code:

<?php 

// ####################### SET PHP ENVIRONMENT ########################### 
error_reporting(E_ALL & ~E_NOTICE); 

// #################### DEFINE IMPORTANT CONSTANTS ####################### 
define('NO_REGISTER_GLOBALS'1); 
define('THIS_SCRIPT''test'); // change this depending on your filename 

// ################### PRE-CACHE TEMPLATES AND DATA ###################### 
// get special phrase groups 
$phrasegroups = array( 

); 

// get special data templates from the datastore 
$specialtemplates = array( 
     
); 

// pre-cache templates used by all actions 
$globaltemplates = array( 
    
'test'
); 

// pre-cache templates used by specific actions 
$actiontemplates = array( 

); 

// ######################### REQUIRE BACK-END ############################ 
chdir('/home/kowlcla/public_html/forum/');
require(
'./global.php');

// ####################################################################### 
// ######################## START MAIN SCRIPT ############################ 
// ####################################################################### 

$navbits = array(); 
$navbits[$parent] = 'vB Test Page; 

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

?>

1. What's wrong here?
2. And the links all point to my website's root directory, not my forum's root directory. For example: http://domain.com/usercp.php instead of http://domain.com/forum/usercp.php.
3. And the navbar drop down menus don't work. How do I fix this also?

Thanks for answering all my questions.

wreck 08-17-2004 01:20 AM

so would this or would it not work for vb2

lichtflits 08-17-2004 09:03 AM

Wreck look here https://vborg.vbsupport.ru/showthread.php?t=66153 for vb2 powerd pages

wreck 08-18-2004 04:54 PM

thanks

sfowler39 08-20-2004 01:52 PM

Ok I created the test page and in my template I try and put in this

<?php
$db = mysql_connect("localhost", "root", "");
mysql_select_db("reports",$db);
$result = mysql_query("SELECT * FROM hrc",$db);
echo "<TABLE BORDER=2>";
echo"<TR><TD><B>Full Name</B><TD><B>Credit Card Number</B><TD></TR>";
while($myrow = mysql_fetch_array($result))
{
echo "<TR><TD>".$myrow["firstname"]." ".$myrow["lastname"]."</a><TD>".$myrow["creditcardnum"];
}
echo "</TABLE>";
?>

I always get an error trying to put in php code into a template.
I am trying to have a page that only a group of people can view and which must be logged into the board to see this page. I want this code to be used to retrive info from a database. It works as it stands like it is and as it is but I cant place this code into a template.
Any Ideas?


All times are GMT. The time now is 11:25 PM.

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.03474 seconds
  • Memory Usage 1,743KB
  • 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
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (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