4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 14, 2018, 05:15:26 AM

Login with username, password and session length
Search:     Advanced search
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Help / Hilfe
| |-+  Bug Fixes & Patches
| | |-+  [1.7.1] {if blah} {endif blah} left in templates
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: [1.7.1] {if blah} {endif blah} left in templates  (Read 16981 times)
Chris
4images Moderator
4images Guru
*****
Offline Offline

Posts: 4487

Thank You
-Given: 0
-Receive: 31

Did u ever stop to think and then forget to start?


View Profile
« on: March 16, 2005, 04:20:34 AM »

Since 4images v1.7.1 was released some conditional tags in the templates are not working properly, the tags are being showed.
I'm not quite sure if this was intentionally or it was forgotten from v1.7.1 beta, but function clean_template() is missing cleaning the conditional tags.

To fix that find in include/templates.php:

1
2
3
4
5
    $template = preg_replace(
      "/".preg_quote($this->start)."[^".preg_quote($this->end)."\s]+".preg_quote($this->end)."/",
      '',
      $template
    );

add after:
1
2
3
4
5
6
7
8
9
    $search_array = array(
      "/".preg_quote($this->start).'if\s+([A-Z0-9_]+)'.preg_quote($this->end)."/i",
      "/".preg_quote($this->start).'endif\s+([A-Z0-9_]+)'.preg_quote($this->end)."/i"
    );
    $replace_array = array(
      "",
      ""
    );
    $template = preg_replace($search_array, $replace_array, $template);
« Last Edit: July 16, 2005, 08:06:39 PM by V@no » Logged

Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.043 seconds with 19 queries.
Post your comments here