Necrid
Forum Replies Created
-
Forum: Plugins
In reply to: [GravityWP - Count] Filter by User and DateIn fact, GF tags several variables. For example, one function is:
private static function insert_variable_prepopulate (…
which uses:
{ip}
{date_mdy}
{date_dmy}
{embed_post:ID}
{embed_post:post_title}
{embed_url}
{user_agent}
{referer}
{user:display_name}
{user:user_email}
{user:user_login}Forum: Plugins
In reply to: [Adminimize] Hiding items for Admin when the Admin has multiple roles.If you’re talking about the version at your post at https://ww.wp.xz.cn/support/topic/hiding-items-for-admin-when-the-admin-has-multiple-roles?replies=27#post-7990101 it’s not behaving that way.
Forum: Plugins
In reply to: [Adminimize] Hiding items for Admin when the Admin has multiple roles.Okay, great, which version should I use then? So far I don’t see which one it is. If you can point me to that one, i’d be eternally grateful.
PS. – The uppercase frmo my previous message was just for emphasis/clarity, not yelling. 🙂
Forum: Plugins
In reply to: [Adminimize] Hiding items for Admin when the Admin has multiple roles.Okay. That’s not going to work.
If the user is Admin+Editor, and I remove the item on Editor, the Admin SHOULD KEEP IT
Asd an admin, I want access to all items, unless i specifically choose to turn them off in the admin setting. otherwise, no matter what the settings are for other users, the admin should still see the item.
I hope this makes sense.
Is it possible, for you to edit it, so that the ADMIN CAN SEE the item, even if the EDITOR CANNOT.
Forum: Plugins
In reply to: [Adminimize] Hiding items for Admin when the Admin has multiple roles.sorry, I did the same test. Turned of tools for all but the admin, and the admin still lost the menu item also. Sorry.
Forum: Plugins
In reply to: [Our Team by WooThemes] OrderBy 'Random' possible?nevermind; thanks!
Forum: Plugins
In reply to: [Adminimize] Hiding items for Admin when the Admin has multiple roles.What I am experiencing currently is…
Hidden Items:
Admin: None
Role1: Tools, Media, Users
Role2: Tools, Pages, CommentsUsers:
User1(admin, role1, role2) = Tools, Media, Users, Pages, Comments are hidden.
User2(role1, role2) = Tools, Media, Users, Pages, Comments are hidden.
User3(role1) = Tools, Media, Users hidden
User4(role2) = Tools, Pages, Comments hiddenForum: Plugins
In reply to: [Adminimize] Hiding items for Admin when the Admin has multiple roles.Yeah, what you said at the end is correct.
Hidden Items:
Admin: None
Role1: Tools, Media, Users
Role2: Tools, Pages, CommentsUsers:
(admin, role1, role2) = see’s all options
(role1, role2) = tools is hidden
(role1) = Tools, Media, Users hidden
(role2) = Tools, Pages, Comments hidden(the menu-item is only hidden if all roles associated with the user have the option hidden)
Forum: Plugins
In reply to: [Adminimize] Hiding items for Admin when the Admin has multiple roles.I see. That’s something that I can work with. Meaning, as long as I can have the admin role unaffected (by not selecting any items) and still see them even if I disabled them on the other roles, this will work. Ideally, I’d rather have it exclude items that are only hidden on all of the users’associated roles. But I can work with the other, taking the highest. You said you had a version that did this?
Forum: Plugins
In reply to: [Adminimize] Hiding items for Admin when the Admin has multiple roles.Actually, it’s the opposite –
Using something close to your example:
On the Admin role, we hide tools.php and index.php.
On the Editor role, we hide settings.php, and tools.php.Now the single user with two roles logged in, they should only have tools.php hidden, since their roles can see the other options. (their ‘editor’ part can see index.php; their ‘admin’ part can see settings.php; so, as a user with both, they should still see these options.)
While “editor-only” users would have both settings.php and tools.php hidden, because they do not have another role that would otherwise show them the item. And “Admin Only” users would have tools and index hiddden.Basically: Hide the item, unless they have another role that does not hide the item
Please let me know if that doesn’t clear it up.
Forum: Plugins
In reply to: [Adminimize] Hiding items for Admin when the Admin has multiple roles.would this work?
foreach ( $user_roles as $role ) {
if (in_array(“administrator”, $role)) { // only admin disable items
$disabled_subitem_adm = ”;
$disabled_subitem_adm_hint = ”;
}
echo ‘<td class=”num”>’ ……Forum: Plugins
In reply to: [Adminimize] Hiding items for Admin when the Admin has multiple roles.I’m thinking the solution lies in the “in_array” function – here is an example:
$os = array(“Mac”, “NT”, “Irix”, “Linux”);
if (in_array(“Irix”, $os)) {
echo “Got Irix”;
}
if (in_array(“mac”, $os)) {
echo “Got mac”;
}
…………..
if you know how to use that instead to see if ‘administrator’ is in the role array, to hide only the items checked in the admin row.This could also lead to a baseline fix for all, where your comparing the items for the roles, and hiding only the items that are consistantly hidden accross the full array of roles for that user.
Forum: Plugins
In reply to: [Adminimize] Hiding items for Admin when the Admin has multiple roles.I took a look at the code. (I am not an expert in this, but I “dabble” in edits.) It appears that the code that should seperate it is,
foreach ( $user_roles as $role ) {
if ( $role !== ‘administrator’ ) { // only admin disable items
$disabled_subitem_adm = ”;
$disabled_subitem_adm_hint = ”;
echo ‘<td class=”num”>’ ……..I think the issue with this, is that my role does not equal ‘administrator’ exactly, it’s technically something like ‘administrator, role1, role2, role3’ so I don’t think it’s triggering on your ‘does_not_equal (!==)’ command. Is there a way to say ‘does not include’ instead?
Forum: Plugins
In reply to: [Adminimize] Hiding items for Admin when the Admin has multiple roles.I gave it a small test. I went to the “Menu Options” options, and disabled “Tools” for all but the admin. Upon refreshing the page, I also lost the tools menu. Sorry!
Forum: Plugins
In reply to: [Adminimize] Hiding items for Admin when the Admin has multiple roles.Glad you found a fix! Should I wait for an update from you, or is this something you are asking me to do on my end? If so, what exactly do I need to do?