Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [ATKOgirl] Rendering PHP in dynamic and static

Quote Reply
Re: [ATKOgirl] Rendering PHP in dynamic and static In reply to
Hi,

You probably would need to add a new field via Database > Category > Properties > Add Field

Name: PHP_Script
Type: CHAR
Size: 255
Form Size: 10

Then, add a new global - called exec_php, with this:

Code:
sub {
return `php $_[0]`;
}

The, in your category.html add something like this:

Code:
<%if PHP_Script%>
<%exec_php($PHP_Script)%>
<%endif%>

..wherever you want the output to go.

For each of the categories, put a value in the PHP_Script field, like:

/ful//path/to/script.php

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Subject Author Views Date
Thread Rendering PHP in dynamic and static ATKOgirl 6701 May 12, 2008, 2:33 PM
Thread Re: [ATKOgirl] Rendering PHP in dynamic and static
Matthias70 6537 May 12, 2008, 3:48 PM
Thread Re: [Matthias70] Rendering PHP in dynamic and static
Piers1 6538 May 12, 2008, 3:59 PM
Thread Re: [Piers1] Rendering PHP in dynamic and static
ATKOgirl 6527 May 12, 2008, 5:16 PM
Thread Re: [ATKOgirl] Rendering PHP in dynamic and static
ATKOgirl 6537 May 13, 2008, 8:59 AM
Thread Re: [ATKOgirl] Rendering PHP in dynamic and static
Andy 6530 May 13, 2008, 9:03 AM
Thread Re: [Andy] Rendering PHP in dynamic and static
ATKOgirl 6534 May 13, 2008, 9:14 AM
Thread Re: [ATKOgirl] Rendering PHP in dynamic and static
Andy 6540 May 13, 2008, 9:16 AM
Thread Re: [Andy] Rendering PHP in dynamic and static
ATKOgirl 6507 May 13, 2008, 9:28 AM
Post Re: [ATKOgirl] Rendering PHP in dynamic and static
Andy 6510 May 13, 2008, 9:41 AM