Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 20 Mar 2015, 12:58
Preech Preech is offline
 
Join Date: Aug 2002
Upload Image from Admincp

Okay, so I have been upgrading this mod http://www.vbulletin.org/forum/showt...hlight=vbmusic for awhile now. I was complete but not happy with it. There was some things I wanted to change.

To add a album from the admincp I didn't want just a html link to add to the database. I wanted to give the admin the option to upload a image where it save's the file to the server and inserts the link into the database. I can get the path to show up in the database, but the file doesn't show up in the correct folder. This is my code for creating a album. Please any assistance would be greatly appreciated.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #2  
Old 21 Mar 2015, 14:02
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
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).
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Miscellaneous Hacks Asset Manager / Image Upload Fix to upload multiple files like the Flash uploader BirdOPrey5 vBulletin 4.x Add-ons 39 05 Feb 2020 18:18



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 05:41.

Layout Options | Width: Wide Color: