[SOLVED] Creating a controller in CB

13 years 3 months ago - 13 years 3 months ago #151488 by laptoproadie
[SOLVED] Creating a controller in CB was created by laptoproadie
Hey, guys. Back again. We have a need that calls for allowing certain users (doctors) to edit another's (patient's) specified data. I'd like to know what special quirks (if any) there are for creating a CB controller and/or model to send form data to for editing and saving.

Please Log in to join the conversation.

13 years 3 months ago #151628 by krileon
Replied by krileon on topic Re: Creating a controller in CB
The following tutorial will explain how to edit and store a users data using CB API if you intended to develop an integration to allow such a thing.

www.allmysocials.com/tutorials/item/237-create-users-through-api

Alternatively I suggest just making those users site moderators. You can set what usergroups are moderators within CB configuration.


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 3 months ago - 13 years 3 months ago #151749 by laptoproadie
Replied by laptoproadie on topic Re: Creating a controller in CB
Let me rephrase. The doctors are already moderators. They can go onto a CB user's profile page and edit specific data. We created a controller to retrieve this data and placed it in the 'controllers' folder outside of the 'plugin' folder of the com_profiler component. However, we need to know how to send that data to the controller. The form is located in com_profiler->plugin->templates->default->default.php. The standard hidden inputs of option, controller, and task (within the form) do not seem to be working:

<input type="hidden" value="com_comprofiler" name="option" />
<input type="hidden" value="doctoredit" name="controller" />
<input type="hidden" value="saveNotes" name="task" />

Please Log in to join the conversation.

13 years 3 months ago #151754 by krileon
Replied by krileon on topic Re: Creating a controller in CB
You're wanting to make a post to an external component? Don't understand what you're trying to do. If modifications were made to CB please remove them. You can make additions to CB or act on its various data using triggers as explained in the following tutorial.

www.allmysocials.com/tutorials/item/228-event-triggers

If you need to update a database of an external component you can do this with incubator project CB Queries on the triggers after registration and profile edit.


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 3 months ago #151759 by laptoproadie
Replied by laptoproadie on topic Re: Creating a controller in CB
Ah, my bad. Where I typed 'com_profiler' I meant to put 'com_comprofiler' to represent the CB component. We actually were able to get everything to work, so no worries anymore (for now). Thanks for your patience and all the help. :)

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.181 seconds

Facebook Twitter LinkedIn