Thread: Major Additions - Classifieds
View Single Post
  #308  
Old 04-18-2009, 04:39 AM
columbusgeek's Avatar
columbusgeek columbusgeek is offline
 
Join Date: Sep 2007
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by smnet View Post
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>&nbsp;&raquo;
            &nbsp;<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]:&nbsp;
            <else />
              $vbphrase[classifieds_by]:&nbsp;
            </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>]&nbsp;
              [<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>&raquo;<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>&nbsp;&raquo;&nbsp;$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>&nbsp;&raquo;&nbsp;$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&amp;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&amp;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>&nbsp;&raquo;&nbsp;$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>&nbsp;&raquo;&nbsp;$vbphrase[classifieds_moderate]</b></div></if><b>&nbsp;&raquo;&nbsp;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.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01131 seconds
  • Memory Usage 1,840KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete