4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
February 09, 2010, 02:16:02 PM

Login with username, password and session length
Search:     Advanced search
Follow 4images on twitter: Click here to follow!
Translate this page with google
=>
 Translate this page with Google =>
* 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 10964 times)
Chris
Administrator
4images Guru
*****
Offline Offline

Posts: 4489

Thank You
-Given: 0
-Receive: 0

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 © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
piqs.de - Fotocommunity & lizenzfreie Fotos