[SOLVED] Tab plugin development problem

12 years 1 month ago - 12 years 4 weeks ago #197982 by mfleeson
[SOLVED] Tab plugin development problem was created by mfleeson
Hi
I wrote a variation of the hello world example and am pulling out various nested links into an output table. It displays and works great. The problem is it only displays in View Profile, not Edit Profile. It also does not display in the admin backend when looking at a viewers profile. A lot of the data is administration read-only data for a yacht club membership system but the admin's need to see it in the backend and the user wants to see it even if he cannot edit it when he's in edit mode.

Is there any code I can pointed to to make this an 'edit' tab even if it's only displaying data?

I've attached the main tab code below.

Any help would be very greatfully received.

Best Wishes

Mark
Attachments:

Please Log in to join the conversation.

12 years 1 month ago #197992 by krileon
Replied by krileon on topic Re: Tab plugin development problem
Please see the below override functions you can specify for your tab class.
/**
* Generates the menu and user status to display on the user profile by calling back $this->addMenu
* @param  moscomprofilerTab   $tab       the tab database entry
* @param  moscomprofilerUser  $user      the user being displayed
* @param  int                 $ui        1 for front-end, 2 for back-end
* @return boolean                        either true, or false if ErrorMSG generated
*/
function getMenuAndStatus( $tab, $user, $ui) {
}
/**
* Generates the HTML to display the user profile tab
* @param  moscomprofilerTab   $tab       the tab database entry
* @param  moscomprofilerUser  $user      the user being displayed
* @param  int                 $ui        1 for front-end, 2 for back-end
* @return mixed                          either string HTML for tab content, or false if ErrorMSG generated
*/
function getDisplayTab( $tab, $user, $ui ) {
}
/**
* Generates the HTML to display the user edit tab
* @param  moscomprofilerTab   $tab       the tab database entry
* @param  moscomprofilerUser  $user      the user being displayed
* @param  int                 $ui        1 for front-end, 2 for back-end
* @return mixed                          either string HTML for tab content, or false if ErrorMSG generated
*/
function getEditTab( $tab, $user, $ui ) {
}
/**
* Saves the user edit tab postdata into the tab's permanent storage
* @param  moscomprofilerTab   $tab       the tab database entry
* @param  moscomprofilerUser  $user      the user being displayed
* @param  int                 $ui        1 for front-end, 2 for back-end
* @param  array               $postdata  _POST data for saving edited tab content as generated with getEditTab
* @return mixed                          either string HTML for tab content, or false if ErrorMSG generated
*/
function saveEditTab( $tab, &$user, $ui, $postdata ) {
}
/**
* Generates the HTML to display the registration tab/area
* @param  moscomprofilerTab   $tab       the tab database entry
* @param  moscomprofilerUser  $user      the user being displayed
* @param  int                 $ui        1 for front-end, 2 for back-end
* @param  array               $postdata  _POST data for saving edited tab content as generated with getEditTab
* @return mixed                          either string HTML for tab content, or false if ErrorMSG generated
*/
function getDisplayRegistration( $tab, $user, $ui, $postdata ) {
}
/**
* Saves the registration tab/area postdata into the tab's permanent storage
* @param  moscomprofilerTab   $tab       the tab database entry
* @param  moscomprofilerUser  $user      the user being displayed
* @param  int                 $ui        1 for front-end, 2 for back-end
* @param  array               $postdata  _POST data for saving edited tab content as generated with getEditTab
* @return mixed                          either string HTML for tab content, or false if ErrorMSG generated
*/
function saveRegistrationTab( $tab, &$user, $ui, $postdata ) {
}
/**
* WARNING: UNCHECKED ACCESS! On purpose unchecked access for M2M operations
* Generates the HTML to display for a specific component-like page for the tab. WARNING: unchecked access !
* @param  moscomprofilerTab   $tab       the tab database entry
* @param  moscomprofilerUser  $user      the user being displayed
* @param  int                 $ui        1 for front-end, 2 for back-end
* @param  array               $postdata  _POST data for saving edited tab content as generated with getEditTab
* @return mixed                          either string HTML for tab content, or false if ErrorMSG generated
*/
function getTabComponent( $tab, $user, $ui, $postdata ) {
	return null;
}


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.
The following user(s) said Thank You: mfleeson

Please Log in to join the conversation.

12 years 1 month ago #198016 by mfleeson
Replied by mfleeson on topic Re: Tab plugin development problem
Many many thanks. It works fantastically.

Best Wishes

Mark

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.166 seconds

Facebook Twitter LinkedIn