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)

Alien 02-17-2009 10:26 PM

So the "define('CSRF_PROTECTION', true);" code should be added under #1 above, even if the script and related custom template contains NO forms whatsoever?

Lynne 02-18-2009 12:06 AM

Quote:

Originally Posted by Alien (Post 1747342)
So the "define('CSRF_PROTECTION', true);" code should be added under #1 above, even if the script and related custom template contains NO forms whatsoever?

I'm pretty sure it doesn't hurt to have it there if there are no forms.

ragtek 02-18-2009 06:46 AM

Quote:

Originally Posted by Lynne (Post 1747404)
I'm pretty sure it doesn't hurt to have it there if there are no forms.

hmm, for example: if guests or other groups don't have access, they'll see the loginform

Lynne 02-18-2009 03:38 PM

A login is processed by the login.php page, not your page.

ragtek 02-18-2009 03:57 PM

sorry, your right

emocan 02-18-2009 07:01 PM

how can we modify this php page to use it in the admincp with admin permissions? or is there another tutorial?

Thx

ragtek 02-19-2009 08:02 AM

<a href="https://vborg.vbsupport.ru/showthread.php?t=83122&highlight=admincp" target="_blank">https://vborg.vbsupport.ru/showt...hlight=admincp</a>

emocan 02-19-2009 08:37 AM

ragtek thanks for the link

RrCoX22 02-24-2009 05:57 AM

question...

are both those first two codes in the instructions in the same file? my file looks like this: and I placed in under my forum directory and just got a black white page. what am I doing wrong?

Code:

<?php

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

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'stickers'); // 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(
    'Norcal 4x4 Forum Dark Side',
);

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

);

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

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

$navbits = array();
$navbits[$parent] = 'Norcal 4x4 Forum Stickers';

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('Norcal 4x4 Forum Dark Side') . '");');

?>

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

$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="tcat">Title</td>
</tr>
<tr>
        <td class="alt1">Text</td>
</tr>
</table>

$footer
</body>
</html>


Lynne 02-24-2009 03:05 PM

I am guessing this line is the problem:
PHP Code:

eval('print_output("' fetch_template('Norcal 4x4 Forum Dark Side') . '");'); 

Do you have a template with that name?

And per the article, the stuff under the ?> is supposed to go into the template you create called "'Norcal 4x4 Forum Dark Side'" (usually we don't use spaces, but use _ instead.)


All times are GMT. The time now is 11:06 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.02427 seconds
  • Memory Usage 1,745KB
  • 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_code_printable
  • (1)bbcode_php_printable
  • (2)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