timetunnel
11 Nov 2005, 17:48
Hello.
How to change the value of a php file var WITHIN a template?
I'm still trying to understand this vB system.
Example:
For FAQ search, I want to change the default value of 'Matching Options' on-the-fly from 'ALL' to 'ANY' via the template and NOT by hacking faq.php.
For example, I created this via the Plugin Manager in hook location, 'faq_start':
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
I'd like this to be executed INSIDE the FAQ template just prior to the search form being displayed (and before a query string is constructed) so that the default values will be the changed values.
How can I call this code WITHIN the template?
It would be ideal (at least until I understand the 'hook' system better) to call this via "($hook = vBulletinHook::fetch_hook('match_default')) ? eval($hook) : false;" directly inside of the template at the appropriate location OR some other way, which I have no idea... :ermm:
Any suggestions on how to accomplish this end result?
Thanks in advance.
How to change the value of a php file var WITHIN a template?
I'm still trying to understand this vB system.
Example:
For FAQ search, I want to change the default value of 'Matching Options' on-the-fly from 'ALL' to 'ANY' via the template and NOT by hacking faq.php.
For example, I created this via the Plugin Manager in hook location, 'faq_start':
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
I'd like this to be executed INSIDE the FAQ template just prior to the search form being displayed (and before a query string is constructed) so that the default values will be the changed values.
How can I call this code WITHIN the template?
It would be ideal (at least until I understand the 'hook' system better) to call this via "($hook = vBulletinHook::fetch_hook('match_default')) ? eval($hook) : false;" directly inside of the template at the appropriate location OR some other way, which I have no idea... :ermm:
Any suggestions on how to accomplish this end result?
Thanks in advance.