Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2013-03-06 09:16:16
- gour
- Member
- From: Hlapičina, Croatia
- Registered: 2013-01-17
- Posts: 124
Comment invitation: general or per article?
Hello,
while working on my 1st Txp site I’m trying to fix localization strings, at least for public side and spent some time hunting from where does Comment string come?
Here is the code snippet:
<section id="comments-form">
<!-- comment invite text is taken for the article's comment invitation field on the 'write' screen -->
<h3>Comment</h3>
Finally I’ve discovered that it’s from Invitation field within article’s Write tab.
Now, considering that for all my articles I’ve this field set to default Comment, I wonder what do you think about having global setting for it which would follow language setting, iow. to have it available within default language?
Or, can someone explain me what are some ‘pros’ to have it as per article setting?
Offline
#2 2013-03-06 20:06:19
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Comment invitation: general or per article?
Do you mean this setting?
Offline
#3 2013-03-06 21:18:52
- gour
- Member
- From: Hlapičina, Croatia
- Registered: 2013-01-17
- Posts: 124
Re: Comment invitation: general or per article?
Els wrote:
Do you mean this setting?
Yes. :-)
How to change it post festum…
Last edited by gour (2013-03-06 21:22:06)
Offline
Re: Comment invitation: general or per article?
gour wrote:
Now, considering that for all my articles I’ve this field set to default Comment, I wonder what do you think about having global setting for it which would follow language setting, iow. to have it available within default language?
I find having a per-article comment invite a bit of a dim feature in most cases. When the default invite is set in the prefs and is applied to each article, you can’t go back and change it en-masse or anything like that (hmmm, a multi-edit option would allow that… but hey). Further, as you’ve found, the invite string is not sensitive to language or anything. I’ve no idea how MLP handles it as I’ve never looked. The invite message is stored with the article data so in theory it’ll be translated if there’s a snippet for it, but the fact it’s set as a pref might make that more tricky than necessary.
Anyway, at the moment you’re stuck with doing it one by one for all existing published articles or employing SQL to do it — neither of which are particularly sexy options.
It’s one of those things that needs looking at as part of the comments system overhaul. I made a start consolidating the vast array of tags and simplifying things with the eventual aim of making it more modular and never finished the work. I’ll dredge it up one day soon and get it ship shape. But if you do have any thoughts like this on how it could be made better, please share them as you work through it and go “huh? wtf?” because the whole commenting system is a bit of a mess.
Last edited by Bloke (2013-03-06 21:53:06)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Comment invitation: general or per article?
If you want to have same value globally, you can just replace comments_invite tag what ever you wish. E.g.
<a href="<txp:permlink />#comment">Leave a comment, sucker</a>
The preference Els mentions will be used as the default value when creating a new article. For existing articles changing it makes no difference. Each article would have to be updated manually or in bulk with a SQL query:
update textpattern set AnnotateInvite = 'Leave a comment, sucker' where AnnotateInvite = 'Comment'
Offline
Re: Comment invitation: general or per article?
I wrote a bunch of plugins once because I used to be so frustrated by how hard it was to customize comments. I never released them because I was too lazy to get the documentation done but they are on my github account.
Offline
#7 2013-03-08 09:01:21
- gour
- Member
- From: Hlapičina, Croatia
- Registered: 2013-01-17
- Posts: 124
Re: Comment invitation: general or per article?
Bloke wrote:
Anyway, at the moment you’re stuck with doing it one by one for all existing published articles or employing SQL to do it — neither of which are particularly sexy options.
Well, it’s not so bad…we can do SQL update, but having other options on disposal would be nice.
It’s one of those things that needs looking at as part of the comments system overhaul.
Btw, I keep finding info about badness of comments system, but I must say that, so far, it does not look so bad. Maybe it’s due to other aspects of Txp’s awesomeness. :-)
But if you do have any thoughts like this on how it could be made better, please share them as you work through it and go “huh? wtf?” because the whole commenting system is a bit of a mess.
OK. Will do. ;)
Offline
#8 2013-03-08 09:02:58
- gour
- Member
- From: Hlapičina, Croatia
- Registered: 2013-01-17
- Posts: 124
Re: Comment invitation: general or per article?
Gocom wrote:
For existing articles changing it makes no difference. Each article would have to be updated manually or in bulk with a SQL query:
This one is helpful. Thank you. ;)
Offline