Support Forums

Search Range for single-line text fields

This is a discussion on Search Range for single-line text fields within the Technical Support forums, part of the Technical Support Forums category; Hello, following problem: i want the members to enter a value (just for example: "year of building"), but in a ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 05-27-2009, 06:17 AM   #1
Junior Member
 
Join Date: May 2009
Posts: 5
Rep Power: 0
mmk01 is on a distinguished road
Default Search Range for single-line text fields

Hello,

following problem:

i want the members to enter a value (just for example: "year of building"), but in a single-line-textfield and not with a dropdown. it would be great if there would be a possible to check if the entered value is in the specified range. But the most important thing:
at the search page should appear that "from---to---" like at the "price range" for all that fields or selecting the ranges with a drop-down.

would be great if someone could help me with that, thank you very much

regards
mmk01 is offline  
Old 05-27-2009, 08:52 AM   #2
68 Evangelist & Developer
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,727
Rep Power: 50
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Please post your 68 Classifieds type (Designer, Developer), version (4.0.x, 4.1.x) and template in your postings asking for help. This information will help you get better answers for your posts. A great place to do this is in your signature!

I'm not quite following you. Having the "to" and "from" options are for extra fields that you set to use that for. Perhaps you could spend some time reading the documentation and it might help you.
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified)
Sandbox (v3.1.10, v4.0.9, 4.1.5)
Visit My blog for tips, tricks, tutorials, reviews for 68 Classifieds as well as my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline  
Old 05-27-2009, 09:45 AM   #3
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 911
Rep Power: 25
bowers01 is on a distinguished road
Default

Im a little confused too, but ill have a go.
Do you mean at the search page have
From year to year?
eg 1990 to 2009?

Nick
__________________
Nick Bowers
68c v4.09 Developer Custom Template
bowers01 is offline  
Old 05-27-2009, 09:59 AM   #4
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,165
Rep Power: 121
Eric Barnes is a jewel in the rough
Default

Let me at my 2 cents. Since I requested him start the thread.

He is running v4.1.3 developer and basically wants a range extra field but when adding / editing a listing he wants it to be a text input.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 05-27-2009, 10:36 AM   #5
Junior Member
 
Join Date: May 2009
Posts: 5
Rep Power: 0
mmk01 is on a distinguished road
Default

thanks eric, yes 4.1.3 developer.


Quote:
Originally Posted by bowers01
Im a little confused too, but ill have a go.
Do you mean at the search page have
From year to year?
eg 1990 to 2009?
exactly! but like eric wrote above, i would need to have a text-input for that fields
is there a way to do that?

thanks!
mmk01 is offline  
Old 05-27-2009, 10:46 AM   #6
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,165
Rep Power: 121
Eric Barnes is a jewel in the rough
Default

Here are the steps I believe should accomplish this.

1. Go to your administration and find the extra field id.
2. Open includes/classes/kernel/Listings.php
3. Go to line 1836 which should have this: if($row['fType']=="P")
4. Just above that add:
PHP Code:
if($row['fID'] == 3// 3 is the id from step 1.
{
$row['fType']="S"

5. Save it and then upload. Be sure you make a backup of the Listings.php file in case things go wrong.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 05-27-2009, 11:17 AM   #7
Junior Member
 
Join Date: May 2009
Posts: 5
Rep Power: 0
mmk01 is on a distinguished road
Default

thanks for your reply!

i did exactly what you said, but there absolutly no difference, i am sure i got the right id, hm... but this way would be a little complicated i think, cause i got 60 different fields that should work like that, but of course i could add code for every single one.
but why isn't it working, what mistake could i have made?

thanks!
mmk01 is offline  
Old 05-27-2009, 11:29 AM   #8
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,165
Rep Power: 121
Eric Barnes is a jewel in the rough
Default

I just tested this and it does have a bug. Try this instead:
PHP Code:
if($row['fID'] == 3// 3 is the id from step 1.
{
$row['fType']="S";

It was missing a semi colon after the "S"

Quote:
cause i got 60 different fields that should work like that, but of course i could add code for every single one.
Would this be global? Meaning every range field should be a text input?
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 05-27-2009, 11:50 AM   #9
Junior Member
 
Join Date: May 2009
Posts: 5
Rep Power: 0
mmk01 is on a distinguished road
Default

thanks eric, but still don't get it working, don't know what i am doing wrong... but yes, it would be global, all range fields should behave like that! may then it works for me also ^^ i took a look at the demo you set up for me yesterday, and that "range-test" is looks exactly what i would need!

regards
mmk01 is offline  
Old 10-06-2009, 07:07 PM   #10
Junior Member
 
Join Date: Sep 2009
Location: Orlando, FL
Posts: 28
Rep Power: 1
bollskis is on a distinguished road
Default

Did you ever find a way to make all range fields text? I'd love to have that as well. Also, I'm having trouble getting the range drop downs to display, it seems to be off.
__________________
I am building a classifieds site running v4.1.6 Developer. I am a web developer based out of Orlando, Fl. I specialize in custom drupal sites and wordpress blogs. Check me out - http://www.gothamblue.net - and lemme know if you need any help!
bollskis is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Errant Text Line won't go away on Listing Page... Bronxgodzilla Technical Support 2 01-19-2009 06:26 PM
Search entire text in the Extra fields hel68c Technical Support 3 11-23-2008 06:20 PM
Line breaks stripped from multi-line text extra field HotAir Technical Support 4 11-17-2008 01:07 PM
How to search a range in an extra field? GPM55 v3.1 Questions & Support 1 05-18-2007 08:43 AM
extra fields : range missing frommarcq v3.1 Suggestions and Feedback 5 09-19-2006 03:36 AM


All times are GMT -4. The time now is 06:22 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0