Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • musicinme Friend
    #154791

    Hi.

    I’d like to give you some tip how to change CPanel content. My visitors do not use those tools to change width of template or increase font size. So instead I decided to put new module position in CPANEL. In my case it is HelloMe from JomSocial.

    Open TemplateDetails.xml and add new position.

    <position>hellome</position>

    Then copy usertools folder from

    pluginssystemjat3base-themesdefaultblocks

    to

    templatesja_t3_blankblocks

    You can delete all files from that folder except cpanel.php file which is the only one we need to modify.

    After that open cpanel.php and remove everything relate to everything showed in CPANEL as default and add new module position So after edit my file looks like:

    <?php
    /*
    # ------------------------------------------------------------------------
    # JA T3v2 Plugin - Template framework for Joomla 1.5
    # ------------------------------------------------------------------------
    # Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
    # @license - GNU/GPL V2, http://www.gnu.org/licenses/gpl2.html. For details
    # on licensing, Please Read Terms of Use at http://www.joomlart.com/terms_of_use.html.
    # Author: JoomlArt.com
    # Websites: http://www.joomlart.com - http://www.joomlancers.com.
    # ------------------------------------------------------------------------
    */
    ?>
    <?php if (!$this->getParam ('option_layouts') && !$this->getParam ('option_screen') && !$this->getParam ('option_font') && !$this->getParam ('option_themes')) return ; ?>
    <div id="ja-cpanel-wrapper">
    <div id="ja-cpanel">
    <div id="ja-cpanel-main">

    <div class="ja-cpanel-tools">
    <jdoc:include type="modules" name="hellome" />
    </div>

    </div>
    <a href="#" id="ja-cpanel-toggle"><span>CPANEL</span></a>
    </div>
    </div>

    <script type="text/javascript">
    var tmpl_name = '<?php echo $this->template ?>';
    window.addEvent('load', function () {
    $('ja-cpanel-toggle').status == 'close';
    $('ja-cpanel-toggle').slider = new Fx.Slide('ja-cpanel-main', {duration: 400});
    $('ja-cpanel-toggle').slider.hide();
    $('ja-cpanel').setStyle ('top', 0);
    $('ja-cpanel-toggle').addEvent ('click', function (e) {
    this.slider.toggle();
    if (this.hasClass ('open')) {
    this.removeClass ('open').addClass ('close');
    } else {
    this.removeClass ('close').addClass ('open');
    }
    new Event(e).stop();
    });

    });
    </script>

    You can leave there some options (as your url links to external content) if you want, of course.

    Finally I had to remove scroll-bar from the main window of CPANEL so I copied usertools.css file from

    pluginssystemjat3base-themesdefaultcss

    to

    templatesja_t3_blankcss

    and change line 73 from

    .ja-cpanel-tools {
    max-height: 400px;
    overflow-y: scroll;
    }

    to

    .ja-cpanel-tools {
    height: 100%;
    padding: 10px;
    overflow-y: inherit;
    }

    Tht’s it.

    chompff86 Friend
    #361124

    You are one brilliant designer! Thanks so much for the simple and understandable instructions.

    For noobs like me: don’t forget to set ‘Module Position” of your custom module to ‘hellome’ or whatever name you used to define the new location. 😀

    gabbya Friend
    #361140

    :confused: you are brilliant designe for this setup but i do not understand wher to move what Code:pluginssystemjat3base-themes defaultcss TO templatesja_t3_blankcss (NO “ja_t3_blank folder”)
    specify what file to what folder and if we need to create bew folder?
    Thank you for shering your work.

    chompff86 Friend
    #361169

    I had the same question as you have, until I realised that this absent folder is representing the template that you work with!

    So use the template that is active as the one to copy that folder to.

    Thus: templatesja_t3_blankcss should be: templatesyour_templatecss

    amir00251 Friend
    #384281

    Hello, I have followed the same process here but the Cpanel has disappeared. If I wanted to only define a module position, what should I change in the cpanel.php.

    Am I understanding right that Cpanel.php should be inside a folder “usertools” in the blocks folder of template (or should it only be as file like others inside blocks folder)?

    Would be grateful if someone could give me a clue. Thanks.

    musicinme Friend
    #384307

    Hi.
    I’m not sure why it is happen to you…
    Anyway usertools folder should be placed in blocks folder of your template. As it only change main cpanel window you can remove from that folder other files leaving only cpanel.php.

    Sure, you can place there as many module positions as you want. You just put this code

    <jdoc:include type="modules" name="NAME OF POSITION" />

    inside cpanel.php between div’s

    <div class=”ja-cpanel-tools clearfix”> … </div>

    Just let me know if you need more help.

    amir00251 Friend
    #384454

    Hi musicinme and thanks alot for your reply. I have now done the same process in both joomla 1.5 and 1.6 and in both cases, Cpanel disapeared and it shows that I am doing something wrong. First I am using Ja Social and Ja Portfolio, in both cases there is a top bar module position which shows dates, etc and I hope this has no influence on Cpanel. But What I am doing:

    I want to define a module postion “sidemenu” inside Cpanel so that different menus could be assigned depending on the content.
    I have added the line to TemplateDetails.xml, which shows the sidemenu as a module position when I am eding a module.

    I copied usertools folder from /plugins/system/jat3/jat3/base-themes/default/blocks (there is two jat3 in Joomla 1.6) to /templates/ja_portfolio/blocks

    Inside that folder all files apart from Cpanel were deleted. In Cpanel.php the code is

    <?php
    /*
    # ————————————————————————
    # JA T3v2 Plugin – Template framework for Joomla 1.5
    # ————————————————————————
    # Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
    # @license – GNU/GPL V2, http://www.gnu.org/licenses/gpl2.html. For details
    # on licensing, Please Read Terms of Use at http://www.joomlart.com/terms_of_use.html.
    # Author: JoomlArt.com
    # Websites: http://www.joomlart.comhttp://www.joomlancers.com.
    # ————————————————————————
    */
    ?>
    <?php if (!$this->getParam (‘option_layouts’) && !$this->getParam (‘option_screen’) && !$this->getParam (‘option_font’) && !$this->getParam (‘option_themes’)) return ; ?>
    <div id=”ja-cpanel-wrapper”>
    <div id=”ja-cpanel”>
    <div id=”ja-cpanel-main”>

    <div class=”ja-cpanel-tools”>
    <jdoc:include type=”modules” name=”sidemenu” />
    </div>

    </div>
    <a href=”#” id=”ja-cpanel-toggle”><span>CPANEL</span></a>
    </div>
    </div>

    <script type=”text/javascript”>
    var tmpl_name = ‘<?php echo $this->template ?>’;
    window.addEvent(‘load’, function () {
    $(‘ja-cpanel-toggle’).status == ‘close’;
    $(‘ja-cpanel-toggle’).slider = new Fx.Slide(‘ja-cpanel-main’, {duration: 400});
    $(‘ja-cpanel-toggle’).slider.hide();
    $(‘ja-cpanel’).setStyle (‘top’, 0);
    $(‘ja-cpanel-toggle’).addEvent (‘click’, function (e) {
    this.slider.toggle();
    if (this.hasClass (‘open’)) {
    this.removeClass (‘open’).addClass (‘close’);
    } else {
    this.removeClass (‘close’).addClass (‘open’);
    }
    new Event(e).stop();
    });

    });
    </script>

    Same as above, only changed to “sidemenu” instead of “hellome”.

    The css file was also copied to /templates/ja_portfolio/css and change was made accordingly.
    Am I doing something wrong?:confused:

    musicinme Friend
    #384468

    Copy usertools folder from

    pluginssystemjat3jat3base-themesdefaultblocks

    to

    templatesja_portfolioblocks

    and usertools.css from

    CODE]pluginssystemjat3jat3base-themesdefaultcss

    to

    templatesja_portfoliocss

    Open cpanel.php in

    templatesja_portfolioblocksusertools

    And replace all with:

    <?php
    /*
    # ------------------------------------------------------------------------
    # JA T3 System plugin for Joomla 1.6
    # ------------------------------------------------------------------------
    # Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
    # @license - Copyrighted Commercial Software
    # Author: J.O.O.M Solutions Co., Ltd
    # Websites: http://www.joomlart.com - http://www.joomlancers.com
    # This file may not be redistributed in whole or significant part.
    # ------------------------------------------------------------------------
    */
    ?>
    <?php
    //get reference of this block and update its no-wrap attribute
    $block = & $this->getBlockXML (T3Common::node_attributes($block, 'name'), T3Common::node_attributes($block, 'parent', 'middle'));
    T3Common::set_node_attributes($block, 'no-wrap', 1);
    T3Common::set_node_attributes($block, 'no-main', 1);
    ?>
    <?php if (!$this->getParam ('option_layouts') && !$this->getParam ('option_screen') && !$this->getParam ('option_font') && !$this->getParam ('option_themes') && !$this->getParam ('option_direction') && !$this->getParam ('option_menu')) return ; ?>
    <div id="ja-cpanel-wrapper">
    <div id="ja-cpanel">
    <div id="ja-cpanel-main">
    <div class="ja-cpanel-head clearfix">
    <a href="http:// YOUR URL" class="first" title="About T3"><span>TEXT 1</span></a>
    <a href="http://http:// YOUR URL" title="Guides"><span>TEXT 2</span></a>
    <a href="http://http:// YOUR URL " title="FAQs"><span>TEXT 3</span></a>
    </div>
    <div class="ja-cpanel-tools clearfix">

    <jdoc:include type="modules" name="sidemenu" />

    </div>
    <div class="ja-cpanel-action clearfix">
    <a href="#" onclick="cpanel_apply();return false;" class="button" title="Apply setting"><span>Apply</span></a>
    <a href="#" onclick="cpanel_reset();return false;" title="Reset to default setting"><span>Reset</span></a>
    <a target="_blank" href="http://www.joomlart.com/joomla/jat3-framework/" class="ja-cpanel-video"><span> </span></a>
    </div>
    </div>
    <a href="#" id="ja-cpanel-toggle"><span>Cpanel</span></a>
    </div>
    </div>

    <script type="text/javascript">
    var tmpl_name = '<?php echo $this->template ?>';
    window.addEvent('load', function () {
    $('ja-cpanel-toggle').status == 'close';
    $('ja-cpanel-toggle').slider = new Fx.Slide('ja-cpanel-main', {duration: 400});
    $('ja-cpanel-toggle').slider.hide();
    $('ja-cpanel').setStyle ('top', 0);
    $('ja-cpanel-toggle').addEvent ('click', function (e) {
    this.slider.toggle();
    if (this.hasClass ('open')) {
    this.removeClass ('open').addClass ('close');
    } else {
    this.removeClass ('close').addClass ('open');
    }
    new Event(e).stop();
    });

    });
    </script>

    Just checked on localhost and works perfectly.

    I’ve changed cpanel header to

    <div class="ja-cpanel-head clearfix">
    <a href="http:// YOUR URL" class="first" title="text1"><span>TEXT 1</span></a>
    <a href="http:// YOUR URL" title="text2"><span>TEXT 2</span></a>
    <a href="http:// YOUR URL" title="text3"><span>TEXT 3</span></a>
    </div>

    as I wanted to have additional shorcuts.


    1. cpanel
    amir00251 Friend
    #384602

    Hi, this worked perfectly.

    I also took the

    <div class=”ja-cpanel-action clearfix”>
    <a href=”#” onclick=”cpanel_apply();return false;” class=”button” title=”Apply setting”><span>Apply</span></a>
    <a href=”#” onclick=”cpanel_reset();return false;” title=”Reset to default setting”><span>Reset</span></a>
    <a target=”_blank” href=”http://www.joomlart.com/joomla/jat3-framework/” class=”ja-cpanel-video”><span> </span></a>

    off the code to hid the apply, reset, youtube which was not needed for me. Many thanks for the tips on header links which are great.

    The other thing people may want to do is to change the word “Cpanel”. I am looking for an ini file which includes this word, so far no success.

    musicinme Friend
    #384603

    There is no ini file for CPanel. All you have to do is edit cpanel.php again:

    <a href="#" id="ja-cpanel-toggle"><span>Cpanel</span></a>

    🙂

    amir00251 Friend
    #384609

    Thanks worked great.

    pedrox Friend
    #387612

    uff, too much work to replace an option unnecessary and inconvenient … would be easier (and reasonable) if it were a module :confused:

    milsirhc Friend
    #390270

    This works brilliantly!

    One thing is how can we disable it from being cache when we turn off development mode?

    My Cpanel has the text “Sign Up” when the user is not registered, and it will display “User CP” when the user logs in. With cache on, it display User CP even if the user is not logged in.

    ghog Friend
    #453145

    i am certain i followed these instructions to a t however the cpanel tab does not display for me at all. are these instructions the same for Joomla 2.5?

    Sherlock Friend
    #456057

    <em>@ghog 319844 wrote:</em><blockquote>i am certain i followed these instructions to a t however the cpanel tab does not display for me at all. are these instructions the same for Joomla 2.5?</blockquote>
    Hi ghog,

    To get the cpanel tab showing you would need to have some fields is choose to show at Your template back-end >> Profile tab >> User Tools panel

Viewing 15 posts - 1 through 15 (of 23 total)

This topic contains 23 replies, has 11 voices, and was last updated by  Wall Crasher 11 years, 4 months ago.

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