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 12-02-2010 04:52 PM

Quote:

Originally Posted by TheInsaneManiac (Post 2128388)
Why does this show at the top of every page?
$stylevar[htmldoctype]

That is not valid syntax for vB4. Also, what do you mean "at the top of every page"? This is an article about creating a single page. If that code is showing on every page, then it isn't an issue for this article/page.

Shadow666 12-07-2010 12:50 AM

Hi,

The copyright in the footer for the new page I was creating has now disappeared, since upgrading to vbulletin 4.1.0 PL2.

PHP Code:

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

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT''test');
define('CSRF_PROTECTION'false);  

// ################### 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('test',
);

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

// ######################### REQUIRE BACK-END ############################
// if your page is outside of your normal vb forums directory, you should change directories by uncommenting the next line
// chdir ('/path/to/your/forums');
require_once('./global.php');
require_once(
'./includes/test_func_var.php');

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

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

// ###### YOUR CUSTOM CODE GOES HERE #####
$pagetitle 'test';



// ###### NOW YOUR TEMPLATE IS BEING RENDERED ######


$templater vB_Template::create('test');
$templater->register_page_templates();
$templater->register('navbar'$navbar);
$templater->register('pagetitle'$pagetitle);
print_output($templater->render());


?>

The copyright is in the file includes/test_func_var.php

PHP Code:

<?php
$vbphrase
[powered_by_vbulletin] = '<a href="http://www.test.com">Test v1.0</a> Copyright &copy; ' date('Y') . ' <br />' $vbphrase[powered_by_vbulletin];
?>

Template test

PHP Code:

{vb:stylevar htmldoctype}
<
html xmlns="http://www.w3.org/1999/xhtml"<vb:if condition="$vboptions['enablefacebookconnect']"xmlns:fb="http://www.facebook.com/2008/fbml"</vb:if> dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
  <
head>
    <
title>{vb:raw vboptions.bbtitle} - {vb:raw pagetitle}</title>
    {
vb:raw headinclude}
    {
vb:raw headinclude_bottom}
  </
head>

  <
body>  
    {
vb:raw header}
    
    {
vb:raw navbar}

    <
div id="pagetitle">
      <
h1>{vb:raw pagetitle}</h1>
    </
div>


    {
vb:raw footer}
  </
body

</
html

Why does this no longer work.

Thanks.

Lynne 12-07-2010 01:35 AM

Are you running 4.1.0 PL2? Or PL1 or no PL at all?

Shadow666 12-07-2010 01:38 AM

Sorry, post edited. PL2

Lynne 12-07-2010 02:32 PM

Quote:

Originally Posted by Shadow666 (Post 2130283)
Sorry, post edited. PL2

did this used to work in another 4.x version? It's hard to tell what is wrong when you have not posted the template at all, nor do we know the full contents of the other file you call. What sort of debugging have you done to figure out where the problem lies?

Shadow666 12-07-2010 06:16 PM

Original post updated.

This worked fine with 4.0.x until updated to 4.1.0 PL2

Any other mods that I have installed, the copyright for them has also disappeared. e.g. VB Pro Garage Timeslips 3.0.7

Lynne 12-08-2010 01:17 AM

I don't know what you mean regarding the other mods (or what they have to do with this page). Have you tried putting the file contents directly into the main file and seeing if it works there? Or setting it to something else in the file to see if it works? Like I asked, what have you done so far to try to troubleshoot this?

And actually, you say it used to work? I could have sworn the footer template gets rendered when global.php is called, so I'm not sure how it could have worked before. And yes, I just checked and it is. You can't call your file that has a phrase to be used in the footer template *after* the footer template has been rendered.

compunerdy 12-09-2010 06:05 AM

I got the new page up and working but when I put the following code into the template it will not load the Flash file.

PHP Code:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="975" height="600" id="saberBuilder_v1.0_securityFix" align="middle">
<
param name="allowScriptAccess" value="sameDomain" />
<
param name="movie" value="saberBuilder_v1.0_cart.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="saberBuilder_v1.0_cart.swf" quality="high" bgcolor="#ffffff" width="975" height="600" name="saberBuilder_v1.0_securityFix" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</
object

If I remove the following code

PHP Code:

{vb:raw headinclude}
{
vb:raw headinclude_bottom

The flash file plays just fine but then the page does not look right. Why is this conflicting?

Any help would be great appreciated as I do not have much hair left to pull out.

Lynne 12-09-2010 02:20 PM

What exactly is the result when you put that code in the template (do you see it? Is it in the page source? etc)? Do you have a link?

compunerdy 12-09-2010 03:19 PM

It looks like it is trying to load but doesn't. Here is a link http://forums.thecustomsabershop.com...mhsbuilder.php


All times are GMT. The time now is 10:53 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.02202 seconds
  • Memory Usage 1,778KB
  • 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_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