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

Lack of Interest Further enhancing Add-Ons, packing everything into a zip

Discussion in 'Closed Suggestions' started by Rigel Kentaurus, Jun 6, 2011.

  1. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    A nice to have would be that addons could be distributed in a nice zip file, that the user could just upload, and that's it.

    As it stands now, the user has to upload the files individually to the server, in the correct places, while this is not particularly hard, it could be easier. Since we already upload an addon.xml file to actually install the mod, we might as well upload a .zip that contains both the php files and the xml file

    Implementation wise, we already use library/ for almost everything, we could have another directory called addons/ which would be added to the php search path, and, ready, addons with auto-install without ever conflicting with the main code (an addon cannot upload a rogue XenForo_ControllerPublic since everything would go to a different directory). Since already data and internal_data are chmod 777 adding one more directory to that should not be that much of a problem

    This would make installing and uninstalling addons a really pleasant experience. It could actually be one click to deleting the relevant files.
     
    Digital Doctor likes this.
  2. Luke F

    Luke F Well-Known Member

    The addons folder would need to be constantly scanned, which isn't really feasible.

    What would be quite nice though, is if there were an addons folder as you described, and once an xml file is added a notification is added either throughout the admin panel or on the main page of it offering to either install the addon or delete the xml file. After installation the xml file would be discarded. Additionally the addon name, whether it is an upgrade, etc. would be read out of the xml on the fly and handled automatically.

    Something for 1.2 perhaps :)
     
    Alien likes this.
  3. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    I don't think that is correct. Could you expand on that? :)
     
  4. ragtek

    ragtek Guest

    1. i requested this already, let's see if i can find the thread

    2. i coded this already. That's why all my add-ons are in library/ragtek/addonid
    if i create a new add-on, the system creates the folder + static file and asks me if a ineed controllerpublic,controlleradmin,model,dw directory
    and then once i'm finished, i can create the zip export

    it's still a very early alpha, so i can't release it.
     
    Darkimmortal likes this.
  5. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    If I remember what happened with the AddOn Management solutions and template solutions in vb.org, they have a serious problem of adoption. So, this kind of feature is better suited in the core, where it is available to all add-on developers, instead of people having to install a separate add-on, only to manage their actual addons.

    That said, I think it is awesome that you are doing something like that and I would love if it were released someday.
     
  6. Slavik

    Slavik XenForo Moderator Staff Member

    Id like to see some sort of API between users boards and the new resource management system soon coming.

    A "click here to install" button... which would allow users to 1 click install mods from xenforo to their boards.
     
  7. a legacy reborn

    a legacy reborn Well-Known Member

    (y), that is actually really cool.
     
  8. Digital Doctor

    Digital Doctor Well-Known Member

    That sounds like the Apple Apps Store.

    Excellent idea.
    That's not good.
     
  9. Slavik

    Slavik XenForo Moderator Staff Member

    Wouldnt know, never used an apple app :)
     
  10. iBreeze

    iBreeze New Member

    nice idea mate this would be a good idea
     
  11. ragtek

    ragtek Guest

  12. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    Nice. That looks like the complement of what I am asking for. Yours is for creating the zip file, mine is using that zip file to actually install the addon.
     
  13. ragtek

    ragtek Guest

    ups
    i missed your point in the first post:(
    I thought your talking about creating the zip^^
     
  14. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    And, actually I did not think about generating the zip in the first place, and I think that makes complete sense... export as zip, import as zip. It is completely doable. And would get rid of the "package" and the "upload" stage of things. The installer already gets rids of the "execute queries" and the hooks of the "edit templates".

    This could put us one step away of the "click here to install"
     
  15. ragtek

    ragtek Guest

    I've added this to our todo list for my addon helper framework(but i agree, if it should be in the core), because it's really a nice idea (for users who want this).
    I would NEVER give the server write permissions to the add-on directories^^
     
  16. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    It could be properly sandboxed. As far as the write is concerned, I was thinking we could have a directory named "addons" in the XenForo installation (that is writable), that protects all other core files from being overwritten. Of course, XenForo would not find this by default because it only checks inside "library" for classes, but this is as easy as adding set_include_path(get_include_path() . PATH_SEPARATOR . './addons'); in the FrontController

    Another solution could be, to restrict writes into a specific addon directory, creating a convention, of course, since one would need to name their classes the same as the addon-id, but that would protect an add-on from overwritting other add-on files.

    Or, if that sounds unreasonable, the engine could just check if the file already exists and refuses to install the add-on if the existing file is not owned by the addon.
     

Share This Page