vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   PHP Code (https://vborg.vbsupport.ru/showthread.php?t=47156)

Patrick Lucas 12-30-2002 11:26 PM

PHP Code
 
Is there a hack so you can put PHP code into a template? :)

That'd be really helpful :) I know PHP... but I dont' know my way well enough around vB to hack it like normal people :(

Sebastian 12-31-2002 12:59 AM

No, you can't put php in templates, some variables yes. however, Logician made a hack that allows you to put conditionals in the templates, this will be a feature in vb3. https://vborg.vbsupport.ru/showthrea...threadid=43325

Chris M 12-31-2002 11:16 AM

Yes you can put PHP in a special template, called the phpinclude template - It acts like global.php, but just is a template:)

Satan

Xenon 12-31-2002 12:37 PM

phpinclude is the onlyone.
this couldn't be hacked in easily, because all templates are just handled as strings (except phpinclude):

$blabla = gettemplate("templatename");

so you have to rewrite every file you want to use php-templates :)
however, in customtemplates you can use php if you call em like phpinclude (see example in global.php)

Chris M 12-31-2002 12:40 PM

Yup:)

You could make a new template called "lolarama", as long as you find the line:

PHP Code:

// parse PHP include ##################
eval(gettemplate('phpinclude',0,0)); 

and add:
PHP Code:

eval(gettemplate('lolarama',0,0)); 

directly beneath it:)

Satan

Xenon 12-31-2002 12:46 PM

PHP Code:

eval(gettemplate('lolarama',0,0)); 

can be in every php-file you use, not just in global.php :)

Chris M 12-31-2002 12:49 PM

It can can it?

Thanks;) Now I can sort the "conditionals" thingy out without having to get anybody to use Logician's hack:)

Satan

Xenon 12-31-2002 01:26 PM

just create your own conditionals like me :)
ok, not so comfortable like logicians, but easier to use with experience ;)

Chris M 12-31-2002 01:33 PM

I think I might actually;)

I won't release it though;) Logician's is good for commercial use, as all of his most recent hacks allow conditional use:)

Satan

Boofo 12-31-2002 03:02 PM

Quote:

Originally posted by Xenon
just create your own conditionals like me :)
ok, not so comfortable like logicians, but easier to use with experience ;)

But can you use your conditionals in templates easily? If so, I'd like to know how you do it if you aren't using Logician's hack. :)


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