Jump to content

Making hooks more end-user friendly.


Wolfie

Recommended Posts

One of the drawbacks of install apps and some hooks is the need to upload additional files. Now, for apps, that's a necessary evil. However for hooks, I believe there's a way around that to a degree.

Add an option so that when going to export a hook, extra folders/files can be added so that everything is contained within one XML file. Then when someone is installing the hook, it would generate the folders/files, so that it's not necessary for someone to upload files on top of importing a hook file.

Mind you, there should be a limit on it. For example, if the XML file is going to be over 1MB, that might be a bit much and for some could bomb out since not all hosts are as generous with memory resources. So setting a size limit and even restricting the number of folders/files would be understandable. Besides, if there are going to be that many files or exceeding a certain size, then it's understandable to require the files to be uploaded.

Anyway, being able to do this would make it easier for the end user to install a hook. Many who are new or not tech savvy get a bit lost or feel worried about doing something wrong when trying to install a hook where they have to upload files as well. So this would help them out some when it's only a few (small) files to be uploaded, as IPB could generate the files for them.

Link to comment
Share on other sites

In order to guarantee that IP.Board can write files, the directory it's writing to has to be writable (ie, CHMOD 777). A lot of the times, the files those hooks have to upload are putting stuff into other directories besides writable ones.

Link to comment
Share on other sites

In order to guarantee that IP.Board can write files, the directory it's writing to has to be writable (ie, CHMOD 777). A lot of the times, the files those hooks have to upload are putting stuff into other directories besides writable ones.


Could remind the hook author that it could be a problem. But if they're choosing folders/files from locations that should be 0777 anyways, then it shouldn't be an issue anyway.
Link to comment
Share on other sites

I used to use a WordPress premium theme that had the concept of an "easyhook" where you picked a template location name from a drop-down list, wrote your code in a text box and the hook was created for you. This concept could be extended to allow us to choose hook type, as well (append my code, prepend my code, replace your code with my code, etc..).

Link to comment
Share on other sites


In order to guarantee that IP.Board can write files, the directory it's writing to has to be writable (ie, CHMOD 777). A lot of the times, the files those hooks have to upload are putting stuff into other directories besides writable ones.




Could remind the hook author that it could be a problem. But if they're choosing folders/files from locations that should be 0777 anyways, then it shouldn't be an issue anyway.



We have /public/ipc_blocks/...
give hooks an assets directory I say and be done with it :P
The main problem has always been js files and images with hooks.... the rest can almost always be cleverly worked around, due to the literal current nature of hooks.
But yes.... a provided directory structure/framework of some kind for this would be .... so helpful actually. :)
Link to comment
Share on other sites

give hooks an assets directory I say and be done with it :tongue:


Something like /public/hooks_assets/ and heck, could even make it an easier process by having it look in a folder that is based on the hooks key.

For example, when exporting a hook and let's say the 'key' is 'wolf_someHook', it would look for/in a folder named '/public/hooks_assets/wolf_someHook/' and if the folder exists, it would tally up any/all files and if it exceeds a certain number of files or a certain combined size then throw an error.

I believe strongly in setting certain limits so that it is less likely to give the end-user/installer any issues such as a blank page, memory error, etc. Besides, it would be intended for times when only a few small files need to be generated, not as a way to make it easy to upload a few megs worth files or something.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...