Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-04-21 12:22:18

graumeister
Plugin Author
From: Ban Bang Por, Samui, Thailand
Registered: 2005-01-16
Posts: 167
Website

[archived] gho_comments_invite

Notice: This thread is archived, this plugin is no longer available.

**********************************************************

hi all,

i wrote a plugin, that enables me to show comment invitations like “12 comments” as comment-invitation. I dont know, if there is something similar around yet, but I needed it and didn’t like to hack into comments-codes of txp. so here it is.

more info: grauhirn.org

description

I searched for the possibility to show the link to the commentform in an other look than “commentstring [num]”. So I ripped of shamelessly Reiniers rei_comments_invite-plugin to fit my needs. With this plugin it is possible to show comment-invites like “12 comments to go”.

The plugin fits my need for now, extensionwishes will be welcome.

gho_comments_invite attributes

showcount
  • show the count of existing comments before the invitation (yes|no)? default is set to yes.
wraptag
  • like in other tags. default is empty (inline).
class
  • the comment-invite is wrapped in a span. what classname should this span (not the wraptag, which is around the span) have? default is “comm-invite”
zero
  • if the article has zero comments, what should the invitation state? default is the comment-invitation given in the articleform. if this value is set, it will override the comment-invitation of the article. (remember to set spaces in front of the string if you want a space between the count and the invitation)
one
  • if the article has one comments, what should the invitation state? default is “ comment”. (remember to set spaces in front of the string if you want a space between the count and the invitation)
more
  • if the article has more than one comments, what should the invitation state? default is “ comments”. (remember to set spaces in front of the string if you want a space between the count and the invitation)
nocomment
  • if the article has comments disabled, what should the invitation state? default is the comment-invitation given in the articleform. if this value is set, it will override the comment-invitation of the article. if it should state nothing, it has to be set but empty.

gho_last_commentator attributes (shows a line like “(last comented by brian)”)

separator
  • what text should separate the commentators (if there are more than one to be shown). default is “, “.
limit
  • how many commentators should maximal be shwon. defaults is 1.
linknames
  • set to true if you want the names linked to the comments they gave. defaults to false. please note that the link to the comment is realized via the anchor c000000 where 000000 is the commentnumber. there has to be a id defined within the comment-form which is named like said. the anchor has to lead somewhere. if you dont know how to insert the comment-id, maybe this plugin will help.
pretext
  • which text should be put before the commentators list? defaults to “(last commented by “.
posttext
  • which text should be put after the commentators list? defaults to “)”.
wraptag
  • like in other tags. default is empty (inline).

History

2005-08-16 v.4.0
  • revised for TXP4.0
  • messed up documentation fixed
2005-08-14 v.1.0
  • revised for TXP1.0
2005-05-03 v.0.4
  • linknames-attribut for gho_last_commentator (name of the commentator will be linked to his comment)
2005-05-02 v.0.3
  • new tag gho_last_commentator for the name(s) of the last commentators
2005-04-22 v.0.2
  • bugfix for the zero-text
  • bugfix: wraptag is applied to the nocomment-invitation
  • bugfix/feature (?): if comments disabled and there are yet comments the nocomment-text will be linked to the comments
  • feature: changes in the handling of the nocomment-attribute
  • feature: class-attribute
2005-04-21 v.0.1
  • initial version

Last edited by graumeister (2005-08-28 06:21:43)


Samui? Samui! (about the life as farang in thailand)
David’s Neighbour

Offline

#2 2005-04-21 12:35:07

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [archived] gho_comments_invite

Sounds good and useful. Could you list it at textpattern.org?

Offline

#3 2005-04-21 12:47:41

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: [archived] gho_comments_invite

Awesome, I had also hacked the install at one point to do this and was going to turn it into a plugin to not have to do it again. No need for that anymore.

Thanks for developing this.

Last edited by hakjoon (2005-04-21 12:48:35)


Shoving is the answer – pusher robot

Offline

#4 2005-04-21 12:55:37

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [archived] gho_comments_invite

One suggestion: if there are no comments, I would still like to have a link to the comments that have been posted before closing the comments.

I couldn’t get this to work, the plugin just shows the textstring that I tell it to for nocomment.

Offline

#5 2005-04-21 15:02:22

mkarolow
New Member
From: Salem, Ma, USA
Registered: 2004-09-26
Posts: 9
Website

Re: [archived] gho_comments_invite

Seems like the zero option wasn’t working. I needed to change the string to $zero from $empty. Here’s what it lookd like when I was done.

<pre> $zero = (empty($zero)) ? “” : $zero;</pre>

Offline

#6 2005-04-21 16:59:41

Jennifer
Member
From: Michigan
Registered: 2004-02-25
Posts: 74
Website

Re: [archived] gho_comments_invite

I love this! I’ve enabled it on my site.

Offline

#7 2005-04-21 17:04:20

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: [archived] gho_comments_invite

An idea: Could there be an option to have something like “3 comments Latest by Alex Cabrera”

Thanks for the plugin.
Lee

Offline

#8 2005-04-21 17:34:50

sivni
Gone, but not forgotten
From: Norway, Hamar
Registered: 2004-10-27
Posts: 39

Re: [archived] gho_comments_invite

Nice. I’ve seen comment invitations stating “nobody loves me” when no comments have been recieved. Now I know how to do it on TXP.

Offline

#9 2005-04-21 22:01:13

jonhicks
Member
From: Oxfordshire UK
Registered: 2004-03-22
Posts: 256
Website

Re: [archived] gho_comments_invite

Superb! Is there any chance you could add also add an option to specify a “class” attribute?


Cheers,
Jon VC#9

Offline

#10 2005-04-21 22:09:53

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: [archived] gho_comments_invite

Great,Thanks Graumeister,downloaded and on the testbench now


⌃ ⇧ < ⌃ ⇧ >

Offline

#11 2005-04-22 00:56:51

graumeister
Plugin Author
From: Ban Bang Por, Samui, Thailand
Registered: 2005-01-16
Posts: 167
Website

Re: [archived] gho_comments_invite

hello all,

aehem. that was much more appreciation than I expected. I will work the bugs out and the feature-requests in this evening.


Samui? Samui! (about the life as farang in thailand)
David’s Neighbour

Offline

#12 2005-04-22 03:12:48

blumie607
Member
Registered: 2004-03-08
Posts: 175
Website

Re: [archived] gho_comments_invite

> mkarolow wrote:

> Seems like the zero option wasn’t working. I needed to change the string to $zero from $empty. Here’s what it lookd like when I was done.

<pre> $zero = (empty($zero)) ? “” : $zero;</pre>

Where did you put this? I am having trouble with the same thing.

Thanks.


bludrop studios .::. Creative Expression

Offline

Board footer

Powered by FluxBB