Textpattern Forum

You are not logged in. Register | Login | Help

#1 2008-03-22 22:29:39

Egypt Urnash
Plugin Author
From: Boston
Registered: 2006-07-23
Posts: 19
Website

[plugin] [ORPHAN] peg_nested_comments

IMPORTANT NOTICE

etc has made this plugin compatible with TXP 4.5.
In order to download skip here.

Original forum post

I’m thinking of moving from Livejournal to Textpattern/xPattern. One of the things I need for this is threaded comments. There’s an existing plugin for this (cha_comment_reply), but it only does one level of nesting.

I took some bits from cha_comment_reply, some other bits from the Textpattern source, and built some recursive functions that can go to any depth of nested comments. It’s still a work in progress – I know there’s some things I’m just not doing properly yet (see the ‘todo’ in the help) – but it does, indeed, function.

Usage:

  • replace <txp:comments /> in your comments_display form with <txp:peg_comments /> – it takes the same syntax.
  • add <txp:peg_child_comments /> to the end of your comments form. Use the same arguments you had for <txp:comments />.
  • put <txp:peg_reply_link /> somewhere in your comments form. This tag generates the link to reply to the comment.
  • finally, put <txp:peg_reply_to /> somewhere in comment_form. This generates an invisible field.

Requires Javascript.

Last edited by uli (2012-12-09 18:32:33)

Offline

#2 2008-03-22 22:30:11

Egypt Urnash
Plugin Author
From: Boston
Registered: 2006-07-23
Posts: 19
Website

Re: [plugin] [ORPHAN] peg_nested_comments

# peg_nested_comments v0.1
# Nested comments ala Livejournal
# Egypt Urnash
# http://egypt.urnash.com/

# ......................................................................
# This is a plugin for Textpattern - http://textpattern.com/
# To install: textpattern > admin > plugins
# Paste the following text into the 'Install plugin' box:
# ......................................................................

YTo5OntzOjQ6Im5hbWUiO3M6MTk6InBlZ19uZXN0ZWRfY29tbWVudHMiO3M6NzoidmVyc2lv
biI7czozOiIwLjEiO3M6NjoiYXV0aG9yIjtzOjEyOiJFZ3lwdCBVcm5hc2giO3M6MTA6ImF1
dGhvcl91cmkiO3M6MjQ6Imh0dHA6Ly9lZ3lwdC51cm5hc2guY29tLyI7czoxMToiZGVzY3Jp
cHRpb24iO3M6MzE6Ik5lc3RlZCBjb21tZW50cyBhbGEgTGl2ZWpvdXJuYWwi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G9iYWwgJHRoaXNj
b21tZW50OwoKCQkvLyBpZiBwYXNzZWQgYSBsYWJlbCwgcHJpbnQgaXQsIG90aGVyd2lzZSwg
dGhlIGRlZmF1bHQgaXMgJ1JlcGx5JwoJCSRyZXBseV92YWx1ZSA9IChpc3NldCgkYXR0c1sn
bGFiZWwnXSkpID8gJGF0dHNbJ2xhYmVsJ10gOiAnUmVwbHknOwoKCQkkaHJlZiA9ICIjcGVn
X3JlcGx5dG8iOwoJCSRvbmNsaWNrID0gInBlZ19zZWxlY3RDb21tZW50KCciLiR0aGlzY29t
bWVudFsnZGlzY3Vzc2lkJ10uIicpIjsKCgkJJG91dCA9ICI8YSBjbGFzcz1cInBlZ19yZXBs
eXRvXCIgaHJlZj1cIiRocmVmXCIgb25DbGljaz1cIiRvbmNsaWNrO1wiPiAkcmVwbHlfdmFs
dWUgPC9hPiI7CgoJCXJldHVybiAkb3V0OwoJfQoiO3M6MzoibWQ1IjtzOjMyOiI0ZmM0YTcy
ZWEwNzE0ZDBmNzAxMmE5NDdjY2E1MWJhMCI7fQ==

Last edited by ruud (2008-03-22 22:33:17)

Offline

#3 2008-03-23 00:43:48

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: [plugin] [ORPHAN] peg_nested_comments

Would be nice to see example page :)


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#4 2008-03-23 02:36:52

Egypt Urnash
Plugin Author
From: Boston
Registered: 2006-07-23
Posts: 19
Website

Re: [plugin] [ORPHAN] peg_nested_comments

Sorry, not yet – I only have TxP running on my local machine. I decided to make sure that TxP and my plugin are happy on the remote server. So now I can say that this comment-threading plugin has been tested under PHP4 and PHP5, too. See it in action!

(and thanks for the board syntax fix, Ruud.)

Last edited by Egypt Urnash (2008-03-23 03:54:37)

Offline

#5 2008-03-23 16:52:05

Els
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,397
Website

Re: [plugin] [ORPHAN] peg_nested_comments

That is looking very nice! Can you see in the back end if a comment is a child comment?


<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields

Offline

#6 2008-03-23 18:59:42

Egypt Urnash
Plugin Author
From: Boston
Registered: 2006-07-23
Posts: 19
Website

Re: [plugin] [ORPHAN] peg_nested_comments

Not yet, but that’s a good idea. I’ll add that to the to-do list if I can figure out what to wedge into!

Offline

#7 2008-03-29 14:21:23

truist
Plugin Author
From: Ohio, USA
Registered: 2004-11-09
Posts: 251
Website

Re: [plugin] [ORPHAN] peg_nested_comments

What happens to the nested comments if you disable the plugin? I’m worried about using this plugin if it’s going to break the comments if/when I turn it off.

Offline

#8 2008-03-29 18:25:43

Egypt Urnash
Plugin Author
From: Boston
Registered: 2006-07-23
Posts: 19
Website

Re: [plugin] [ORPHAN] peg_nested_comments

If you disable it and go back to the normal comments tag, they’ll be displayed as a sequential list. Nested comments are stored in the same flat table as always; I just add a couple of additional fields to link parents and children.

Offline

#9 2008-03-29 21:15:47

truist
Plugin Author
From: Ohio, USA
Registered: 2004-11-09
Posts: 251
Website

Re: [plugin] [ORPHAN] peg_nested_comments

Just to be sure – they’ll display in order-of-entry, right? (Whereas with your plugin, they’ll display in thread order.)

Offline

#10 2008-03-29 23:26:09

Egypt Urnash
Plugin Author
From: Boston
Registered: 2006-07-23
Posts: 19
Website

Re: [plugin] [ORPHAN] peg_nested_comments

Yes.

If you have 10 comments and reply to comment #6, that comment will still be #11. It just gets marked as being a child of #6, and if you display the comments using my tags, they’ll be shown as such.

I need to do a cleanup pass on this thing. grin

Offline

Board footer

Powered by FluxBB