Quote:
Originally Posted by smnet
I have tweaked the main 'item display' page because I felt the layout (especially the options) was badly arranged from a usability point of view.
Here is what I am using for the template classifieds_showad
It just makes all icons clickable and rearranges the template for much much better usability. I know you'll love it
Code:
<script type="text/javascript">
function deleteAd(adid)
{
if(confirm("$vbphrase[classifieds_confirm]"))
window.location= 'classifieds.php?do=deletead&adid=' + adid + '&return=ad';
}
</script>
<table cellpadding="2" cellspacing="2" width="100%" class="tborder">
<tr>
<td class="tcat" align="left" height="20">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="left" height="20">
<div class="smallfont"><b> »
<a href="classifieds.php?do=showad&adid=$ad[id]">$ad[title]</a></div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left" valign="top" class="alt1">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="25%" align="center">
<if condition="!empty($ad[photoname])">
<a href="classifieds/photos/$ad[photoname]" rel="thumbnail">
<img border="0" src="classifieds/photos/thumbs/$ad[photoname]" /></a>
</if>
<if condition="$ad[price]<>0">
<br /><big>$vbphrase[classifieds_price]: <b>$ad[price]</b> $ad[currency]</big>
</if>
</td>
<td width="75%" align="right">
<div class="smallfont">
<if condition="$ad[price]<>0">
$vbphrase[classifieds_seller]:
<else />
$vbphrase[classifieds_by]:
</if>
<a target="_blank" href="member.php?u=$ad[userid]"><b>$ad[username]</b></a><br />
<if condition="$print!=1">
[<a href="classifieds.php?do=viewreviews&userid=$ad[userid]&title=$username"><b>$vbphrase[classifieds_view_reviews]</b></a>]
[<a href="classifieds.php?do=userforsale&userid=$ad[userid]&title=$username"><b>$vbphrase[classifieds_other_ads]</b></a>]<br />
</if>
$vbphrase[classifieds_category]:
<if condition="!empty($ad[subcatname])">
<b>$ad[catname]</b>»<b>$ad[subcatname]</b>
<else />
<b>$ad[catname]</b>
</if>
<br />
$vbphrase[classifieds_viewed]: <b>$ad[viewcount]</b> $vbphrase[classifieds_times]
<if condition="$canmod || $ad[userid] == $userid">
<br /><br /><a href="classifieds.php?do=editad&adid=$adid&return=ad"><img border="0" src="classifieds/images/edit.gif" width="15" height="15" style="padding-right:3px;" /></a>
<a href="classifieds.php?do=editad&adid=$adid&return=ad"><b>$vbphrase[classifieds_edit]</b></a> | <a href="javascript:deleteAd($ad[id])"><img border="0" src="classifieds/images/delete.gif" width="15" height="15" style="padding-right:3px;" /></a>
<a href="javascript:deleteAd($ad[id])"><b>$vbphrase[classifieds_delete]</b></a><br /><br /></if>
</div>
</td>
</tr>
</table>
</td>
</tr>
<if condition="!empty($ad[description])">
<tr>
<td height="20" class="alt2" align="left">
<div class="smallfont"><b> » $vbphrase[classifieds_general_info]</div>
</td>
</tr>
<tr>
<td width="100%" align="left" valign="top" class="alt1"><div style="float:right; margin-left:10px; margin-bottom:5px;"><a target="_blank" href="classifieds.php?do=print&adid=$ad[id]&title=$title"><img border="0" src="classifieds/images/print.gif" width="15" height="15" style="padding-right:3px;" /></a> <a target="_blank" href="classifieds.php?do=print&adid=$ad[id]&title=$title"><b>$vbphrase[classifieds_print]</b></a></div>$ad[description]
<if condition="$ad[price]<>0">
<br /><br /><big>$vbphrase[classifieds_price]: <b>$ad[price]</b> $ad[currency]</big>
</if>
</td>
</tr>
</if>
<if condition="!empty($extrafields)">
<tr>
<td width="100%" height="20" class="alt2" align="left">
<div class="smallfont"><b> » $vbphrase[classifieds_extra_fields]</div>
</td>
</tr>
$extrafields
</if>
<if condition="$ad[userid] != $userid"><tr><td class="alt1"><br /><br />
<a href="classifieds.php?do=buy&adid=$ad[id]&title=$title"><img border="0" src="classifieds/images/buy.gif" width="15" height="15" style="padding-right:3px;" /></a>
<a href="classifieds.php?do=buy&adid=$ad[id]&title=$title"><b>$vbphrase[classifieds_buy]</b></a> | <a target="_blank" href="private.php?$session[sessionurl]do=newpm&u=$ad[userid]" rel="nofollow"><img border="0" src="classifieds/images/contact.gif" width="15" height="15" style="padding-right:3px;" /></a>
<a target="_blank" href="private.php?$session[sessionurl]do=newpm&u=$ad[userid]" rel="nofollow"><b>$vbphrase[classifieds_contact]</b></a><br /><br /><br /></td></tr></if>
<if condition="!empty($pictures)">
<tr>
<td width="100%" height="20" class="alt2" align="left">
<div class="smallfont"><b> » $vbphrase[classifieds_gallery]</div>
</td>
</tr>
<tr>
<td width="100%" valign="top" class="alt1">
$pictures
</td>
</tr>
</if>
<tr>
<td height="20" class="alt2" align="left">
<div class="smallfont"><if condition="$canmod"><div class="smallfont" style="float:right;"><b> » $vbphrase[classifieds_moderate]</b></div></if><b> » Options:</b></div>
</td>
</tr>
<tr>
<td width="100%" align="left" valign="top" class="alt1">
<if condition="$canmod"><div style="float:right;">
<if condition="$ad[editor]<>1">
<a href="classifieds.php?do=seteditchoice&adid=$ad[id]&title=$title"><img border="0" src="classifieds/images/editor.gif" width="15" height="15" style="padding-right:3px;" /></a>
<else />
<a href="classifieds.php?do=removeeditchoice&adid=$ad[id]&title=$title"><img border="0" src="classifieds/images/editor.gif" width="15" height="15" style="padding-right:3px;" /></a>
</if>
<if condition="$ad[editor]<>1">
<a href="classifieds.php?do=seteditchoice&adid=$ad[id]&title=$title"><b>$vbphrase[classifieds_set_editor]</b></a><br />
<else />
<a href="classifieds.php?do=removeeditchoice&adid=$ad[id]&title=$title"><b>$vbphrase[classifieds_remove_editor]</b></a><br />
</if>
<if condition="$ad[featured]<>1">
<a href="classifieds.php?do=setfeatured&adid=$ad[id]&title=$title"><img border="0" src="classifieds/images/featured.gif" width="15" height="16" style="padding-right:3px;" /></a>
<else />
<a href="classifieds.php?do=removefeatured&adid=$ad[id]&title=$title"><img border="0" src="classifieds/images/featured.gif" width="15" height="16" style="padding-right:3px;" /></a>
</if>
<if condition="$ad[featured]<>1">
<a href="classifieds.php?do=setfeatured&adid=$ad[id]&title=$title"><b>$vbphrase[classifieds_set_featured]</b></a><br />
<else />
<a href="classifieds.php?do=removefeatured&adid=$ad[id]&title=$title"><b>$vbphrase[classifieds_remove_featured]</b></a><br />
</if>
<if condition="$ad[bold]<>1">
<a href="classifieds.php?do=setbold&adid=$ad[id]&title=$title"><img border="0" src="classifieds/images/bold.gif" width="15" height="16" style="padding-right:3px;" /></a>
<else />
<a href="classifieds.php?do=removebold&adid=$ad[id]&title=$title"><img border="0" src="classifieds/images/bold.gif" width="15" height="16" style="padding-right:3px;" /></a>
</if>
<if condition="$ad[bold]<>1">
<a href="classifieds.php?do=setbold&adid=$ad[id]&title=$title"><b>$vbphrase[classifieds_set_bold]</b></a><br />
<else />
<a href="classifieds.php?do=removebold&adid=$ad[id]&title=$title"><b>$vbphrase[classifieds_remove_bold]</b></a><br />
</if>
</div> </if>
<if condition="$ad[userid] != $userid">
<if condition="!$bookmarked">
<a href="classifieds.php?do=savebookmark&adid=$ad[id]"><img border="0" src="classifieds/images/bookmark.gif" width="15" height="15" style="padding-right:3px;" /></a>
<a href="classifieds.php?do=savebookmark&adid=$ad[id]"><b>$vbphrase[classifieds_bookmark]</b></a><br />
</if>
</if>
<a href="classifieds.php?do=email&adid=$ad[id]&title=$title"><img border="0" src="classifieds/images/friend.gif" width="15" height="15" style="padding-right:3px;" /></a>
<a href="classifieds.php?do=email&adid=$ad[id]&title=$title"><b>$vbphrase[classifieds_friend]</b></a><br />
<if condition="$ad[userid] != $userid">
<a href="classifieds.php?do=report&adid=$ad[id]&title=$title"><img border="0" src="classifieds/images/report.gif" width="15" height="15" style="padding-right:3px;" /></a>
<a href="classifieds.php?do=report&adid=$ad[id]&title=$title"><b>$vbphrase[classifieds_report]</b></a><br />
</if>
</td>
</tr>
</table>
|
Thanks. While I can't say I'm a fan of the tables, I certainly can appreciate the better usability. Good work to everybody who works on this mod.