I'll confess that I haven't studied the code you posted to understand why it isn't working. I spent years working as a software developer and writing object oriented code, but now I don't have the patience to figure out all the class stuff. I guess I'm more of a hacker when it comes to vbulletin. So anyway, I can't tell you why what you are doing doesn't work, but I could suggest that you try something simpler like google for php sample code to handle uploaded files, or maybe look at admincp/diagnostics.php where do='doupload'. You probably just need to get the name of the temp path to the uploaded file and it's intended name, then rename/move it to the directory you want. Since this is only for admins, it saves you worrying too much about permissions, file types and sizes, etc (well, assuming you trust your admins).
|