Implementig uploadify in a WordPress template?

david4156

New Member
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. Therefore, I want to use uploadify. I have to set that up in WordPress.What I've done 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 \[code\]get_header()\[/code\][*]Added the JavaScript to call uploadifyJust so you know, my whole WordPress blog already uses jQuery, so it's already embedded in my header file.\[code\]<?php/*Template Name: ftpupload*/?><?php get_header(); ?><script type="text/javascript" src="http://stackoverflow.com/questions/3649196/<?php bloginfo('template_url'); ?>/uploadify/swfobject.js"<script type="text/javascript" src="http://stackoverflow.com/questions/3649196/<?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"/>\[/code\]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:\[code\]ERROR: $("#fileselect").uploadify is not a function\[/code\]Any ideas?
 
Back
Top