_getTabFieldsDb question

14 years 10 months ago #99865 by iberkner
_getTabFieldsDb question was created by iberkner
Hi,

Working on a module for CB and using these 2 lines:
[code:1]$tabs = $myCbUser->_getCbTabs(); // new cbTabs( 0, 1 ); //TBD: later: this private method should not be called here, but the whole users-list should go into there and be called here.
$allFields = $tabs->_getTabFieldsDb( null, $myUser, 'list' );
[/code:1]
taken from:
[code:1]function usersList( $uid ) {
[/code:1]
in comprofiler.php.

The problem is that although the call to _getTabFieldsDb appears to take place and $allFields is set, it either gets combined with another call to the same function by other CB Modules or something else is going on.

The "reason" parameter that is passed, does not get set to "list", but rather is set to "register" for example if the module is included on a page that has the "CB Registration" code on it. I'm trying to understand what is the flow in CB when making this call and where it would potentially mix up with other similar CB calls on the same page.

I'm not sure if I'm explaining it correctly... let me know if you need further clarification.

Thanks

spellingcity.com

Please Log in to join the conversation.

14 years 10 months ago #99874 by krileon
Replied by krileon on topic Re:_getTabFieldsDb question
What is the goal of your module? Function? Purpose?

Will give further API information once aware of your goal.


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 10 months ago #99877 by iberkner
Replied by iberkner on topic Re:_getTabFieldsDb question
Thanks for the quick reply. So I've investigated further and here's what I've come up with:

1. The function actually does get called :-)

2. The problem I think has to do with "prefetching" of values or something along those lines.

The module that I'm working on is a search module, similar in behavior to the existing built in search functionality of CB except encapsulated in a module.

The module is being loaded on a page that has the CB registration code on it which I think is prefetching the field data and storing it statically which is why the field data is not being loaded properly when I call the function.

I tried to call it with "prefetch = false" variable set but its still not working right. Its only returning the fields that are visible on the "registration" form.

Any guidance or help you can provide would be appreciated.

Thanks

spellingcity.com

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.192 seconds

Facebook Twitter LinkedIn