CB Helloworld Plugin (part 2)

16 years 9 months ago #40069 by fcarroll
Replied by fcarroll on topic Re:CB Helloworld Plugin (part 2)
Hello!

Kudos to nant for these articles!!

I've authored a plugin which displays a tab with an editor text area which users can write biographical info into in freeform. What I'm trying to do now is to have this tab only available to people in a certain group. The code below does this for getDisplayTab - the tab only shows for the usergroup 'biogroup' (created with JACL-hence the non-standard group) when being viewed normally, however if someone not in 'biogroup' clicks to update their profile, it appears as a tab with editable fields. I don't know how to stop this from happening because I can't figure out much about the getEditTab and saveEditTab classes.

[code:1]
if ($my->usertype == 'biogroup')
{
class getBioTab extends cbTabHandler
{
function getBioTab()
{
$this->cbTabHandler();
}
function getDisplayTab($tab,$user,$ui)
{
global $my;
$params = $this->params;
$return = "";
if ($user->cb_bio != '')
{
$return .= "<strong>Biography:</strong> <br /> <div>". $user->cb_bio ."</div>";
}
return $return;
}
}
}//else user not in biogroup
[/code:1]

Please Log in to join the conversation.

15 years 2 months ago #89523 by Jurgentje
Replied by Jurgentje on topic Re:CB Helloworld Plugin (part 2)
Hi,

are there any plans to update the Hello World Plugins to the level of Joomla 1.5?

Currently there are a few glitches (easily fixed, but still...) that break compatibility with Joomla 1.5.

I'm anxious to find a book or up-to-date tutorial of the Community Builder API...

Please Log in to join the conversation.

14 years 9 months ago #105126 by calford
Replied by calford on topic Helloworld Plugin (part 2)
Hi,

thanks for the tutorial, one quick question (i had a look at the forum but couldnt find an answer)

If i want to display a tab with a custom form (not with CB fields) can I still use this plugin?

thanks in advance

Please Log in to join the conversation.

14 years 9 months ago #105508 by krileon
Replied by krileon on topic Re:Helloworld Plugin (part 2)
calford wrote:

Hi,

thanks for the tutorial, one quick question (i had a look at the forum but couldnt find an answer)

If i want to display a tab with a custom form (not with CB fields) can I still use this plugin?

thanks in advance


Yes, you can display whatever you want.


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.

14 years 8 months ago #108933 by 262media
Replied by 262media on topic Re:CB Helloworld Plugin (part 2)
Hello

Jurgentje wrote:

are there any plans to update the Hello World Plugins to the level of Joomla 1.5?

Currently there are a few glitches (easily fixed, but still...) that break compatibility with Joomla 1.5.


I'm also looking for the J1.5 helloworld plugin you said it can be easly fixed. Can you please tell me how?

Tanks

Please Log in to join the conversation.

14 years 7 months ago #109181 by deck1187hw
Replied by deck1187hw on topic Re:CB Helloworld Plugin (part 2)
How Do I add jquery library to the hello world plugin??? and how make it works??

Thanks!

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.277 seconds