fikirotuz5 / vqmod

Automatically exported from code.google.com/p/vqmod
0 stars 0 forks source link

vQmod does not work with includes in template files #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. edit a template file to have includes in it:
i.e. in a.tpl:
<? if (...)
require 'a_1.tpl';
else
require 'a_2.tpl';
?>
2. run simple vQmod replace for a_1.tpl or a_2.tpl

What is the expected output? What do you see instead?
File in cache folder for a_1.ptl or a_2.tpl should be generated, however it 
does not happen.

What version of the product are you using? On what operating system?
vQmod 2.1.2
Linux joker 2.6.32.8-grsec-2.1.14-modsign-xeon-64 
PHP Version 5.2.17 

Please provide any additional information below.
Pls let me know if you anyneed further information.

I believe this could be a good enhancement for the mod.
Tks
Gustavo

Original issue reported on code.google.com by gust...@gmail.com on 19 Oct 2011 at 1:14

GoogleCodeExporter commented 8 years ago
This is not a bug. vQmod does not claim to do this, nor should it. You would 
need to parse every template file otherwise just in case it has a require. What 
the correct solution is is to use

<?php
global $vqmod;
require($vqmod->modCheck('file/path/here'));
?>

Original comment by DJG6...@gmail.com on 20 Oct 2011 at 6:51