I wonder if someone might help me with the code necessary for only displaying listings that have a description in the 'random listings' -- if it's something simple, that is. My php skills are poor.
I wonder if someone might help me with the code necessary for only displaying listings that have a description in the 'random listings' -- if it's something simple, that is. My php skills are poor.
Here is, edit blocks/block.random_listing.php line 32
Code:$query = "select * from idx_link where suspended = 0 and description like '%random listings%' order by rand() limit $params[max_item]";
Sorry, Dody, I should have specified my version: 1.21
This is all the Kosmos theme contains for block.random_listing.php:
<table width="433" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="23" align="center" style="background-image: url(<%$tpl_base%>/images/template_26.gif);" bgcolor="#ededed" class="head">
<b> <%$title%></b></td>
</tr>
<tr>
<td>
<%$link%>
<div align="right">
<a href="<%$site_url%>/rss.php?type=random"><img src="<%$tpl_base%>/images/rss.gif" align="middle" border="0" alt="" /></a>
<br />
</div>
</td>
</tr>
</table>
It seems you open wrong file. I mean this file: /blocks/block.random_listing.php
not the one in template file (.html)
Sorry. Placed in correct file. Unfortunately, no links show.
I didn't read your posting clearly. Here is to show random listing only for links with description
Code:$query = "select * from idx_link where suspended = 0 and description <> '' order by rand() limit $params[max_item]";
thanks!![]()