hey guys, it's my first time using uploadify and i'm trying to implement it into a wordpress page template.
I have a template which should users of my website allow to upload files (or more files at once) to a specific folder on my ftp-server. I want to use uploadify therefore.
I really need your help, because i have no idea how i have to set that up in wordpress.
What i did so far:
- i downloaded the uploadify package (latest version)
- renamed the folder it to "uploadify" so it's easier to call the package
- uploaded the uploadify folder into my template directory
- opened my custom page-template with the name ftp-upload.php
- added two script-tags under get_header()
- added the javascript to call uploadify
just so you know, my whole wordpres blog already uses jQuery so it's already embedded in my header file.
<?php
/*
Template Name: ftpupload
*/
?>
<?php get_header(); ?>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/uploadify/swfobject.js"
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/uploadify/jquery.uploadify.v2.1.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#fileselect').uploadify({
'uploader': '<?php bloginfo('template_url'); ?>/uploadify/uploadify.swf',
'script': '<?php bloginfo('template_url'); ?>/uploadify/uploadify.php',
'folder': '/userupload',
'cancelImg': '<?php bloginfo('template_url'); ?>/uploadify/cancel.png'
});
});
</script>
<div id="content">
<?php if(!isset($_POST['sendit'])){ ?>
<form id="formUpload" name="form" action="<? $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data">
<input id="fileselect" type="file" name="userfile" class="loginInput"/>
the folder i want to upload the files to is in my root directory on my server called "userupload".
currently my browser tells me that: ERROR: $("#fileselect").uploadify is not a function
any idea what i need to do?