dbd Truncate Quotes
Mod Version: 0.25, by deadbydawn
vB Version: 4.0.3 |
Rating: (3 votes - 4.00 average) |
Installs: 18 |
Released: 28 May 2010 |
Last Update: 28 May 2010 |
Downloads: 47 |
Not Supported
Uses Plugins
Template Edits
Additional Files
Re-usable Code
|
About this product
Many times it is convenient to quote someone's reply so that they know the comment is directed at them, however this can become tedious if someone happens to be longwinded. Other times, the replying user simply doesn't understand the difference and quotes someone unnecessarily. Regardless, it leads to a lot of wasted screen space for everyone else to skip over.
That's where this product comes in. Using jQuery, it will automatically truncate quotes to a defined length and replace the remaining text with a "Read More" link. This is all done clientside, so no actual changes are being made to the html (and so it shouldn't affect anything with SEO). When the viewer clicks the read-more link, the div automatically expands showing the rest of the quoted text.
Product Installation breakdown- Files to Edit: 0
- Templates to Edit: 1
- Files to Upload: 2 (optional)
- Time to Install: 1 minute
Installation instructions- Decide if you want to host the jquery scripts yourself, or if you would rather use google's CDN. I recommend the self hosted option, but it's your choice.
1a) self hosted: upload the contents of the upload_via_ftp/ folder to your vb_root/clientscript/ directory
jquery-1.4.2.min.js -> /clientscript/
jquery.jtruncate.pack.js -> /clientscript/
1b) cdn: nothing.
- Import product-dbd_truncate_quotes.xml into Product Manager. Set Allow Overwrite to Yes if upgrading.
- Go to template editor and add the following to the end of your headinclude_bottom template depending upon your decision from step 1.
3a) self hosted: add this to the top of the edit you are about to make in the mandatory section below:
Code:
<vb:if condition="$vboptions['dbd_tq_enabled'] == 1">
<script type="text/javascript" src="/clientscript/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="/clientscript/jquery.jtruncate.pack.js"></script>
3b) cdn: add this to the top of the edit you are about to make in the mandatory section below:
Code:
<vb:if condition="$vboptions['dbd_tq_enabled'] == 1">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://jtruncate.googlecode.com/svn/trunk/jquery.jtruncate.js"></script>
MANDATORY STEP: Now that you have made a choice between 3a or 3b, paste that code into the template followed by this right below it:
Code:
<script type="text/javascript">
jq=jQuery.noConflict();
jq(document).ready(function(){
jq('.message').jTruncate({
length: {vb:raw vboptions.dbd_tq_length},
minTrail: {vb:raw vboptions.dbd_tq_minTrail},
moreText: "{vb:raw vboptions.dbd_tq_moreText}",
lessText: "{vb:raw vboptions.dbd_tq_lessText}",
ellipsisText: "{vb:raw vboptions.dbd_tq_ellipsisText}",
moreAni: '{vb:raw vboptions.dbd_tq_moreAni}',
lessAni: '{vb:raw vboptions.dbd_tq_lessAni}'
});
});
</script>
</vb:if>
- Go to vbulletin options, scroll down to dbd Truncate Quotes, change the default settings if necessary
- Click Installed
Download
dbd_truncate_quotes_025.zip (27.7 KB, 55 downloads)
Screenshots
|