68 Classifieds Forums
Go Back   68 Classifieds Forums > v3.1.x Help & Support > v3.1 Questions & Support > How to display extras on showlisting.tpl?
v3.1 Questions & Support Help and support for 68 Classifieds v3.1.x

 
Thread Tools Display Modes
(#1)
Old
wiredhat wiredhat is offline
Junior Member
wiredhat is on a distinguished road
 
Posts: 16
Join Date: Nov 2006
Default How to display extras on showlisting.tpl? - 11-20-2006, 03:49 PM

How do I do it? I see other threads explaining how to modify the extras display on viewlisting.tpl, but I can't figure out how to get the fields to show up on showlistings.tpl. Any help is much appreciated.
Reply With Quote
(#2)
Old
Acpjax Acpjax is offline
Junior Member
Acpjax is on a distinguished road
 
Posts: 28
Join Date: Oct 2006
Default 11-20-2006, 04:30 PM

http://www.68classifieds.com/forums/...0048#post10048

take a look at that and see if its what your looking for
Reply With Quote
(#3)
Old
wiredhat wiredhat is offline
Junior Member
wiredhat is on a distinguished road
 
Posts: 16
Join Date: Nov 2006
Default 11-20-2006, 06:05 PM

That looks like it is what I need. But I can't seem to get it to work. Any Help?
Reply With Quote
(#4)
Old
Lhotch Lhotch is online now
Moderator
Lhotch has a spectacular aura about
 
Posts: 1,472
Join Date: Mar 2006
Default 11-20-2006, 06:21 PM

What have you done so far?
Reply With Quote
(#5)
Old
wiredhat wiredhat is offline
Junior Member
wiredhat is on a distinguished road
 
Posts: 16
Join Date: Nov 2006
Default 11-20-2006, 06:30 PM

I tried Maffos workaround, by adding

Code:
//Get custom extra field $mafSQL = "SELECT sValue FROM ".PREFIX."products_fields WHERE pID=".$row['id']." AND fID=34 LIMIT 1"; $mafResult=$db->query($mafSQL); $mafrs=$mafResult->fetch(); $row['mafExtra']=$mafrs['sValue'];
to toplistings.php in the while loop.

Then I added

Code:
{if $entry.extra<>""} <td{if $entry.class<>""} class="{$entry.class}"{/if}>{$entry.extra}</td> {else} Extras are not working!!! {/if}
to showlistings.tpl


I get nothing!

I want to just display the two extra fields I have set up on all ad listing pages. Thanks a lot!
Reply With Quote
(#6)
Old
Acpjax Acpjax is offline
Junior Member
Acpjax is on a distinguished road
 
Posts: 28
Join Date: Oct 2006
Default 11-20-2006, 08:09 PM

Quote:
AND fID=34 LIMIT 1";
you need to change that part of it to represent the extra field id that you want to search/display. 34 is an FID off of maffos site i believe.
Reply With Quote
(#7)
Old
Chaslie Chaslie is offline
Moderator
Chaslie is on a distinguished road
 
Posts: 493
Join Date: Mar 2006
Location: Great Ocean Road - Australia
Default 11-21-2006, 05:46 PM

In showlistings.tpl.php, you would add only this:

Code:
{$entry.mafExtra}
.... and nothing else - that will then display the contents of the extra field.

Go back here (http://www.68classifieds.com/forums/...0048#post10048) and read the instructions again.

Note that code needs to be added to searchresults.php and category.php as well.


Chaslie
V3.1.4 dev
mods.auscity.com
AUSCITY
Reply With Quote
(#8)
Old
wiredhat wiredhat is offline
Junior Member
wiredhat is on a distinguished road
 
Posts: 16
Join Date: Nov 2006
Default 11-22-2006, 05:19 PM

Awesome! Thanks Chaslie! That's all I needed. I should have figured that out!
Reply With Quote


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding 'category' to 'new listings' display Chaslie v3.1 Modifications 4 10-28-2006 08:58 PM
modifying display of one category dawyatt v3.1 Modifications 4 08-27-2006 05:18 PM
Problem in ACP with messed up Listing Extras pat01 v3.1 Questions & Support 0 07-18-2006 01:32 PM
Display Total Number of Users suzkaw v3.0 Modifications 5 05-10-2006 11:22 AM
Display Total Number of Listings suzkaw v3.0 Modifications 2 03-30-2006 02:29 PM



Powered by vBulletin® Version 3.6.3
Copyright ©2000 - 2007, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com