![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| Scriptaculous Effects
Is there a list anywhere of what effects (for example, as it is the default) pligg uses in conjunction with the yget template, and which of the scriptaculous files are called to produce those effects?
|
| ||||
|
look in effects.js in the SVN code. Those are all the effects that are used (I wasn't sure on some of them so I left them in anyways). Using scriptaculous requires using prototype.js which is the largest js file.
__________________ I accept donations for my time helping users like you on the forum and IRC. |
| ||||
|
KB - i was wondering - is it possible to use the prototype lite file that is used with Mootools - it seems to get the scroll down effects work (sidebar boxes), tell a friend and add to under the story summary. But seems to break many things and cause m,any JS errors - probably we too can attempt on something that will reduce the prototype.js to have only those effects that we use. Am enclosing the sample protype.js that I got from moo.fx JS library - more details at http://moofx.mad4milk.net/#prototype - it is <3KB (currently we use 49KB :( ) |
| ||||
|
I've tried it before and it broke many things but I didn't have time to investigate any further.
__________________ I accept donations for my time helping users like you on the forum and IRC. Last edited by kbeeveer46; 04-09-2007 at 08:31 AM.. |
| |||
|
If you're using the php gzip function, then I believe it checks to see if the browser accepts it. I'm not sure if the other gzip method does (where the files are stored as compressed on the server). I use the following in my htaccess to make sure that the .gz files are only served if the browser can support it, otherwise it serves the non-compressed version in the same directory: Code: AddEncoding gzip .gz
##### CSS / JS Compression Begin #####
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{THE_REQUEST} ^(.*).css
RewriteCond %{SCRIPT_FILENAME}.gz -f
RewriteRule ^(.*)\.css $1.css.gz [L]
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{THE_REQUEST} ^(.*).js
RewriteCond %{SCRIPT_FILENAME}.gz -f
RewriteRule ^(.*)\.js $1.js.gz [L]
##### CSS / JS Compression End #####
Feel free to test it to see if it breaks anything. I don't like the way scriptaculous is so bulky! Last edited by Simon; 04-09-2007 at 10:41 AM.. |
| ||||
|
Simon, I've tested that code before and it only worked with the CSS files and not .js files. I used this test to see which files were being loaded http://www.websiteoptimization.com/services/analyze/
__________________ I accept donations for my time helping users like you on the forum and IRC. |
| |||
|
Ah, that's what I originally thought too, but I don't believe that test is accurate. I now use firebug to test load times and sizes, and it reports that js and css are served as compressed to my firefox browser. However, if i test it with the webanalyser, it won't register as compressed. I did a number of tests with firebug - adding in and removing the gzipped files to see whether the load sizes were different, and they were, so I believe it is correct - at least for FF. The one thing I haven't been able to test is whether the same is true for IE. |
| ||||
|
I don't think I had firebug installed when I tested it before but when I tested it with that link it actually said that .css.gz was being loaded but still said the .js files and not the .js.gz were being loaded. I'll give it a whirl with firebug and see what I can find out.
__________________ I accept donations for my time helping users like you on the forum and IRC. |
| |||
|
What I noticed with firebug, was that it was reporting that protoype.js was being loaded, but the size was that of the compressed file. I think the reason is that the htaccess code doesn't 301 it to the compressed file, it just silently adds on the gz extension. If you click on a javascript file in firebug, it will show the gzip encoding however. I'm also going to try out the Firebug console for IE, and see if the results are the same. http://www.phpied.com/firebug-console-for-ie/ EDIT: nevermind, only shows js errors, not any file or loading times. Although interestingly enough, I was able to confirm that a compressed javascript file was being served to IE anyway. The compressed prototype file I attached above gives an error in IE, but not FF. When I removed the compressed file, cleared cache and refreshed, the page was loaded in IE without any errors. So i'm quite confident it works. Also updated the attached file above to fix the error it was producing in IE. Last edited by Simon; 04-09-2007 at 10:41 AM.. |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Optimised Scriptaculous Module with Thickbox | Simon | Modification Tutorials | 78 | 07-27-2008 01:11 AM |
| What functions do I lose if I disable scriptaculous module | deeplygreen | General Help | 1 | 02-05-2008 06:21 PM |
| Lightbox Thickbox Scriptaculous jbquery | revolver | Modification Tutorials | 3 | 04-18-2007 12:54 PM |
| Does scriptaculous do anything? | DuckFat | General Help | 1 | 07-21-2006 12:35 PM |
| problem with using scriptaculous effect in submit_2.tpl | mhk | General Help | 0 | 07-05-2006 06:47 AM |




Linear Mode

