The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
dbd Truncate Quotes Details »» | |||||||||||||||||||||||||||||||
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
Installation instructions
Download Now
Screenshots
Show Your Support
|
Comments |
#2
|
||||
|
||||
Reserved
|
#3
|
||||
|
||||
For my own site, I have implemented a UserCP option to allow the user to opt-out of this modication. You never know how old the users computer might be, and while jQuery is very lightweight and shouldn't cause any problems, you just never know.
I apologize for not making this a part of the Product Install automated process, but so far I've gotten no answers to my query of how to do so. As soon as I find out, I'll gladly update the product!
Take note of the "name" of the new Field after you click save. Mine, for example, is "field12". Go to AdminCP->Styles & Templates->Style Manager->Edit your styles Templates Edit headinclude_bottom Find the line: Code:
<vb:if condition="$vboptions['dbd_tq_enabled'] == 1"> Code:
<vb:if condition="$vboptions['dbd_tq_enabled'] == 1"><vb:if condition="$bbuserinfo['field12'] == Enabled"> Code:
</vb:if> Code:
</vb:if></vb:if> Code:
<vb:if condition="$vboptions['dbd_tq_enabled'] == 1"> <vb:if condition="$bbuserinfo['field12'] == Enabled"> <script type="text/javascript" src="/clientscript/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="/clientscript/jquery.jtruncate.pack.js"></script> <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></vb:if> |
#4
|
|||
|
|||
Quote:
Which one is it? just a bit confused here. Also am i adding the other larger edit to the end of 3a) or bottom of the headinclude_bottom template? |
#5
|
||||
|
||||
Quote:
|
#6
|
||||
|
||||
My apologies for the confusion (and the delayed response). What I was trying to say there is that you will need to add either 3a or 3b to the top of the mandatory part of step 3 (which I will try to make clearer above).
So, if you were going to host it yourself, your edit to the END of the headinclude_bottom would be: 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> <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> And if you went with option b, CDN hosted, it would be: 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> <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> |
#7
|
||||
|
||||
It's working with 4.2
*Installed* Thanks |
#8
|
||||
|
||||
My forum is not in the root directory so had to change path in the code
Code:
<script type="text/javascript" src="/forum/clientscript/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="/forum/clientscript/jquery.jtruncate.pack.js"></script> |
#9
|
||||
|
||||
It cause problem with this plugin (Image Resizer - Using nCode Script): https://vborg.vbsupport.ru/showthrea...237650&page=10
Is there any way to solve it? |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|