Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
dbd Truncate Quotes Details »
dbd Truncate Quotes
Mod Version: 0.25, by deadbydawn (Member) deadbydawn is offline
Developer Last Online: Nov 2010 I like it Show Printable Version Email this Page

vB Version: 4.0.3 Rating: (3 votes - 4.00 average) Installs: 18
Released: 27 May 2010 Last Update: 27 May 2010 Downloads: 45
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
  1. 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.
  2. Import product-dbd_truncate_quotes.xml into Product Manager. Set Allow Overwrite to Yes if upgrading.
  3. 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:

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

    3b) cdn: add this to the top of the edit you are about to make in the mandatory section below:

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.


    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:


    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

  4. Go to vbulletin options, scroll down to dbd Truncate Quotes, change the default settings if necessary
  5. Click Installed

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	dbd_truncated_quotes_screen.jpg
Views:	381
Size:	65.9 KB
ID:	117643   Click image for larger version

Name:	dbd_admincp.png
Views:	152
Size:	98.3 KB
ID:	117646  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 27 May 2010, 21:34
deadbydawn's Avatar
deadbydawn deadbydawn is offline
 
Join Date: May 2010
Reserved
Reply With Quote
  #3  
Old 27 May 2010, 23:50
deadbydawn's Avatar
deadbydawn deadbydawn is offline
 
Join Date: May 2010
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!
  • Go to AdminCP -> User Profile Fields -> Add New User Profile Field
  • Profile Field Type: Single-Selection Radio Buttons
  • Title: Enable Truncate Quotes
  • Description: Turn the Quotes Truncation system on/off
  • Options:

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

  • Set Default: Yes
  • Display Order: 8
  • Field Required: No
  • Field Editable by User: Yes
  • Private Field: Yes
  • Field Searchable on Members List: No
  • Show on Members List: No
  • Allow Users to input their own value for this option: No
  • Which page displays this option: Options: Thread Viewing
  • Save

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:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace with:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Find the close of the if at the bottom:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace it with:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Complete example using the self-hosted method:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And now your users have the option to decide for themselves
Reply With Quote
  #4  
Old 16 Jun 2010, 00:00
furst furst is offline
 
Join Date: Dec 2005
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 your edit:
im confused, am i adding this edit to the top or bottom/end? first you say to add the following to the end of your headinclude_bottom template then 3a) says add to the top

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?
Reply With Quote
  #5  
Old 02 Aug 2010, 09:01
OlijO's Avatar
OlijO OlijO is offline
 
Join Date: Jun 2005
Originally Posted by furst View Post
im confused, am i adding this edit to the top or bottom/end? first you say to add the following to the end of your headinclude_bottom template then 3a) says add to the top

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?
Agree, it's a little confused and seams to doesn't work for me
Reply With Quote
  #6  
Old 27 Oct 2010, 18:58
deadbydawn's Avatar
deadbydawn deadbydawn is offline
 
Join Date: May 2010
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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


And if you went with option b, CDN hosted, it would be:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I hope that helps!
Reply With Quote
  #7  
Old 17 Sep 2013, 16:54
Ig@r's Avatar
Ig@r Ig@r is offline
 
Join Date: Feb 2002
Real name: Igor
It's working with 4.2
*Installed*
Thanks

Last edited by Ig@r; 18 Sep 2013 at 14:15.
Reply With Quote
  #8  
Old 18 Sep 2013, 14:17
Ig@r's Avatar
Ig@r Ig@r is offline
 
Join Date: Feb 2002
Real name: Igor
My forum is not in the root directory so had to change path in the code

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #9  
Old 27 Aug 2015, 12:51
blue7's Avatar
blue7 blue7 is offline
 
Join Date: Aug 2007
It cause problem with this plugin (Image Resizer - Using nCode Script): https://www.vbulletin.org/forum/show...237650&page=10

Is there any way to solve it?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 08:13.

Layout Options | Width: Wide Color: