test
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • matgray87 Friend
    #183862

    Hi,

    I have my iPhone and Handheld templates working fine, but the menus are different on the two…

    I’ve sorted the menu fine for iPhone etc, but on Android, it uses form / options:

    <select onchange=" _proxy_jslib_assign('', _proxy_jslib_handle(window, 'location', '', 0, 0), 'href', '=', ( _proxy_jslib_handle(this, 'value', '', 0, 0)));" id="handheld-nav">
    <option selected="selected" value="http://www.wbn.frankwarren.com/">Home</option>
    <option value="/schedule.html">Schedule</option>
    <option value="/results.html">Results</option>
    <option value="/wbc-rankings-and-world-champions.html">Rankings</option>
    <option value="/wbn-pound-for-pound-top-50.html">P4P Top 50</option>
    <option value="/top-10-profiles.html">Top 10 Profiles</option>
    <option value="/awards.html">Awards</option>
    <option value="/hall-of-fame.html">Hall of Fame</option>
    <option value="/about-wbn.html">About WBN</option>
    </select>

    The Menu works fine, but the title always shows the value of the page it’s on…

    Is it possible to always have a default form option ‘0’ which says ‘MENU’?

    I imagine this is done in plugins/system/jat3/jat3/core/menu/handheld.class.php but I can’t work out how…

    That file looks as follows:

    <?php
    /**
    * ------------------------------------------------------------------------
    * JA T3v2 System Plugin for J25 & J30
    * ------------------------------------------------------------------------
    * Copyright (C) 2004-2011 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
    * @license - GNU/GPL, http://www.gnu.org/licenses/gpl.html
    * Author: J.O.O.M Solutions Co., Ltd
    * Websites: http://www.joomlart.com - http://www.joomlancers.com
    * ------------------------------------------------------------------------
    */

    // No direct access
    defined('_JEXEC') or die();

    if (!defined('_JA_HANDHELD_MENU_CLASS')) {
    define('_JA_HANDHELD_MENU_CLASS', 1);
    include_once dirname(__FILE__) . DS . "base.class.php";

    /**
    * JAMenuHandheld class
    *
    * @package JAT3.Core.Menu
    *
    */
    class JAMenuHandheld extends JAMenuBase
    {
    /**
    * Constructor
    *
    * @param array &$params An array parameter
    *
    * @return void
    */
    function __construct(&$params)
    {
    parent::__construct($params);
    //To show sub menu on a separated place
    $this->showSeparatedSub = true;
    }

    /**
    * Echo markup before menu markup
    *
    * @param int $startlevel Start menu level
    * @param int $endlevel End menu level
    *
    * @return void
    */
    function beginMenu($startlevel = 0, $endlevel = 10)
    {
    echo "<select id="handheld-nav" onchange="window.location.href=this.value;">";
    }

    /**
    * Echo markup after menu markup
    *
    * @param int $startlevel Start menu level
    * @param int $endlevel End menu level
    *
    * @return void
    */
    function endMenu($startlevel = 0, $endlevel = 10)
    {
    echo "</select>";
    }

    /**
    * Echo markup before menu item makrup
    *
    * @param object $mitem Menu item object
    * @param int $level Menu level
    * @param string $pos Position
    *
    * @return void
    */
    function beginMenuItem($mitem = null, $level = 0, $pos = '')
    {
    }

    /**
    * Echo markup after menu item makrup
    *
    * @param object $mitem Menu item object
    * @param int $level Menu level
    * @param string $pos Position
    *
    * @return void
    */
    function endMenuItem($mitem = null, $level = 0, $pos = '')
    {
    }

    /**
    * Echo markup before menu items makrup
    *
    * @param int $pid Menu id
    * @param int $level Menu level
    *
    * @return void
    */
    function beginMenuItems($pid = 0, $level = 0)
    {
    }

    /**
    * Echo markup after menu items makrup
    *
    * @param int $pid Menu id
    * @param int $level Menu level
    *
    * @return void
    */
    function endMenuItems($pid = 0, $level = 0)
    {
    }

    /**
    * Generate menu item
    *
    * @param object $item Menu item
    * @param int $level Level of menu item
    * @param string $pos Position of menu item
    * @param int $ret Return or show data
    *
    * @return mixed void if ret = 1, otherwise string data of menu item generating
    */
    function genMenuItem($item, $level = 0, $pos = '', $ret = 0)
    {
    $tmp = $item;

    $space = '---';
    $prespace = '';
    for ($i = 0; $i < $level; $i++)
    $prespace .= $space;

    $txt = $prespace . $tmp->name;

    if ($tmp->type == 'menulink') {
    // $menu = &JSite::getMenu();
    $menu = JFactory::getApplication()->getMenu();
    $alias_item = clone ($menu->getItem($tmp->query['Itemid']));
    if ($alias_item) {
    $tmp->url = $alias_item->link;
    }
    }

    $active = in_array($tmp->id, $this->open);
    $selected = $active ? "selected="selected"" : "";
    $data = "<option " . $selected . " value="$tmp->url">$txt</option>";

    if ($ret)
    return $data;
    else
    echo $data;
    }
    }
    }
    ?>

    Can anyone help please?

    Many thanks,
    Matt

    Luna Garden Moderator
    #479817

    Hello,

    I have discussed with our developer regarding your problem, I’m afraid that your request is out of our support scope, as its gonna require lot of customization and core code changes. You can try hiring a freelancer for this or wait for someone here in the JA community to help you out.

    Regards

    matgray87 Friend
    #480002

    Hi, Thanks for getting back to me… so it’s not as simple as I hoped it’d be – that’s a shame…
    Anyone know any quick fix? Or even how to change the menu text to uppercase? Can’t seem to manage with CSS!

    Luna Garden Moderator
    #480012

    <em>@matgray87 355484 wrote:</em><blockquote>Or even how to change the menu text to uppercase? Can’t seem to manage with CSS!</blockquote>

    Hello,

    Could you provide your site URL here. I can help you with this one.

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

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

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