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)

JohnWoo 01-01-2003 10:00 PM

Limited PHP scripts functionality for templates v1.0
 
Hello all !

Here is small funny hack (5 strings of new code only in one script :) That may help to bring more power to vb templates :)
Features:
- executing php scripts (with modified syntax) from templates. Changing\creating php variables from templates, conditional actions and database requests without editing scripts.
It is all :)

PS changes in 1.1
- normal php variables syntax (with $)
- added example of database request from template
- support for several PHP blocks in one template

Xenon 01-02-2003 07:16 PM

hey, looks nice :)

Dean C 01-02-2003 07:35 PM

Indeed this looks very nice.

But what if a template is called by more than one file?

- miSt

JohnWoo 01-02-2003 08:05 PM

then why not to use some condition checking #PHP_SELF in template code ?

DrkFusion 01-02-2003 08:37 PM

he got u there mist ;)
Looking nice JohnWooo
I will check it out when I get home

Velocd 01-02-2003 11:43 PM

Interesting, but for organizational methods I like to keep PHP separate from the templates :p

DrkFusion 01-03-2003 03:04 AM

Organizational?
Well I would use this in a case of when I am lazy to add 3 lines of code that do 1 thing one 1 page.

So it would be pretty useful in my caze :)

nuno 01-03-2003 03:45 AM

hmm seems not to be working correctly :(
I was trying to pull out the the filesize attachments
PHP Code:

~%#data = 'index.php';#id = filesize(#data);echo "Filesize for #data: (#id)"%~ 

It gets printed at left top corner page and not right after attachment :confused:

JohnWoo 01-03-2003 06:48 AM

It is "limited functionality". Remember? :) echo will not work - sorry :) Try to replace echo with return.

VeoMorphine 01-03-2003 03:54 PM

nice. we should release template mods with this(they might like this on www.vbulletintemplates.com to.


All times are GMT. The time now is 02:42 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.01036 seconds
  • Memory Usage 1,727KB
  • 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
  • (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