Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2010-04-24 03:37:54
- Siguo
- Member
- From: Beijing, China
- Registered: 2008-05-22
- Posts: 44
problem of saveComment function
this is the saveComment function definiton in comment.php
function saveComment()
{
......
$isdup = safe_row("message,name", "txp_discuss", "name='$name' and message='$message2db' and ip='".doSlash($ip)."'");
......
}
the problem is how to define a DUP, the present function say:
If a discuss with same name, message, and ip is a dup
but that’s not true. say I want to comment two topic with the same message like “this topic is so great, thanks.”, then I fall into a dup.
maybe the correct one is:
If a discuss with same name, message, and parentid is a dup
if so, the function code should be:
function saveComment()
{
......
$isdup = safe_row("message,name", "txp_discuss", "name='$name' and message='$message2db' and parentid='".doSlash($parentid)."'");
......
}
btw, I think the whole comment system is not very good, maybe we should make it a little better.
Last edited by Siguo (2010-04-24 03:42:13)
Offline
Re: problem of saveComment function
Siguo wrote:
say I want to comment two topic with the same message like “this topic is so great, thanks.”, then I fall into a dup.
I get what you’re saying but if all you are doing is adding that comment to two topics, then you’re not exactly adding value to the articles are you? ;-) Adding a comment like that is almost as useless — to the author — as a trackback, which is something else (thankfully) not available in native TXP.
Sure, it might make the author feel important to receive 500 comments from 500 people simply saying that every article they write is great, but if nobody says how or why it helped them, you might as well not bother commenting (similarly, the author might consider not bothering to allow comments if they have to wade through useless comments like this).
My hunch says people who write exactly the same message on exactly the same site on two different articles from exactly the same IP are either:
ten years oldunable to express themselves due to immaturity / not knowing any better- just not very imaginative
- spamming (and not very well either: proper spammers would randomize their IPs/use a proxy!)
I think the whole comment system is not very good
And so do I. You might want to chime in over on that thread and post any mods there, because I’d like to help bring comments in line with other tags and/or a implement them in a better (still backwards-compatible!) manner. Your thoughts/code would be appreciated.
Last edited by Bloke (2010-04-25 18:53:52)
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: problem of saveComment function
Bloke wrote:
ten years old
Don’t blame youth, blame immature. Some of us are really young here, please don’t make kids cry ;-) On serious note; also really old ppl might be behind those indentical comments. Old person’s decease is serious business.
Offline
Re: problem of saveComment function
Gocom wrote:
Don’t blame youth, blame immature.
Hehe, sorry. That’s what I meant. No offence intended. Post adjusted to be more politically correct :-)
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
Pages: 1