Paged comments

7th Feb 2006 ¥åßßå
Introduction

Taming Long Comment Lists

Does your blog receive lots of comments? If so, you're probably tired of scrolling down the screen each time you want see the newest comments. ( We know we are. :p ) Tame your long list of comments by paging them.

This skin modification will help you get control over lots of comments by putting them into pages. You can control the following:

  • Number of comments per page.
  • Sort order (New-to-old or old-to-new).
  • Styling and/or number of page controls.

The way it works is simple. Your comments appear, as normal, until they exceed your "number of comments per page". When they go over, a comment page is added, with page controls (i.e., newer comments | older comments ). The controls appear where you place them and we've added hooks so that you can style them to your liking in your CSS file. The code includes an internal bookmark, so when you scroll through pages of comments, each new page starts at the "top of comments" (rather than "top of entry"), which makes reading multiple pages of comments easier. We have also included an optional, easy core hack to keep view counts from incrementing for comment pages, should this be something you need.

To implement paged comments for your blog, follow the detailed instructions & use the cut'n-paste code on the next page. After you're finished installing, you'll likely want to style the page controls, which is covered on page 3 (CSS Styling), including some suggested CSS declarations. The last page (FAQs and Enhancements) discusses any questions we've received about paged comments and additional ways to make paged comments nicer.

**********************************************************************************************************
Contents
  1. Introduction
  2. Installation instructions
  3. CSS Styling of Page Controls
  4. FAQs & Enhancements
 
 
 
 

5 comments

Comment from: dub27
Hi, using b2evolution 1.9.2

all going well until adapting the hit counter. For some reason, b2evolution does not like the [bg= code

error message:
Parse error: parse error, unexpected '[' in C:\Documents and Settings\HP_Administrator\My Documents\websites\b2evolution\blogs\inc\MODEL\items\_item.class.php on line 1134

should the [bg be in quotes? or is the code deprecated?

Thanks,

D
 
27/02/07 @ 15:15
Comment from: dub27
fyi 1.9.2

database plus_comments table has become "comments"

So instructions above for select from "from evo_plus_comments where"

need to be adapted to new table
 
27/02/07 @ 15:39
Comment from: dub27
Hi again,

I couldn't get this up and running, unfortunately with 1.9.2. Perhaps the mechanics have changed in relation to finding comments counts, or such. If you have an update for 1.9.2 will you let me know?

Thanks for your plugins/hacks!

D
 
27/02/07 @ 16:12
Hi Dub27,

The [bg= stuff is actually meant to be a background colour, but the bbcode renderer appears to have forgotten how to handle it :S

The table name is another error, it was the prefix of the tables in my db at the time, it really should read T_comments ( I've amended the name in the post, thanks for catching that ).

I've not actually tried this hack in my 1.9.2 install, when I get a free moment I'll give it a whirl and see if I can make it work.

¥
 
27/02/07 @ 16:28
Comment from: dub27
Hi,

I gave it another try, but not sure what the glitch is -- There are no error messages but there is no control mechanism in the comments panel and comments are not responding to the restriction ie 4 comments.

Any ideas?

Another idea you that might appeal to you in relation to this hack is this link --
http://forums.b2evolution.net/viewtopic.php?t=7188&highlight=checkbox+post

it creates checkboxes for deleting multiple posts (I couldn't get it to work however, but really like the concept)

D
 
27/02/07 @ 23:51

Comments are closed for this post.

 

B.O.P.I.T