Support Forums


Go Back   68 Classifieds Forums > Archives > v3.0.x Help & Support > v3.0 Questions & Support

 
 
LinkBack Thread Tools Display Modes
Old 04-10-2006, 06:57 PM   #1
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 2,192
Rep Power: 60
juven14 is a jewel in the rough
Default custom fields searchresults/toplistings/category

Here is the mod orginally created by Eric and Lhotch pre-crash. I had another request for it and decided to make it a little more user friendly.

This mod allows for the display of up to 4 fields (more if you manually add them to the files) on the searchresults.php search results, category.php category ad results, and top/new/featured listings results from toplistings.php.

I made another table in the database which has a file to install/remove the table. To install you basically upload the files, navigate to the install page, and open the admin page to select the fields you wish to be globably displayed. You can also uninstall the mod by going to the remove link, deleteing the new mod files, and restoring your original files.

I've made it from 3.0.15 Developer files and did a brief test. I am pretty sure I have fixed all the bugs but be sure to post here if you find any. The readme is pretty complete but if you have any questions fire away.

custom-fields-showlisting.zip
__________________
John Snyder
PHP Developer
juven14 is offline  
Old 04-11-2006, 09:57 AM   #2
Junior Member
 
Join Date: Apr 2006
Posts: 10
Rep Power: 14
NDTV is on a distinguished road
Default

Hi John. . .
Is this something I should download?
NDTV is offline  
Old 04-11-2006, 10:06 AM   #3
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 2,192
Rep Power: 60
juven14 is a jewel in the rough
Default

Not unless you'd like. It is just the setup you have which is controlled by an admin area instead of manually adding the numbers after looking in the field ids in the database.

The only difference is an admin area where you see a list of the fields availible and you can select as many as you'd like and then these are added to all the files automatically. It is only setup to handle four fields as your's is, however if they want to add in more they just have to make the same change to 3 files.
__________________
John Snyder
PHP Developer
juven14 is offline  
Old 04-14-2006, 11:42 PM   #4
Junior Member
 
Join Date: Apr 2006
Posts: 2
Rep Power: 0
Old School is on a distinguished road
Default

John,

I have a question regarding your mod. I am looking for a way to add field to the search are. These fields are "Extra Fields" that I have added, to give crucial info and narrow down searches. Will your mod allow this?

For now, I don't see a way to add Extra Fields to the Search.php screen.

Thanks in advance.

OS
Old School is offline  
Old 04-15-2006, 12:11 AM   #5
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 2,192
Rep Power: 60
juven14 is a jewel in the rough
Default

This mod is for displaying the results - it doesn't really have anything to do with the search criteria, just the way the results are displayed.

It's late here, let me get back to you on the extra fields for search in the am.
__________________
John Snyder
PHP Developer
juven14 is offline  
Old 04-15-2006, 08:07 AM   #6
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 2,192
Rep Power: 60
juven14 is a jewel in the rough
Default

By extra fields you are referring to fields created via the admin panel. You'd like to be able to search one or all of these fields?

You would have to create the select/text/check boxes on search.tpl.php

Then in searchresults.php you will have to modify the query to include these in the search. What exactly do you have in mind?
__________________
John Snyder
PHP Developer
juven14 is offline  
Old 04-20-2006, 12:47 PM   #7
Junior Member
 
 
Join Date: Apr 2006
Posts: 6
Rep Power: 0
chorro is on a distinguished road
Default

Hi John,

Thanks for the Mod, I did install it and it is asking me for a file that I could not find in the folder I downloaded.

administration/cfsmodform.tpl.php

here is the error:

Warning: Smarty error: unable to read resource: "administration/cfsmodform.tpl.php" in /home/apartmen/public_html/includes/template/Smarty.class.php on line 1095

TIA

Fernando
chorro is offline  
Old 04-20-2006, 01:44 PM   #8
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 2,192
Rep Power: 60
juven14 is a jewel in the rough
Default

sorry about that , I added the wrong template file. I've replaced the zip so it's in there now. upload/templates/administration/cfsmodform.tpl.php. You can just upload the file your missing. If you find any more problems let me know.
__________________
John Snyder
PHP Developer
juven14 is offline  
Old 04-20-2006, 02:14 PM   #9
Junior Member
 
 
Join Date: Apr 2006
Posts: 6
Rep Power: 0
chorro is on a distinguished road
Thumbs up

Mod works perfect!!
Thanks John,

One question: to change the order of the extra fields before the regular fields which file do I have to modify.

e.g. I have state, country and then city (city is the extra field). I need to place city, state and country in that order.

Thanks
__________________
Gambling Systems
Learn skills and play to win!
http://www.gamblingsystems.com
chorro is offline  
Old 04-20-2006, 02:42 PM   #10
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 2,192
Rep Power: 60
juven14 is a jewel in the rough
Default

They should be displayed in the order the fields where created. I set this up originally to be added on after the fields where created in order they were going to be displayed. Thinking about it now, that probably wasn't such a hot idea.

templates/default/showlistings.tpl.php is the page you need to alter. There are two sections, the title and body for the fields.

If you know how many fields you are displaying you can manually enter the names of these fields for the title section and then just move around the 1,2,3,4 (which are in the same order as displayed where you choose them).

fields' title section of showlistings.tpl.php, find:

HTML Code:
{foreach from=$field_names item="entry"}
   <th>{$entry.fName}</th>
{/foreach}
and replace with the titles in the order you wish them displayed:

HTML Code:
<th>some title 1</th>
<th>some title 2</th>
<th>some title 3</th>
<th>some title 4</th>
fields' body section of showlistings.tpl.php rearrange these:

HTML Code:
{if $entry.one<>""}
  <td{if $entry.class<>""} class="{$entry.class}"{/if}>{$entry.one}</td>
{/if}
{if $entry.two<>""}
  <td{if $entry.class<>""} class="{$entry.class}"{/if}>{$entry.two}</td>
{/if}
{if $entry.three<>""}
  <td{if $entry.class<>""} class="{$entry.class}"{/if}>{$entry.three}</td>
{/if}
{if $entry.four<>""}
  <td{if $entry.class<>""} class="{$entry.class}"{/if}>{$entry.four}</td>
{/if}
hope this helps
__________________
John Snyder
PHP Developer
juven14 is offline  
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is the custom field search function? MrSpandex v3.1 Modules & Modifications 3 12-08-2006 06:33 PM
viewlistings and custom fields summer v3.1 Modules & Modifications 16 10-04-2006 03:44 AM
Ad Preview, Search Custom Fields, and more summer v3.1 Suggestions and Feedback 1 08-09-2006 02:24 PM
Search Ranges on Custom Fields philmaw v3.1 Questions & Support 2 08-03-2006 07:55 AM


All times are GMT -4. The time now is 03:48 PM.


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