HTTPS in module API [solved]

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
milehigh

HTTPS in module API [solved]

Post by milehigh »

I don't see anything in the API docs but I wanted to check here to be sure. Is there anything in the module API that can change the output of $this->CreateFormStart($id,'default',$returnid,'post','multipart/form-data');

from this:



to this:




I created a
CreateSecureFormStart($id, $action='default', $returnid='', $method='post', $enctype='', $inline=false, $idsuffix='', $params = array(), $extra='')
and included it within my module (so i can still use the default core install). It swaps the default action with an https: action.
Last edited by milehigh on Tue Mar 31, 2009 6:42 pm, edited 1 time in total.
alby

Re: HTTPS in module API [solved]

Post by alby »

milehigh wrote: I don't see anything in the API docs but I wanted to check here to be sure. Is there anything in the module API that can change the output of $this->CreateFormStart($id,'default',$returnid,'post','multipart/form-data');
Which CMSMS version?
For me CreateFormStart() in 1.5.3 create a correct action in form tag

Alby
milehigh

Re: HTTPS in module API [solved]

Post by milehigh »

There is one instance in the site where I need the form action to go from http to https so I simply just added a CreateSECUREFormStart function in my module which basically is a carbon copy of the CreateFormStart function but swapping out the _curPageURL with a function that forces https://

If you are already on https CreateFormStart keeps you on https and all works perfectly. But if you are on http: I didn't see away to change the 'action' from http to https. I needed to gather some basic info, post that to an https and then gather the rest of the info encrypted from there.

I probably made it harder than it needed to be but its working as I need it to now.
Post Reply

Return to “Developers Discussion”