v4.0.x Store Image And Name In Showlistings

Discussion in 'Modules / Plugins / Modifications' started by bowers01, Jun 30, 2009.

  1. bowers01 Genius At Work

    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
  2. pipelin Customer

    How I call the variable from viewlisting.tpl ?
  3. bowers01 Genius At Work

    {* 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 *}
  4. pipelin Customer

    Thanks Nick.
  5. vinnied New Member

    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!
  6. Lhotch curmudgeon

    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.
  7. vinnied New Member

    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?
  8. bowers01 Genius At Work

    Do you have the designer or developer copy?
    Nick
  9. Lhotch curmudgeon

    when someone exploits your site and wipes it out every other day you will likely change your mind.
  10. vinnied New Member

    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!
  11. bowers01 Genius At Work

    You should be able to just follow the instructions on the first post then.
    Nick
  12. seymourjames All Hands On Deck

    Well 4.0.1 is not supported is it. You should log into your 68C customer account to see what is available and you can always raise a support ticket asking for help. You do have a customer account don't you?

Share This Page