View previous topic :: View next topic |
Author |
Message |
cobex4 Smarty Regular
Joined: 02 Sep 2008 Posts: 74
|
Posted: Sat Jul 02, 2011 2:35 pm Post subject: compress javascript |
|
|
Hello,
Is there a function to compress the javascript code ? As the {strip} for HTML
Tanks. |
|
Back to top |
|
cobex4 Smarty Regular
Joined: 02 Sep 2008 Posts: 74
|
Posted: Sat Jul 02, 2011 6:49 pm Post subject: |
|
|
Hmmm
This is the {literal} that prevents :s
Code: | <script type="text/javascript">
{literal}
jQuery(function($){
.....
});
{/literal}
</script> |
|
|
Back to top |
|
cobex4 Smarty Regular
Joined: 02 Sep 2008 Posts: 74
|
Posted: Sun Jul 03, 2011 9:44 am Post subject: |
|
|
No idea ? |
|
Back to top |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
|
Back to top |
|
cobex4 Smarty Regular
Joined: 02 Sep 2008 Posts: 74
|
Posted: Wed Aug 10, 2011 7:53 am Post subject: |
|
|
I install SACY, it will not work.
i'm using php 5.3.5.
Here is the error :
Quote: | [Wed Aug 10 09:46:38 2011] [error] [client 127.0.0.1] PHP Fatal error: Uncaught exception 'sacy_Exception' with message 'Cannot handle tag: ' in phar:///home/c4y/public_html/smarty1/smarty/plugins/block.asset_compile.php/sacy/sacy.php:184\nStack trace:\n#0 /home/c4y/public_html/smarty1/smarty/plugins/block.asset_compile.php(103): sacy_CacheRenderer->renderFiles(NULL, NULL, Array)\n#1 /home/c4y/public_html/smarty1/templates_c/fr^9206ffe216f3f7c2e7655782292928f7d20e8be5.file.footer.tpl.cache.php(4: smarty_block_asset_compile(Array, '<script type="t...', Object(Smarty_Internal_Template), false)\n#2 /home/c4y/public_html/smarty1/smarty/sysplugins/smarty_internal_template.php(434): include('/home/c4y/pub...')\n#3 /home/c4y/public_html/smarty1/smarty/sysplugins/smarty_internal_template.php(569): Smarty_Internal_Template->renderTemplate()\n#4 /home/c4y/public_html/smarty1/templates_c/fr^90093ad09988b466f409a1871733c5589014713e.file.index.tpl.cache.php(85): Smarty_Internal_Template->getRenderedTemplate()\n#5 /home/c4y/public_html/smarty1/smarty/sysplugins/smarty_internal in phar:///home/c4y/public_html/smarty1/smarty/plugins/block.asset_compile.php/sacy/sacy.php on line 184 |
In TPL :
Code: | {asset_compile}
<script type="text/javascript" src="js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="js/jquery-pngFix.min.js"></script>
{/asset_compile} |
One idea ? |
|
Back to top |
|
cobex4 Smarty Regular
Joined: 02 Sep 2008 Posts: 74
|
Posted: Sat Aug 13, 2011 10:42 am Post subject: |
|
|
no idea ??? |
|
Back to top |
|
douglassdavis Smarty Junkie
Joined: 21 Jan 2008 Posts: 541
|
Posted: Sat Aug 13, 2011 11:59 am Post subject: |
|
|
I don't know anything about sacy but I would say google the error message for ideas:
sacy_Exception Cannot handle tag |
|
Back to top |
|
pilif Smarty n00b
Joined: 17 Sep 2009 Posts: 3
|
Posted: Mon Aug 15, 2011 12:21 pm Post subject: |
|
|
Author of sacy here: It looks to me like there is some unknown whitespace or an unknown tag in your {asset_compile} section.
Can you paste the full {asset_compile}-block here?
Philip |
|
Back to top |
|
cobex4 Smarty Regular
Joined: 02 Sep 2008 Posts: 74
|
Posted: Thu Aug 18, 2011 8:25 pm Post subject: |
|
|
Here is the code
Thank you for your help
Unable to copy the code here, oversize. |
|
Back to top |
|
cobex4 Smarty Regular
Joined: 02 Sep 2008 Posts: 74
|
Posted: Fri Aug 19, 2011 7:54 am Post subject: |
|
|
I use the file : block.asset_compile.php — Sacy 0.2 - All-in-on Bundle for PHP 5.3, excluding any transformation support. 46KB · Uploaded February 16, 2011
my block :
Code: | {asset_compile}
<script type="text/javascript" src="js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="js/jquery-pngFix.min.js"></script>
{/asset_compile} |
In the file I see :
Is it be possible to have the file in UTF-8 compatible with the Linux system?
Tanks. |
|
Back to top |
|
cobex4 Smarty Regular
Joined: 02 Sep 2008 Posts: 74
|
Posted: Fri Aug 26, 2011 9:03 am Post subject: |
|
|
UUUUUP |
|
Back to top |
|
cobex4 Smarty Regular
Joined: 02 Sep 2008 Posts: 74
|
Posted: Sat Aug 27, 2011 10:13 am Post subject: |
|
|
The problem persists with this code
Code: | {asset_compile}
<script type="text/javascript" src="js/jquery-1.6.2.js"></script>
{/asset_compile} |
|
|
Back to top |
|
cobex4 Smarty Regular
Joined: 02 Sep 2008 Posts: 74
|
Posted: Tue Sep 13, 2011 8:54 am Post subject: |
|
|
UUUUUUUUUUUUUUUP |
|
Back to top |
|
|