11
iLuc
Re: Trick [SMARTY] Compress your code HTML
  • 2012/3/13 8:27

  • iLuc

  • Just popping in

  • Posts: 47

  • Since: 2009/6/6 0


Hi Manba !

Yes, there it would be the best of the best! ...

But here, the compilation CSS, JS ... I would find it difficult to help.
Should consider and understand Prestashop.
I think they wrote their own code.

While the trick that I propose to above is based on Smarty Plugin.
Which is already in Xoops.

Good day! :)



12
iLuc
Re: Trick [SMARTY] Compress your code HTML
  • 2012/3/13 7:21

  • iLuc

  • Just popping in

  • Posts: 47

  • Since: 2009/6/6 0


Hi, thank ! ;)

in file : header.php

After this code :
$xoopsTpl =& $xoTheme->template;


Add this code :
$xoopsTpl->load_filter('output''trimwhitespace');



Then..

Open this file :
/class/smarty/plugins/outputfilter.trimwhitespace.php

After this code :
$source trim(preg_replace('/((?<!?>)n)[s]+/m''1'$source));


Add this code :
$source trim(preg_replace("/(rn|n|r)/"""$source));
$source =  trim(preg_replace("/<br(s+)?/?>/i""<br/>"$source));
$source trim(preg_replace('#<!--[^>]+-->#','',$source));



If someone helps me to solve the problem. (Post above).
The display time will be even faster!

I hope we will find the solution.

Exactly would require that the compiled code is compressed before the file is saved in cache...

it would be the Best!


-



13
iLuc
Re: Trick [SMARTY] Compress your code HTML
  • 2012/3/13 5:03

  • iLuc

  • Just popping in

  • Posts: 47

  • Since: 2009/6/6 0


Compression code, thus between the compiled file and display.
I would like compression, before saving the file compiled.

What I can do with an instalation SMARTY (Not Xoops)

Any idea?

This will allow a great improvement in Xoops, for performance!

Files in Cache (compilation) will be compressed.
And therefore, the display time of Xoops, more powerful! ...

Prestashop uses this technique.

Thank you for your help.


iLuc



14
iLuc
Re: [SMARTY] install
  • 2012/3/13 1:48

  • iLuc

  • Just popping in

  • Posts: 47

  • Since: 2009/6/6 0


i'm So,

it works!

in header.php

line 119

add this code :

$xoopsTpl =& $xoTheme->template;
    
$xoopsTpl->load_filter('output''trimwhitespace');



To remove the line breaks.

in the file : outputfilter.trimwhitespace.php

/class/smarty/plugins/outputfilter.trimwhitespace.php

add this code on line 93:

$source trim(preg_replace("/(rn|n|r)/"""$source));
$source =  trim(preg_replace("/<br(s+)?/?>/i""<br/>"$source));
$source trim(preg_replace('#<!--[^>]+-->#','',$source));




Your HTML code is compressed !

In action here ---> Disques vinyles
And also here ---> Petites annonces


Very Good for page speed and SEO !!

This allowed me to achieve a score of 97 out of 100,
on Page Speed ​​Online (Google) for the site : Limonads.com


Luc ( A French User )




-



15
iLuc
Trick [SMARTY] Compress your code HTML
  • 2012/3/13 1:35

  • iLuc

  • Just popping in

  • Posts: 47

  • Since: 2009/6/6 0


Good evening,

The trick lies below.


Note to developers: I am looking for a solution to improve this trick. To make it more efficient. (See below) may be, it can be integrated into a future version of Xoops?

This technique is used by Prestashop and other CMS.
What makes the time postings Lots more powerful.
Which is very good for SEO.

It must be possible to compress the HTML before recording cached. (Compiled file)

Thank you for your help.

ps: Excuse me, I not write English very well.

iLuc ( a French user )



16
iLuc
Censor undesirable words ?
  • 2011/5/3 14:41

  • iLuc

  • Just popping in

  • Posts: 47

  • Since: 2009/6/6 0


Hello,

I want to activate (integrate) in a module:
-> censor undesirable words.
(function xoops: Options to censor words)

I have not found any documents.

Maybe someone knows how?

Thank you for your support

iLuc



17
iLuc
Re: adslight 1.11 - Remove area ?
  • 2011/3/10 12:25

  • iLuc

  • Just popping in

  • Posts: 47

  • Since: 2009/6/6 0


Hello,
AdsLight website is currently suspended.
I have to reactivate it. (soon)

I will try to regain control and continue to improve.
Other translations was sending me: Italian / Polish / Portuguese of Brazil

If developers want to join me to help me.
You're welcome.
Contact: adslight.translate [at] gmail.com

Thank you for your patience. :)

iLuc
( French Xoops User )



18
iLuc
Re: adslight 1.11 - Remove area ?
  • 2011/3/3 11:19

  • iLuc

  • Just popping in

  • Posts: 47

  • Since: 2009/6/6 0


Hi Lapsa,

Look in the file adslight_category.html ( folder templates )
there is an include for the menu. ( smarty )

And, for remove the box.
you can delete the code.

I have little time to give to you more details.
If you can not find, warn me, I'll give more details.

iLuc




19
iLuc
Re: Happy New Year!
  • 2011/1/4 18:56

  • iLuc

  • Just popping in

  • Posts: 47

  • Since: 2009/6/6 0


Bonne et Heureuse année 2011 !!

Happy New Year Xoops.org

iLuc



20
iLuc
Re: XOOPS 2.5 RC - Testing and Bug Report
  • 2010/10/24 18:31

  • iLuc

  • Just popping in

  • Posts: 47

  • Since: 2009/6/6 0


Good evening,
I test XOOPS 2.5 RC on my Mac with MAMP.

Until then, no major bug encountered.

By cons, there is a concern,
that already exist. Who I think deserves to be solved "for referencing.

When active the cache on a module.
(Preferences)

The title page (no cache)
"I sell a car - my Xoops site"

Cache enabled:
"Module name - my Xoops site"

All pages of a module with "cache enabled"
are identical. "Module name - my Xoops site"

What is harmful for a good SEO.
And therefore, the use of the cache is obsolete. (To avoid).

Sympathetically

iLuc




TopTop
« 1 (2) 3 »



Login

Who's Online

165 user(s) are online (112 user(s) are browsing Support Forums)


Members: 0


Guests: 165


more...

Donat-O-Meter

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

Latest GitHub Commits