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)

Adem GEN? 03-07-2009 07:31 PM

<div align="left">Excuse me Was I wrong to want

For help thanks
</div>

Lynne 03-07-2009 07:53 PM

No, you aren't wrong to want help. I'm just suggesting that maybe it would be better for you to have your own thread to ask all these questions. Kinda keep it all in one place and not have other users commenting about their problems inbetween your questions in the same thread also.

Adem GEN? 03-07-2009 10:05 PM

I have written here by mistake

I opened a new thread
Here you can delete


Stagehandspace 03-09-2009 01:55 PM

I get a blank page when set as guest any help would be good, all I have done is copied the code from first post

ragtek 03-09-2009 01:56 PM

whats your code?

Stagehandspace 03-09-2009 02:04 PM

As mentioned I have just simply copied the code from first page, and set test.php as the terms of service link, As member it is viewable but not as guest....strange

using 3.8.1 if that help any...

ragtek 03-09-2009 02:10 PM

1. make sure that you have nothing before <?php
2. yes this code is still working with 3.8

--------------- Added [DATE]1236611544[/DATE] at [TIME]1236611544[/TIME] ---------------

there are just 2 "new things"
1. use the securitytoken
2. no_register_globals is not needed

--------------- Added [DATE]1236611613[/DATE] at [TIME]1236611613[/TIME] ---------------

maybe the autor could update the article;)

Stagehandspace 03-09-2009 02:15 PM

Quote:

Originally Posted by ragtek (Post 1764042)
1. make sure that you have nothing before <?php
2. yes this code is still working with 3.8

theres nothing b4 <?php

like I say it works as member just not as guest...

Added:
PHP Code:

define('CSRF_PROTECTION'true); 

Removed:
PHP Code:

define('NO_REGISTER_GLOBALS'1); 

Got it working....

Tomale 03-13-2009 01:14 AM

How do I run php code from within the template?

For example, this didn't work:

Quote:

$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"><?php echo 'Hello World!'; ?></td>
</tr>
</table>

$footer
</body>
</html>

Lynne 03-13-2009 02:01 AM

You cannot put php code into the template. It must go into the php page you created (test.php).


All times are GMT. The time now is 06:04 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.06318 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
  • (2)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
  • (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