Add-on Editing the level of a usergroup

I believe it could be changed in both instances without affecting functionality (besides order, that is).
 
Like I said.. I'm WAY over MY head in changing the code. I can generally find where needs to be changed.. but what to change it to is the current challenge I'm battling. :cautious:
 
Like I said.. I'm WAY over MY head in changing the code. I can generally find where needs to be changed.. but what to change it to is the current challenge I'm battling. :cautious:
If you can get me the schema (database columns) for the user group table I can tell you. :) I'm just unable to look it up now. (Actually I already said it, just need proper data)
 
If you can get me the schema (database columns) for the user group table I can tell you. :) I'm just unable to look it up now. (Actually I already said it, just need proper data)
Let me install it real quick on my 1.1.5 site and see what turns up.
 
Thanks. My computer is out of juice, downstairs, and its a pain to walk. Would like to get @XeStorm a solid answer before I go to bed.
 
Yes, that was going to be my guess,but don't like steering people wrong. In my previous post, replace "STYLE_PROPERTY" in the text I have and replace it as you have said. :)
 
Time for more edit looking:
Code:
An exception occurred: Mysqli prepare error: Unknown column 'display_style_priority' in 'order clause' in /var/www/twowheel/library/Zend/Db/Statement/Mysqli.php on line 77

Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 734
Zend_Db_Adapter_Abstract->fetchAll() in XenStaff/Model/StaffGroupsUserIds.php at line 40
XenStaff_Model_StaffGroupsUserIds->getAllUserIdsPerStaffGroup() in XenStaff/Model/StaffGroupsUserIds.php at line 10
XenStaff_Model_StaffGroupsUserIds->getListofUsersPerStaffGroup() in XenStaff/Addtab.php at line 20
XenStaff_Addtab::navigationTabs()
call_user_func_array() in XenForo/CodeEvent.php at line 54
XenForo_CodeEvent::fire() in XenForo/Dependencies/Public.php at line 464
XenForo_Dependencies_Public->_getNavigationContainerParams() in XenForo/Dependencies/Public.php at line 348
XenForo_Dependencies_Public->getEffectiveContainerParams() in XenForo/FrontController.php at line 566
XenForo_FrontController->renderView() in XenForo/FrontController.php at line 156
XenForo_FrontController->run() in /var/www/twowheel/index.php at line 13
 
Revert the one in the UserIds model (I believe it was the second file).

Edit: just make the change in the first file you listed in your previous post.
 
This is what I have in the one file that won't give an error:
Code:
return $this->_getDb()->fetchAll('
SELECT user_group_id, title
FROM xf_user_group
WHERE user_group_id IN (' . $staffgroups . ')
ORDER BY display_style_priority
');
Still displays in the old format.
 
Bingo... the php orders by lowest number to highest. I just changed my moderator group from 10000 to 1 and it moved to the top. It should be doing the reverse.
 
@XeStorm
Take the attached file and replace the existing one in your root_forum_directory/library/XenStaff/Model.
Just to be on the safe side, rename your existing one to .php.bak extension.
 

Attachments

Last edited:
THIS is the way I end up learning about PHP. ;)
And it's the exact way I learned it. Seriously, ask questions. You shall receive answers here and most of it shall be rather helpful in learning the languages. But this be off topic.
 
Top Bottom