(SOLVED) [PHP] in articles?
Posted: Thu 7. May 2009, 06:04
Later solution: Turns out [PHP] in article content parts is originally disabled in conf.inc.php. So setting $phpwcms['allow_cntPHP_rt'] = 1; has fixed my problem. Very simple. I don't know whether this is actually documented, but if so I couldn't find it.
Original problem follows.
--
Backstory: I use Gallery for photos for my website. Currently I'm looking at using Gallery's External Image Block function to embed a selection of thumbnail images relevant to particular articles on my website. To do this, I need to execute a PHP function.
I've been testing this using a template I've reserved specifically for testing stuff, and in the template it works just fine using the [PHP] replacement tag. But when I try to test it in an article, the [PHP] tag gets stripped off and I'm left with the code rendering as plain text in the body of the article. I've tried to search on this, but when both "php" and "article" are considered too common words and can't be used as search keywords I'm clearly not going to get very far. If this is going to work at all, it has to be within the article body and not a template since I need to have different arguments in each call relevant to a given article. So I'm needing to know first if for some reason it's not possible to execute a PHP function in an article body (and if that's the case, why?!) and if it is possible, what's going wrong for me?
I'm using 1.3.9.
Original problem follows.
--
Backstory: I use Gallery for photos for my website. Currently I'm looking at using Gallery's External Image Block function to embed a selection of thumbnail images relevant to particular articles on my website. To do this, I need to execute a PHP function.
I've been testing this using a template I've reserved specifically for testing stuff, and in the template it works just fine using the [PHP] replacement tag. But when I try to test it in an article, the [PHP] tag gets stripped off and I'm left with the code rendering as plain text in the body of the article. I've tried to search on this, but when both "php" and "article" are considered too common words and can't be used as search keywords I'm clearly not going to get very far. If this is going to work at all, it has to be within the article body and not a template since I need to have different arguments in each call relevant to a given article. So I'm needing to know first if for some reason it's not possible to execute a PHP function in an article body (and if that's the case, why?!) and if it is possible, what's going wrong for me?
I'm using 1.3.9.