Support Forums

userbrowselistings.tpl

This is a discussion on userbrowselistings.tpl within the Templates, HTML, CSS, and Design Help forums, part of the General category; Hello, I have a small question about this template. I would like to add the thumbnail (photo) of the ad ...


Go Back   68 Classifieds Forums > General > Templates, HTML, CSS, and Design Help

Reply
 
Thread Tools Display Modes
Old 03-17-2011, 09:43 PM   #1
Customer
 
Join Date: Feb 2010
Location: Montreal, QC
Posts: 285
Rep Power: 12
EnergyFreak is on a distinguished road
Default userbrowselistings.tpl

Hello,

I have a small question about this template. I would like to add the thumbnail (photo) of the ad beside the others, just like the userfavorites.tpl. Because when a person browses his/her listing he/she should be able to see what picture is associated with that ad.

Now I have copied the code added in the userfavorites.tpl but no luck. It's like if the $entry.image is not picking up anything.

PHP Code:
<td class="{cycle values="row1,row2" advance=false}">{if $entry.image != ""}<img src="thumbs/small_{$entry.image}" />{else}<img src="images/nophotosmall.gif" border='0' />{/if}</td
Let me know what I might be doing wrong.

Thanks.
EnergyFreak is offline   Reply With Quote
Old 03-17-2011, 10:35 PM   #2
Developer & Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,311
Rep Power: 69
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

I don't actually see a question in your post.

I assume your question is why doesn't the copied code work?

You need to use the smarty debug to see what variables are assigned to the template and in this case, the image is NOT available to that template. This is why copying the code from a different template does not work.

You would have to modify the core php file(s) to get the images for each of the listings, assign it to the template and then in the template enter the smarty variables appropriately to display the listings.
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2,5.0)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and 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   Reply With Quote
Old 03-17-2011, 10:47 PM   #3
Customer
 
Join Date: Feb 2010
Location: Montreal, QC
Posts: 285
Rep Power: 12
EnergyFreak is on a distinguished road
Default

Yes that was my question. Although my Designer version does not permit me to modify the core files so I will have to wait until I get the Developer version. Too bad though, it would of been a great add on.

Thanks.
EnergyFreak is offline   Reply With Quote
Reply

Thread Tools
Display Modes



All times are GMT -4. The time now is 10:32 PM.


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