-
AuthorPosts
-
nevilix Friend
nevilix
- Join date:
- January 2011
- Posts:
- 8
- Downloads:
- 0
- Uploads:
- 1
- Thanked:
- 2 times in 2 posts
January 10, 2011 at 3:56 am #158526I haven’t tested the other menus yet but the mega menu is not hiding/showing links as it should. When I set a link to the access level of Registered the link will not show when logged in. I have double checked the access level settings and everything is set correct. I am using the package installer of t3 2.0. Any ideas how to fix this? :p
aman204 Friendaman204
- Join date:
- January 2010
- Posts:
- 1945
- Downloads:
- 0
- Uploads:
- 43
- Thanks:
- 11
- Thanked:
- 418 times in 356 posts
January 10, 2011 at 8:23 am #371068Please ensure that you are updated to latest version of T3 system plugin ::
http://www.joomlart.com/forums/downloads.php?do=file&id=1518
nevilix Friendnevilix
- Join date:
- January 2011
- Posts:
- 8
- Downloads:
- 0
- Uploads:
- 1
- Thanked:
- 2 times in 2 posts
January 10, 2011 at 2:52 pm #371126I am using JA T3 System plugin for Joomla 1.6 (779.4 KB) 1.1.0. I even tried uninstalling and reinstalling the plugin with no success.
nevilix Friendnevilix
- Join date:
- January 2011
- Posts:
- 8
- Downloads:
- 0
- Uploads:
- 1
- Thanked:
- 2 times in 2 posts
January 10, 2011 at 3:46 pm #371138To reproduce the problem: Download Quickstart t3 framework v2, Install with sample data, goto main menu and set a menu item to registered or any other access level besides public, login the the front end using admin account. When you do this you will notice that it will not display the link regardless of the access level settings.
nevilix Friendnevilix
- Join date:
- January 2011
- Posts:
- 8
- Downloads:
- 0
- Uploads:
- 1
- Thanked:
- 2 times in 2 posts
January 10, 2011 at 8:06 pm #371183I solved this myself until a fix is released.
I dont know if this is the best way to do it but in
coremenubase.class.php lines 48 – 73
// Get user access levels in array 1.6
jimport( 'joomla.access.access' );
$authorised = array_flip(JAccess::getAuthorisedViewLevels(JFactory::getUser()->get('id')));$aid = 1;
// If no active menu, use default
$active = ($menu->getActive()) ? $menu->getActive() : $menu->getDefault();$this->open = isset($active) ? array_reverse($active->tree) : array();
$rows = $menu->getItems('menutype',$this->getParam('menutype'));
if(!count($rows)) return;
// first pass - collect children
$children = array ();
$cacheIndex = array();
$this->items = array();
foreach ($rows as $index => $v) {
//1.6 compatible
if (isset ($v->title)) $v->name = $v->title;
if (isset ($v->parent_id)) $v->parent = $v->parent_id;$v->name = str_replace ('&', '&', str_replace ('&', '&', $v->name));
if (array_key_exists($v->access, $authorised)) {$pt = $v->parent;
$list = @ $children[$pt] ? $children[$pt] : array ();
These are the only lines modified to make the menu work correctly.
// Get user access levels in array 1.6
jimport( 'joomla.access.access' );
$authorised = array_flip(JAccess::getAuthorisedViewLevels(JFactory::getUser()->get('id')));if (array_key_exists($v->access, $authorised)) {
I know this may not be the best method to accomplish this but works for now ! :laugh:
1 user says Thank You to nevilix for this useful post
stevetsi Friendstevetsi
- Join date:
- May 2006
- Posts:
- 1
- Downloads:
- 25
- Uploads:
- 0
- Thanked:
- 1 times in 2 posts
February 2, 2011 at 9:30 pm #374892Thanks. I was just working on a fix for this, but it looks like you got it first. I exploded the $users array, but couldn’t get something useful out of it (at least by simply referancing a single element in the array).
Any, I test the code modification above and it works.
It looks like Joomlart never finished this part, otherwise they would not have left a hard-code “$aid = 1;”. What was that all about?!
Too bad, since menu restrictions are, you know, *critical* in implementing a good portion of the access restriction improvements in Joomla 1.6.
1 user says Thank You to stevetsi for this useful post
nevilix Friendnevilix
- Join date:
- January 2011
- Posts:
- 8
- Downloads:
- 0
- Uploads:
- 1
- Thanked:
- 2 times in 2 posts
February 3, 2011 at 8:45 am #374926<em>@stevetsi 219084 wrote:</em><blockquote>Thanks. I was just working on a fix for this, but it looks like you got it first. I exploded the $users array, but couldn’t get something useful out of it (at least by simply referancing a single element in the array).
Any, I test the code modification above and it works.
It looks like Joomlart never finished this part, otherwise they would not have left a hard-code “$aid = 1;”. What was that all about?!
Too bad, since menu restrictions are, you know, *critical* in implementing a good portion of the access restriction improvements in Joomla 1.6.</blockquote>
Yeah it was something that was top priority to me to have working also, so I just figured it out myself instead of waiting. :laugh: It works perfectly for all access levels even the guest levels.
February 3, 2011 at 2:59 pm #374963Is there a possibility to do this ACL-based menu switching with complete menus ?
I have a multiple level ACL and every level has its own menu after login.
It worked fine with the normal templates but not with T3.
A workaround would be to put them all into one menu and show/hide depending on
the login level, but it would be nice for keeping the overwiew to have them devided.
Is there any chance ?TIA
nevilix Friendnevilix
- Join date:
- January 2011
- Posts:
- 8
- Downloads:
- 0
- Uploads:
- 1
- Thanked:
- 2 times in 2 posts
February 4, 2011 at 2:39 am #375029<em>@cartman 219187 wrote:</em><blockquote>Is there a possibility to do this ACL-based menu switching with complete menus ?
I have a multiple level ACL and every level has its own menu after login.
It worked fine with the normal templates but not with T3.
A workaround would be to put them all into one menu and show/hide depending on
the login level, but it would be nice for keeping the overwiew to have them devided.
Is there any chance ?TIA</blockquote>
Here is the attached modified file. This modification allows you to set the access level on any menu item and if the group the user is in is not assigned that access level the menu item will not be displayed. It works for all levels of menu items.
I have tested only with the mega menu but would think it works for all the menus.
Just replace this file with the attached file
pluginssystemjat3jat3coremenubase.class.phpThis is with plg_system_jat3.v1.2.1 and J1.6 Stable
1 user says Thank You to nevilix for this useful post
February 7, 2011 at 9:51 am #375355I replaced the file with the given one, but still does not work as with the standard templates.
I have three access classes : public and two own
The main menu (public) is for users not logged in, but it still appears after the login.
The adminmenu (myadmin) should be shown after an admin logs in, but there is still only the
main menu. The same with the 3rd access class.
When I put all entries into the main menu, I am able to switch the admin´s menu items on and off, but the
public entries are still there.
With template beez2 it all worked fine.nevilix Friendnevilix
- Join date:
- January 2011
- Posts:
- 8
- Downloads:
- 0
- Uploads:
- 1
- Thanked:
- 2 times in 2 posts
February 15, 2011 at 9:13 am #376760<em>@cartman 219737 wrote:</em><blockquote>I replaced the file with the given one, but still does not work as with the standard templates.
I have three access classes : public and two own
The main menu (public) is for users not logged in, but it still appears after the login.
The adminmenu (myadmin) should be shown after an admin logs in, but there is still only the
main menu. The same with the 3rd access class.
When I put all entries into the main menu, I am able to switch the admin´s menu items on and off, but the
public entries are still there.
With template beez2 it all worked fine.</blockquote>If you are logging in as the Super Admin by default it seems to give you access to view everything regardless of restrictions. Try to set the permissions and log in using a different user account. The ACL setup should be as follows:
Goto Groups and create a group named: Guest
Goto users -> config and set the “Guest” account to group “Guest”
Goto Access Levels and make a new Access Level called “Guest” and set the view permissions to group “Guest”.
Goto Access Levels select “Public” group and select “Guest” under view permissions.
Make sure you logged out to clear any prior session data.
Login using a member account to check if the menu items are displayed correctly..With this setup and that small modification the menu hides and shows depending on the acl setting and the users group access. Are these settings set right like the example above?
-
AuthorPosts
This topic contains 11 replies, has 4 voices, and was last updated by nevilix 13 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum