Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[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.
- like in other tags. default is empty (inline).
- 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”
- 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)
- 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)
- 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)
- 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 “, “.
- how many commentators should maximal be shwon. defaults is 1.
- 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.
- which text should be put before the commentators list? defaults to “(last commented by “.
- which text should be put after the commentators list? defaults to “)”.
- like in other tags. default is empty (inline).
History
2005-08-16 v.4.0- revised for TXP4.0
- messed up documentation fixed
- revised for TXP1.0
- linknames-attribut for gho_last_commentator (name of the commentator will be linked to his comment)
- new tag gho_last_commentator for the name(s) of the last commentators
- 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
- 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
Re: [archived] gho_comments_invite
Sounds good and useful. Could you list it at textpattern.org?
Offline
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
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
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
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
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
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
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