Skip to Content Skip to Menu

Help with CB Custom Search Module

  • rikaryo
  • rikaryo
  • OFFLINE
  • Posts: 19
  • Thanks: 1
  • Karma: 1
5 months 2 weeks ago #338249 by rikaryo
Help with CB Custom Search Module was created by rikaryo
Friends I need help creating a CB profile search module

I only need to add fields created in CB and the sequence I want:

1 - State, 2 - Location, 3 - Professional, 4 - Gender, 5 - Age

Is there an existing module that can do this? I searched and found nothing.

I'm not a programmer, I'm self-taught and I do cool things with CB and I really wanted your help with this, the client who hired me is asking a lot about this work.

Thanks

Please Log in or Create an account to join the conversation.

  • rikaryo
  • rikaryo
  • OFFLINE
  • Posts: 19
  • Thanks: 1
  • Karma: 1
5 months 2 weeks ago #338270 by rikaryo
Replied by rikaryo on topic Help with CB Custom Search Module
As the CB community got weird, the extension simply didn't keep up with the mainstream Joomla 5 implementations.

It does not integrate the search or advanced fields. I see this as long steps backwards.

I created a module that doesn't run well and I'm thinking, since there are limitations of CB with Joomla in the search, it would be enough for CB's own internal search to work as a module option.



 
Attachments:

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
5 months 2 weeks ago - 5 months 2 weeks ago #338271 by krileon
Replied by krileon on topic Help with CB Custom Search Module
You can use a wrapper module to wrap the userlists search mode URL. You can also use something like Components Anywhere to insert the search component view anywhere you like. As long as hotlink protection is disabled you can also create a custom HTML form and just submit as GET to the userlist URL as well to trigger a search. So there's a lot of options available for pulling userlist searching out of the list. We'll be providing a module to do this with CB 3.x more easily.

As the CB community got weird, the extension simply didn't keep up with the mainstream Joomla 5 implementations.

I've no idea what you mean by this. I'm just going to take a guess and assume you're talking about Joomla's smart search?

No we don't integrate profiles with Smart Search because it's a massive privacy violation for profiles. There's no way to enforce privacy controls and access limits on a per field per profile basis. Joomla itself doesn't even offer a smart search plugin for Joomla users for the very same reason.

I don't see how we can reasonably implement profile smart searching without breaking a dozen different privacy laws across the globe. That's why Joomla has only implemented it for static content (e.g. articles). We're still trying to figure out a way to make it work with possibly allowing strictly selecting a set of public data to be searchable, but we're open to suggestions if you have any to deal with the serious problems it has with user data.

For those that don't understand how smart search works is it's basically an indexer. It scans the content, extracts words from the content, and stores those words in the database. So if it scanned profile data it would extract every word from their profile and index it. From there when you make a search it goes against this standardized storage modal. It's extremely limited in what we can do to protect this content. This indexing would have to be re-ran on users profiles every time a profile is updated as well.


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.
Last edit: 5 months 2 weeks ago by krileon.

Please Log in or Create an account to join the conversation.

  • rikaryo
  • rikaryo
  • OFFLINE
  • Posts: 19
  • Thanks: 1
  • Karma: 1
5 months 2 weeks ago #338273 by rikaryo
Replied by rikaryo on topic Help with CB Custom Search Module
Krileon thank you very much for your return.

I believe that the source of the integration between CB and Joomla advanced search is the need to limit the indexing of profiles according to the display permission, in my case it is public and the fields with the data, selected for display with login.

I don't know if I thought wrong, but the lack of this integration with Joomla's extra fields is difficult, especially for us who need to integrate specific fields for the search.

In my case, I need 5 fields with list-type options

1 - State (São Paulo, Rio de Janeiro, Ceará, Bahia...), 2 - Location, 3 - Professional, 4 - Gender (man, woman, other), 5 - Age (age between xxx and xxx)

I made a script with a module that pulls from the bank, but it doesn't work well and as I'm late, I have to think of something that works well to maintain a good standard for the client.

My weekend will be long, as on Monday I need to present the work to the client.

When I talked about CB not following Joomla 5 it's because Joomla has had fields since version 3 and they don't have them in CB.

