Hide sidebarplugins by usergroup

Creating and modifying plugins.
lordcoffee
Regular
Posts: 308
Joined: Tue Nov 29, 2005 10:22 pm
Location: Munich - Germany
Contact:

Hide sidebarplugins by usergroup

Post by lordcoffee »

Hi!

I've installed the sidebarhider plugin and I mising a feature. With the regular plugin you can choose who can see the sidebarplugins. But the choices to made are only:

Any user
Only Registered Users
Only me

It would be nice if I can choose the Usergroups i've created. Every usergroup could have/see their specific sidebar plugins.

Is that possible? And how?

Thanks, Lordcoffee.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Hide sidebarplugins by usergroup

Post by garvinhicking »

Hi!

That would be possible, but a bit of work. It could be implemented just like the "categories" can be selected where a plugin appears in. But instead of the category listing, show the usergroup listing.

This actually could be done by somebody who always wanted to put his PHP knowledge into first action, good newbie work.... Any takers? :)

I could even hint code lines (117-120, 132-154, 331, 391-407, 424, 466-468) where new code would need to be inserted similar to the category code.

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
lordcoffee
Regular
Posts: 308
Joined: Tue Nov 29, 2005 10:22 pm
Location: Munich - Germany
Contact:

Post by lordcoffee »

O.K. Garvin, with these "hints" I will give it a try! So this is going to be a long night ;-)

Edit: Sorry, but I can't do that! That's to hard! I really tried it but stuck on the first problem to only display the usergroup listing. Hmmm...

Any other takers, please?

Lordcoffee
lordcoffee
Regular
Posts: 308
Joined: Tue Nov 29, 2005 10:22 pm
Location: Munich - Germany
Contact:

Post by lordcoffee »

I had an idea of another solution that does the "private gallery thing" to me but I have one problem:

I've created a category with group permissions called "Fotos". I've activated tha ACL checks in config and all entries are hidden for normal visitors. But the category is still visible in the sidebarplugin and if a non-registerd-user clicks on it he will see an empty category. Waht else have I to do, to hide the category in the categoryplugin?

Thanks, Lordcoffee
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

In the categoryplugin you must set the source of category authors to "currently logged in user" to hide categories that a user should not see!

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
lordcoffee
Regular
Posts: 308
Joined: Tue Nov 29, 2005 10:22 pm
Location: Munich - Germany
Contact:

Post by lordcoffee »

This works! Thanks!

But my brain won't stop thinking about other possibilities :D

Would it be possible to set a link inside the sidebar HTML nugget wich says something like :

I'm a link only for the usergroup "family" if you're not a user with that usergroup rights I'm invissible.

Lordcoffee

EDIT: The option with the sidebarhiderplugin would of course be the best. Maybe someone will do this for a small donation?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

No, that possibility does not exist for the HTML nugget. I favor to implement that into the sidebarhider plugin, that could be used much more better.

If no one does it, I'll have a look at it at the end of next week, if you remind me :)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
lordcoffee
Regular
Posts: 308
Joined: Tue Nov 29, 2005 10:22 pm
Location: Munich - Germany
Contact:

Post by lordcoffee »

Hi Garvin!

I installed the CVS Version. Theres a little bug:

Image

I can't choose any group

Thanks one more time, Lordcoffee
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Why can't you choose any group? The names of the EDITOR/ADMIN/CHIEF groups currently look odd, but it should still work to be selected?

Does the HTML code hold any errors?

The dropdown only holds groups that you are a member off! So you can only grant access to sidebars through groups you yourself are allowed to access, I think that makes sense?

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
lordcoffee
Regular
Posts: 308
Joined: Tue Nov 29, 2005 10:22 pm
Location: Munich - Germany
Contact:

Post by lordcoffee »

There are a view more Probs I think.

Here are my Groups I've created:
Image

But they do not show in the Plugin:
Image

And thats not enough :wink: The links on the left menu are having the image of my template:

Image
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

The links seem to be affected because of your style.css customizations? For that i sadly can'T help, it was not caused by me *g*

About the usergroups: Are you sure you not only created them, but your admin user is also a MEMBER of that group?

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
lordcoffee
Regular
Posts: 308
Joined: Tue Nov 29, 2005 10:22 pm
Location: Munich - Germany
Contact:

Post by lordcoffee »

Yep that's it! Now it works fine!

:D :D :D

Thanks!
lordcoffee
Regular
Posts: 308
Joined: Tue Nov 29, 2005 10:22 pm
Location: Munich - Germany
Contact:

Post by lordcoffee »

HI!

I have a little problem in comination with the sidebarhider plugin. The recententries plugin in the sidebar shows also the comments for the entries wich are "hidden" for the non-registered users. Is it hard to fix this? By the way, the recententries plugin makes avery ugly linebreak. It even breaks words wich are short enough. Any help?

Thanks, Lordcoffee
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!
lordcoffee wrote:HI!

I have a little problem in comination with the sidebarhider plugin. The recententries plugin in the sidebar shows also the comments for the entries wich are "hidden" for the non-registered users. Is it hard to fix this? By the way, the recententries plugin makes avery ugly linebreak. It even breaks words wich are short enough. Any help?
Yes, the recententry plugin does not evalute any ACLs. Inserting this would be hard to do, I'm sorry. One would need to fetch all SQL related queries for that from the core code, and it would make the plugin a lot less faster.

Instead you might want to use the "showentries" sidebar plugin, as this one uses the same fetching routines as the usual content. But I believe it does not have the same options as the recententries plugin.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
lordcoffee
Regular
Posts: 308
Joined: Tue Nov 29, 2005 10:22 pm
Location: Munich - Germany
Contact:

Post by lordcoffee »

But the showentries plugin shows the latest entries not the latest comments. If that is that hard i don't want anyone to do that :wink: It works for now.

What about the ugly linebreaks? Is there any possibility to get the text flow automatic the way it does in the "real" comments?

Thanks, Lordcoffee!

@Garvin: did you recieve everthing?
Post Reply