Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • Andre Prior Friend
    #191557

    How to restrict the right module (authors)

    I just want to display a specific Group (Manager) in that box, so that other new registered user dont be displaied there. I only need to people in that block. Any way to manage that? Thank you

    Wall Crasher Developer
    #509621

    Hi pixelitodesign,

    The author module is Latest User module, a default module of Joomla.
    JA Magz have custom it a bit.

    There was no setting in the module configuration for your request. But you can customize it. Here the step.

    1. Open user manager and take a look for id of Manager group (should be 6 by default)
    2. Open templatesja_magzhtmlmod_users_latestdefault.php (only in JA Magz v1.0.1 and above), if you use older version, you can just copy this file from newer version.

    3. Replace
    if (!$user->authorise(‘core.admin’) && $params->get(‘filter_groups’, 0) == 1)
    {
    $groups = $user->getAuthorisedGroups();
    if (empty($groups))
    {
    return array();
    }
    $query
    ->leftJoin(‘#__user_usergroup_map AS m ON m.user_id = a.id’)
    ->leftJoin(‘#__usergroups AS ug ON ug.id = m.group_id’)
    ->where(‘ug.id in (‘ . implode(‘,’, $groups) . ‘)’)
    ->where(‘ug.id <> 1’);
    }

    with

    $query
    ->leftJoin(‘#__user_usergroup_map AS m ON m.user_id = a.id’)
    ->leftJoin(‘#__usergroups AS ug ON ug.id = m.group_id’)
    ->where(‘ug.id in ( )’)
    ->where(‘ug.id <> 1’);

    (Replace with your Manager user group id. You can specify many user groups by comma)

    Hope it helps,

    Regards

    dpchap015 Friend
    #513799

    its working thanks

    dpchap015 Friend
    #520323

    Hi, @wall Crasher

    thanks again for solution, its working fine, but there is a problem in the ordering of the authors., on front end, they are according to the user ID,

    i want to sort them by alphabetical order or the same order that i set in the contacts profile(contacts components order)

    + how can a author edit their profile from front end ???

    Regards

    Wall Crasher Developer
    #520609

    @ dpchap015,

    To sort user list by alphabetical order, you can try the following:

    Add two lines of code below just after the loadObjectList call.

    $names = $db->loadObjectList();

    $alphasort = create_function('$a, $b', ' return strcmp($a->name, $b->name); ');
    usort($names, $alphasort);

    For the second question. I am afraid it requires heavy customisation.
    Joomla does not provide a way to edit a contact, you have to create a component or plugin to do so.

    dpchap015 Friend
    #521266

    Hi, @wall Crasher
    is there any way to sort them by user list order from user manager or the same order that i set in the contacts profile(contacts components order)

    Wall Crasher Developer
    #521433

    @ dpchap015,

    Yes, you can make change (from the original file)

    1. Replace

    ->where('(a.activation is null or a.activation = "")')
    ->order('a.registerDate DESC');

    with:

    ->where('(a.activation is null or a.activation = "")');

    2. Replace

    $db->setQuery($query, 0, $params->get('shownumber'));

    with:

    $query->innerJoin('#__contact_details AS contact ON a.id = contact.user_id')
    ->where('contact.published = 1')
    ->order('contact.ordering');

    $db->setQuery($query, 0, $params->get('shownumber'));

    dpchap015 Friend
    #534612

    @wall Crasher Hi,

    There is another question that i have. As you may see the link: http://edtechreview.in/author/5
    How can i put the contact alias along side with the Id to make the URL look somewhat like: http://edtechreview.in/author/5-rod-berger.

    It will be great help.
    Thanks

    Saguaros Moderator
    #535016

    @dpchap015,

    Your question relates more to Joomla than our template, you should raise the same concern into Joomla forum. Our support scope is limited to bug fixing and helping users get demo site alike setup only.

    Best,

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

This topic contains 9 replies, has 4 voices, and was last updated by  Saguaros 9 years, 12 months ago.

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