Page 2 of 12 FirstFirst 1234 ... LastLast
Results 11 to 20 of 111
  1. #11
    Join Date
    Jun 2008
    Location
    Singapore, Australia, America
    Posts
    96
    Plugin Contributions
    0

    Default Re: css javascript loader addon

    PHP Code:
    <?php
    /**
     * Common Template - tpl_header.php
     *
     * this file can be copied to /templates/your_template_dir/pagename<br />
     * example: to override the privacy page<br />
     * make a directory /templates/my_template/privacy<br />
     * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br />
     * to override the global settings and turn off the footer un-comment the following line:<br />
     * <br />
     * $flag_disable_header = true;<br />
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_header.php 3392 2006-04-08 15:17:37Z birdbrain $
     */
    ?>
    <!--bof-header logo and navigation display-->
    <?php
    if (!isset($flag_disable_header) || !$flag_disable_header) {
    ?>
    <div id="headerWrapper" class="clearfix">
      <?php
      
    if (SHOW_BANNERS_GROUP_SET1 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET1)) {
        if (
    $banner->RecordCount() > 0) {
    ?>
    <div id="bannerOne" class="banners"><?php echo zen_display_banner('static'$banner); ?></div>
    <?php
        
    }
      }
    ?>
      <div id="headerWrappera">
        <div id="headerWrapperb">
          <div id="headerWrapperc">
            <!--bof-navigation display-->
            <div id="navMainWrapper" class="clearfix">
              <div id="navMain">
                <div id="navMainLinks">
                  <ul class="back">
                    <li><?php echo '<a href="' HTTP_SERVER DIR_WS_CATALOG '">'?><?php echo HEADER_TITLE_CATALOG?></a></li>
                    <?php if ($_SESSION['customer_id']) { ?>
                    <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF'''SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF?></a></li>
                    <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT'''SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT?></a></li>
                    <?php
          
    } else {
            if (
    STORE_STATUS == '0') {
    ?>
                    <li><a href="<?php echo zen_href_link(FILENAME_LOGIN'''SSL'); ?>"><?php echo HEADER_TITLE_LOGIN?></a></li>
                    <?php } } ?>
                    <?php if ($_SESSION['cart']->count_contents() != 0) { ?>
                    <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART'''NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS?></a></li>
                    <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING'''SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT?></a></li>
                    <?php }?>
                  </ul>
                </div>
                <div id="navMainSearch">
                  <?php require(DIR_WS_MODULES 'sideboxes/search_header.php'); ?>
                </div>
              </div>
            </div>
            <!--eof-navigation display-->
            <!--bof-branding display-->
            <div id="logoWrapperOuter">
              <div id="logoWrapper">
                <div id="logo"><?php echo '<a href="' HTTP_SERVER DIR_WS_CATALOG '">' zen_image($template->get_template_dir(HEADER_LOGO_IMAGEDIR_WS_TEMPLATE$current_page_base,'images'). '/' HEADER_LOGO_IMAGEHEADER_ALT_TEXTHEADER_LOGO_WIDTHHEADER_LOGO_HEIGHT) . '</a>'?></div>
                <?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET2))) { ?>
                <div id="taglineWrapper">
                  <?php
                  
    if (HEADER_SALES_TEXT != '') {
    ?>
                  <div id="tagline"><?php echo HEADER_SALES_TEXT;?></div>
                  <?php
                  
    }
    ?>
                  <?php
                  
    if (SHOW_BANNERS_GROUP_SET2 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET2)) {
                    if (
    $banner->RecordCount() > 0) {
    ?>
                  <br class="clearBoth" /><div id="bannerTwo" class="banners"><?php echo zen_display_banner('static'$banner);?></div>
                  <?php
                    
    }
                  }
    ?>
                </div>
                <?php // no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2 ?>
              </div>
            </div>
            <!--eof-branding display-->
            <!--eof-header logo and navigation display-->
            <!--bof-header ezpage links-->
            <?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE$_SERVER['REMOTE_ADDR'])))) { ?>
            <div id="navEZPagesTopWrapper">
              <?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
            </div>
            <?php ?>
            <!--eof-header ezpage links-->
            <!--bof-optional categories tabs navigation display-->
            <?php require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_categories_tabs.php'); ?>
            <!--eof-optional categories tabs navigation display-->
          </div>
        </div>
      </div>
    </div>
    <?php ?>
    I am using 1.39d, and using custom template. I tried to merge the existing html_header.php (shown here is from my template), but couldn't seem to be doing the right thing, my page turns out blank.

    Appreciate anyone who might know where what and where to change?

  2. #12
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: css javascript loader addon

    Quote Originally Posted by saplanet View Post
    PHP Code:
    <?php
    /**
     * Common Template - tpl_header.php
     *
     * this file can be copied to /templates/your_template_dir/pagename<br />
     * example: to override the privacy page<br />
     * make a directory /templates/my_template/privacy<br />
     * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br />
     * to override the global settings and turn off the footer un-comment the following line:<br />
     * <br />
     * $flag_disable_header = true;<br />
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_header.php 3392 2006-04-08 15:17:37Z birdbrain $
     */
    ?>
    <!--bof-header logo and navigation display-->
    <?php
    if (!isset($flag_disable_header) || !$flag_disable_header) {
    ?>
    <div id="headerWrapper" class="clearfix">
      <?php
      
    if (SHOW_BANNERS_GROUP_SET1 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET1)) {
        if (
    $banner->RecordCount() > 0) {
    ?>
    <div id="bannerOne" class="banners"><?php echo zen_display_banner('static'$banner); ?></div>
    <?php
        
    }
      }
    ?>
      <div id="headerWrappera">
        <div id="headerWrapperb">
          <div id="headerWrapperc">
            <!--bof-navigation display-->
            <div id="navMainWrapper" class="clearfix">
              <div id="navMain">
                <div id="navMainLinks">
                  <ul class="back">
                    <li><?php echo '<a href="' HTTP_SERVER DIR_WS_CATALOG '">'?><?php echo HEADER_TITLE_CATALOG?></a></li>
                    <?php if ($_SESSION['customer_id']) { ?>
                    <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF'''SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF?></a></li>
                    <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT'''SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT?></a></li>
                    <?php
          
    } else {
            if (
    STORE_STATUS == '0') {
    ?>
                    <li><a href="<?php echo zen_href_link(FILENAME_LOGIN'''SSL'); ?>"><?php echo HEADER_TITLE_LOGIN?></a></li>
                    <?php } } ?>
                    <?php if ($_SESSION['cart']->count_contents() != 0) { ?>
                    <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART'''NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS?></a></li>
                    <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING'''SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT?></a></li>
                    <?php }?>
                  </ul>
                </div>
                <div id="navMainSearch">
                  <?php require(DIR_WS_MODULES 'sideboxes/search_header.php'); ?>
                </div>
              </div>
            </div>
            <!--eof-navigation display-->
            <!--bof-branding display-->
            <div id="logoWrapperOuter">
              <div id="logoWrapper">
                <div id="logo"><?php echo '<a href="' HTTP_SERVER DIR_WS_CATALOG '">' zen_image($template->get_template_dir(HEADER_LOGO_IMAGEDIR_WS_TEMPLATE$current_page_base,'images'). '/' HEADER_LOGO_IMAGEHEADER_ALT_TEXTHEADER_LOGO_WIDTHHEADER_LOGO_HEIGHT) . '</a>'?></div>
                <?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET2))) { ?>
                <div id="taglineWrapper">
                  <?php
                  
    if (HEADER_SALES_TEXT != '') {
    ?>
                  <div id="tagline"><?php echo HEADER_SALES_TEXT;?></div>
                  <?php
                  
    }
    ?>
                  <?php
                  
    if (SHOW_BANNERS_GROUP_SET2 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET2)) {
                    if (
    $banner->RecordCount() > 0) {
    ?>
                  <br class="clearBoth" /><div id="bannerTwo" class="banners"><?php echo zen_display_banner('static'$banner);?></div>
                  <?php
                    
    }
                  }
    ?>
                </div>
                <?php // no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2 ?>
              </div>
            </div>
            <!--eof-branding display-->
            <!--eof-header logo and navigation display-->
            <!--bof-header ezpage links-->
            <?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE$_SERVER['REMOTE_ADDR'])))) { ?>
            <div id="navEZPagesTopWrapper">
              <?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
            </div>
            <?php ?>
            <!--eof-header ezpage links-->
            <!--bof-optional categories tabs navigation display-->
            <?php require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_categories_tabs.php'); ?>
            <!--eof-optional categories tabs navigation display-->
          </div>
        </div>
      </div>
    </div>
    <?php ?>
    I am using 1.39d, and using custom template. I tried to merge the existing html_header.php (shown here is from my template), but couldn't seem to be doing the right thing, my page turns out blank.

    Appreciate anyone who might know where what and where to change?
    well, for a start, this is the wrong file. you want html_header.php NOT tpl_header.php

  3. #13
    Join Date
    Jun 2008
    Location
    Singapore, Australia, America
    Posts
    96
    Plugin Contributions
    0

    Default Re: css javascript loader addon

    Quote Originally Posted by BlessIsaacola View Post
    well, for a start, this is the wrong file. you want html_header.php NOT tpl_header.php
    thank you for pointing that out.. Will go try the correct file now.

  4. #14
    Join Date
    Jun 2008
    Location
    Singapore, Australia, America
    Posts
    96
    Plugin Contributions
    0

    Default Re: css javascript loader addon

    PHP Code:
    <?php
    /**
     * Common Template
     *
     * outputs the html header. i,e, everything that comes before the \</head\> tag <br />
     *
     * @package templateSystem
     * @copyright Copyright 2003-2010 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: html_header.php 15761 2010-03-31 19:31:27Z drbyte $
     */
    /**
     * load the module for generating page meta-tags
     */
    require(DIR_WS_MODULES zen_get_module_directory('meta_tags.php'));
    /**
     * output main page HEAD tag and related headers/meta-tags, etc
     */
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS?>>
    <head>
    <title><?php echo META_TAG_TITLE?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET?>" />
    <meta name="keywords" content="<?php echo META_TAG_KEYWORDS?>" />
    <meta name="description" content="<?php echo META_TAG_DESCRIPTION?>" />
    <meta http-equiv="imagetoolbar" content="no" />
    <meta name="author" content="saplanet originals by lis chaong" />
    <meta name="generator" content="saplanet originals - handcrafted amigurumi and wedding favors" />
    <?php if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($current_page_base,explode(",",constant('ROBOTS_PAGES_TO_SKIP'))) || $current_page_base=='down_for_maintenance' || $robotsNoIndex === true) { ?>
    <meta name="robots" content="noindex, nofollow" />
    <?php ?>
    <?php 
    if (defined('FAVICON')) { ?>
    <link rel="icon" href="<?php echo FAVICON?>" type="image/x-icon" />
    <link rel="shortcut icon" href="<?php echo FAVICON?>" type="image/x-icon" />
    <?php //endif FAVICON ?>

    <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER DIR_WS_HTTPS_CATALOG HTTP_SERVER DIR_WS_CATALOG ); ?>" />
    <?php if (isset($canonicalLink) && $canonicalLink != '') { ?>
    <link rel="canonical" href="<?php echo $canonicalLink?>" />
    <?php ?>

    <?php
    /**
     * load all template-specific stylesheets, named like "style*.css", alphabetically
     */
      
    $directory_array $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE$current_page_base,'css'), '/^style/''.css');
      while(list (
    $key$value) = each($directory_array)) {
        echo 
    '<link rel="stylesheet" type="text/css" href="' $template->get_template_dir('.css',DIR_WS_TEMPLATE$current_page_base,'css') . '/' $value '" />'."\n";
      }
    /**
     * load stylesheets on a per-page/per-language/per-product/per-manufacturer/per-category basis. Concept by Juxi Zoza.
     */
      
    $manufacturers_id = (isset($_GET['manufacturers_id'])) ? $_GET['manufacturers_id'] : '';
      
    $tmp_products_id = (isset($_GET['products_id'])) ? (int)$_GET['products_id'] : '';
      
    $tmp_pagename = ($this_is_home_page) ? 'index_home' $current_page_base;
      if (
    $current_page_base == 'page' && isset($ezpage_id)) $tmp_pagename $current_page_base . (int)$ezpage_id;
      
    $sheets_array = array('/' $_SESSION['language'] . '_stylesheet',
                            
    '/' $tmp_pagename,
                            
    '/' $_SESSION['language'] . '_' $tmp_pagename,
                            
    '/c_' $cPath,
                            
    '/' $_SESSION['language'] . '_c_' $cPath,
                            
    '/m_' $manufacturers_id,
                            
    '/' $_SESSION['language'] . '_m_' . (int)$manufacturers_id,
                            
    '/p_' $tmp_products_id,
                            
    '/' $_SESSION['language'] . '_p_' $tmp_products_id
                            
    );
      while(list (
    $key$value) = each($sheets_array)) {
        
    //echo "<!--looking for: $value-->\n";
        
    $perpagefile $template->get_template_dir('.css'DIR_WS_TEMPLATE$current_page_base'css') . $value '.css';
        if (
    file_exists($perpagefile)) echo '<link rel="stylesheet" type="text/css" href="' $perpagefile .'" />'."\n";
      }

    /**
     * load printer-friendly stylesheets -- named like "print*.css", alphabetically
     */
      
    $directory_array $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE$current_page_base,'css'), '/^print/''.css');
      
    sort($directory_array);
      while(list (
    $key$value) = each($directory_array)) {
        echo 
    '<link rel="stylesheet" type="text/css" media="print" href="' $template->get_template_dir('.css',DIR_WS_TEMPLATE$current_page_base,'css') . '/' $value '" />'."\n";
      }

    /**
     * load all site-wide jscript_*.js files from includes/templates/YOURTEMPLATE/jscript, alphabetically
     */
      
    $directory_array $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE$current_page_base,'jscript'), '/^jscript_/''.js');
      while(list (
    $key$value) = each($directory_array)) {
        echo 
    '<script type="text/javascript" src="' .  $template->get_template_dir('.js',DIR_WS_TEMPLATE$current_page_base,'jscript') . '/' $value '"></script>'."\n";
      }

    /**
     * load all page-specific jscript_*.js files from includes/modules/pages/PAGENAME, alphabetically
     */
      
    $directory_array $template->get_template_part($page_directory'/^jscript_/''.js');
      while(list (
    $key$value) = each($directory_array)) {
        echo 
    '<script type="text/javascript" src="' $page_directory '/' $value '"></script>' "\n";
      }

    /**
     * load all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically
     */
      
    $directory_array $template->get_template_part($template->get_template_dir('.php',DIR_WS_TEMPLATE$current_page_base,'jscript'), '/^jscript_/''.php');
      while(list (
    $key$value) = each($directory_array)) {
    /**
     * include content from all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically.
     * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
     */
        
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE$current_page_base,'jscript') . '/' $value); echo "\n";
      }
    /**
     * include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
     */
      
    $directory_array $template->get_template_part($page_directory'/^jscript_/');
      while(list (
    $key$value) = each($directory_array)) {
    /**
     * include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
     * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
     */
        
    require($page_directory '/' $value); echo "\n";
      }

    // DEBUG: echo '<!-- I SEE cat: ' . $current_category_id . ' || vs cpath: ' . $cPath . ' || page: ' . $current_page . ' || template: ' . $current_template . ' || main = ' . ($this_is_home_page ? 'YES' : 'NO') . ' -->';


    ?>
    </head>
    <?php // NOTE: Blank line following is intended: ?>
    Still no joy.

  5. #15
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: css javascript loader addon

    I have pasted the latter portion of my code for you below which is where you're messing things. Please note that this is NOT the complete file. I just started from the meta generator. Also
    PHP Code:
    <?php echo rss_feed_link_alternate(); // RSS Feed ?>
    is part of my file because we use RSS Feed.

    PHP Code:
    <meta name="generator" content="shopping cart program by Zen Cart&trade;, http://www.zen-cart.com eCommerce" />
    <?php if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($current_page_base,explode(",",constant('ROBOTS_PAGES_TO_SKIP'))) || $current_page_base=='down_for_maintenance' || $robotsNoIndex === true) { ?>
    <meta name="robots" content="noindex, nofollow" />
    <?php ?>
    <?php 
    if (defined('FAVICON')) { ?>
    <link rel="icon" href="<?php echo FAVICON?>" type="image/x-icon" />
    <link rel="shortcut icon" href="<?php echo FAVICON?>" type="image/x-icon" />
    <?php //endif FAVICON ?>

    <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER DIR_WS_HTTPS_CATALOG HTTP_SERVER DIR_WS_CATALOG ); ?>" />
    <?php if (isset($canonicalLink) && $canonicalLink != '') { ?>
    <link rel="canonical" href="<?php echo $canonicalLink?>" />
    <?php ?>

    <?php
    /**
    * load the loader files
    */

    if($RI_CJLoader->get('status')){
        
    $directory_array $template->get_template_part(DIR_WS_TEMPLATE.'auto_loaders''/^loader_/''.php');
        
        
    $loaders_check $RI_CJLoader->get('loaders');
        if(
    $loaders_check == '*' || count($loaders_check) > 0){
            while(list (
    $key$value) = each($directory_array)) {
            
    /**
            * include content from all site-wide loader_*.php files from includes/templates/YOURTEMPLATE/jscript/auto_loaders, alphabetically.
            */
                
    if($loaders_check == '*' || in_array($value$loaders_check))
                    require(
    DIR_WS_TEMPLATE.'auto_loaders''/' $value);
            }
        }
        
        
    $RI_CJLoader->loadCssJsFiles();
        
    $files $RI_CJLoader->processCssJsFiles();
        foreach(
    $files['css'] as $file)
            if(
    $file['include']) include($file['string']);
            else echo 
    $file['string'];
            
        foreach(
    $files['js'] as $file)
            if(
    $file['include']) include($file['string']);
            else echo 
    $file['string'];
    }
    // DEBUG: echo '<!-- I SEE cat: ' . $current_category_id . ' || vs cpath: ' . $cPath . ' || page: ' . $current_page . ' || template: ' . $current_template . ' || main = ' . ($this_is_home_page ? 'YES' : 'NO') . ' -->';


    ?>
    <?php 
    echo rss_feed_link_alternate(); // RSS Feed ?>
    </head>
    <?php // NOTE: Blank line following is intended: ?>

  6. #16
    Join Date
    Jun 2008
    Location
    Singapore, Australia, America
    Posts
    96
    Plugin Contributions
    0

    Default Re: css javascript loader addon

    Thank you for offering the help.

    Most of the codes are needed to load my site. I still can't figure out where to insert the cj loader code. I used a merge application to check against my file, and when replaced with the CJ code, it won't load for me.

    Anyone else used this mod on the customized html_header.php file?

  7. #17
    Join Date
    Dec 2009
    Posts
    204
    Plugin Contributions
    0

    Default Re: css javascript loader addon

    I am using it with no problems so far. Try this:
    PHP Code:
    <?php
        
    require_once(DIR_WS_CLASSES 'class.cj_loader.php');
        
    $ri_cj_loader = new RICJLoader();
        list(
    $css_files_to_load$jscript_files_to_load) = $ri_cj_loader->loadCssJsFiles();
      
    $files $ri_cj_loader->processCssJsFiles($css_files_to_load$jscript_files_to_load);
      foreach(
    $files['css'] as $file)
          if(
    $file['include']) include($file['string']);
          else echo 
    $file['string'];
          
      foreach(
    $files['js'] as $file)
          if(
    $file['include']) include($file['string']);
          else echo 
    $file['string'];      
    //DEBUG: echo '<!-- I SEE cat: ' . $current_category_id . ' || vs cpath: ' . $cPath . ' || page: ' . $current_page . ' || template: ' . $current_template . ' || main = ' . ($this_is_home_page ? 'YES' : 'NO') . ' -->';
    ?>
    The above code should replace this part in you html_header.php:

    PHP Code:
    <?php
    /**
     * load all template-specific stylesheets, named like "style*.css", alphabetically
     */ 
    ....
    ....
    ....
    // DEBUG: echo '<!-- I SEE cat: ' . $current_category_id . ' || vs cpath: ' . $cPath . ' || page: ' . $current_page . ' || template: ' . $current_template . ' || main = ' . ($this_is_home_page ? 'YES' : 'NO') . ' -->';


    ?>
    Give it a try and post here if it was successful.

  8. #18
    Join Date
    Jun 2008
    Location
    Singapore, Australia, America
    Posts
    96
    Plugin Contributions
    0

    Default Re: css javascript loader addon

    Thank you, andreitero!!!!! I did what you suggested, and I believe it works!!

  9. #19
    Join Date
    Dec 2009
    Posts
    204
    Plugin Contributions
    0

    Default Re: css javascript loader addon

    You're welcome, glad it's working now

  10. #20
    Join Date
    Feb 2004
    Location
    Georgia, USA
    Posts
    1,948
    Plugin Contributions
    0

    Default Re: css javascript loader addon

    Quote Originally Posted by saplanet View Post
    Thank you, andreitero!!!!! I did what you suggested, and I believe it works!!
    Glad you got it to work...I was actually trying to show you the difference between my file and yours to let you know you have to remove the old code and replace it with CJ Loader code. Sorry about the confusion.

 

 
Page 2 of 12 FirstFirst 1234 ... LastLast

Similar Threads

  1. Replies: 8
    Last Post: 26 Feb 2016, 12:41 AM
  2. css/js loader !!
    By Miff in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 28 Nov 2011, 01:19 PM
  3. 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
  4. Yellow1912's css javascript loader breaks Ajax EasySlider
    By dutchy in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 27 Oct 2010, 11:23 AM
  5. [support thread] Javascript loader
    By yellow1912 in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 7 Nov 2009, 12:11 AM

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