Page 1 of 17 12311 ... LastLast
Results 1 to 10 of 169
  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default CSS JS Loader [Support Thread]

    Since I didn't find a support thread for the CSS/JS Loader (http://www.zen-cart.com/downloads.php?do=file&id=1774), I've created this one!

    I've installed v3.0.2 on a v1.5.3 test site and it's working quite well! I did make the following changes before I installed:

    1. I run local test sites for all my installations, with a /includes/local/configure.php file to allow me to keep the /includes/configure.php as it is in the "live" store. The following change to /min/config.php allows that environment to work properly with the loader:
    Code:
    // added for Zen Cart
    //-20140806-lat9-Enable proper operation if a local configure.php file is being used.
    if (file_exists('../includes/local/configure.php')) {
      include('../includes/local/configure.php');
    } else {
      include('../includes/configure.php');
    }
    //-eof-20140806-lat9
    2. The new-install script "kills" configuration_group_id = 0 in the configuration table; I made the following change to /YOUR_ADMIN/includes/installers/css_js_loader/new_install.php:
    Code:
    <?php
    $configuration = $db->Execute("SELECT configuration_group_id FROM " . TABLE_CONFIGURATION_GROUP . " WHERE configuration_group_title = 'CSS/JS Loader' OR configuration_group_title = 'CSS/JS Loader Configuration';");
    if ($configuration->RecordCount() > 0) {
      while (!$configuration->EOF) {
        $db->Execute("DELETE FROM " . TABLE_CONFIGURATION . " WHERE configuration_group_id = " . $configuration->fields['configuration_group_id'] . ";");
        $db->Execute("DELETE FROM " . TABLE_CONFIGURATION_GROUP . " WHERE configuration_group_id = " . $configuration->fields['configuration_group_id'] . ";");
        $configuration->MoveNext();
      }
    }
    //$db->Execute("DELETE FROM " . TABLE_CONFIGURATION . " WHERE configuration_group_id = 0;");  //-20140806-lat9-Don't kill CGI(0)!
    $db->Execute("DELETE FROM " . TABLE_CONFIGURATION . " WHERE configuration_key = '';");
    
    $db->Execute("INSERT INTO " . TABLE_CONFIGURATION_GROUP . " (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES (NULL, 'CSS/JS Loader Configuration', 'Set CSS/JS Loader Options', '1', '1');");
    $configuration_group_id = $db->Insert_ID();
    
    $db->Execute("UPDATE " . TABLE_CONFIGURATION_GROUP . " SET sort_order = " . $configuration_group_id . " WHERE configuration_group_id = " . $configuration_group_id . ";");
    
    $db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES
                ('Version', 'CSS_JS_LOADER_VERSION', '2.0.0', 'Installed Version', " . $configuration_group_id . ", 0, NOW(), NOW(), NULL, 'trim('), 
                ('Enable Minify', 'MINIFY_STATUS', 'true', 'Minifying will speed up your site\'s loading speed by combining and compressing css/js files (valid CSS and JS are required).', " . $configuration_group_id . ", 10, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
                ('Max URL Length', 'MINIFY_MAX_URL_LENGHT', '500', 'On some servers the maximum length of any POST/GET request URL is limited. If this is the case for your server, you can change the setting here', " . $configuration_group_id . ", 20, NOW(), NOW(), NULL, NULL),
                ('Minify Cache Time', 'MINIFY_CACHE_TIME_LENGHT', '31536000', 'Set minify cache time (in second). Default is 1 year (31536000)', " . $configuration_group_id . ", 30, NOW(), NOW(), NULL, NULL),
                ('Latest Cache Time', 'MINIFY_CACHE_TIME_LATEST', '0', 'Normally you don\'t have to set this, but if you have just made changes to your js/css files and want to make sure they are reloaded right away, you can reset this to 0.', " . $configuration_group_id . ", 40, NOW(), NOW(), NULL, NULL)");

  2. #2
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: CSS JS Loader [Support Thread]

    There are plans to rebuild the auto_installer. I'm sure that will be resolved with that change

  3. #3
    Join Date
    Mar 2012
    Location
    South Africa- Krugersdorp
    Posts
    29
    Plugin Contributions
    0

    Default Re: CSS JS Loader [Support Thread]

    Hi everyone I am trying to get CSS/JS Loader installed as a first step to installing Fast and Easy checkout.
    I am running V1.5.3 with PHP 5.5.3

    I have installed the latest available version ( v3.0.2 ? ) which broke the site. After enabling the minify's in admin I got back a large portion of CSS functionality , but there are still some CSS's that are being blocked.

    Further it slows the site down by almost 2 seconds.

    Un-installing and modifying the " new_install.php " just produces he same results.

    The cache time thru all this always stays at : 1407828153 (I have reset it to zero a number of times )

    I have not worked on the config in /min/config.php

    Anybody got any pointers for me?

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: CSS JS Loader [Support Thread]

    The /plugins directory created by this plugin needs an .htaccess and empty index.html to prevent the directory structure from being "snooped":
    Code:
    #
    # @copyright Copyright 2003-2010 Zen Cart Development Team
    # @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    # @version $Id: .htaccess 16111 2010-04-29 22:39:02Z drbyte $
    #
    # This is used with Apache WebServers
    #
    # The following blocks direct HTTP requests to all filetypes in this directory recursively, except certain approved exceptions
    # It also prevents the ability of any scripts to run. No type of script, be it PHP, PERL or whatever, can normally be executed if ExecCGI is disabled.
    # Will also prevent people from seeing what is in the dir. and any sub-directories
    #
    # For this to work, you must include either 'All' or at least: 'Limit' and 'Indexes' parameters to the AllowOverride configuration in your apache/conf/httpd.conf file.
    # Additionally, if you want the added protection offered by the OPTIONS directive below, you'll need to add 'Options' to the AllowOverride list, if 'All' is not specified. 
    # Example:
    #<Directory "/usr/local/apache/htdocs">
    #  AllowOverride Limit Options Indexes
    #</Directory>
    ###############################
    
    # deny *everything*
    <FilesMatch ".*">
      Order Allow,Deny
      Deny from all
    </FilesMatch>
    
    # but now allow just *certain* necessary files:
    <FilesMatch ".*\.(php|html)$">
      Order Allow,Deny
      Allow from all
    </FilesMatch>
    
    IndexIgnore */*
    
    OPTIONS -Indexes -ExecCGI
    Code:
    <html>
      <head>
        <title></title>
        <meta content="">
        <style></style>
      </head>
      <body></body>
    </html>

  5. #5
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: CSS JS Loader [Support Thread]

    Quote Originally Posted by lat9 View Post
    The /plugins directory created by this plugin needs an .htaccess and empty index.html to prevent the directory structure from being "snooped":
    Code:
    #
    # @copyright Copyright 2003-2010 Zen Cart Development Team
    # @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    # @version $Id: .htaccess 16111 2010-04-29 22:39:02Z drbyte $
    #
    # This is used with Apache WebServers
    #
    # The following blocks direct HTTP requests to all filetypes in this directory recursively, except certain approved exceptions
    # It also prevents the ability of any scripts to run. No type of script, be it PHP, PERL or whatever, can normally be executed if ExecCGI is disabled.
    # Will also prevent people from seeing what is in the dir. and any sub-directories
    #
    # For this to work, you must include either 'All' or at least: 'Limit' and 'Indexes' parameters to the AllowOverride configuration in your apache/conf/httpd.conf file.
    # Additionally, if you want the added protection offered by the OPTIONS directive below, you'll need to add 'Options' to the AllowOverride list, if 'All' is not specified. 
    # Example:
    #<Directory "/usr/local/apache/htdocs">
    #  AllowOverride Limit Options Indexes
    #</Directory>
    ###############################
    
    # deny *everything*
    <FilesMatch ".*">
      Order Allow,Deny
      Deny from all
    </FilesMatch>
    
    # but now allow just *certain* necessary files:
    <FilesMatch ".*\.(php|html)$">
      Order Allow,Deny
      Allow from all
    </FilesMatch>
    
    IndexIgnore */*
    
    OPTIONS -Indexes -ExecCGI
    Code:
    <html>
      <head>
        <title></title>
        <meta content="">
        <style></style>
      </head>
      <body></body>
    </html>
    lat9,
    The change you have recommended has added to the module, and should be submitted for moderation shortly.

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: CSS JS Loader [Support Thread]

    Quote Originally Posted by bislewl View Post
    lat9,
    The change you have recommended has added to the module, and should be submitted for moderation shortly.
    Excellent! Thanks much.

  7. #7
    Join Date
    Aug 2014
    Location
    Polska
    Posts
    20
    Plugin Contributions
    0

    Default Re: CSS JS Loader [Support Thread]

    Alright, so I validated my css's and disabled minify option in admin config, BUT it's still breaking my site.
    My template frame's are now whole page wide, categories bars in sidebox are full page wide etc.

    looks like this:


    Upon validation I removed *zoom property from css. Could this be responsible for good look of my page?

    I noticed that now links in my footer has additional display:none, but when I'm checking this with chrome dev tools, it shows no source.
    It doesn't make much sense to me.

  8. #8
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: CSS JS Loader [Support Thread]

    any errors in /logs?
    how many version of jquery are you running? should be 1.11.0 and migrate 1.2.1, in my opinion.

  9. #9
    Join Date
    Aug 2014
    Location
    Polska
    Posts
    20
    Plugin Contributions
    0

    Default Re: CSS JS Loader [Support Thread]

    There's nothing in logs. I don't know where to check jquery.

  10. #10
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: CSS JS Loader [Support Thread]

    in your <HEAD> what are the js files that are loading sometimes things get messed up and the javascript files get loaded in the body as well

    also jquery should be the first with migrate being the 2nd

 

 
Page 1 of 17 12311 ... LastLast

Similar Threads

  1. v150 CSS Buttons for Admin [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 19
    Last Post: 24 Dec 2015, 09:13 PM
  2. v151 CSS/JS Loader installation question
    By McLovin in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 12 Feb 2014, 06:28 PM
  3. css/js loader !!
    By Miff in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 28 Nov 2011, 01:19 PM
  4. CJ Loader (CSS/Javascript Loader) plugin function is not loaded by zen cart?
    By tripflex in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 11 Jul 2011, 03:55 PM
  5. [support thread] Javascript loader
    By yellow1912 in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 7 Nov 2009, 12:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR