Thread: Major Additions - QuoteIt! - Quote Database
View Single Post
  #349  
Old 04-27-2007, 04:39 AM
iBaker's Avatar
iBaker iBaker is offline
 
Join Date: Oct 2006
Location: Melbourne, Australia
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Cap for a great mod.

I have installed it and made a few changes to the display which I hope is ok but I am not a coder as such but the attached screen shot is what I was trying to achieve and it works in both IE and Firefox.

The Quote_ListBit has been changed to:
Code:
 
<tr><td class="quoterow {$quoteclass}" align="left" id="quote{$quote['quoteid']}-{$globalcounter}">
<table>
<tr>
<td width="15%" align="Top">
 <if condition="$_REQUEST['do'] != 'preview' AND !$sidebar">
  Quote #:<a href="quotes.php?{$vbulletin->session->vars['sessionurl']}do=view&amp;quoteid={$quote['quoteid']}">{$quotedisplayid}</a><br>
  {$vbphrase['added_by']}: <a href="member.php?{$vbulletin->session->vars['sessionurl']}userid={$quote['userid']}">{$quote['username']}</a><div class="date">{$quote['date']}</div>
  <if condition="$quoteitoptions['reportquotes'] AND $quoteitpermissions['canreportquotes']">
   <a id="report{$quote['quoteid']}-{$globalcounter}" rel="nofollow" href="quotes.php?{$vbulletin->session->vars['sessionurl']}{$quotedisplay['querystring']}{$quotedisplay['orderstring']}&amp;page={$quotedisplay['page']}&amp;do=report&amp;quoteid={$quote['quoteid']}" onclick="reportQuote(event, {$quote['quoteid']});return false;"><img class="inlineimg" src="{$stylevar['imgdir_button']}/report.gif" alt="{$vbphrase['report_this_quote']}" /></a>
  <br>
  </if>
  </div>
 <else />
  <if condition="$sidebar">
   Quote #:<a href="quotes.php?{$vbulletin->session->vars['sessionurl']}do=view&amp;quoteid={$quote['quoteid']}">#{$quotedisplayid}</a>
  </if>
 </if>
</td>
<td>
<img src="{$stylevar['imgdir_misc']}/quotation-open.png" alt="“" width="60px" height="51px">&nbsp;
</td>
<td width="60%" align="center">
<span class="smallfont" id="quotetext{$quote['quoteid']}-{$globalcounter}">{$quote['quote']}
<div>
 <b><if condition="!empty($quote['author'])">
  <div class="author" id="author{$quote['quoteid']}-{$globalcounter}">- {$quote['author']}</div>
 </if>
 <if condition="$quoteitoptions['enablecontext'] AND !empty($quote['context'])">
  <span class="context" id="context{$quote['quoteid']}-{$globalcounter}">({$quote['context']})</span>
 </if></b>
</div></span>
</td>
<td>
<img src="{$stylevar['imgdir_misc']}/quotation-close.png" alt="“" width="60px" height="51px">&nbsp;
</td>
<td width="15%" align="right" valign="top">
  <if condition="($quote['userid'] == $vbulletin->userinfo['userid'] AND $quoteitpermissions['caneditownquotes']) OR ($quote['userid'] != $vbulletin->userinfo['userid'] AND $quoteitpermissions['caneditotherquotes'])">
   <a rel="nofollow" href="quotes.php?{$vbulletin->session->vars['sessionurl']}{$quotedisplay['querystring']}{$quotedisplay['orderstring']}&amp;page={$quotedisplay['page']}&amp;do=editquote&amp;quoteid={$quote['quoteid']}" onclick="editQuote(event, {$quote['quoteid']}, {$globalcounter});return false;"><img class="inlineimg" src="{$stylevar['imgdir_button']}/edit.gif" alt="{$vbphrase['edit_this_quote']}" /></a>
  <br>
  </if>
  <if condition="($quote['userid'] == $vbulletin->userinfo['userid'] AND $quoteitpermissions['candeleteownquotes']) OR ($quote['userid'] != $vbulletin->userinfo['userid'] AND $quoteitpermissions['candeleteotherquotes'])">
   <a rel="nofollow" href="quotes.php?{$vbulletin->session->vars['sessionurl']}{$quotedisplay['querystring']}{$quotedisplay['orderstring']}&amp;page={$quotedisplay['page']}&amp;do=delquote&amp;quoteid={$quote['quoteid']}" onclick="deleteQuote(event, {$quote['quoteid']});return false;">{$vbphrase['delete_this_quote']}</a> 
  <br>
  </if>
  <if condition="$quoteitpermissions['canmoderatequotes'] AND THIS_SCRIPT == 'quotes'">
   <input class="inlineimg" type="checkbox" name="modquotes[{$quote['quoteid']}]" id="modquotes{$quote['quoteid']}" value="y" onclick="selectQuote({$quote['quoteid']});"{$checked[$quote['quoteid']]} />
  </if>
</td>
</tr>
<tr>
<td colspan="5" align="center">
<if condition="$_REQUEST['do'] != 'preview' AND !$sidebar">
 <if condition="$quoteitoptions['ratings']">
  <span id="rating{$quote['quoteid']}-{$globalcounter}">{$ratethis}</span>&nbsp;&nbsp;
  <span id="stats{$quote['quoteid']}-{$globalcounter}">{$vbphrase['total_rating']}: {$quote['rating']} - {$vbphrase['votes']}: {$quote['votes']} - {$vbphrase['average']}: {$quote['average']}</span>
 </if>
 <span class="inlineimg unapproved" id="unapproved{$quote['quoteid']}-{$globalcounter}">
 <img src="{$stylevar['imgdir_misc']}/moderated.gif" alt="{$vbphrase['unapproved_quote']}" <if condition="$quote['approved']">class="approved" </if>/>
 </span>
</div>
</if>
</td>
</tr>
</table>
</td>
</tr>
The quote_randomquote has been changed to:
Code:
 
<if condition="!defined('QUOTE_FORM_ADDED') AND ($quoteitpermissions['caneditownquotes'] OR $quoteitpermissions['caneditotherquotes'] OR $quoteitpermissions['candeleteotherquotes'] OR $quoteitpermissions['candeleteownquotes'])">
<form action="quotes.php" method="post" id="sneakyform">
 <input type="hidden" name="s" value="{$vbulletin->session->vars['sessionhash']}" />
 <input type="hidden" name="do" value="edit" />
 <input type="hidden" name="quoteid" id="hiddenquoteid" />
 <input type="hidden" name="quote" id="hiddenquote" />
 <input type="hidden" name="author" id="hiddenauthor" />
 <input type="hidden" name="context" id="hiddencontext" />
 <input type="hidden" name="category[]" id="hiddencategory" />
 <input type="hidden" name="all" id="hiddenall" value="{$sneaky['all']}" />
 <input type="hidden" name="searchtext" id="hiddensearchtext" value="{$sneaky['searchtext']}" />
 <input type="hidden" name="searchauthor" id="hiddensearchauthor" value="{$sneaky['searchauthor']}" />
 <input type="hidden" name="searchcontext" id="hiddensearchcontext" value="{$sneaky['searchcontext']}" />
 <input type="hidden" name="sortby" id="hiddensortby" value="{$sneaky['sortby']}" />
 <input type="hidden" name="order" id="hiddenorder" value="{$sneaky['order']}" />
</form>
</if>
<table id="forumhome_randomquote{$quotecount}" class="randomtable tborder" cellpadding="0" cellspacing="0" width="{$stylevar['tablewidth']}" align="center">
<thead>
 <tr><td class="tcat">
  <div class="quoteheading">
   <if condition="$sidebar">{$vbphrase['quote']}
   <else />
   <a href="quotes.php?{$vbulletin->session->vars['sessionurl']}do=list"><if condition="$sidebar">{$vbphrase['all']}<else />{$vbphrase['random_quote']}</if></a>
   </if>
  </div>
  <div class="collapsebutton">
   <a href="#top" onclick="return toggleMultiCollapse('forumhome_randomquote');"><img id="collapseimg_forumhome_randomquote{$quotecount}" src="{$stylevar['imgdir_button']}/collapse_tcat{$vbcollapse['collapseimg_forumhome_randomquote']}.gif" alt="{$vbphrase['collapse_this']}" class="inlineimg" /></a>
  </div>
 </td></tr>
 
 <tr><td class="thead">
  Random Quote
 </td></tr>
 
</thead>
<tbody id="collapseobj_forumhome_randomquote{$quotecount}" style="{$vbcollapse['collapseobj_forumhome_randomquote']}">
{$quotelistbit}
</tbody>
</table>
<!--
Powered by QuoteIt! {$quoteitoptions['version']} 
{$quoteitdebug}
-->
The only thing now is how to hide the Moderation drop down box to show only for moderators - any suggestions?
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01338 seconds
  • Memory Usage 1,808KB
  • 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
  • (2)bbcode_code
  • (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