Does anyone know of a simple online file editor that I could put in a folder on the server to enable users to view and modify files? It would have read/write access to source code files (html & css) and open those up in a web-based code editor.
Then when they save it, it would need to have a hook to be able to commit the changes back to whatever revision control system is in place.
Basically I need github.com's capability to edit files that are in a repository without checking the project out.
PHP would probably be the easiest to be able to just drop into a folder, but whatever works.
The Github wiki is open source: https://github.com/github/gollum - it stores the files in the git repository. I don't know of a pure file editor, though.
Related
I am using atom editor, remote-sync plugin so that after every change I make right in the editor it will be updated automatically.
That is working perfectly and it's a nice feature. I want to know if there is a way that every remote change will be downloaded to my local version. They have a watch for files.
"watch":[
"/css/styles.css",
"/index.html"
]
I want to know if there is a possible way to watch for the whole folder so that every change is tracked.
I use ecplise for my php projects.
I want to have an external location for all my plugins and link specific plugins to each of my projects.
I found how to link folders etc, but the actual files aren't copied in the folder, resulting in errors in the website because the files are missing. They are only inside my project.
How can I link an actual folder to my eclipse project, that is being updated automatically from the source?
In Visual Studio there is an option to copy specific resources to the output folder. I am looking for something similar here.
Some things come to mind:
I don't know if such an option exists. You could achieve that with build tools, that just to the copy on build. You wouldn't then need to reference the files in eclipse any longer then however.
You can configure the PHP include path in your project. Then you can configure the include in your application the same. Might not solve all your issues, but would work cross compatible.
I have a PHP project setup in Netbeans (v6.8) where all the PHP files are on a remote server and in a single directory. Whenever I save files locally they are updated on the remote server via SFTP.
I now need to edit a remote JavaScript file to add some jQuery logic but the file is located within a different directory on the webserver. How to I add this JavaScript file such that when it is saved or updated it is transferred to it's own location on the server?
When I attempt to create the file locally within NetBeans it saves to the same directory as my PHP files. I would like to be able to continue using NetBeans rather than doing this all manually using an SFTP client and a text editor. Thanks in advance.
Since you're not getting any answers I'll offer a limited suggestion. I use netbeans, but not to automatically upload like you're doing so I may be way off here.
It sounds like you would either need to change your project to have a larger directory structure that would contain everything for this to work like you want it to. Gan you go up a level or two in the directory structure, and add containing folders in your local project to match?
The other option might be to create a second project for the javascript directory, and set that to go were it needs to go. You can create "project groups" in the project view which you can use to link them together. I know this is probably not ideal, but is hopefully easier than doing your uploads manually.
I was just wondering if i can find php backend which can be used as alternative to poedit to enter translations.
Sometimes we need update view files directly to live server and its painful to download all source to local machine and generate .po files and translate them using poedit and upload again. Can anyone help?
It's not PHP, but there is Transifex, in both download and hosted form. </shamelessplug>
i am using FTP for uploading and downloading PHP files as well as folders, so in that case if you want to edit/update only some of the source in the FTP you can right click on file name where you get the option for "View/edit" which can be open in any of your editor and its still connected with FTP so whenever you done change in that file and save it will automatically save on your live server too.
So if your query what i have understood then you can use my answer.
Thank you.
I'm using WordPress for my website. There is a plugin for WordPress that can edit po-files and generate mo-files.
CodeStyling Localization (plugin for WordPress):
http://www.code-styling.de/english/development/wordpress-plugin-codestyling-localization-en
Unfortunately, if you're not using WordPress you have nothing.
I know that I can save all my projects files into repository so deployment of new version of software become only using svn export into properly directory.
But I have a feeling that it is not right way and for media files I should use some other utilities for deployment like rsync. But it is also a problem with double-side sync = I like to keep backup of full projects into some security space (not only live server).
So main question is what is the right way and project's directory structure for web-application in PHP?
Ehh, a complex one.
First of all, if you have such possibility, it's good to split 'code' and 'web' part. Something like that.
web/
web/css/
web/upload
code/
code/lib/
code/actions
This gets PHP out of web root. It's safer (attacer will not be able to access your files by entering URL in browser). BUT - this requires appropriate application design (for example Symfony framework gives you similar layout).
Second thing - there's nothing wrong (in my opinion) with binary files inside SVN repo. It all depends, though, what files we are talking about. If not user-uploaded content - go ahead. The less complex is deployment, the less chance something goes wrong.
BTW: You can always opt-out some folders contents from svn so user files won't mess up with your files.
So one thing you have to keep in your design is to separate user entered content of your content (the best is to create special folders for users and opt them out SVN).
It's absolutely right to put media files into source control (whether svn or something else). It's probably a good idea to put media files somewhere separate from your .php files though.
Why have a two step deployment (svn up and then rsync or similar) when you can do it in one step?
It's not wrong to have your media files into your SVN repository, as your medias' version is linked to the rest of your software's.
Besides, if you want to have backups of your svn repository, you can use the svnsync command to have some other box mirror you "main" subversion repository.
About structure, the best practice mainly depends on the use case you are facing. You most likely want to organize your files by modules and content-type (so having media separated from code, ...).
It's fine to put the media files in svn too.
You could use for example external svn links to blend the media files into your tree, so you have only one checkout to do and you have full subversion support and you do not clutter your sourcecode repository.
In my opinion, it depends on what type of media you are talking about. If this is something static, like images, javascript, css, and so forth - something that isn't temporary, then put it in subversion. However, if it is something that will change, such as an ad, I don't think there is much reason to subversion it. Just set the directory propset to ignore and upload the files manually with rsync, scp or ftp.