4images Forum & Community

4images Help / Hilfe => Bug Fixes & Patches => Topic started by: V@no on June 15, 2003, 04:15:25 AM

Title: [1.7] Cant display \\# (i.e \\2 or \\4 or \\9)
Post by: V@no on June 15, 2003, 04:15:25 AM
By default 4images replaces all \\xx (where xx is number 0-9)  with \\1
For testing purpose, try add anywhere (in any template or any variable that will be printed in a template) this: \\7 u'll see that it will be replaced by \\1
to fix that, in /includes/template.php remove marked:
Quote
 function clean_template($template) {
    $search_array = array(
      "/".$this->start."[^ \t\r\n".$this->end."]+".$this->end."/",
      "/".$this->start."if[ \t\r\n]+[^ \t\r\n".$this->end."]+".$this->end."/",
      "/".$this->start."endif[ \t\r\n]+[^ \t\r\n".$this->end."]+".$this->end."/",
      "/$([0-9])/",
      "/\([0-9])/"

    );
    $replace_array = array(
      "",
      "",
      "",
      '$\1',
      '\\\1'

    );

NOTE: dont forget delete comas!