UserList: Advanced Frontend Search

18 years 1 month ago #8515 by mediaguru
Replied by mediaguru on topic Re:UserList: Advanced Frontend Search
Upon enabling the search I've got some italian in there:

[code:1]Cerca per Nome Utente:

[1] 2 Successivo > Fine >>[/code:1]

Bad grammar here:
The search has produced 32 result.
should be The search has produced 32 results.



When the search is disabled I'm getting:
Warning: Invalid argument supplied for foreach() in /home/mysite/public_html/components/com_comprofiler/comprofiler.html.php on line 793

CB/Joomla golf site: www.thegolfspace.com
Geek/joomla site: www.tkserver.com

Check out my Joomla/CB projects:

* LIKE thumbs up system for "liking" content items
* Karma - CB user rating system
* Golf Score Tracker
* Jitter - status update system. "What's on your mind?"
* CB Author Plug - Shows CB author link and avatar in content items. J1.5 compatible and very customizable!

Found on my web site or in the Joomlapolis Directory !

Please Log in to join the conversation.

18 years 1 month ago #8596 by Praetorian
Replied by Praetorian on topic Re:UserList: Advanced Frontend Search
Hi all !!!
First thanks for having implementing such a great component!!!
This is very good job.
Then I have a question...
I can't display the fields "name", "username", "emailaddress", etc... Actually all the fields which are "system fields".
Replacing
[code:1]$where[] = "(f.sys = 0)"; [/code:1]
by [code:1]$where[] = "(f.sys = 0 OR f.sys = 1 );[/code:1] in the admin.comprofiler.php file,
the fields appear in the Field Manager and so I can choose if the "system fields" should be "searchEnabled" or not.
My problem is that these fields still don't appear in the frontend.
Was I right to modify the admin.comprofiler.php file or is there a way easier to do that? Do I have to modify other file ?

Thanks for your help.

Praetorian.

Please Log in to join the conversation.

18 years 1 month ago #8612 by Praetorian
Replied by Praetorian on topic Re:UserList: Advanced Frontend Search
Praetorian wrote:

Hi all !!!
First thanks for having implementing such a great component!!!
This is very good job.
Then I have a question...
I can't display the fields "name", "username", "emailaddress", etc... Actually all the fields which are "system fields".
Replacing
[code:1]$where[] = "(f.sys = 0)"; [/code:1]
by [code:1]$where[] = "(f.sys = 0 OR f.sys = 1 );[/code:1] in the admin.comprofiler.php file,
the fields appear in the Field Manager and so I can choose if the "system fields" should be "searchEnabled" or not.
My problem is that these fields still don't appear in the frontend.
Was I right to modify the admin.comprofiler.php file or is there a way easier to do that? Do I have to modify other file ?

Thanks for your help.

Praetorian.


Actually, I found a way to do it. No need to change the admin.comprofiler.php file.
The fields displayed in the frontend depends on their "type".
In the comprofiler.html.php file, you need to add on line 800 :
[code:1]
case "editorta":
case "predefined":
case "primaryemailaddress":
[/code:1]
just before
[code:1]
case "text":
[/code:1]
if you want the "system fields" to be displayed (most of them are "predefined" type).

For now, I don't have any backend solution. You need to go directly in the database to put "1" in the "searchEnabled" of the "system fields" you want to display.
One problem stands : When you click on the "Reset" it doesn't erase these fields.

I don't know if it is the best or the easiest way to do it but for now it seems to work. So if anybody has a better idea, I take it.

Praetorian.

Please Log in to join the conversation.

18 years 1 month ago #8613 by Praetorian
Replied by Praetorian on topic Re:UserList: Advanced Frontend Search
Me again...
To order the fields in the frontend, replace on line 780 :
[code:1]
$query_campi = "SELECT * from #__comprofiler_fields x where (x.published = 1) AND (x.searchEnabled = 1)";
[/code:1]
by
[code:1]
$query_campi = "SELECT * from #__comprofiler_fields x where (x.published = 1) AND (x.searchEnabled = 1) ORDER BY x.ordering";
[/code:1]

But still looking for the reset problem...
Actually it doesn't deal with if it's a "system field" or not. For any fields, if you enter a value and you click on the "submit" button and then if you want to reset the field, the value you used for the search still remains even if you erase it by hand.
Any suggestions ?

Praetorian.

Post edited by: Praetorian, at: 2006/03/21 02:43

Please Log in to join the conversation.

18 years 1 month ago #8702 by FrySpy
Replied by FrySpy on topic Re:UserList: Advanced Frontend Search
Hi Praetorian!
My name is Francesco and I wrote this Advanced Search Filter for CB with Marcello (supixxx).
The problem you encountered is due to the typical characteristic a reset input-type has: restoring all fields in the current form to their default states. Therefore, when you push the "submit" button, default state will change and "reset button" won't work as expected. We should fix it as soon as possible.
I hope I got your problem right.

Ciao,
Francesco

Post edited by: FrySpy, at: 2006/03/22 02:55

Post edited by: FrySpy, at: 2006/03/22 02:56

Please Log in to join the conversation.

18 years 1 month ago #8726 by Praetorian
Replied by Praetorian on topic Re:UserList: Advanced Frontend Search
Hi Francesco!
Thanks for your reply. This is exactly the problem that I encounter and your explaination is exactly what I found by looking around.
I'm waiting for the fix impatiently !!!

Thanks.
Praetorian.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.184 seconds

Facebook Twitter LinkedIn