|
#1
|
|||
|
|||
storing web script files (e.g., PHP)
I thought I would experiment with storing web code files in UR.
I dragged some php files to the tree, and most of them displayed the behavior I wanted: the source is indexed, visible in the text editor, and I can launch the external file in my code editor using Ctrl-J. Then I hit some files that didn't work this way. Unlike the former files, which were pure php with no embedded html, the second type of files are php but also have plain html info in them (<html><body>, etc.). The second type of file imports as a web document and I get an IE download prompt when browsing to it in UR. I tried setting .php as a file type to edit in the text editor but this didn't help. It seems UR senses the html on import. This brings up another issue that there is probably no way around... some .html files I would want to store as plain text like this while others should behave as normal web documents. Any ideas? This would be really cool if I can get it to work. |
#2
|
|||
|
|||
Hi Chris,
A rather simplistic workaround I just tried is to copy/paste the source code into a UR text item, i.e. Open .html file in browser and View Source or open directly in a text editor; Select All, Copy and Paste as Text into an already created text item. In fact, I've made a text template with Courier (monospace) font so that the content looks more like code. This is far from an elegant solution, of course; the worst part comes when exporting. As far as I've tested, UR will export the item as RTF, which is useless, so copy/pasting seems again the only way out. I take this opportunity to suggest to Kinook to add a default plain text template and the ability to import/export plain text as plain text. In that case, an HTML, PHP or whatever code file may be selected as a plain text document and imported as such. alx |
#3
|
|||
|
|||
One available option is to create a new template, based on the Document template, from a text file containing a single space or line feed. Creating Info Items with this template will require copy and paste, but will allow internal editing, and exporting will work as expected.
Steps to create/use the template: Create 1) Start Notepad, enter a space (or line feed), then save the file somewhere on your hard drive. 2) Move this file into Ultra Recall, under the Templates system item (give it a appropriate name and optionally assign an appropriate icon) Use 3) Create new Info Item from this template, then paste copied web page content. The plain text format on the clipboard will be used automatically. We will add your request to our feature request list. |
#4
|
|||
|
|||
Thanks Kevin; looking forward to UR's constant and exciting evolvement!
alx |
#5
|
|||
|
|||
Thanks for the workaround ideas.
I'm actually less interested in editing code directly in UR (although it could be useful at some point; especially if an editing component like Scintilla were available for "code" type items and the editing could be synchronized with external files). I was more interested in simply storing all of my code for easy searching and launching in an external editor. Unfortunately, copy and paste won't really work for my needs since I have thousands of these files and generate new ones every day. The workarounds do come in handy though for simply storing commonly used functions, classes, etc. and for times when I want to save the source of web pages. |
|
|