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
{* 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 *}
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!
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.
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?
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!
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?