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)

Marco van Herwaarden 08-03-2005 04:34 AM

That is because they are custom templates. If you want to show them also as default, you will have to set them manually in the database to belong to styleid -1.

This can however mean that they get removed on a vB upgrade.

/me didn't have his coffee yet, so use the above only on a testboard.

MRGTB 08-03-2005 12:44 PM

Does that also mean then if you make some manual edits to some of the default templates, like when you add a new mod that requires some edits in FORUMHOME templates, the chances are an update to an higher version can mess things up becuase they were default templates edited,

Out of interest how would you go about making them changes in your database. Would you go into the template section and edit each template and change the ID.

JMH11788 08-03-2005 11:53 PM

I have this hack working perfect for my forum rules, but I tried making another page today using a template called ARTICLES and a .php file called articles.php. I modifed the template and .php file correctly, but when I go to http://forums.theoverclocked.com/articles.php, I get that error. :confused: Can anyone help?

EDIT: Nvm...appears to be working now....wierd

Selene 08-04-2005 12:57 AM

thanx

derekivey 08-04-2005 01:18 AM

I still can't get it to show the page in a certain style, it always shows it in the style the user is using. Any ideas?

MRGTB 08-04-2005 03:14 PM

Sorry can't help you there, I only use the default style here, so I don't have that problem.

But I also would still like to know how you edit your database so the new template displays a default template for in the edit template page.

James Grant 08-04-2005 08:27 PM

This is a really useful bit of code, but i want to change the style to something different too :ermm:

TylerL 08-06-2005 04:47 PM

Am I the ONLY one with this error?

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/myovercl/public_html/sudburyskate/skatespots/index.php on line 43

PHP 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(
    
'skatespots',
);

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

);

// ######################### REQUIRE BACK-END ############################
chdir('$vboptions[homeurl]/');
require(
'./global.php');

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

$navbits = array();
$navbits[$parent] = 'Sudbury Skate Spots'';

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

?>

Created a template called 'skatespots'. The file is located at:

http://www.sudburyskate.com/skatespots/index.php

Adrian Schneider 08-06-2005 05:13 PM

PHP Code:

$navbits[$parent] = 'Sudbury Skate Spots''; 

should be
PHP Code:

$navbits[$parent] = 'Sudbury Skate Spots'

(it had an extra quote)

Also,
PHP Code:

chdir('$vboptions[homeurl]/'); 

won't work, as $vboptions is set after global.php is ran, and of course even if it was set, you can't use variables inside single quotes.:)

Quote:

Originally Posted by James Grant
This is a really useful bit of code, but i want to change the style to something different too :ermm:

Assuming you are on 3.0.x: (mine is 3.0.7, may be a little dif)

global.php - find:
PHP Code:

$styleid intval($styleid); 

Above it, add:
PHP Code:

if (THIS_SCRIPT == 'yourscriptname')
{
    
$styleid X;


(where yourscriptname is what you have defined at the top of your page)

cnczone 08-10-2005 04:37 PM

Has this been redone for VB 3.5?


All times are GMT. The time now is 10:51 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.08068 seconds
  • Memory Usage 1,752KB
  • 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
  • (6)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