Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-06-11 06:08:02
- mhulse
- Plugin Author
- From: Eugene Oregon
- Registered: 2005-01-21
- Posts: 200
[solved] TXP and PHP questions
Hi,
Example code:
<txp:php>
global $thisarticle;
$article_image = $thisarticle[‘article_image’];
</txp:php>
Just curious how I would access the article image properties… for example, the above will return an ID, but what PHP can I use to get the URL or other values (caption, alt…) of that image ID?
Hmm, would I have to query the database with the image ID? If so, could someone post example code… or, even better, is there a good developer resource for looking these things up?
Related question: where can I look up TXP specific PHP functions and such… Is there a developer manual? How bout a plugin manual for developers?
Any help would be great!
Many thanks!
Cheers,
M
Last edited by mhulse (2007-06-11 07:05:31)
Offline
Re: [solved] TXP and PHP questions
mhulse wrote:
Just curious how I would access the article image properties… for example, the above will return an ID, but what PHP can I use to get the URL or other values (caption, alt…) of that image ID?
Dive into upm_image. It covers almost all aspects of accessing images and their properties in Textpattern.
where can I look up TXP specific PHP functions and such…
Textpattern contains some libraries which might be helpful.
How bout a plugin manual for developers?
Offline
#3 2007-06-11 07:05:08
- mhulse
- Plugin Author
- From: Eugene Oregon
- Registered: 2005-01-21
- Posts: 200
Re: [solved] TXP and PHP questions
Hi wet!
Perfect! Many thanks for the links and tips. :)
Your help is always excellent! I owe you one.
Have a great day.
Cheers,
Micky
Offline
Pages: 1