Page 1 of 1
custom-coded PHP pages inside of CMSMS?
Posted: Tue Jun 20, 2006 2:05 am
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?
Re: custom-coded PHP pages inside of CMSMS?
Posted: Tue Jun 20, 2006 6:55 am
by jd
try the user-tags options of the cmsms

Re: custom-coded PHP pages inside of CMSMS?
Posted: Tue Jun 20, 2006 9:29 pm
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.
Re: custom-coded PHP pages inside of CMSMS?
Posted: Wed Jun 21, 2006 10:10 am
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.
Re: custom-coded PHP pages inside of CMSMS?
Posted: Fri Jun 23, 2006 1:12 am
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.
Re: custom-coded PHP pages inside of CMSMS?
Posted: Fri Jun 23, 2006 1:48 am
by Ted