Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • ce2f Friend
    #161534

    Good morning,
    I try to use gmaccess http://www.eduvs.ch/gmaccess/, but it can’t with transmenu. I used this code that i found on a forum put in a old Ja purity for Joomla 1.5 in ja_templatetools.php in ja zibal because it’s the same sql and it doens’t work with gmaccess
    [PHP]if (isset($user))
    {
    $aid = $user->get(‘aid’, 0);

    $checkmenu = fonctionGmaccess::checkgmdroit(‘com_content’,’read’,’users’,$user->gmid,’menu’);

    $sql = “SELECT count(*) FROM #__menu AS m”

    . “nWHERE menutype='”. $menutype .”‘ AND published=’1’ AND (m.id IN (“.$checkmenu.”) OR m.access <= ‘$aid’) AND parent=0 and ordering < $ordering”;
    } else {
    $sql = “SELECT count(*) FROM #__menu AS m”
    . “nWHERE menutype='”. $menutype .”‘ AND published=’1’ AND parent=0 and ordering < $ordering”;
    }[/PHP]

    Thanks
    Tom

    thangnn1510 Friend
    #381866

    Dear Tom!

    We suggest you using forum of gmaccess for this problem:

    http://www.eduvs.ch/gmaccess/index.php?option=com_agora&Itemid=59

    They have much experience in working with this.

    Regards!

    ce2f Friend
    #381887

    thks but they don’t resolve already all template. I had even ask them.

    i want to know where PHP code with query sql is used for item and submenu of transmenu because i am not sure that’s in ja_templatetools.php (line ?)
    Even when i delete this code , access managing works(basic option of joomla) with “register user” is work but not of course with gmaccess which offer more options .

    [PHP]$user =& JFactory::getUser();
    $aid = $user->get(‘aid’, 0);
    if (isset($user))
    {
    $aid = $user->get(‘aid’, 0);
    $sql = “SELECT count(*) FROM #__menu AS m”
    . “nWHERE menutype='”. $menutype .”‘ AND published=’1’ AND access <= ‘$aid’ AND parent=0 and ordering < $ordering”;
    } else {
    $sql = “SELECT count(*) FROM #__menu AS m”
    . “nWHERE menutype='”. $menutype .”‘ AND published=’1’ AND parent=0 and ordering < $ordering”;
    }[/PHP]

    thks

    ce2f Friend
    #381960

    the solution
    in Base.class.php put
    [PHP]//if ($v->access <= $aid) {
    if (fonctionGmaccess::checkgmaccess2(‘com_content’,’read’,’users’,$user->gmid,’menu’,$v->id)) {[/PHP]

    Tom

    thangnn1510 Friend
    #381971

    <em>@ce2f 228450 wrote:</em><blockquote>the solution
    in Base.class.php put
    [PHP]//if ($v->access <= $aid) {
    if (fonctionGmaccess::checkgmaccess2(‘com_content’,’read’,’users’,$user->gmid,’menu’,$v->id)) {[/PHP]

    Tom</blockquote>
    It is very good that you could solve the problem. 🙂

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

This topic contains 5 replies, has 2 voices, and was last updated by  thangnn1510 13 years, 1 month ago.

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