My own Application running in CMS Made simple?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
enric

My own Application running in CMS Made simple?

Post 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
nivekiam

Re: My own Application running in CMS Made simple?

Post 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.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: My own Application running in CMS Made simple?

Post 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
Locked

Return to “CMSMS Core”