Show empty tabs

15 years 6 months ago #77292 by gavner
Show empty tabs was created by gavner
hi there, i need help here

if i choose the option Show empty tabs to no i find that the video tab im trying to hide still shows up. THere is no content in there with certain users so it shouldnt be showing


here is the page: www.thecolouroflove.net/admin-2

any ideas?? please

thnx, gav

Please Log in to join the conversation.

15 years 6 months ago #77295 by krileon
Replied by krileon on topic Re:Show empty tabs
That function only works on tabs designed for it.

You need to modify the tab to return nothing if there is no videos.

Here's an example if it uses a database:
[code:1]
if (count($videos)==0){
return;
} else {
return $content;
}
[/code:1]


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.

15 years 6 months ago #77297 by gavner
Replied by gavner on topic Re:Show empty tabs
thanks for quick response, so does that mean i can put that code into the main plugin .php file?, also how do i know if it uses a database...this plugin provides a name and url link to you tube or google videos.

thanks;)

Please Log in to join the conversation.

15 years 6 months ago #77301 by gavner
Replied by gavner on topic Re:Show empty tabs
ok i found the database table`jos_comprofiler_plug_video`

so what would the exact code be if im going to insert?

Please Log in to join the conversation.

15 years 6 months ago #77305 by krileon
Replied by krileon on topic Re:Show empty tabs
I don't know.

I just gave you an example. I don't know what plugin you use. I use seyret so can't really help ya with anything other then that.

You'll just have to look at the plugin and check out how it handles displaying the information. Then make a new if statement to return something or nothing depending what was pulled from the database.


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.198 seconds