-
AuthorPosts
-
March 16, 2011 at 3:38 pm #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
Tomthangnn1510 Friendthangnn1510
- Join date:
- October 2014
- Posts:
- 1608
- Downloads:
- 0
- Uploads:
- 80
- Thanks:
- 73
- Thanked:
- 278 times in 256 posts
March 17, 2011 at 10:31 am #381866Dear 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!
March 17, 2011 at 1:17 pm #381887thks 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
March 17, 2011 at 10:28 pm #381960the 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
1 user says Thank You to ce2f for this useful post
thangnn1510 Friendthangnn1510
- Join date:
- October 2014
- Posts:
- 1608
- Downloads:
- 0
- Uploads:
- 80
- Thanks:
- 73
- Thanked:
- 278 times in 256 posts
March 18, 2011 at 1:19 am #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. 🙂 -
AuthorPosts
This topic contains 5 replies, has 2 voices, and was last updated by thangnn1510 13 years, 8 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum