21
iLuc
Re: Trick [SMARTY] Compress your code HTML
  • 2012/11/7 2:53

  • iLuc

  • Just popping in

  • Posts: 47

  • Since: 2009/6/6 0


There has an error. I just realize it.
And obviously, it could not work.
Xoops removes the "slash" in the code.
I try to find a solution to copy the code on the forum.

This code is good!
------------------------------


/*************** HACK iLUC Minify HTML / COMPRESS CODE *******************/
$compiled_content = trim(preg_replace('/((?<!\?>)\n)[\s]+/m', '\1', $compiled_content));
$compiled_content = preg_replace('#<!--//.*?-->#s', '', $compiled_content);
$compiled_content = preg_replace("/(\r\n|\n|\r)/", "", $compiled_content);
$compiled_content = str_replace(CHR(13).CHR(10),"",$compiled_content);
$compiled_content = preg_replace("/(\n\n|\n\n\n)/", "", $compiled_content);
$compiled_content = preg_replace("#>(\s+)<#s", "><", $compiled_content);


------------------------------

The code above removes Xoops -> \

22
mrphilong
Re: Trick [SMARTY] Compress your code HTML
  • 2012/11/7 22:29

  • mrphilong

  • Quite a regular

  • Posts: 351

  • Since: 2006/7/14


Doesn't display content inside mytab module.

Login

Username:
Password:

Lost Password? Register now!

Who's Online

79 user(s) are online (43 user(s) are browsing Support Forums)


Members: 0


Guests: 79


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jan 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits