vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Php parsing in templates (https://vborg.vbsupport.ru/showthread.php?t=50525)

dejoslav 03-25-2003 01:20 PM

I also need to do the same thing... add a php code in a specific place in showthread template but I don't know how.

What do you use phpinclude template for?

filburt1 03-25-2003 02:26 PM

Quote:

Yesterday at 09:24 PM smokey said this in Post #9
last time im asking a simple question here, thanks for nothing

You'll never get any help here with that attitude. These people are using their own personal time to help you with your problem, the least you could do is show some gratitude.

dejoslav 03-25-2003 02:39 PM

I guess it could work this way (I haven't tried it actually), but it looks little messy. All you need to do is to split a template on two templates at the point you want to insert your php code... ie. from first part of showthread template make showthread1 and from the rest showthread2.

Then edit showthread.php and replace the following line

PHP Code:

eval("dooutput(\"".gettemplate("showthread")."\");"); 

with:

PHP Code:

eval("dooutput(\"".gettemplate("showthread1")."\");");
// .... your PHP code goes here...
eval("dooutput(\"".gettemplate("showthread2")."\");"); 

I guess it should work, but I'd rather use some cleaner method....

dejoslav 03-28-2003 11:25 AM

Or there is another way I just tried... Right in front of the following line in showthread.php

eval("dooutput(\"".gettemplate("showthread")."\"); ");

make a line of of text you wish to appear somewhere on the showthread page. Just put everything you want in one variable, i.e $myvariable. All you need to do then is to put $myvariable somewhere in the showthread template...

Brad 03-28-2003 12:05 PM

Quote:

03-20-03 at 09:18 PM smokey said this in Post #3
I still get nothin, i want to put the stars right under the usertitle in the postbit template, i have the phpcoding in showthreads.php and i added $stars in postbit. Is there anyway i can accually get them to show up? i even tried adding replacements and doing the coding in the phpinclude template

Edit /admin/functions.php insted. Search for this:

PHP Code:

// ###################### Start buildpostbit ####################### 



All times are GMT. The time now is 06:54 AM.

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.01061 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
  • (3)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
  • (5)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