Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-08-27 14:35:52
- jpeacock
- New Member
- Registered: 2008-08-26
- Posts: 7
Upgrade from .3 -> .6 & comment arrays changed?
So,
I’ve been checking around and haven’t found a solution. Just wondered if anyone knew of a way to accomplish this.
I (used to) have a link at the end of each article that would pop up a specific sized comment page, passing an article ID through to the popped up page. The only way with TXP 4.0.3 I could get this to work was by accessing an array for the comments like so:
It appears as though these arrays are not accessible in the newer version.
When I switch on debugging, I get these errors:
txp : comments_invite textonly=“1” showalways=“1” showcount=“0” -> Textpattern Notice: Article tags cannot be used outside an article context on line 1964
followed by:
textpattern/lib/txplib_misc.php:1964 trigger_error()
textpattern/publish/taghandlers.php:1407 assert_article()
textpattern/publish.php:970 comments_invite()
processtags()
textpattern/publish.php:929 preg_replace_callback()
textpattern/publish.php:466 parse()
index.php:40 textpattern()
Then about 20 other errors follow, but I’m assuming they all are caused by this main error. Any thoughts on how to go about a fix? I tried the default comment tags but got these errors as well. I’m assuming that it’s a security restriction perhaps, but wasn’t sure if there was a workaround. I loved the flexibility that txp gave me for the project, being able to use my own mix of php and txp tags, so I’m hoping it’s an easy fix.
Last edited by jpeacock (2008-08-27 14:38:00)
Offline
Re: Upgrade from .3 -> .6 & comment arrays changed?
The “id” attribute was removed. You can simulate the behaviour by using the article_custom tag (which does support an id attribute) to show comments for 1 specific article.
<txp:php>
$commentID = $_GET['commentID'];
echo article_custom(array(
'id' => intval(gps('commentID')),
'listform' => 'mycomments'
));
</txp:php>
And a ‘mycomments’ form containing:
<txp:comments form="comments" />
<txp:comments_form form="comment_form" preview="1" />
Last edited by ruud (2008-08-27 15:06:03)
Offline
#3 2008-08-27 15:31:28
- jpeacock
- New Member
- Registered: 2008-08-26
- Posts: 7
Re: Upgrade from .3 -> .6 & comment arrays changed?
Awesome! Thanks! (thanks for the edit. It solved my next problem).
Last edited by jpeacock (2008-08-27 15:32:40)
Offline