I use CB on many sites, I love the extension, I always recommend it, but coming across these limitations makes me thoughtful to the point of thinking that CB is running slow or backwards.

I ask that you take my words as feedback from a CB user who misses add-ons that could make the platform as great as ever.

Thanks for the answer, hugs

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
5 months 2 weeks ago #338275 by krileon
Replied by krileon on topic Help with CB Custom Search Module

I believe that the source of the integration between CB and Joomla advanced search is the need to limit the indexing of profiles according to the display permission, in my case it is public and the fields with the data, selected for display with login.

That's easier said than done and is something we're already exploring. I get that your use case is simple, but that's not the case for the vast majority of CB sites and the last thing we want to do is cause a massive data leak. The indexer would have to take into account profile access permissions, tab access permissions, field display settings, field privacy settings, field condition settings, and field CBSubs settings as all can contribute to their access. We absolutely want to have a smart search indexer, but again it's complicated for these reasons.

When I talked about CB not following Joomla 5 it's because Joomla has had fields since version 3 and they don't have them in CB.

We have far more field types than Joomla provides. We also provide a Joomla field type for using custom Joomla user component fields directly in CB. This means All of CB and Joomla's field types are available to CB. So I'm not sure what you mean by this. If you mean use CB fields throughout Joomla then that's something coming in CB 3.x.


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 or Create an account to join the conversation.

  • rikaryo
  • rikaryo
  • OFFLINE
  • Posts: 19
  • Thanks: 1
  • Karma: 1
5 months 1 week ago #338312 by rikaryo
Replied by rikaryo on topic Help with CB Custom Search Module
krileon I followed your suggestion of creating a module in get, but the code I created does not need any complement that is beyond my knowledge in CB.

I disabled friendly urls, changed the link "view=userslist to task=userslist" as recommended, reviewed each suggestion in the database to add to this code.

When using, a 404 error page appears with the message "my site/libraries/src/Router/Router.php (155)"
Code:
<form action="<?php echo JRoute::_('index.php?option=com_comprofiler&task=userslist');?>" method="get">   <label></label>   <select name="search[uf]"> <option value=" ">Selecionar</option>     <option value="SP">SP</option>     <option value="RJ">RJ</option>     <option value="ES">ES</option>     <option value="BA">BA</option>   </select>   <label></label>   <select name="search[localidade]"> <option value=" ">Selecionar</option>      <option value="SP - São Bernardo do Campo">SP - São Bernardo do Campo</option>     <option value="SP - Guarulhos">SP - Guarulhos</option>     <option value="SP - Campinas">SP - Campinas</option>     <option value="SP - Santo André">SP - Santo André</option>     <option value="SP - Osasco">SP - Osasco</option>   </select>   <label></label>   <select name="search[profissional]"> <option value=" ">Selecionar</option>     <option value="Cuidador (a) de Idoso">Cuidador (a) de Idoso</option>     <option value="Enfermeiro (a)">Enfermeiro (a)</option>     <option value="Técnico (a) de Enfermagem">Técnico (a) de Enfermagem</option>     <option value="Fisioterapeuta">Fisioterapeuta</option>     <option value="Psicólogo (a)">Psicólogo (a)</option>     <option value="Nutricionista">Nutricionista</option>   </select>   <label></label>   <select name="search[genero]"> <option value=" ">Selecionar</option>     <option value="Homem">Homem</option>     <option value="Mulher">Mulher</option>     <option value="Outro">Outro</option>   </select>   <label></label>   <select name="search[idade]"> <option value=" ">Selecionar</option>     <option value="18-25">18 a 25 anos</option>     <option value="25-35">25 a 35 anos</option>     <option value="35-45">35 a 45 anos</option>     <option value="45-55">45 a 55 anos</option>     <option value="55-65">55 a 65 anos</option>     <option value="65-100">Acima de 70 anos</option>   </select>   <p></p>   <p> <button type="submit">Pesquisar</button></p> </form>

Would you have any suggestions to help me?

I'm already a week late with the deadline and a little lost not knowing what to do.

I have already updated to version 2.9.2+Joomla5+PHP8.2+Mysql8

Thanks

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum