deadbydawn
05-26-2010, 10:00 PM
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:
<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:
<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:
<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 :D
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:
<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:
<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:
<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 :D