12
OK, I believe this will do the trick. The following assumes you know how to work with templates. If you don't know how to work with templates, go to
http://www.macambridge.com/dummies/ and read up on it.
Create a cloned template set, set it as default, and set "Update module template..." to yes.
Click on List next to Small ads in the template manager
Click edit for catads_item.html
Copy and paste the following code into the edit box:
<!-- Pas d'annonce -->
<{if not $ad_exists and not $preview}>
<{$smarty.const._MD_CATADS_NO_ADS}>
<{else}>
<table cellspacing="1" class="outer" style="width:100%;">
<tr>
<th><b>
<{if $annonce.date_pub == 0}>
<{$smarty.const._MD_CATADS_ADSWAIT}>
<{elseif $annonce.date_exp == 0}>
<{$smarty.const._MD_CATADS_ADSEXP}>
<{else}>
<{$annonce.date_pub}>
<{/if}>
</b> </th>
<th>
<{$annonce.codpost}> <b><{$annonce.town}></b>
</th>
</tr>
<tr>
<td width="22%" class="head">
<{if $annonce.date_exp > 0 and $annonce.date_pub > 0}>
<{$smarty.const._MD_CATADS_DATE_EXP}><{$annonce.date_exp}>
<{/if}>
</td>
<td width="78%" class="head">
<{$annonce.type}><b>: </b><{$annonce.title}>
</td>
</tr>
<tr>
<td class="odd">
(<{$annonce.nbview}>)
</td>
<td class="odd">
<{if $annonce.price}>
<b><{$smarty.const._MD_CATADS_PRICE2}> <{$annonce.price}></b> <{$annonce.monnaie}>
<{if $annonce.price_option}>
(<{$annonce.price_option}>)
<{/if}>
<{/if}>
</td>
</tr>
<tr>
<td width="22%" class="odd">
<{if $annonce.suspend > 0}>
<br><{$smarty.const._MD_CATADS_PUB_SUSP}>
<{else}>
<b><{$smarty.const._MD_CATADS_CONTACT}></b><br><br>
<{$annonce.maillink}>
</br>
<{$annonce.pmlink}>
</br></br>
<b><{$smarty.const._MD_CATADS_PHONE}> </b><br>
<{$annonce.phone}>
<br> <b> </b> <br>
<{/if}>
<div align="center">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" />
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="<{$annonce.email}>" />
<input type="hidden" name="item_name" value="<{$annonce.title}>" />
<input type="hidden" name="amount" value="<{$annonce.price}>" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="currency_code" value="USD" />
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" />
</form>
</div>
</td>
<td class="odd"><div align="left">
<{$annonce.description}>
<br>
<br>
<{$annonce.photo}>
<br>
<br>
</div></td>
</tr>
<{if not $preview}>
<tr>
<td align="left" class="foot">
<a href="print.php?op=showone&ads_id=<{$annonce.id}>"><img src="images/print.gif" border=0 alt="<{$smarty.const._MD_CATADS_PRINT}>"></a>
<!-- Icone validation annonce en attente -->
<{if $xoops_isadmin and $annonce.date_pub == 0}>
<a href="admin/index.php?op=approve&ads_id=<{$annonce.id}>"><img src="images/valid.gif" border=0 alt="<{$smarty.const._MD_CATADS_VALIDADS}>"></a>
<{/if}>
<!-- Icones édition/effacement annonce -->
<{if $xoops_isadmin}>
<a href="admin/index.php?op=edit&ads_id=<{$annonce.id}>"><img src="images/modif.gif" border=0 alt="<{$smarty.const._MD_CATADS_EDITADS}>"></a>
<a href="admin/index.php?op=delete&ads_id=<{$annonce.id}>"><img src="images/delete.gif" border=0 alt="<{$smarty.const._MD_CATADS_DELETEADS}>"></a>
<a href="adsuserlist.php?uid=<{$annonce.uid}>"><img src="images/who.gif" border=0 alt="<{$smarty.const._MD_CATADS_ALLADS}><{$annonce.submitter}>"></a>
<img src="images/ip.gif" border=0 alt="<{$annonce.poster_ip}>"></a>
<{/if}>
</td>
<td align="right" class="foot"><div align="left">
<{if $annonce.isauthor}>
<{if $annonce.date_exp == 0 and $annonce.countpub > 0 and $annonce.date_pub > 0}>
<a href="adsitem.php?op=pubagain&ads_id=<{$annonce.id}>"><{$smarty.const._MD_CATADS_PUB_AGAIN}></a>
<{elseif $annonce.date_pub > 0 and $annonce.date_exp > 0}>
<{if $annonce.suspend > 0}>
<a href="adsitem.php?op=stopandgo&ads_id=<{$annonce.id}>"><{$smarty.const._MD_CATADS_PUB_GO}></a>
<{else}>
<a href="adsitem.php?op=stopandgo&ads_id=<{$annonce.id}>"><{$smarty.const._MD_CATADS_PUB_STOP}></a>
<{/if}>
<{/if}>
<{/if}>
</div></td>
</tr>
<{/if}>
<{/if}>
</table>
<br>
<!-- Liens accueil/catégorie -->
<{if not $preview}>
<div align="center"><b>[ <{$link_main}> | <{$link_cat}> ]</b></div>
<div style="text-align: center; padding: 3px;
margin:3px;">
<{$commentsnav}>
<{$lang_notice}>
</div>
<div style="margin:3px; padding: 3px;">
<!-- start comments loop -->
<{if $comment_mode == "flat"}>
<{include file="db:system_comments_flat.html"}>
<{elseif $comment_mode == "thread"}>
<{include file="db:system_comments_thread.html"}>
<{elseif $comment_mode == "nest"}>
<{include file="db:system_comments_nest.html"}>
<{/if}>
<{/if}>
Click submit
Test
Set "Update module template..." to No
Sorry to give such a rushed tutorial. The button works quite nicely, albeit with the few limitations I mentioned in my last post.
I hope this meets your needs.
Best Regards,
JMorris