Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-08-10 09:50:39
- NicKy
- Member
- Registered: 2007-08-08
- Posts: 13
How do i separate the comments from the article ?
Hi,
I want to separate the comments from the article like alistapart.com does.
Basicly :
one page with all the articles => detail of the article WITHOUT the comments => page with all the comments WIHTOUT the article
Is it possible to do this ? with or without a plugin ?
Thanks
Last edited by NicKy (2007-08-10 09:50:54)
Offline
Re: How do i separate the comments from the article ?
In the admin areas under preferences you have an option not to automatically append comments to articles. And then there’s a dropdown box for selecting comments as popup, so can have the comments in a new popup widow instead of on the article page.
Offline
#3 2007-08-10 23:00:16
- jadehouse
- Member
- Registered: 2007-06-26
- Posts: 75
Re: How do i separate the comments from the article ?
apsk121 wrote:
In the admin areas under preferences you have an option not to automatically append comments to articles. And then there’s a dropdown box for selecting comments as popup, so can have the comments in a new popup widow instead of on the article page.
Please look at Alistapart.com. It’s the same question I had.
Offline
#4 2007-08-11 00:18:01
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: How do i separate the comments from the article ?
Have a look at this FAQ. You should be able to do something similar with two article tags and two different forms.
Offline
#5 2007-08-11 00:37:50
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: How do i separate the comments from the article ?
It is not possible. A plugin could do it, but I don’t think one exists yet.
Offline
#6 2007-08-11 13:52:47
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: How do i separate the comments from the article ?
Mary wrote:
It is not possible.
That’s why I said ‘something similar’ :) I’m not sure about this, but I was thinking – roughly – along these lines: in the article form make the comments link go to a page/section ‘comments’, and on that page call the article’s comments with txp:article_custom and an article form that just shows the comments. The difficult part would be to find a way to insert the article’s id to the article_custom tag, but maybe something like chs_if_urlvar could do that?
Offline
Re: How do i separate the comments from the article ?
Hi Els,
seems to be a very good and clever solution. I’s looking for a solution a long time ago. All work fine when I use article’s ID within url like this : ?post=ID’s_article_number and use $_GET[‘post’] into comments page to display the corresponding article’s comment form.
I’m trying to paginate the comments page with the help of ob1_googlenav plugin.
Tks lot Els, you’re the man!
Cheers,
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
#8 2007-08-12 17:32:03
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: How do i separate the comments from the article ?
Patrick, if you really get this working would you mind posting exactly how you did it? Would be nice if my ‘wild’ idea actually turned out to work :)
Offline
Re: How do i separate the comments from the article ?
I think you can do it even nicer, using clean urls.
/section/id/title => shows article
/section/id/title/comments => shows comments.
Something like this (not tested):
<txp:php>
global $pretext;
extract(chopUrl($pretext['req']));
if ($u4 === 'comments') {
echo parse('
<!-- all the HTML + TXP tags for showing comments here -->
');
}
else {
echo parse('
<!-- all the HTML + TXP tags for showing the article here -->
');
}
</txp:php>
Or, if you put the comments code in a form called ‘comments_form’ and the article code in a form called ‘article_form’:
<txp:php>
global $pretext;
extract(chopUrl($pretext['req']));
echo parse_form($u4 === 'comments' ? 'comments_form' : 'article_form');
</txp:php>
Last edited by ruud (2007-08-12 17:51:48)
Offline
Re: How do i separate the comments from the article ?
WoW!
Do you know this man is a Genius?
As always Ruud make the rule with the most elegant way!
As I said some days ago: world belongs to coders!
One more question Ruud :
Do you think it’s possible to paginate the comment’s page with your code (for the purpose to render exactly Alistapart comments page)?
If you find a solution Ruud, you definitively beat Alistapart and their Ruby on Rail custom CMS…
WoW. What a challenge : TXP better than Alistapart…
;-)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: How do i separate the comments from the article ?
Haha… well, it’s not impossible, but to paginate the comments you’d have to rewrite the <txp:comments /> taghandler in a plugin so it accepts a page number.
Offline
Re: How do i separate the comments from the article ?
So… it’s possible!
Ola community. Don’t forget to keep this little code. Now, all TXP websites integrate it for their comments page! Don’t forget to thanks ruud within your websites.
Now you have a new idol : ruud!
I think that Core Developers are better than Jeffrey Zeldman, Eric Meyer and J.-S. Maria :)
Tks lot.
Respects,
Last edited by Pat64 (2007-08-13 08:31:44)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline