![]() |
Modify template by install code
I want to do simple search/replace in the template on product install.
It works fine, however until it's re-saved manually changes are not visible. I guess I need to re-cache the template? How to solve this? Thanks in advance. |
Why don't you just use the parse_templates hook and do it in the mod itself? I know of no way to do it on the actual install procedure of a mod.
|
You don't want to actually change the master style. I think that would be a no-no.
|
Thanks for you replies.
I've tried to do this in parse_templates but it won't work: Code:
$vsa_tlmu_rstr_s = '<a class="title'; When I manually add Code:
style="{vb:raw thread.vsa_tlmu_css}" thread.vsa_tlmu_css is produced in threadbit_process hook. |
vb 4 does it differently. Try this in the parse_templates or process_templates_complete hook:
Code:
require_once(DIR . '/includes/class_template_parser.php'); |
Yes, it works.
You are genius. Thank You! Edit: It also works when added after my code in threadbit_process. |
You had doubts? ;)
And you are welcome, my friend. |
thanks Boofo for your code it helped me too :)
|
I expect residuals. ;)
|
All times are GMT. The time now is 03:53 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|