Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • viet4777 Friend
    #153890

    I try to load scripts and stylesheet for a component such as below:
    [PHP]<?php
    /**
    * @version 1.0.0 smoothgallery $
    * @package smoothgallery
    * @copyright Copyright © 2010 – All rights reserved.
    * @license GNU/GPL
    * @author
    * @author mail nobody@nobody.com
    *
    *
    * @MVC architecture generated by MVC generator tool at http://www.alphaplug.com
    */

    // no direct access
    defined(‘_JEXEC’) or die(‘Restricted access’);

    jimport( ‘joomla.application.component.model’ );

    class smoothgalleryModelSmoothgallery extends Jmodel
    {
    function __construct(){
    parent::__construct();
    JHTML::stylesheet(‘layout.css’,’com_smoothgallery/assets/css/’);
    JHTML::stylesheet(‘jd.gallery.css’,’com_smoothgallery/assets/css/’);
    JHTML::script(‘jd.gallery.js’,’com_smoothgallery/assets/scripts/’);
    JHTML::script(‘jd.gallery.transitions.js’,’com_smoothgallery/assets/scripts/’);
    }

    }
    ?>[/PHP]

    But Only scripts are rendered. No stylesheets are output: (layout.css and jd.gallery.css are mising)
    [PHP]transitional.dtd”>

    <html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en-gb” lang=”en-gb”>

    <head>
    <meta http-equiv=”content-type” content=”text/html; charset=utf-8″ />
    <meta name=”robots” content=”index, follow” />
    <meta name=”keywords” content=”joomla, Joomla” />
    <meta name=”description” content=”Joomla! – the dynamic portal engine and content management system” />
    <meta name=”generator” content=”Joomla! 1.5 – Open Source Content Management” />
    <title>Smooth Gallery</title>
    <link rel=”stylesheet” href=”/cc/templates/system/css/system.css” type=”text/css” />
    <link rel=”stylesheet” href=”/cc/templates/system/css/general.css” type=”text/css” />
    <link rel=”stylesheet” href=”/cc/plugins/system/jat3/base-themes/default/css/addons.css” type=”text/css” />
    <link rel=”stylesheet” href=”/cc/plugins/system/jat3/base-themes/default/css/layout.css” type=”text/css” />
    <link rel=”stylesheet” href=”/cc/plugins/system/jat3/base-themes/default/css/template.css” type=”text/css” />
    <link rel=”stylesheet” href=”/cc/plugins/system/jat3/base-themes/default/css/usertools.css” type=”text/css” />
    <link rel=”stylesheet” href=”/cc/plugins/system/jat3/base-themes/default/css/css3.css” type=”text/css” />
    <link rel=”stylesheet” href=”/cc/plugins/system/jat3/base-themes/default/css/menu/mega.css” type=”text/css” />
    <link rel=”stylesheet” href=”/cc/templates/ja_t3_blank/css/template.css” type=”text/css” />
    <link rel=”stylesheet” href=”/cc/templates/ja_t3_blank/css/menu/mega.css” type=”text/css” />
    <script type=”text/javascript” src=”/cc/media/system/js/mootools.js”></script>
    <script type=”text/javascript” src=”/cc/plugins/system/jat3/base-themes/default//js/core.js”></script>
    <script type=”text/javascript” src=”/cc/plugins/system/jat3/base-themes/default//js/menu/mega.js”></script>
    <script type=”text/javascript” src=”/cc/com_smoothgallery/assets/scripts/jd.gallery.js”></script>
    <script type=”text/javascript” src=”/cc/com_smoothgallery/assets/scripts/jd.gallery.transitions.js”></script> [/PHP]

    If I use a defult template. Both stylesheets and scripts are rendered:
    [PHP]<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en-gb” lang=”en-gb”>

    <head>
    <meta http-equiv=”content-type” content=”text/html; charset=utf-8″ />
    <meta name=”robots” content=”index, follow” />
    <meta name=”keywords” content=”joomla, Joomla” />
    <meta name=”description” content=”Joomla! – the dynamic portal engine and content management system” />
    <meta name=”generator” content=”Joomla! 1.5 – Open Source Content Management” />
    <title>Smooth Gallery</title>
    <link href=”/cc/templates/ja_purity/favicon.ico” rel=”shortcut icon” type=”image/x-icon” />
    <link rel=”stylesheet” href=”/cc/com_smoothgallery/assets/css/layout.css” type=”text/css” />
    <link rel=”stylesheet” href=”/cc/com_smoothgallery/assets/css/jd.gallery.css” type=”text/css” />
    <script type=”text/javascript” src=”/cc/media/system/js/mootools.js”></script></script>
    <script type=”text/javascript” src=”/cc/com_smoothgallery/assets/scripts/jd.gallery.js”></script>
    <script type=”text/javascript” src=”/cc/com_smoothgallery/assets/scripts/jd.gallery.transitions.js”></script>

    <link rel=”stylesheet” href=”http://localhost:8080/cc/templates/system/css/system.css” type=”text/css” />
    <link rel=”stylesheet” href=”http://localhost:8080/cc/templates/system/css/general.css” type=”text/css” />
    <link rel=”stylesheet” href=”http://localhost:8080/cc/templates/ja_purity/css/template.css” type=”text/css” />

    <script language=”javascript” type=”text/javascript” src=”http://localhost:8080/cc/templates/ja_purity/js/ja.script.js”></script>

    <script language=”javascript” type=”text/javascript”>
    var rightCollapseDefault=’show’;
    var excludeModules=’38’;
    </script>
    <script language=”javascript” type=”text/javascript” src=”http://localhost:8080/cc/templates/ja_purity/js/ja.rightcol.js”></script>

    <link rel=”stylesheet” href=”http://localhost:8080/cc/templates/ja_purity/css/menu.css” type=”text/css” />

    <link rel=”stylesheet” href=”http://localhost:8080/cc/templates/ja_purity/styles/background/lighter/style.css” type=”text/css” />
    <link rel=”stylesheet” href=”http://localhost:8080/cc/templates/ja_purity/styles/elements/black/style.css” type=”text/css” />[/PHP]

    How to fix problem.

    Thanks.

    thatryan Friend
    #354063

    Help, anyone? I am trying to load the Gavick News Image slider, but the stylesheet simply wont get loaded… What causes this?

    Saguaros Moderator
    #354101

    Hello all! our developers are checking the issue, please give us some time for doing this
    Thanks

    korb Friend
    #354116

    IE6/7 limits to 30 CSS files, in other cases, the module is not working properly, or it is not even loaded. Please try to enable the option Optimize CSS in template manager, Global tab to check if it works.

    thatryan Friend
    #354137

    Not using ie, this is in FF.
    The module loads I know because it shows and works, just doesn’t have it’s styles loaded.

    I acttally have to disable the optimization for that to work as I get js errors otherwise.

    viet4777 Friend
    #354153

    Thank.

    This is a mistake, after I tracking the $document->_styleSheets ($document =& JFactory::getDocument(); at jat3/core/head.php). I found that I forget declare the right filename:
    JHTML::stylesheet(‘layout.css’,’com_smoothgallery/assets/css/’);
    It should be JHTML::stylesheet(‘layout.css’,’components/com_smoothgallery/assets/css/’);

    Everything is oK now.
    <em>@tienhc 192145 wrote:</em><blockquote>Hello all! our developers are checking the issue, please give us some time for doing this
    Thanks</blockquote>

    thatryan Friend
    #354155

    That was for your specific issue right? Bummer, any luck with the developers figuring out my problem? 🙂

Viewing 7 posts - 1 through 7 (of 7 total)

This topic contains 7 replies, has 4 voices, and was last updated by  thatryan 13 years, 8 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum