The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Help Creating A File Upload Page Please
Hi guys & girls, I'm looking to create a simple file upload page so I can offer my moderators the ability to upload 1 specific file to a specific folder. I'd like the page to take my forum theme which I can do already by creating a custom page and template. The option of usergroup access checking would be nice but not essential as the page will not be public.
It's just a simple upload script I'm looking for, which I can customize to suite my file and folder requirements and then build it into a custom template perhaps. Any help would be greatly appreciated. Many thanks B16MCC. |
#2
|
||||
|
||||
You could try this mod https://vborg.vbsupport.ru/showthrea...ht=file+upload
|
#3
|
||||
|
||||
This is the programming *discussion* forum which means you get help with programming the page yourself. This usually starts by you posting your code and saying what the problem is. If you are asking for someone else to do the whole thing for you, then you need to post in either the Unpaid or Paid requests forum.
|
#4
|
|||
|
|||
Outbackmark, thanks for the link , I am actually already that mod but it's far too advanced for this simple task I want to offer my moderators.
OK Lynne, here's what I've got so far. Here's the custom template I've made that's linked to a navbar tab. HTML Code:
{vb:stylevar htmldoctype} <html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html"> <head> <title>{vb:raw vboptions.bbtitle}</title> {vb:raw headinclude} </head> <body> {vb:raw header} {vb:raw navbar} <h2 class="blockhead">Services Database Upload</h2> <div class="blockbody"> <div class="blockrow"> <center> <br></br> Welcome Moderators, to the Services Database update page. <br></br> Download The Database <a href="http://www.xxxxxxxxxx.com/spreadsheet.xlsm">Here.</a> <br></br> <br></br> When you have finished updating the spreadsheet please upload it using the form below. <br></br> <br></br> <form action="upload_file.php" method="post" enctype="multipart/form-data"> <label for="file">spreadsheet.xlsm : </label> <input type="file" name="file" id="file" /> <br /> <br></br> <input type="submit" name="submit" value="Submit" /> </form> </center> </div> </div> {vb:raw footer} </body> </html> That's my simple upload form and here's the associated php script that it runs. PHP Code:
Firstly, when it checks to see if the file exists, I simply want to over rite it, if it does exist. Secondly, when the uploaded file is moved to the Uploads folder, I want to change this to a location outside of my forum root folder if possible. A bonus would be a check to see if the file is the correct name which is 'services_db.xlsm' A second bonus would be to check if the user is a member of the allowed user groups and deny access to the page if they are not. Although the navbar tab is hidden from certain user groups the page could still be addressed directly and so a user group check would make it more secure. I'm sure what seem to me like huge hurdles in this simple page are very easily over come with a little expert help. Any help would be greatly appreciated and if a donation to a coder for example, would help then of course I'd be happy to do so. Many thanks. B16MCC |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|