Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-02-16 17:51:02

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

rah_comments // Pagination for comments

Allows you to paginate comments. In other words, it outputs pagination and page numbers below comments. You can style pagination with various attributes and ofcourse with a CSS-styling magic. The tag is replacement for <txp:comments />-tag. Works only with Textpattern 4.0.6 and above.

Download and info

Last edited by Gocom (2010-09-07 10:10:52)

Offline

#2 2008-02-16 21:03:51

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: rah_comments // Pagination for comments

Is there a way for 2nd page of comments to go from 11 to 20 and 3rd page to go from 21 to 30 etc? You can see my problem here


BB6 Band My band
Gud One My blog

Offline

#3 2008-02-16 21:49:00

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: rah_comments // Pagination for comments

I don’t see any problem, or do you mean that number? Well, I don’t have nothing to do with how textpattern core tags work, so it’s possible bug, as it also shows up when using offset in <txp:comments /> tag I believe :)

Offline

#4 2008-02-16 21:56:09

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: rah_comments // Pagination for comments

Page 1 numbers comments 1 to 10, page 2 numbers comments 1 to 10, page 3 numbers comments 1 to 10


BB6 Band My band
Gud One My blog

Offline

#5 2008-02-16 23:52:39

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: rah_comments // Pagination for comments

Nope. Comments are real and changing – only the comment number tag isn’t changing. It’s bug in that tag.

Page 1 – comment #1: by rick
Page 2 – comment #1: by peter
Page 3 – comment #1: by peter (you again ;))

So Peter what are you after? My plugin works.

If you are after that comment number, that isn’t core feature nor made by me. It’s output by <txp:sed_comment_number /> that doesn’t support offset or limit on comment tag (in other words the plugin isn’t updated). So, probably it would be best if you inform plugin’s author to update sed_comment_number to work with Textpattern 4.0.6. ;)

rah_comments uses offset as workaround so it just uses it and calculates pages. sed_comment_number does same even when regular offset is used.

Should I update sed_comment_pack? :P Nah… and that number thing is feature if you ask me – bug is when tried thing fails, feature is when it does what should. And when sed_comment_number only counts arrays, well – it’s feature ;)

Last edited by Gocom (2008-02-16 23:58:57)

Offline

#6 2008-02-17 01:22:06

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: rah_comments // Pagination for comments

Peter,

I fixed your comment numbers ;) Now they work like wonder :) as you can see:

http://txpq.com/articles/fork/?pg=1
http://txpq.com/articles/fork/?pg=2

I hope you like it :P

The fixing code is simple if somebody else needs it:

<txp:php>
	if(gps('pg')){
		$dif = gps('pg')*10;
		$dif = $dif-10;
	} else {
		$dif = '0';
	}
	$number = sed_comment_number(array())+$dif;
	echo $number;
</txp:php>

Last edited by Gocom (2008-02-17 02:01:26)

Offline

#7 2008-02-17 01:37:28

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: rah_comments // Pagination for comments

Thanks Jukka. It’s nearly right. Check out http://txpq.com/articles/fork/ (lol!)

Sites which regularly get lots of comments will like this plugin. Most of them will want it to be a la ala and your plugin can do this, just so long as the numbers work right. I should think lots of people will use sed_comments_pack so the two have to work together. I don’t know how you worked your magic on txpq but I hope it works with other sites equally well.

Cheers!


BB6 Band My band
Gud One My blog

Offline

#8 2008-02-17 01:47:15

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: rah_comments // Pagination for comments

From the plugin help:

wraptag (X)HTML tag (without brackets) to wrap around list. Default depends upon preference setting, either ol or unset.

break (X)HTML tag (without brackets) or string used to separate comments. Default depends upon preference setting, either li or div.

It doesn’t depend on preferences settings, though I have Present comments as a numbered list? set to Yes I have to use wraptag="ol" break="li" to display the comments as a numbered list.

Also, just like sed_comment_number, the ordered list starts with #1 on every page. What’s the use of comments pagination if the list starts with #1 on every page?

And I’m getting a whole lot of tag errors in testing and debugging mode…

I would have liked this plugin if it could work with ordered lists ;)

Offline

#9 2008-02-17 01:56:12

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: rah_comments // Pagination for comments

Els,

You can use that fix code for <txp:sed_comment_number />.

The errors are quite basic I could fix them in some point – but haven’t there yet as that plugin is 5 minutes work and not tested anywhere :D (if i say the truth – or actually it’s on action at rahinaa.biz ).

And it does work with unordered list <txp:rah_comments wraptag="ol" break="li" /> – that help documention is written in hurry so there is also that misleading sentense :P Wait for other 5 minutes and all of those should be fixed.

Offline

#10 2008-02-17 02:08:00

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: rah_comments // Pagination for comments

Gocom wrote:

You can use that fix code for <txp:sed_comment_number />.

I don’t use that plugin…?

And it does work with unordered list <txp:rah_comments wraptag="ol" break="li" />

Unordered?

Listen, Jukka, don’t hurry. Get some sleep. I think it’s not the right time of the day (night…) to test this. See you tomorrow ;)

Offline

#11 2008-02-17 02:31:12

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: rah_comments // Pagination for comments

Ofcourse unordered list always starts with number #1 ;) – it’s html tag not something that textpattern generates – it can’t be helped. Or could be with JavaScript, but not my deal. BTW, it’s day for me right now :D

Yeah, I updated the plugin. Fixed documention and all errors – that weren’t even real errors ;)

Last edited by Gocom (2008-02-17 02:35:19)

Offline

#12 2008-02-17 10:43:38

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: rah_comments // Pagination for comments

Not that my sites receive a lot of comments but I will suggest this to some friends.
Thanks Jukka. I think that this plugin will be invaluable for some sites.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB