Collapsible Comments is my plugin for WordPress. It was created for my personall needs and because i couldn’t find any other plugin to show a few words of each comment and open the full comment text by choice. Fell free to try it, share your opinion with me and make any suggestions!

  • Info

Collapsible Comments version 3.8
Updated @ 21/07/2008
Download Collapsible Comments
(from the Wordpress Repository)

  • Description

Collapsible Comments shows an excerpt of each comment on your blog (the first characters of each comment) and you can expand any comment inline by demand. That means you don’t have to scroll too deep to read the last comment and you can read only the comment you want without destructing your attention (or getting bored). It was developed for my needs because i get really long comments and the readers found annoying scrolling down to read the last unread comments (so as I).

  • Usage

After the succesfull installation you will see the first 130 characters of each comment and a link [+] which you can click it to open the box with the comment text. After reading it you could leave it opened and go to another one or close it by clicking the [-] link. There are also two additional links [Open ↓] and [Close ↑] which they also do the same job. Texts can be changed in collapsible-comments.php file. The separate CSS file has been removed to avoid multiple http requests but you can easily give your own style at the comment box by opening collapsible-comments.php file. There you can define the number of characters from which a comment should be in an “opened” or “closed” state by changing the value of $ccTEXT_lenght variable. Comments with less characters will start opened. There’s another variable named $CCstyle and is used to apply a style on comments and comment box. After that you are ready!

You can also leave a test comment in this page if you want to see it in action but make it long, more than 200 characters!

  • Credits

Collapsible Comments is based on the Javascript i found on Arvind Satyanarayan example which toggles the visibility of multiple elements on a page, see the code in his website.

62 Comments in 4 pages

Go to Comment Form »
  •  maierma said:

    05-09-2008 @ 01:21 [ID:9372]

    [-]

    Hi,

    I’m using the theme “Blixed” which has a different comment.php. There is no comment_text present in the file and I guess, something else is calling the function here. I have no idea where to put the cmmentslement here …

  •  ..::DeUCeD::.. said:

    05-09-2008 @ 07:39 [ID:9373]

    [-]

    If you are talking about that blixed theme there is a <?php comment_text() ?>, if not provide me the URL of the theme to take a look.

  •  maierma said:

    05-09-2008 @ 09:08 [ID:9374]

    [-]

    Thnaks for the quick reply!

    I use Blixed, (based on the original Blix theme, your lin refers to):
    http://themecorp.com/themes/blixed/

  •  ..::DeUCeD::.. said:

    05-09-2008 @ 09:26 [ID:9375]

    [+]

    I 've Just downloaded it. There's a file comments.php, go to line 42, find <?php comment_text() ?> and replace with <?php collapsiblecomments() ?> and if something goes wrong replace with the original line. After you have activated the plugin it should work. Let me know how it goes.... ...

  •  maierma said:

    05-09-2008 @ 09:39 [ID:9376]

    [+]

    OK, this is really made me look stupid ... thanks so much! But to be honest, I had to upload the comment.php again to find the comment_text. The one I had on my site must have been modified by a plugin I once used (sexycomments), I believe. I swear it line 42 was different from the original ... ... ...

  •  ..::DeUCeD::.. said:

    05-09-2008 @ 15:02 [ID:9377]

    [-]

    Hey, don’t worry, we all use many plugins and make lots of mods so it just happens from time to time to miss a few things but no big deal, have a nice day ;)

  •  Rich said:

    13-09-2008 @ 22:37 [ID:9393]

    [+]

    Hey there. I love what you're doing and have implemented this onto my blog. I just have one question.. For some reason the start of the comments box starts a little too far to the right causing it to overlap the sidebar slightly on the right hand side. Do you know how I can either move the comments... ...

  •  ..::DeUCeD::.. said:

    15-09-2008 @ 08:16 [ID:9394]

    [-]

    Open collapsible-comments.php with a text editor like notepad (but NOT WORD), then find $CCstyle and put a margin-right about 10px. I guess this is caused by a div of your theme but it’s only CSS and can be fixed. You only need to play a bit with the CSS values.

  •  Rich said:

    16-09-2008 @ 20:37 [ID:9402]

    [-]

    Regarding comment 47, 48 – Thanks so much for the info.. That worked.

  •  Bookmarks for 2008-9-18 « ゆめのあとさき said:

    18-09-2008 @ 10:43 [ID:9404]

    [-]

    [...] ..::DeUCeD::.. – [...]

  •  rory said:

    10-02-2009 @ 18:26 [ID:10316]

    [-]

    Really useful plugin!
    Question
    The collapsed text does not show character formatting.
    Is there something we need to do?
    Thanks!

  •  ..::DeUCeD::.. said:

    11-02-2009 @ 12:15 [ID:10321]

    [-]

    Hi Rory, open collapsible-comments.php file and edit $CCstyle as the example there shows. All you need is a decent text editor like notepad.

  •  Mike said:

    24-03-2009 @ 07:13 [ID:10428]

    [-]

    Is this plug WP2.7 compatible? I just tried it, and click open sent me back to the top of the page.

  •  ..::DeUCeD::.. said:

    24-03-2009 @ 07:39 [ID:10429]

    [+]

    Hi Mike, I'm running the latest WP 2.7.1 here and, as you see, there's no problem. So best shot is that you got a theme for WP 2.7.1 where comment_text(); has been replaced by wp_list_comments(); and the solution is not as simple as you think. If your theme has n't tweak it then check this link in m... ...

  •  Chris said:

    04-04-2009 @ 22:25 [ID:10465]

    [+]

    Hi there; First of all, I just want to say how much I enjoy your Collapsible comments and Collapsible elements. I use both of them on my site, and they work perfectly. I just have a question for you, is it possible add a collapsible comment in a collapsible element? For example, on my site, I hav... ...

  •  ..::DeUCeD::.. said:

    06-04-2009 @ 08:53 [ID:10466]

    [+]

    Hi chris Easy answer is NO. What i mean is that WordPress gets comments in every post so how can you divide comments based on a part of a post, that wouldn't make any sense. So my plugin follows WordPress, if we suppose that you could have different areas in a post and each one having its own com... ...

  •  Chris said:

    06-04-2009 @ 22:45 [ID:10467]

    [-]

    Thanx Deuced;

    that’s seems a tad too complicated, so, I’ll just leave it the way it is. And people can just comment regularly.
    Thanx for the great plugins!!!

  •  magicdrop said:

    12-06-2009 @ 15:04 [ID:10729]

    [-]

    It worked on WP2.8! Thank you so much.

    I added the code DeUCe wrote in the forum in function.php, and replaced the line of comments.php as below.

    before:
    <?php wp_list_comments(); ?>

    after:
    <?php wp_list_comments(‘type=all&callback=comment_format’); ?>

  •  paul said:

    11-11-2009 @ 02:10 [ID:11007]

    [-]

    Hi there!
    I love the collapsable idea since I am working on a system dat has lots of text. However, using 2.8.5 with Fusion as theme I am afraid that that wont work… Am I right?
    Nevertheless I wish you could make it it compatible though ;-)

  •  ..::DeUCeD::.. said:

    25-11-2009 @ 13:09 [ID:11012]

    [-]

    I havent use Fusion theme and i m sorry but right now i have no time to deal with collapsible comments update. If i can find the time to update it i ll make sure to check its compatibility with most of available themes. Sorry for that.

Post a Comment

Are you a SPAMMER?   YES     NO   (required)