Page 1 of 1

Uploadify + my module = uploading files redirect to login...

Posted: Fri Aug 10, 2012 9:31 pm
by cve
Hi there, I'm developing simple module for products management for cms made simple, and I want to use great plugin called uploadify http://www.uploadify.com/ flash version for uploading files, so I was setup all required files with cms made simple in my module, and when the uploadify start uploading file the cms response is redirect to login page... When I set debug option in uploadify (this shows simple textarea on the bottom of the page with trace information what's going on when uploadify works upon uploading files) and the debuger says that the cms made simple response is login... So I try debug the code with xdebug and I saw that in moduleinterface.php in admin folder at the 27 line there is function called login_check(), and is check session, logged in user and cookies, and when it founds nothink then redirect to the login page... The problem is, that my action for uploadify uploader script is regular cms made simple action placed in my module and it fires after moduleinterface takes process first... How can I start the session or whatever before the check_login function get me out???

Code: Select all

<__script__ type="text/javascript">
$(function(){
    $('#file_upload').uploadify({
        'formData'      : { 'PHPSESSID': 'tsqia7s3vk8clm6ukiqk7jjnl1'},
        'swf'      : 'http://localhost/cms/modules/Mymodule/uploadify/uploadify.swf',
        'uploader' : 'http://localhost/cms/admin/moduleinterface.php?mact=Mymodule,m1_,uploader,0&_sx_=6e5bc88e&m1_disable_theme=true&m1_showtemplate=false',
        'debug': true
    }); 
});
</__script>

Re: Uploadify + my module = uploading files redirect to logi

Posted: Sat Aug 11, 2012 1:57 am
by calguy1000
How are you creating this URL? is this for an admin action or a frontend action?

Re: Uploadify + my module = uploading files redirect to logi

Posted: Sat Aug 11, 2012 6:36 am
by cve

Code: Select all

$this->smarty->assign('uploader_script', $this->CreateLink($id, 'uploader', $returnid='', $contents='', array('disable_theme'=>'true','showtemplate'=>'false'), $warn_message='', $onlyhref=true, $inline=false, $addttext='', $targetcontentonly=false, $prettyurl=''));
this is link for admin section

Re: Uploadify + my module = uploading files redirect to logi

Posted: Sun Aug 12, 2012 9:46 pm
by cve
Any suggestions??? Today I've tried with any combinations of CreateLink method with inline argument to true or CreateFrontendLink, but the result is the same as above...