vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Some basics of vB3(mini howto) (https://vborg.vbsupport.ru/showthread.php?t=59939)

AN-net 03-19-2004 10:22 AM

question on action templates, can u define wut u mean by actions more precisely im a lil confused.

Zachery 03-19-2004 10:23 AM

like.

search.php?do=getnew

is a vB3 action, and it does a specific / more refined / predetermined function

AN-net 03-19-2004 11:09 AM

k
so something like
blah.php?do=redirect
is one?

Tradjick 04-02-2004 09:03 PM

Thanks Faranth! I read the whole thread and now I understand a little more how the whole thing is working :)

The "actions", are they all included in one php file? But I guess not, they must be spread evywhere. To list all these actions, is the way to do that to Ctrl-F through all the files and search for "do=" ???

And also, where are all the functions, do we simply need to require global.php for all the functions beeing available?

Noobish cheers :nervous:

:)

JamesFrost 05-18-2004 07:08 AM

Really useful 'hack' (or guide, whatever). Got my first VB based page up and running in no time at all.

thanks a lot :D.

Randomlove 05-28-2004 12:31 PM

Hi Zachery,
I tested the first & second examples but I keep getting the following lines in my browser:

HTML Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

I went and changed couple of things and came up with this version:

PHP Code:

<?php
// ## Changes Directory so it can accesss vBulletin IF we are outside the forums folder, if not this is not nessary ##
chdir("./vb3");

// ## Error Reporting ( we use error reporting in php so we can control the display of error messages
// ## we will use this because all vBulletin files follow the same error reporting rules) ##
error_reporting(E_ALL & ~E_NOTICE);

// ## this here defines the "this_script" function, which if you use template conditionals, it will come in handy :) ##
define('THIS_SCRIPT''page');

// ## this action here cache's the templates so that everytime their needed a querry wont be needed to run
// ## the names in there are just the template names :), there must be a comma after everyone but the last ##
$globaltemplates = array(
'header',
'navbar',
'footer'
);

// ## Grabs global.php this grabs vbulletins global.php so we can use the most basic of vBulletins functions ##
require_once("./global.php");

// ## ok this next set of lines "eval"'s our templates so they can be called inside the template we will print out ##
eval('$header = "' fetch_template('header') . '";');
eval(
'$navbar = "' fetch_template('navbar') . '";');
eval(
'$footer = "' fetch_template('footer') . '";');

?>

Now I get a totally blank page :).

Please help.

R.L. :)

Zachery 05-28-2004 12:48 PM

You didnt print any templates...

your missing the most important line

eval('print_output("' . fetch_template('TEMPLATE') . '");');

You just made some varibles, you didnt tell the script to display a template i suggest trying generic shell

eval('print_output("' . fetch_template('GENERIC_SHELL') . '");');

Randomlove 05-28-2004 01:12 PM

Got it! It worked :)

Thanks Zachery.

Casparian 06-05-2004 02:57 AM

Quote:

Originally Posted by Mijae
Seems so, so there is no way to add footer/header templates to hard coded page then?

Has anyone figured out if it's possible?

I have a lot of content outside of my forums which I'd love to be able to include the header and footer from the template on! This way I could update the style of my whole site, forums and static content, through the admincp.

I've tried almost everything I can think of, if someone has a simple test page they can show me I'd be really, really greatful :)

lichtflits 06-21-2004 04:41 PM

how can a do one code for ?do= and thene whene i make a new template i can do ?do=test and so that i can do it at's mutch as i want. please help my. :d


All times are GMT. The time now is 09:22 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.01557 seconds
  • Memory Usage 1,748KB
  • 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_html_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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