Page 1 of 1

My own Application running in CMS Made simple?

Posted: Wed Jan 16, 2008 4:45 pm
by enric
Hi folks!

I´m a new CMS Made Simple user, and I have a question...

I have already developed an application for my website, running on php and mysql, it just
shows information from DB on request, very simple. Can I integrate those pages with CMS MS?
If yes, how?


Thank you!!!

Enric

Re: My own Application running in CMS Made simple?

Posted: Wed Jan 16, 2008 9:08 pm
by nivekiam
You might want to start by looking at the code.  Digging through any development documents http://wiki.cmsmadesimple.org/index.php/Main_Page

And finally after giving it a bit of a go, asking in the Developer forum.  Maybe you can turn your application into a module or plugin function.

Re: My own Application running in CMS Made simple?

Posted: Wed Jan 16, 2008 9:27 pm
by Nullig
If it's just a simple database script, I usually use a UDT (User Defined Tag).

Give it a name like MyDBApp and code it like:

Code: Select all

$seconddbhost = 'localhost';
$seconddbuser = 'username';
$seconddbpass = 'password';
$seconddbdata = 'dbname';

$seconddb = mysql_connect("$seconddbhost", "$seconddbuser", "$seconddbpass") or die("Could not connect: " . mysql_error());
mysql_select_db("$seconddbdata",$seconddb);

--------------
YOUR CODE HERE
--------------

mysql_close ($seconddb);

adodb_connect();
Then you can call it on a page or template by using:

Code: Select all

{MyDBApp}
Nullig