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)

Lynne 12-22-2008 05:54 PM

Quote:

Originally Posted by Chunky Monkey (Post 1691293)
I see. I didn't realize I had to go to Manage Plugins and create a new plugin. I've followed your instructions but the location is reading Unknown common/lists.css. Any idea as to why that might be happening?

I have no idea since I can't see exactly what you did for the two plugins. Like I said before, if you need further help you should post in the correct forum - this thread isn't really about the Who's Online locations.

Chunky Monkey 12-22-2008 05:55 PM

Thanks, I'll post my question in the General Discussion forum.

supergper 12-22-2008 10:41 PM

Ok, this is excellent info, I've tried to read most of this thread but I'm sure i have missed this somewhere. I am trying to create a page within a directory within my forum directory (forum is at /var/www/html/forum, directory is at /var/www/html/forum/directory). I added the
Code:

chdir('/var/www/html/forum/');
and my page is showing up, mostly. The problem I am having is my header, navbar, or footer are not showing up on my page??? Do I need to change a path in my Template, or??? If I create a test page in my forum directory everything works fine, so I'm sure I'm just missing something simple. Any help would be appreciated. ...and sorry if this has already been answered

Thanks

amcd 12-23-2008 02:28 AM

supergper, in your template, put
Code:

$header
$navbar


$footer

at the appropriate place.

supergper 12-23-2008 07:08 AM

Quote:

Originally Posted by amcd (Post 1691670)
supergper, in your template, put
Code:

$header
$navbar


$footer

at the appropriate place.

I've already got them. Here is my template:

Code:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle]</title>
$headinclude
</head>
<body>
$header

$navbar



$footer
</body>
</html>

Like i said, if I put my page in the directory with my forum, it works fine, however if it's one directory deeper, forum/directory/, then my header, navbar, and footer don't show.

amcd 12-23-2008 07:17 AM

do the chdir before you include/require global.php

supergper 12-23-2008 07:25 AM

It's already there. Here is my php file (I've named it index.php and my template is named GrandTech)

Code:

<?php

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

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'index'); // 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(
    'GrandTech',
);

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

);

// ######################### REQUIRE BACK-END ############################
chdir('/var/www/html/forum/');
require_once('./global.php');

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

$navbits = array();
$navbits[$parent] = 'Grand Tech';

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

?>


amcd 12-23-2008 07:45 AM

Try to call it somethingelse.php and put it in the forum directory and comment out the chdir and see if it works. If it does, then the problem because of the changed directory.

supergper 12-23-2008 08:13 AM

Quote:

Originally Posted by amcd (Post 1691797)
Try to call it somethingelse.php and put it in the forum directory and comment out the chdir and see if it works. If it does, then the problem because of the changed directory.

Quote:

Originally Posted by supergper (Post 1691782)

Like i said, if I put my page in the directory with my forum, it works fine, however if it's one directory deeper, forum/directory/, then my header, navbar, and footer don't show.

;)


I am fully aware it's because of the changed directory, I'm trying to figure out how to rectify that :)

Lynne 12-23-2008 03:32 PM

Get rid of the ending slash:
PHP Code:

chdir('/var/www/html/forum'); 



All times are GMT. The time now is 10:30 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.02540 seconds
  • Memory Usage 1,744KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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