Not signed in (Sign In)

Categories

Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    •  
      CommentAuthorDinoboff
    • CommentTimeMar 25th 2007 edited
     # 1
    Patch for Vanilla 1.1 that automatically merge and minify CSS and JavaScript files.

    Vanilla is a plain forum engine. Each functionality is added by a plug-in, and each plug-in can add his own JavaScript and CSS files.

    All these files should be merged to reduce the number of http requests and make the page load faster.

    Inspired by the CSS/JS merging script of Ed Eliot, this patch allows Vanilla to do it automatically. It also can use JSMin, by Douglas Crockford (and David Holmes for the php version), and the zlib library (when available) to reduce the size of the file(s).

    Also, if any changes are made to your CSS and JS file, the browser will download the new version instead of waiting for the expiration date to update its cache. No more, broken functionalities because of an outdated js file :-)

    TODO:
    • Allow admin to reset the server cache
    • Force browser cache to refresh when the patch is updated or when the server cache is reseted
    • Allow extension author to create a css file alternative for the packer(e.g.: with $Head->AddStyleSheet('extensions/myExtension/style.css'), the packer would try to packer extensions/myExtension/style.css.packer if it exist)
  1.  # 2
    Uploaded version 0.4.beta.2 of Vanilla Packer.
  2.  # 3
    Uploaded version 0.4.beta.2 of Vanilla Packer.
    •  
      CommentAuthorDinoboff
    • CommentTimeMar 25th 2007
     # 4
    (Just a problem problem with the version number in default.php)
    •  
      CommentAuthorADM
    • CommentTimeMar 26th 2007
     # 5
    Very cool! Great work as always Dino!
  3.  # 6
    we don't have to do anything to our JS files right, except make sure all commands are ended by a semi-colon
    •  
      CommentAuthory2kbg
    • CommentTimeMar 26th 2007
     # 7
    so mark any chance of using it here on the lussumo community?
  4.  # 8
    so it merges the files into one but doesn't compress them
    •  
      CommentAuthorMr Do
    • CommentTimeMar 26th 2007
     # 9
    thats fine, it never was a size issue, just a number of connection thing
    •  
      CommentAuthorDinoboff
    • CommentTimeMar 26th 2007
     # 10
    Thanks ADM :-)

    @MySchizoBuddy: If you have gzip enable on your server, it will compress it. It can also minify the js files, but by default - for this first release -, it doesn't, since the files need to be tested.
  5.  # 11
    Uploaded version 0.4.beta.3 of Vanilla Packer.
    •  
      CommentAuthorDinoboff
    • CommentTimeMar 26th 2007
     # 12
    Fix two bugs that stopped in some case the merged files to cached on the server.

    If you are updating the patch, you will need to delete all the files in the js and css caches.
    •  
      CommentAuthorTomTester
    • CommentTimeMar 28th 2007 edited
     # 13
    Dino, came across this comment on ob_gzhandler at http://www.php.net/ob_gzhandler"
    27-Feb-2007 03:35
    ...caching of gzipped files is broken in all versions of MSIE. The following blog entry
    appears to declare that this has been fixed in IE7, but I haven't verified this.
    http://blogs.msdn.com/ie/archive/2005/10/31/487509.aspx


    Do you know if this is indeed the case? If so, gzip compression should perhaps be disabled
    on IE to maximize the benefits of packing & local caching.
    •  
      CommentAuthorTiggr
    • CommentTimeMar 28th 2007
     # 14
    After patching, I'm getting


    A fatal, non-recoverable error has occurred
    Technical information (for support personel):

    Error Message
    Could not create the FilesToPack Table
    Affected Elements
    undefined.PackerInstaller();

    The error occurred on or near: Too big column length for column 'FilePath' (max = 255). Use BLOB instead

    For additional support documentation, visit the Lussumo Documentation website at: lussumo.com/docs
    •  
      CommentAuthorDinoboff
    • CommentTimeMar 28th 2007 edited
     # 15
    line 437 of library/Framework/Framework.Class.PackManager.php, replace 'varchar(256)' by 'varchar(255)'. I am looking at it...

    @Tom, I will look at a solution.
  6.  # 16
    Uploaded version 0.4.beta.4 of Vanilla Packer.
    •  
      CommentAuthorDinoboff
    • CommentTimeMar 28th 2007
     # 17
    @Tiggr: use the new version
    •  
      CommentAuthorTiggr
    • CommentTimeMar 28th 2007 edited
     # 18
    Hi Dinoboff!

    Great Work, thank you very much!

    But there are some problems with "bad behaving exensions":


    • BBInsertBar fails, because it uses the whole url for scripts and styles, giving this error:

      Warning: filemtime() [function.filemtime]: Stat failed for /home/www/colorful_sky_de/forum/http://www.colorful-sky.de/forum/extensions/BBInsertBar/style.css (errno=2 - No such file or directory) in /home/www/colorful_sky_de/forum/library/Framework/Framework.Class.PackManager.php on line 225


    • Some extensions use relativ path to images in the style file (background-image: url(...);), this images can't be found when using your extensions. But this is a minor thing...



    Bye
    Tiggr
    •  
      CommentAuthorTomTester
    • CommentTimeMar 28th 2007 edited
     # 19
    @Dino: think I've found a relevant KB article: http://support.microsoft.com/kb/321722
    •  
      CommentAuthorDinoboff
    • CommentTimeMar 28th 2007 edited
     # 20
    @ Tiggr: Thanks for BBInsertBar. Can you tell which extension use css background image? I try to list the extension that can't work with the packer.
    http://code.google.com/p/vanilla-packer/wiki/ExtensionsIssue

    @Tom: umm... so believing Microsoft, gzip encoded file are always cached in IE5 and IE6?
    I will try to check today.

    If you want to help for fixing bugs or update the wiki pages, you are welcome to join the project.
    •  
      CommentAuthorTiggr
    • CommentTimeMar 28th 2007
     # 21
    >Can you tell which extension css background image?

    In my case, it was CategoryIcons, that used relative pathes
  7.  # 22
    So now we have to move our images to the themes folder.?
    plus i fixed the packer based path in jqmedia. last time i updated it.
    the external.gif file in jqmedia isn't called from a style sheet.
    •  
      CommentAuthorTiggr
    • CommentTimeMar 29th 2007
     # 23
    Couldn't the the packer parse css for url(.+) and replace the path with the absolut path?
    •  
      CommentAuthorjimw
    • CommentTimeMar 29th 2007
     # 24
    Is there any way I can fix CategoryIcons to work with Packer?
    •  
      CommentAuthorTiggr
    • CommentTimeMar 29th 2007
     # 25
    Is there any way I can fix CategoryIcons to work with Packer?


    That's easy, just change the style file. ;-)

    Look for the parts with the image urls, and change them to the full pathes starting from webroot!
    •  
      CommentAuthorjimw
    • CommentTimeMar 29th 2007
     # 26
    I've tried adding $Configuration['WEB_ROOT'] to the image location in the stylesheet, but that looks like it isn't recognized.
    •  
      CommentAuthorDinoboff
    • CommentTimeMar 29th 2007 edited
     # 27
    You just need to copy the images into the style folder.
    •  
      CommentAuthorTiggr
    • CommentTimeMar 29th 2007
     # 28
    I would like to keep the images where they are!

    I've tried adding $Configuration['WEB_ROOT'] to the image location in the stylesheet


    Of course not! There is no parsing or executing of php in styles!

    Just change the parts with url(images/misc.gif) to something like url(/forum/extensions/CategoryIcons/images/misc.gif). Please check for the right path on your server!
    •  
      CommentAuthorWanderer
    • CommentTimeMar 29th 2007
     # 29
    Shouldn't you set a variable to equal...
    $Configuration['BASE_URL'].'extensions/CategoryIcons/images/misc.gif';

    Posted: Friday, 30 March 2007 at 9:48AM

    •  
      CommentAuthorTiggr
    • CommentTimeMar 30th 2007
     # 30
    Hi Wanderer!

    Would be very nice, but it's a style sheet, not php!
    •  
      CommentAuthorWanderer
    • CommentTimeMar 30th 2007 edited
     # 31
    Der, I knew that (didn't read the whole thread)!

    Posted: Friday, 30 March 2007 at 5:16PM

    •  
      CommentAuthorTomTester
    • CommentTimeApr 1st 2007 edited
     # 32
    I'd be happy to send you the alpha version of vzippy to see if that solves (or even experiences) some of the problems listed here.
    See alpha testers wanted for vzippy thread. Dino has been nice enough to install it on the same server http://vzippy.edinet.co.uk/


    Update: VZippy will not be released.
  8.  # 33
    Uploaded version 0.4.beta.5 of Vanilla Packer.
    •  
      CommentAuthor[-Stash-]
    • CommentTimeApr 2nd 2007
     # 34
    Just a random OT comment for Mark...
    Could the Lussumo Bot learn to link to the updated file when it tells us about it? It would save me scrolling all the way up the page (yes, I'm lazy). So its post would look like:

    Uploaded version 0.4.beta.5 of Vanilla Packer.
  9.  # 35
    packer v3.0 is released
    http://dean.edwards.name/weblog/2007/04/packer3/

    EDIT: i forgot u don't use the Packer
    •  
      CommentAuthorDinoboff
    • CommentTimeApr 2nd 2007 edited
     # 36
    I am not sure there is a php4 version of dean edward's packer. That's why I use JSmin.
    •  
      CommentAuthorVincent
    • CommentTimeApr 2nd 2007
     # 37
    Just a random OT comment for Mark...
    Could the Lussumo Bot learn to link to the updated file when it tells us about it? It would save me scrolling all the way up the page (yes, I'm lazy). So its post would look like:

    Uploaded version 0.4.beta.5 of Vanilla Packer.


    Lussumo Bot's post count also doesn't go up :P
    • CommentAuthortekl
    • CommentTimeApr 3rd 2007
     # 38
    I'll get the following Error:
    Warning: filemtime() [function.filemtime]: Stat failed for /home/www/XYZ/html/dev/forum/http://www.domain.com/forum/extensions/BBInsertBar/functions.js (errno=2 - No such file or directory) in /home/www/XYZ/html/dev/forum/library/Framework/Framework.Class.PackManager.php on line 225

    There is a path mixed with an url.

    Also js/css packer settings tells me: Not a valid or up-to-date css packer. I reuploaded 0.4b5, but it doesn't work.
    • CommentAuthortekl
    • CommentTimeApr 3rd 2007
     # 39
    Upps, sorry. I should read all messages. I'm not the first with the BBInsertBar-problem
    • CommentAuthortekl
    • CommentTimeApr 3rd 2007 edited
     # 40
    Hmm I can't ressolve the BBInsertBar problem? I copied the images everywhere. Also css packer is still not valid.
    •  
      CommentAuthorDinoboff
    • CommentTimeApr 3rd 2007 edited
     # 41
    You should replace line 154 and 155:$Head->AddStyleSheet($Context->Configuration["BASE_URL"].$Context->Configuration["BBBAR_PATH"].'style.css');
    $Head->AddScript($Context->Configuration["BASE_URL"].$Context->Configuration["BBBAR_PATH"].'functions.js');

    by:$Head->AddStyleSheet($Context->Configuration["BBBAR_PATH"].'style.css');
    $Head->AddScript($Context->Configuration["BBBAR_PATH"].'functions.js');

    That's how it should look like with or without the vanilla-packer.
    • CommentAuthortekl
    • CommentTimeApr 3rd 2007
     # 42
    Ahhh... the css packer problem can be solved with binary ftp uploads
    •  
      CommentAuthor[-Stash-]
    • CommentTimeApr 3rd 2007
     # 43
    Thanks Dinoboff, beta5 seems to work just fine for me :)

    I shall start mucking around with things now :)
    •  
      CommentAuthor[-Stash-]
    • CommentTimeApr 3rd 2007
     # 44
    Attachments file icons don't show up - guess they're css background images?
    •  
      CommentAuthor[-Stash-]
    • CommentTimeApr 3rd 2007 edited
     # 45
    Comments Links 1.4 doesn't copy the links when you click on the format you want. Turning packer off allows it to work.

    I lied - Comment Links 1.4 doesn't allow me to copy anything at all, no matter packer being on or off :(
    •  
      CommentAuthor[-Stash-]
    • CommentTimeApr 3rd 2007 edited
     # 46
    On this heavy extension testing page I get the following changes with packer. Very impressive, and most certainly worth it!

    http://exhibitq.com/talk/discussion/3/
    Data size 214kb -> 124kb
    Load time 11.5s -> 5.5s
    Requests 65 -> 47

    Smile seems to work just fine.
    Strangely, Preview Post seems to work without having to do anything with the PNG (could be because I'm using Jazzman's style?).
    •  
      CommentAuthorTomTester
    • CommentTimeApr 3rd 2007 edited
     # 47
    .
    •  
      CommentAuthor[-Stash-]
    • CommentTimeApr 3rd 2007
     # 48
    Tom, responded in your other thread.

    Dinoboff, minor little thing... default.php line 14, if you could capitalise the 2nd "Options" - change it from:$Context->SetDefinition('ExtensionOptions', 'Extension options');to:$Context->SetDefinition('ExtensionOptions', 'Extension Options');
    then it would appear in the same place as the Jazzman's various Extension Options :)
    •  
      CommentAuthorDinoboff
    • CommentTimeApr 3rd 2007
     # 49
    thanks Stash.

    I will look at Comment Links 1.4
    •  
      CommentAuthorDinoboff
    • CommentTimeApr 3rd 2007
     # 50
    There is a problem with this file:
    http://exhibitq.com/talk/themes/vanilla/styles/europeaftertherain/images/file_attach.gif

    You have to copy images/file_attach.gif to /themes/vanilla/styles/europeaftertherain/