TOPIC:

Advanced Search Module - Filters values from db 1 month 1 day ago #280682

  • bf_user
  • Offline
  • Junior Member
  • Junior Member
  • Registered
  • Posts: 29
  • Thanks: 0
I tried nl2br in the username.php as follows:
<?php
$db = JFactory::getDBO();
$db->setQuery("SELECT id, username FROM #__users");
$contents = $db->loadObjectList();
$listdata = "Please select a value;0\n"; 

for ($i = 0; $i < count($contents); $i++) {
                $listdata .= "{$contents[$i]->username};{$contents[$i]->id}\r\n";
}

$value = nl2br($listdata); // that's the important part for contentbuilder


?>

This correctly inserted <br> tags between the items. However the Select List element of the Advanced Search Module does not interpret them, but gives a select list with only one option, where all elements are listed and between every pair of items there is printed a <br /> tag.

In conrast, if I use 'echo nl2br'; then, the items are properly displayed on new lines. I suspect that the Advanced Search Module elements do not allow HTML. This would explain why no new lines are shown. Perhaps one can "allow" HTML somehow...

use

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

Advanced Search Module - Filters values from db 2 weeks 5 days ago #280941

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Registered
  • Posts: 12079
  • Thanks: 778
Hi,

everything is fine with 'echo nl2br'; ?

Regards,
Tihana

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

Advanced Search Module - Filters values from db 2 weeks 5 days ago #280966

  • bf_user
  • Offline
  • Junior Member
  • Junior Member
  • Registered
  • Posts: 29
  • Thanks: 0
No, this is not working. Actually, we had this topic with you ca. one year ago without success:

crosstec.org/de/forums/42-contentbuilder...ter-select-list.html

This is why I posted here with the hope that someone would have a copy of the modified advanced filter (posted here 7 years ago) that would properly populate a select list. Unfortunately, the default Advanced filter does not work for that purpose and the admin has to enter the values manually.

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

Advanced Search Module - Filters values from db 2 weeks 4 days ago #281047

  • Topic Author
  • K-meo
  • Offline
  • New Member
  • New Member
  • Registered
  • Posts: 5
  • Thanks: 1
Hi, I updated the module, you should be able to download it
shop.k-meo.com/joomla/9-advanced-search-module-extended.html

Have a good day.

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

Advanced Search Module - Filters values from db 2 weeks 4 days ago #281082

  • bf_user
  • Offline
  • Junior Member
  • Junior Member
  • Registered
  • Posts: 29
  • Thanks: 0
Hello K-meo and Happy New Year! I highly appreciate your effort!

The download worked fine, but the filter did not work. I think the reason is that by chance the original CB filter was uploaded instead of the modified one. Here is why I think that:

I downloaded  the CB filter from your link and installed it, no problem. I made a fresh new filter module and activated it on a CB generated view of a CB storage table. One of the columns is called 'user' and stores user names. I entered in the filter setting for the CB field 'user' the following:

@db/user

The text "@db/user " was shown in the front end filter. So, I downloaded the original CB Filter and compared the package content with the modified one from your link. The content and the files were identical, no differences found.

Could you please check, if indeed the modified CB filter was uploaded?  Or perhaps I am using the filter wrongly? 

Thank you once again for your effort, this is an essential contribution!

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

Advanced Search Module - Filters values from db 2 weeks 3 days ago #281095

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Administrator
  • Administrator
  • Super Users
  • Posts: 10331
  • Thanks: 827
Yes, once this is sorted I would also like to include that somewhere on the crosstec page. Especially as soon as the Joomla4 version is ready, it would be cool to have this modification associated with it.

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

Moderators: ForumSupport
Time to create page: 0.060 seconds

Support Discord

Join our Discord and enter the Crosstec channels for live-support, chat forums and directly interacting with the community!

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Subscribe to news and updates!

Special Offer

Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here and enter the Crosstec channels to receive live support and talk directly to the team!