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

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
cve
Forum Members
Forum Members
Posts: 44
Joined: Wed Jul 07, 2010 10:54 am

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

Post 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>
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

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

Post by calguy1000 »

How are you creating this URL? is this for an admin action or a frontend action?
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
cve
Forum Members
Forum Members
Posts: 44
Joined: Wed Jul 07, 2010 10:54 am

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

Post 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
cve
Forum Members
Forum Members
Posts: 44
Joined: Wed Jul 07, 2010 10:54 am

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

Post 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...
Post Reply

Return to “Developers Discussion”