Jump to content

An online template file creator/editor


Rebecca
 Share

Recommended Posts

There are times when we deal with clients that will either not allow us to access their servers directly or where we don't get FTP access to.

I think that it would be interesting to have somewhere in PW2 a small file manager, nothing that fancy, a simple text editor as an option for when this kind of things happen and a way to delete old unused images (since the ones we still have and need will be created again by PW2 when viewed).

I know there are already cool things like ajaxplorer, but I also think that it would be a great thing to have this as a standard module for PW2.

Link to comment
Share on other sites

When we talked about this last time, we felt that this was needed very rarely, so I don't know if it even is on the roadmap, but if is, then very very low.

How can you work for someone who doesn't even give you FTP access? And more importantly, if you have to do a website for them, do you send them finished website vie e-mail, so you can edit it online? :)

Link to comment
Share on other sites

Adam: Case might be intranet or some other special environment.

I personally feel bad every time when I see any code in textarea. Even if it's css.

About unused images: can you describe the need better? Images that user add's but never uses anywhere? Or images used in templates/css but edited away in some point?

Link to comment
Share on other sites

Well, i had a client who was simply overzealous about their servers, and that's just it... I worked with them on my localhost, presented all the things to the client, after all the approval processes finished (damned committees and bureaucracy) I gave them a CD with the php files and a big sql file and specific instructions on how to deal with them, they didn't understood, so I had to go there and install them under close supervision of the IT admin (who knew close to nothing about anything linux related).  Every time I had to change something, I would just use a recreation of  the folder structure present in their servers, do the changes and commit them in a CD (with instructions like:"just copy all this files to replace the one's you've got).

I know this is not an ideal scenario but it happens, it has happened to me once and I would like to see if there's a possibility that would allow me to save myself from such hassles.

As for the images, well, if we have a simple online template editor (nothing more than just a text area to copy paste the code developed elsewhere, that would save as a template file as required by PW2, then we could get a client who required their images to be a specific size, but now want their images to be another size.  In this scenario, PW2 would generate the images for each size.  If we deal with just a small amount of images, that's not an issue, but what if, as time passes by, they change their design and literally thousands of images need to be recreated using the new dimensions? Old images stay there wasting valuable server space...

The template creator/editor should not need to be anything fancy, it doesn't need to be more than a simple text file editor so we can easily copy/paste the text that needs to be on the server.  Why? Because of the scenario I described above, but also so we can make small adjustments easily.  This would not mean we save templates to the database though, it would save the php files where they belong and that's it.    I guess the option would be to integrate something like FileThingie into the admin. http://www.solitude.dk/filethingie/

By the way, what I ended up doing with that client is installing ajaxplorer :Phttp://www.ajaxplorer.info/ but for most sites this might be too much.

Link to comment
Share on other sites

Well, as for that client: I commiserate with you.

re: text editor – I can see why you would want something like that , but it's mostly very few situations, so I don't see this becoming top priority any time soon, not with time/resources needed for users & plugins parts, sorry.

re: image cleanup – some sort of clean-up routine would be nice, however there is no such thing for a moment. Also, there is no way how to say what files are and what files are not used – since resizing is done on template-level. However, something, that would list all sizes of generated images other than original size and let you check sizes you're not using and then delete them could be done as plugin / module. [and later, if polished enough, become maybe a core feature]

Link to comment
Share on other sites

Regarding the image cleanup. I need to create a "clear image cache" function at some point (perhaps as a button in the  FieldtypeImage module configuration). That would just go through and wipe out all the cached images. Since ProcessWire doesn't know which size variations you are actually using, it would have to wipe them all. But of course, any of the ones that were being used would just get re-create automatically the next time the page is viewed. On a big site, this might mean pages take longer to render than usual, but only temporarily.

Link to comment
Share on other sites

@piranha: just as was said before: it's nice feature, I agree. However, it's not important enouhh to be pushed to the top of the list current one and only lead programmer needs to do. Also, it will probably never be part of core – however it will be available as a module [probably], and as a module, there is nothing stopping you from doing it yourself.

Link to comment
Share on other sites

  • 1 month later...

:) Let me address this :)

there is nothing stopping you from doing it yourself.

A mixture of lack of experience of documentation (as of yet).  It might be the case that you didn't want to come out as rude, but just think about it, if piranha and me have come here for information and help, offering us to do it ourselves is not the most helpful response (though, I might add that the clarification of this not becoming part of the core and it probably coming later down the road as a module indeed is helpful).

I say this to state my point of view on how we should care what we say here to keep this community happy, helpful and fun :D

Thanks and take care.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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