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?
custom-coded PHP pages inside of CMSMS?
-
sabernar
Re: custom-coded PHP pages inside of CMSMS?
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.
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.
Re: custom-coded PHP pages inside of CMSMS?
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:
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.
You would access the db object like so:
Code: Select all
global $gCms;
$db =& $gCms->GetDb();
-
sabernar
Re: custom-coded PHP pages inside of CMSMS?
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.
Thanks.

