Welcome to Our Community

Registration on our forums are now open for some days! Feel free to sign up today.

[Free Add-on ] CustomPages by HeadHodge 1.0

A file tool to remotely manage server directories and files with Ajax/Json

  1. XenForo Rocks
    Compatible XF Versions:
    • 1.3
    License:
    Liscensed under the MIT License (http://www.opensource.org/licenses/mit-license.php)
    Updates Duration:
    N/A
    Visible Branding:
    No
    CustomPages by HeadHodge
    Includes two CustomPages: 'FileTool' and 'Hello'

    I do volunteer database mgmt. and custom coding for The Kavaforums, a worthy non-profit organization.

    During the course of my work, I developed a file tool that I use to make my job a little easier. I call it 'FileTool' (original isn't it?).

    'FileTool' Screenshot:

    aTRyxmz.png

    The work I needed to do required me to learn how to work with the Xenforo framework. To help me learn, I developed a little test program that I use to experiment XF concepts. I call it 'Hello'. It's my rendition of the veritable time-honored hello program.

    'Hello' Screenshot:

    rfSYjQH.png

    I had such a long learning curve with Xenforo, I thought I would share my code with the hopes that it may help others using the Xenforo framework.

    Administrators may find this useful as a remote file tool. Developers and others may find this useful as a working example that demonstrates a variety of techniques I use to interface with the Xenforo framework.

    I include my 'Hello' page for those who may be interested in a bare bones example of a CustomPage with a xf style overlay using Ajax/Json.
    ___________________________________________

    'File Tool' Features:
    • Traverse the Server File Structure.
    • Upload Files.
    • Cut, Copy, Paste Directories and Files.
    • Edit/Delete Directories and Files.
    • Unzip Files.
    ___________________________________________

    'File Tool' Techniques:
    • JQuery/Html:
      • Passing objects between client/server using Ajax/Json
      • Creating multpart forms with the HTML5 FormData object
      • Create a multipart post to upload FormData files
      • Encode/Decode binary data in a Json object
      • HTML5 'flex' elements for better layout control
      • Self invoking objects to isolate variables (Namespace)
    • JQuery-Tools:
      • Creating xf style overlays
    • JQuery-UI:
      • Dragging/Dropping Table Columns
      • Dragging/Resizing Table Columns
    • PHP:
      • Various file system functions (i.e. 'rename file', 'delete file')
      • Dynamic class loading
      • Unzipping files
      • Retrieving/Saving uploaded multipart form files
      • Encoding/Decoding binary data for Json objects
    • Xenforo:
      • Interfacing Page Nodes to a callback controller
      • Using a JSON View method to stringify objects to Json format
      • Using a RAW View method to return Html without templates
      • Using Callbacks in templates to inject Html into them.
      • Using $Visitor object to implement a security feature.
    ___________________________________________

    Pricing/Support:
    I distribute CustomPages freely to everyone under the MIT License (The MIT License (MIT) | Open Source Initiative).

    If you find this tool useful please donate a little (or a lot) to The Kavaforums. It's a worthy non-profit. All donations go directly to them for the exclusive use of offsetting their operation costs to keep their valuable web site alive.

    This is not a commercial product so I provide very limited support for it. You will get extra attention from me with any amount of Donations made toThe Kavaforums.

    donate-to-kavaforums-gif.111841.gif
    ___________________________________________

    Installation:

    Download the and install the attached zip file.

    Verify that the result installed:

    Directories:
    /root/js/CustomPages
    /root/library/CustomPages

    Templates:
    HeadHodge_FileTools
    HeadHodge_FileTools_Edit
    HeadHodge_FileTools_Reply
    HeadHodge_Hello

    Use the Admin CP to create a new Page of type Node (anywhere you like).

    For the Page Node you use for FileTool:

    Set the URL Portion field in the Page Node form needs to exactly the name 'FileTool' (see attachment).


    Of0NPdo.png

    Set the PHP Callback field in the Page Node form to: 'CustomPages_Controller :: getGuestReply' (see attachment)


    WRSrW3N.png

    For the Page Node you use for Hello:

    Set the URL Portion field in the Page Node form needs to exactly the name 'Hello' (see attachment).

    COxFvpr.png


    Set the PHP Callback field in the Page Node form to: 'CustomPages_Controller :: getGuestReply' (see attachment)

    FrMMll2.png
    shabbir12 and Warrior like this.
  • About Us

    Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.
  • Like us on Facebook

  • Buy us a beer!

    The management works very hard to make sure the community is running the best software, best designs, and all the other bells and whistles. Care to buy us a beer? We'd really appreciate it!

    Donate to us!