[SOLVED] Profile Owner and admins Tab

13 years 6 months ago #143934 by bgies
Hi,

I need a tab that shows only to the profile owner and admins. I asked previously if it was possible and Kyle responded that it would require a custom plugin... Long story short: I can make the plugin, but I also have a second website that requires this function also, and I would think I am not even close to the only one that would use it.

My current thought is that it should be possible to just add it to the CB core Tab permissions. The options right now are :
Everybody
All Registered Users
... and then the normal Users.. and backend...

If an option was added "Profile Owner", then I could just select that, and a backend admin, and I think the logic would be easy enough :
"if (user->id == profile_owner_id)
allow = true
else
the normal tab display functions.

If the CB team would consider adding this to the core, then I can probably figure out how to do it and submit a patch.

Oh.. can you tell me what files I need to start with to find this... I'm sure I can find them eventually, but you have a lot of files to look through :).

Thanks.

Post edited by: krileon, at: 2010/12/20 16:28

Please Log in to join the conversation.

13 years 6 months ago #143975 by krileon
Replied by krileon on topic Re:Profile Owner and admins Tab
We've plans to better enhance the workflows with release of CB 2.0, but that's awhile off. We've no plans for CB 1.2.x to adjust the permissions system. It's not possible to add that code via core edits to tabs created in Tab Management as there's no core code to edit. As for 3rd party plugins you'll need to locate them in the plugins folder and edit them manually.

You could just use substitutions within a delimiter field to render a tabs content and using IF substitutions you can display that content to select users such as admins or only the user themselves. More on substitutions can be found in Tutorials within my signature.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

13 years 6 months ago #143984 by nant

Please Log in to join the conversation.

13 years 4 months ago #149035 by bgies
Replied by bgies on topic Re:Profile Owner and admins Tab
Just as an FYI... I did create a plugin for it, and it works fine.

While I was creating the Plugin, I realized that it would be helpful if the Example Plugin had a full list of the CB events it could register for... so that when creating the Plugin, I could simply delete those events I didn't want. It would be much easier than searching for events. It would also make it much easier to find the code associated with an event because you could just do a file search on the name.

I can do one like that and send it to you if you want it... Let me know.

Oh... yes.. I did know that CB Subs would do this... but I can't afford it for this site :). I do use CB Subs on another site though.. and works really well.

Please Log in to join the conversation.

13 years 4 months ago #149104 by krileon
Replied by krileon on topic Re:Profile Owner and admins Tab

While I was creating the Plugin, I realized that it would be helpful if the Example Plugin had a full list of the CB events it could register for... so that when creating the Plugin, I could simply delete those events I didn't want. It would be much easier than searching for events. It would also make it much easier to find the code associated with an event because you could just do a file search on the name.

All of the triggers are provided with their variables in the tutorial, which you'd of had to scroll past to get to the example download. No, I will not clutter and confuse the example by adding all triggers to it.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.238 seconds

Facebook Twitter LinkedIn