vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Limited PHP scripts functionality for templates v1.0 (https://vborg.vbsupport.ru/showthread.php?t=47282)

Xenon 01-03-2003 08:21 PM

@Velo: yeh, but sometimes this can be usefull to, if you just want to calculate some values (ppd directly in the template instead of the code)

The Prohacker 01-04-2003 08:45 PM

Hmm... The 1.1 zip seems to be empty...

JohnWoo 01-04-2003 09:19 PM

Updated :)
It downloads fine for me (and before it was fine too)

Brad 01-05-2003 12:18 AM

Quote:

Originally posted by VeoMorphine
nice. we should release template mods with this(they might like this on www.vbulletintemplates.com to.
We have our own wrapper that works from the phpinclude template. Its a bit more work to code with it but it keeps us from hacking files. We have many of the hacks here working with only the phpinclude.

JohnWoo 01-05-2003 07:00 AM

But phpinclude will be executed on any page of forum, and think that it is not good :)

Brad 01-05-2003 10:20 AM

Acully no. for example this would only be ran on index.php, The query it exucutes will only be done on that page, its ignored on all others.

PHP Code:

if (strpos($_SERVER['PHP_SELF'], 'index.php') != false)
{
   
$query='code here'



Chris M 01-05-2003 10:21 AM

Nice Idea;)

@Anime-loo - Wouldn't "$DB_site->query" be better?

Satan

JohnWoo 01-05-2003 10:42 AM

Yes. It is another way. But what if you need to execute some code inside some loop ? :) Think that for example calculating something different for each post on showthread.php must be impossible using phpinclude only...

Brad 01-05-2003 11:09 AM

Quote:

Originally posted by hellsatan
Nice Idea;)

@Anime-loo - Wouldn't "$DB_site->query" be better?

Satan

yes, i was only showing a example ;) this would be the correct useage if you where ganna show the result of the query on index.php

$query=$DB_site->query_frist

Xenon 01-05-2003 11:13 AM

also it's not good to expand the phpinclude template such a lot.
rembember it's loaded on everypage, also if everything is in an if-clause it has to be loaded and so on.


All times are GMT. The time now is 04:57 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.01103 seconds
  • Memory Usage 1,729KB
  • 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_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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