vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   PHPInclude Variables in Formbit Templates (https://vborg.vbsupport.ru/showthread.php?t=53137)

Boeman 05-19-2003 08:35 PM

PHPInclude Variables in Formbit Templates
 
The variables in PHPInclude do no show up in any of the formbit templates where I have inserted them (though they work fine on other templates).

The search feature referenced me to a post which suggested that I add $session to a specified line in the functions.php file. This, however, seems to have already been done with 2.3.0 but to no affect.

Any help on forcing PHPInclude variables to be displayed in the formbit templates would be appreciated. Thanks.

Xenon 05-20-2003 09:11 AM

bit variables areoften called within functions.
and functions just can use variables from other part of the script (phpinclude her) if you made em global in that function
Basic php knowledge

Boeman 05-20-2003 02:31 PM

Quote:

Today at 11:11 AM Xenon said this in Post #2
bit variables areoften called within functions.
and functions just can use variables from other part of the script (phpinclude her) if you made em global in that function
Basic php knowledge


Can you please provide an example?

filburt1 05-20-2003 02:50 PM

Check out http://www.php.net/manual/en/languag...bles.scope.php for what he's talking about.

Boeman 05-20-2003 05:58 PM

Quote:

Today at 04:50 PM filburt1 said this in Post #4
Check out http://www.php.net/manual/en/languag...bles.scope.php for what he's talking about.

Thank you for the link. I have a better understanding of globals within functions but at the same time, I'm still unsure as to how to apply this in order for the fuction to show on postbit. Are you saying I need to put global on fuctions made in phpinclude?

My code in the external script isn't incased in a fuction syntax. All it does is echo out html based on whether or not if this is the first instance of the code being applied.

A real world example using this problem would be most helpful. Thanks.

filburt1 05-20-2003 05:58 PM

Put simply, there's nothing you can do without editing how phpinclude itself works.

Boeman 05-20-2003 06:09 PM

Quote:

Today at 07:58 PM filburt1 said this in Post #6
Put simply, there's nothing you can do without editing how phpinclude itself works.

Would you be willing to dilvulge a little more detail? Perhaps I can ask a programmer who is knowledgable with PHP. All I would need to know is what areas need to be edited.

filburt1 05-20-2003 06:22 PM

I am knowledgable in PHP considering I have developed a full emergency messenging system in it at NASA. phpinclude is eval'ed after bit templates, which is why it does not have acccess to the bit templates (which are eval'ed before it).

Boeman 05-20-2003 06:28 PM

Quote:

Today at 08:22 PM filburt1 said this in Post #8
I am knowledgable in PHP considering I have developed a full emergency messenging system in it at NASA. phpinclude is eval'ed after bit templates, which is why it does not have acccess to the bit templates (which are eval'ed before it).
So in basic terms, what do I need to do to get my phpinclude functions to evaluate along with the formbit_level_1 template? I looked around various hacks listed here but could not find one that allows this.

filburt1 05-20-2003 06:31 PM

You can't without rewriting a significant chunk of gettemplate() to:

1. See if a flag is set
2. If not, eval phpinclude and set it
3. Continue with normal gettemplate functions

...also removing it from (IIRC) global.php.


All times are GMT. The time now is 10:05 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.01077 seconds
  • Memory Usage 1,738KB
  • 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
  • (4)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