Adapt CMSMS for Flash front-end - Help needed!

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
tomgsd
Forum Members
Forum Members
Posts: 74
Joined: Tue Feb 12, 2008 10:00 am

Re: Adapt CMSMS for Flash front-end - Help needed!

Post by tomgsd »

Not really sure exactly what you are wanting to do but I've had some success communicating with modules from flash via the loadvars class.

For example, I've got a flash movie adding posts to the comments module.  First I figured out what the url and query parameters were by looking at the php and HTML then just made a loadvars object that posted the required info.

Code: Select all

//Add comment to page (AS2)

//Adding comment object
var add_lv:LoadVars = new LoadVars();
	
//Check success object
var check_lv:LoadVars = new LoadVars();

//Send the post
add_lv.m6author = name.text;
add_lv.m6content = comment.text;
add_lv.m6submitcomment = "Submit"
add_lv.sendAndLoad("http://CMSMS/PATH/index.php?mact=Comments,m6,default,0&m6returnid=13&m6pageid=13", check_lv, "POST");

//Check the loadvars
check_lv.onLoad = function(success:Boolean) {

	if (success) {

		trace("loadvars success")
	
	} else {
		trace("Error loading/parsing LoadVars.");
	}
};
Back in the php code you can send back success or fail messages in the form: &success=false&error=noauthor& OR &success=true&
I also put these in hidden divs so anyone on the HTML version of the site won't see them.  It also needs some validation on the flash side to make sure all the fields are filled in.

Don't know if this is useful for what you're doing but it seems to work for me!
Green Sheep Design Ltd. - www.greensheep.co.uk
madsny
Forum Members
Forum Members
Posts: 31
Joined: Mon Jul 14, 2008 2:46 pm

Re: Adapt CMSMS for Flash front-end - Help needed!

Post by madsny »

yes im having a somewhat problem accessing the modules from flash, mainly because i don't understand the way they are build and are very likely not to :D hehe.
i basically just want to be able to modify data in the sql server, so i can add values to the page field like, position and other crazy things one would want to need, it's no problem to create a costume PHP script for this task, which i'll be doing, but this is not a very safe way, if any got the notice of then name of the PHP file they could basically do alot of mess on my website :D.

i believe it'll take some time before we see a flash hookup for all the modules, thou i strongly believe that CMS made simple should build it, it'll be one of the vildest CMS out there since you can basically hook your dataflow up to any front end even unity3D if you like :D.
but for now, i'll just make a hack, costume php script with a password handshake from flash, guess that's the best for now :D.

:)
Post Reply

Return to “Developers Discussion”