1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Upload Script in a PHP file. How to?

Discussion in 'XenForo Development Discussions' started by Richey, May 10, 2011.

  1. Richey

    Richey Member

    Hey community,

    currently I am working on a texture database for my forum. Everyhting is done with PHP files.

    Now my users should have the possibility to upload files. I could do this with an own upload script but I would like to use the xenForo uploader. So, how can I integrate the xenForo Uploading system in a php file?

    Thanks a lot!
  2. Robbo

    Robbo Well-Known Member

    If you look at my gallery mod you can see code in it to upload a file using AJAX, this won't have the progress bar but it will be without a page load. That is the easiest way I could find to do it to get my mod out.

    Or you can look at the attachment model, post controller and attachment datawriter to see how all the code works together to upload. And don't forget attachment_editor.js as well to make it use flash and look pretty.

    I am currently creating a file manager for my downloads mod and using the flash uploader, when it is out you can have a look at it to see how it is done as well. I am wanting to write a tutorial on it at some point as I think the quality of mods will increase if people know how to use the nice uploading features instead of resorting to a page load or using FTP (like a lot of mods are doing at the moment).

    So basically I can be of more help in the future :p
    Richey likes this.
  3. Richey

    Richey Member

    Thank you Robbo. I will check your gallery mod when I'm home!

Share This Page