vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4] Create your own vBulletin page (https://vborg.vbsupport.ru/showthread.php?t=228112)

Lynne 03-28-2011 03:14 PM

Quote:

Originally Posted by Mark4865 (Post 2178278)
Hello Lynne,

Thanks for response, tried that this is what I get, sorry I am a technical idiot

Mark

Parse error: syntax error, unexpected T_STRING in /var/www/clients/client11/web26/web/custom.php on line 3

You have a problem on line 3 of your custom file. Post the first 5 lines of your file (using code tags, please).

Mark4865 03-28-2011 04:58 PM

We have fixed errors but now get a blank white page

Lynne 03-28-2011 05:01 PM

Quote:

Originally Posted by Mark4865 (Post 2178429)
We have fixed errors but now get a blank white page

Does the template for the page exist in the style you are using to view the page?

Mark4865 03-28-2011 05:17 PM

yes

Lynne 03-28-2011 05:22 PM

Then check your error_logs and see if something is in there. Otherwise, go through your php and debug as needed (remove/comment out stuff, etc.).

Mark4865 03-28-2011 05:24 PM

our template is called new custom page but our php file is called custom, would that cause a problem

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

Sorry stupid question but where do I find the error log

Lynne 03-28-2011 06:01 PM

It does not matter as long as you make sure to put the correct template name where needed.

If you don't know where your error_logs are, then you need to ask your host.

Mark4865 03-28-2011 06:18 PM

this is the code we used

<?php

error_reporting(E_ALL);

define('THIS_SCRIPT', 'custom');
define('CSRF_PROTECTION',true);

$phrasegroups = array();

$specialtemplates = array();

$globaltemplates = array('custom',);

$actiontemplates = array();

require_once('./global.php');

$navbits = construct_navbits(array(''=>'Register'));
$navbar = render_navbar_template($navbits);

$pagetitle = 'Porsche Planet Register';

$templater = vB_Template::create('custom');
$templater->register_page_templates();
$templater->register('navbar', $navbar);
$templater->register('pagetitle', $pagetitle);
$templater->register('page', $page);
print_output($templater->render());
?>

Lynne 03-28-2011 08:43 PM

According to your code, the name of the template is "custom".
PHP Code:

...
$globaltemplates = array('custom',);
...
$templater vB_Template::create('custom');
... 


SuperTaz 03-29-2011 03:47 AM

I am not well versed with php, but I thought I would ask here for some help. I have a file on my site that is html and javascript. I used this article to convert it to a php file. Well, for the most part, it works. However, it shows adsense double and the footer is at the top. lol

Where did I go wrong?


All times are GMT. The time now is 03:36 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.02091 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_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