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)

makange 05-25-2008 12:36 PM

does it work with vb 3.7.0 ??
I tried only to find nothing works. Just an page.

Mum 05-25-2008 06:28 PM

Quote:

Originally Posted by IR15H (Post 1530869)
"Revert" it.
(ADMIN CP > Styles & Templates > Style Manager > Edit Templates > Select Your Template > Revert)

Thank you so much :)

unleash 05-28-2008 12:55 PM

Thanks, I was looking for this

TimberFloorAu 05-30-2008 12:49 AM

Stupid question here, but where do i create the template?

Strike that lol !

Digital Jedi 06-02-2008 09:23 AM

Quote:

Originally Posted by makange (Post 1530901)
does it work with vb 3.7.0 ??
I tried only to find nothing works. Just an page.

Sure does. Retrace your steps or try again, making sure you followed the steps exactly. It seems a lot of folks are misinterpreting what making a PHP file and what making a template means.

made2kill 06-03-2008 10:54 PM

Hello,

I got about 20 pages in and realized it was a 49 page thread.

I followed the steps, and got the page working - no problem.
I'm sure this question was asked before, but...

How do you get PHP code working inside of the template?
All my pages have custom written PHP functions.

Thank you in advance.

amcd 06-04-2008 05:41 AM

Templates are not supposed to execute code. This is not just with vbulletin, but the entire concept of templating is separation of presentation from code (business logic).

Execute the php before calling the template, keep the presentation data in certain variables, and use the template just to show those variables.

made2kill 06-04-2008 12:48 PM

I'll give it a try, thanks.

soundbarrierpro 06-11-2008 07:18 PM

Can I configure this so that the user has to be logged in to see this? I have pages with content I don't want readily available to guests.

I'm using 3.7.0 and I want 'ONLY' registered users to see my vbpowered pages. I don't want them available to unregistered guests.

I checked herebut what template or folder page gets edited?

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

Quote:

Originally Posted by edgecutioner (Post 1310380)
thanks for the code guys!

EDIT: Works perfectly!

Here is what mine looks like. I can't get the permissions to work.
Code:

<?php

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

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'downloads'); // 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(
    'downloads',
);

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

);

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

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
if ($vbulletin->userinfo->userid==0)
{
    print_no_permission();
}
$navbits = array();
$navbits[$parent] = 'downloads';

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

?>


manuelsechi 06-14-2008 11:50 AM

hello all

is it possible to insert php code in this kind of pages?

thank you

Manuel


All times are GMT. The time now is 05:17 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.03949 seconds
  • Memory Usage 1,746KB
  • 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
  • (3)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