custom-coded PHP pages inside of CMSMS?

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
sabernar

custom-coded PHP pages inside of CMSMS?

Post by sabernar »

Is it possible to have custom coded PHP pages inside a CMSMS site?  There are several things that I'd like to do that I would be able to do quickly in straight PHP but would take me longer to do if I were to write custom modules.

For example, I'd like to create a custom search page which take form fields from a custom form, do some stuff with them, and then display results on the next page.  Is something like this possible?
jd

Re: custom-coded PHP pages inside of CMSMS?

Post by jd »

try the user-tags options of the cmsms :)
sabernar

Re: custom-coded PHP pages inside of CMSMS?

Post by sabernar »

Is there a simple way to get access to the DB from insite a user defined tag?  Let's say I wanted to do a very customized search and I wanted to give the user a form with some dropdowns and textboxes.  The form would then submit to another page that would display the content (preferably paginated).  Is there a relatively simple way to do this? 

Off the top of my head as a very inexperienced CMSMS newbie, here is what I would think that I would do:

1) create two pages (I guess they would go in a section that wouldn't be displayed in the menu), one for the form, one for the results.
2) the form page could be hardcoded with the dropdowns and textboxes, or some stuff could be dynamic
3) the form would submit to the 2nd page which would have a User Defined Tag that would get the information and display it.

Of course, I'm not sure about the details, like accessing the DB, but is this close?

Thanks.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: custom-coded PHP pages inside of CMSMS?

Post by Ted »

Yes, people have done this before with 2 user defined tags.  I think there are even some examples on the forums here.

You would access the db object like so:

Code: Select all

global $gCms;
$db =& $gCms->GetDb();
Then look at some of the examples of database access in the core or your favorite module to get an idea of how the adodb syntax works.
sabernar

Re: custom-coded PHP pages inside of CMSMS?

Post by sabernar »

Thanks.  Do you know what I could search on in order to find some examples like that on the forums?  I've searched, but to no avail.

Thanks.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: custom-coded PHP pages inside of CMSMS?

Post by Ted »

Locked

Return to “CMSMS Core”