![]() |
I will not be using any of the "User Registration Fields"
these are the 'additional fields' IDs Location: id - 9, called x1 Sleeps: id - 11, called x1 Type: id - 5, called x1 Price: id - 7, called x1 state: id - 10, called x3 country: id - 8, called x1 is it possible to have cheap flights to "state, country" |
Question - whereabouts in 'administrationm' did you add these fields? Please be very specific.
Also, what does 'called x3' mean? .... as in ....'state: id - 10, called x3' |
I made these fields up in /administration/fields.php.
'state: id - 10, called x3', means I would like to use state data 3 times on showlistings2.tpl.php like for cheap travel insurace for "state" cheap car hire in "state" cheap flight to "state, country" credit card trasfur Email A Friend "called X3" means I would like to insert state info 3 times on the same page |
Ok - now I understand - these are called 'extra fields'.
Open up the files category.php, searchresults.php and toplistings.php. They are situated in your root directory of the classifieds script. In these files you will see this: Code:
//now get the imagesQuote:
Now open up showlistings2.tpl.php. Where you wish to have 'location' displayed, add this: {$entry.mafExtralocation} Where you wish to have 'sleeps' displayed, add this: {$entry.mafExtrasleeps} Where you wish to have 'type' displayed, add this: {$entry.mafExtratype} etc, etc. Let's know how you go. I'm sure many others will use this modification - it's very simple (when you know how) and very powerfull. Thanks to maffo for the help with this one. |
Iv got the designer copy of 68, I need to upgrade or can you do it with out developer copy??
thanks for your help and time, this is a HOT HACK |
An upgrade is the only way im afraid but worth every penny.
|
I have one site ive been working on which is largely informational and I have nearly 70 fields that I want people to be able to see "at a glance" so I wanted them on the showlisting level. What I did was used the following code to grab all the extra fields. It then adds them to the current $row array with a key that equals their fieldname. The $row array is later assigned to $result and passed to the template.
here is my little code snipped to get and pass the extra fields. Code:
$extra=array(); |
Now thats efficiency!
Thats how it should be written when wanting more than one field. 70 extra fields???:confused: :confused: |
Hi Larry, on what pages did you use this code, do I still need the upgrade
Also if I upgrade to the developer 68 what files do I need to save, So I dont loose all the changes Iv made so far |
Quote:
Im doing away with the left nav and will be using a DHTML menu across the top, ive just been too busy to redo the layout. Quote:
It would need to be added to the same 3 files Chaslie mentioned (ie category.php, searchresults.php and toplistings.php) |
| All times are GMT -4. The time now is 10:55 PM. |
Powered by vBulletin® Version 3.6.3
Copyright ©2000 - 2007, Jelsoft Enterprises Ltd.