Support Forums

Store Image And Name In Showlistings

This is a discussion on Store Image And Name In Showlistings within the Modules / Plugins / Modifications forums, part of the Developer Forums category; Hi, I have had a few requests on how to add the seller store image to showlistings.tpl The following code ...


Go Back   68 Classifieds Forums > Developer Forums > Modules / Plugins / Modifications

Reply
 
Thread Tools Display Modes
Old 06-30-2009, 06:02 AM   #1
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,089
Rep Power: 35
bowers01 is on a distinguished road
Default Store Image And Name In Showlistings

Hi,
I have had a few requests on how to add the seller store image to showlistings.tpl
The following code came from 68c (Credit to Eric)
Open includes\classes\kernel\listings.php and find
Code:
$row['status']=$row['display'];
Just under that add the following code
Code:
				//get the store image
					$storeSQL = "SELECT sID,sUserID,sTitle,sDescription,sImage  FROM ".PREFIX."store WHERE sUserID = '".$row['owner']."'";
					$storeResult=$db->query($storeSQL);
					$rows=$storeResult->size();
						if($rows>0)
						{
							$rs = $storeResult->fetch();
							$row['storeImage'] = $rs['sImage'];
							$row['storeTitle'] = $rs['sTitle'];
						}
				// end store image
Then in the showlistings.tpl do the following:
Find
Code:
			<th scope="col">{$smarty.const.LANG_VIEW_LISTING}</th>
Below that add
Code:
			<th scope="col">Seller</th>
Then find
Code:
	     <td{if $entry.class<>""} class="{$entry.class}"{/if}>
	     	<a href="{$entry.link}" title="{$entry.title}">{$smarty.const.LANG_VIEW_LISTING}</a>	     	
	     </td>
And below it add:
Code:
<td {if $entry.class<>""} class="{$entry.class}storelogo"{else}class="storelogo"{/if}>
{if $entry.storeImage <> ""}
<a href="{$entry.link}"><img src="photos/{$entry.storeImage}" class="storeimage" alt="{$entry.storeTitle}" /></a>
{elseif $entry.storeTitle <> ""}
<a href="{$entry.link}" class="showlistings" style="text-decoration: none">{$entry.storeTitle|replace:'&':'&'}</a>
{else}
<a href="{$entry.link}" class="showlistings" style="text-decoration: none">Private Seller</a>
{/if}
</td>
I made that how i wanted it, you can change it to suit what you want.
This should work for 4.0x and 4.1x
Any problems please dont PM me reply to this post.
Cheers,
Nick
__________________
Nick Bowers
68c v4.1.10 Developer Custom Template
bowers01 is offline   Reply With Quote
Old 10-21-2009, 04:06 PM   #2
Customer
 
Join Date: Jun 2009
Posts: 127
Rep Power: 12
pipelin is on a distinguished road
Default

How I call the variable from viewlisting.tpl ?

Last edited by pipelin; 10-21-2009 at 04:30 PM.
pipelin is offline   Reply With Quote
Old 10-21-2009, 05:24 PM   #3
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,089
Rep Power: 35
bowers01 is on a distinguished road
Default

{* user store display *}
{if $storeImage<>""}
<div align="center">
<img src="photos/{$storeImage|escape:"url"}" alt="{$storeTitle}" />
</div>
<br />
{else}
<h3>{$storeTitle}</h3>
{/if}
<table width="80%" align="center">
<tr>
<td>{$storeDescription}</td>
</tr>
</table>
{* end user store display *}
__________________
Nick Bowers
68c v4.1.10 Developer Custom Template
bowers01 is offline   Reply With Quote
Old 10-21-2009, 06:50 PM   #4
Customer
 
Join Date: Jun 2009
Posts: 127
Rep Power: 12
pipelin is on a distinguished road
Default

Thanks Nick.
pipelin is offline   Reply With Quote
Old 03-01-2010, 04:26 PM   #5
Junior Member
 
Join Date: Jan 2010
Posts: 5
Rep Power: 0
vinnied is on a distinguished road
Default

What version of 68 Classifieds are you running?
V4.0.1 Developer

How can I insert the image in viewlisting.tpl and viewmember.tpl?

Thanks!
vinnied is offline   Reply With Quote
Old 03-01-2010, 05:27 PM   #6
curmudgeon
 
Join Date: Mar 2006
Posts: 5,413
Rep Power: 138
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

4.0.1 is 2 years old and has known vulnerabilities in it. Your wasting your time developing a site based on it. Also, if you are running the version I think you have, your core php files are encrypted so you cant make the changes recomended in this thread anyway.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 03-01-2010, 05:51 PM   #7
Junior Member
 
Join Date: Jan 2010
Posts: 5
Rep Power: 0
vinnied is on a distinguished road
Default

Thanks for the prompt reply! :-D
I've already done this, i mean, showlisting shows the logo.
I don't think I'm wasting my time and btw I don't have money to buy the new version right now.

Any idea?
vinnied is offline   Reply With Quote
Old 03-01-2010, 06:24 PM   #8
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,089
Rep Power: 35
bowers01 is on a distinguished road
Default

Quote:
Originally Posted by vinnied
Thanks for the prompt reply! :-D
I've already done this, i mean, showlisting shows the logo.
I don't think I'm wasting my time and btw I don't have money to buy the new version right now.

Any idea?
Do you have the designer or developer copy?
Nick
__________________
Nick Bowers
68c v4.1.10 Developer Custom Template
bowers01 is offline   Reply With Quote
Old 03-01-2010, 06:50 PM   #9
curmudgeon
 
Join Date: Mar 2006
Posts: 5,413
Rep Power: 138
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by vinnied
Thanks for the prompt reply! :-D
I've already done this, i mean, showlisting shows the logo.
I don't think I'm wasting my time and btw I don't have money to buy the new version right now.

Any idea?
when someone exploits your site and wipes it out every other day you will likely change your mind.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 03-02-2010, 04:14 AM   #10
Junior Member
 
Join Date: Jan 2010
Posts: 5
Rep Power: 0
vinnied is on a distinguished road
Default

Larry, right now I cannot affoard a newer version. That's it.


Nick, I've got 4.0.1 Developer, I've got the source to work on!
vinnied is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
New image next to title in showlistings if under a week old bowers01 Technical Support 1 10-12-2008 03:49 AM
Hide image when no image is uploaded? MiśUszatek Modules / Plugins / Modifications 1 09-11-2008 08:37 PM
Seller Store Image Red Technical Support 1 05-13-2008 01:43 PM
Showlistings Nickb Modules / Plugins / Modifications 7 03-08-2008 05:27 AM


All times are GMT -4. The time now is 04:31 PM.


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