Page 1 of 1

How do handle my old php-scripts?

Posted: Sun Jan 25, 2009 10:44 pm
by martinG
Hello,

I've been working with Joomla before but now when I've tried this CMS I have to say I'm very impressed over its simplicity and construction.

My new CMSMS site is now beginning to take form but what are my options if I want to use my old php-scripts (with connections towards another DB and stuff)? Can I just upload them and start using them within a "Content"-page in some how or what?

Thanks for answering! / Martin

Re: How do handle my old php-scripts?

Posted: Sun Jan 25, 2009 11:16 pm
by Ziggywigged
You can use UDTs (user defined tags) or place php right in your content in {php}foo{/php} after you enable it in config.

Re: How do handle my old php-scripts?

Posted: Sun Jan 25, 2009 11:21 pm
by calguy1000
old php scripts will work.

just create a udt called "my_old_php_script"

and inside that do an

Code: Select all

include('my_old_php_script.php');
Then in your page, or template just use

Code: Select all

{my_old_php_script}
the only thing you have to worry about is conflicting variable names... (there shouldn't be many, but just to be on the safe side, don't use $db)

Regarding db stuff, that's easy. do whatever you want, and just call

Code: Select all

adodb_connect(); 
at the end of the UDT.

Re: How do handle my old php-scripts?

Posted: Mon Jan 26, 2009 2:03 pm
by martinG
Thank you both for answering. Perfect.