Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • zdjl505 Friend
    #165014

    Hi,

    When using standard joomla 1.5.23 & T3 Framework 2, there is a way to show image & text as menu title, but I can’t find way how to use image only (without text). Bellow are template modification to do that.

    1. Image as background or not
    By default ‘T3 Framework 2’ show image in menu as background. To use image only you need to show image as image instead of as background. Actually there is an option to change it as image. Open file pluginssystemjat3coretemplate.php & edit line 585,
    Old:
    [PHP]$japarams->set(‘menu_background’, 1); //0: image, 1: background[/PHP]
    New:
    [PHP]$japarams->set(‘menu_background’, 0); //0: image, 1: background[/PHP]

    2. Add parameter ‘Show Image Only’
    Add parameter in ‘Parameters (JA Extended)’ tab of ‘Menu Item: Edit’ page for activate or deactivate ‘Show Image Only’ option. Open file pluginssystemjat3coreparamsparams.xml & insert this code after closing tag </param> of ‘mega_showtitle’.

    <param name="mega_imageonly" type="radio" default="0" label="Show Image Only" description="Show Image Only Desc">
    <option value="0">No</option>
    <option value="1">Yes</option>
    </param>

    3. Add into language file
    Add into language file label & description of new parameter ‘Show Image Only’. This is important if you want to translate in other language then English. Open file administratorlanguageen-GBen-GB.plg_system_jat3.ini & insert this code at line 369-370:

    SHOW IMAGE ONLY=Show Image Only
    SHOW IMAGE ONLY DESC=Show Image Only as menu title

    4. Modify menu program
    The last step is modify file pluginssystemjat3coremenubase.class.php, replace
    Old code at line 350:
    [PHP]$txt = ‘<span class=”menu-image”><img src=”‘.JURI::base(true).’/images/stories/’.$iParams->get(‘menu_image’).'” alt=”‘.$tmpname.'” title=”‘.$tmpname.'” /></span><span class=”menu-title”>’ . $tmpname . ‘</span>’;[/PHP]
    with new code:
    [PHP]if ($tmp->megaparams->get (‘imageonly’)) {
    $txt = ‘<span class=”menu-image”><img src=”‘.JURI::base(true).’/images/stories/’.$iParams->get(‘menu_image’).'” alt=”‘.$tmpname.'” title=”‘.$tmpname.'” /></span>’;
    } else {
    $txt = ‘<span class=”menu-image”><img src=”‘.JURI::base(true).’/images/stories/’.$iParams->get(‘menu_image’).'” alt=”‘.$tmpname.'” title=”‘.$tmpname.'” /></span><span class=”menu-title”>’ . $tmpname . ‘</span>’;
    }[/PHP]

    You can input image file at ‘Parameters (System)’ tab of ‘Menu Item: Edit’ page.

    Regards,

    chavan Friend
    #395428

    Explain this in detail [ but I can’t find way how to use image only (without text). ]

    zdjl505 Friend
    #395435

    Hi Chavan,

    I mean can’t find the way to use image only as menu title without doing this modification. To make clear about ‘image & text as menu title’ and ‘image only as menu title’ please see attached image.


    1. image-text-as-menu-title
    2. image-only-as-menu-title
    chavan Friend
    #395442

    Post your site Url

    zdjl505 Friend
    #395452

    Sorry, it is still in localhost. BTW, are there normal way (without modification) to use image only as menu title?

    chavan Friend
    #395467

    you must add this css code to hide the text “text-indent: -999em;”

    Without the site Url. I could not let you know which css code you need to do.

    But try adding this css code to this file /plugins/system/jat3/base-themes/default/css/menu/mega.css


    #ja-mainnav #menu1{
    text-indent: -999em;
    }

    Note: If you Find my Post useful please click on the Thanks Icon

    zdjl505 Friend
    #395508

    Hi Chavan,

    Thanks for your idea to use ‘text-indent:-999em’. Actually I don’t add your code to #ja-mainnav because all menu items will have no text. I just want only certain menu items to use image as menu title. Instead of your code, I add

    .notextmenu{
    text-indent: -999em;
    }

    to /plugins/system/jat3/base-themes/default/css/menu/mega.css. Then input that new css name (notextmenu) to ‘Additional class’ field at ‘Parameters (JA Extended)’ tab of ‘Menu Item: Edit’ page. This method (use css) also fulfill what I want with above modification.

    Regards,

    zdjl505 Friend
    #395730

    Hi Chavan,

    There is a little correction. The method ‘text-indent:-999em’ to make image only as menu title is not work for menu item that have sub menu (child). Actually, the method ‘text-indent:-999em’ is print menu title in far left (-999em) so do for their sub menus.

    In my case, I want to use parent menu with image only and module below or sub menu is normal. For this purpose my modification is work.

    Regards,

    chavan Friend
    #395792

    Is everything is done? If not Please upload your site and post your site Url.

    zdjl505 Friend
    #395795

    Hi Chavan, everything is done, please see attached pic.


    1. image-only-as-menu-title-of-login
    chavan Friend
    #395798

    yes I can understand the issue. If there is a css issue it may differ from one to another. Thats why we are asking for your Site Url. This is would be more helpful to figure out the css issue. Please understand post you localhost site to live server and then provide your Url.

    Please understand and do the Needful. Since we can suggest you accurately than assumption that I have done on my previous post.

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

This topic contains 11 replies, has 2 voices, and was last updated by  chavan 12 years, 11 months ago.

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