OT

Steve, I have an idea I'd like to discuss. It's to do with creating
scripts, any scripts, that are in effect of two parts. The normal part,
which is viewed normaly with any text editor, may contain any amount of
comments, tabs, spaces etc. The second part of the file contains the actual
working script which is stripped of all comments, unnescessary formatting
etc. This can be done in what is an already existing feature, though
largely unknown, of the NTFS file system, and should also work on Mac OS.
Not sure about Nix etc at this point. If the file is opened on a file system
that doesn't support it, the commented/formatted part would still open and
work as normal.
If you are interested you can contact me by removing the MAPS part.
Regards,
Vince
vinhar [at] optusMAPSnet.com.au
Vince Morgan [ Mi, 18 April 2007 12:56 ] [ ID #1691365 ]

Re: OT

"Vince Morgan" <vinhar [at] REMOVEoptusnet.com.au> wrote in message
news:4625f8eb$0$5749$afc38c87 [at] news.optusnet.com.au...
| Steve, I have an idea I'd like to discuss. It's to do with creating
| scripts, any scripts, that are in effect of two parts. The normal part,
| which is viewed normaly with any text editor, may contain any amount of
| comments, tabs, spaces etc. The second part of the file contains the
actual
| working script which is stripped of all comments, unnescessary formatting
| etc. This can be done in what is an already existing feature, though
| largely unknown, of the NTFS file system, and should also work on Mac OS.
| Not sure about Nix etc at this point. If the file is opened on a file
system
| that doesn't support it, the commented/formatted part would still open
and
| work as normal.
| If you are interested you can contact me by removing the MAPS part.
| Regards,
| Vince
| vinhar [at] optusMAPSnet.com.au

i appreciate your vote of confidence. i'm pretty thin on time however. i'll
be happy to help you in this venue. that is, if this is something you're not
worried about being public.
Steve [ Mi, 18 April 2007 14:46 ] [ ID #1691368 ]

Re: OT

"Steve" <no.one [at] example.com> wrote in message
news:aooVh.2904$Bg.140 [at] newsfe12.lga...
> i appreciate your vote of confidence. i'm pretty thin on time however.
i'll
> be happy to help you in this venue. that is, if this is something you're
not
> worried about being public.
>
>
Not so much help as an opinion. The idea is to do with CMS and using
windows 'alternate data streams' to store what can be heavily commented and
formatted scripts in text files, and the stripped script in the ascociated
alternate file. The fact that the normaly hidden alternate file is in fact
hidden is not the main benifit of the approach as much as the fact that they
are transported, copied, etc together by the OS transparently.
What are your thoughts?
Vince
Vince Morgan [ Mi, 18 April 2007 15:00 ] [ ID #1691372 ]

Re: OT

An application I'd build would upload the stripped alternate file onto the
server, but when it was viewed would in fact show the one that has the
formatting etc transparently.
Sorry for the verbosity, it's getting late here and my brain is dying ;)
Vince
Vince Morgan [ Mi, 18 April 2007 15:12 ] [ ID #1691374 ]

Re: OT

"Vince Morgan" <vinhar [at] REMOVEoptusnet.com.au> wrote in message
news:462618c8$0$22073$afc38c87 [at] news.optusnet.com.au...
| An application I'd build would upload the stripped alternate file onto the
| server, but when it was viewed would in fact show the one that has the
| formatting etc transparently.
| Sorry for the verbosity, it's getting late here and my brain is dying ;)
| Vince

no problem. initially i didn't like the description of 'how' you were going
to do it since it isn't os independent.

i'd pull in the source code for a script into a browser (much like doing
..phps). i'd then detect double/right clicks using js. i'd have calculated
line numbers for the source when outputting to the browser. js would get the
line number via the src element - since any attribute you put into an html
tag, you can set the line number, function/variable name, etc. and use that
to post back to php when commenting is saved. anyway, the mouse clicking
would open a floating div with a textarea into which you put your
comment(s). the comments and lines numbers are stored in js. when a 'save'
operation is performed, i'd dynamically create a form thusly:

//javascript
var html = '<form name="comments">';
loop here for all comments
{
html += '<textarea name="line[" + line + "]>' + comment + '</textarea>';
}
html += '<form>';
someDivOrSpan.innerHTML = html;
comments.submit();
//javascript

php would simply store the php script name, line, comment for each of the
comments in the lines array sent in via the browser. now when you retrieve
the file, you are essentially repopulating the js lines information with
comments...js handles mouseover/click events to show/hide comments from that
info. php also creates a tag similar to strtoupper(md5(mt_rand(uniquid(),
true))) and stores it in the db as well...when it creates the html, it
supplies the comments in whatever pleasant fashion you see fit, puts the tag
at the line number, puts toggleDisplay type of show/hide functionality with
the tag. the tag would look like this in the html output:

<div onclick="toggleDisplay(document.getElementById(<?= $tag ?>)">
<img src='question.mark.jpg'>
<div id="<?= $tag ?>" style="display:none;"><span><?= $comment
?></span></div>
</div>

and toggleDisplay?

//javascript
function toggleDisplay(el)
{
el.style.display = el.style.display == 'none' ? '' : 'none';
el.style.postion = 'absolute';
}
//javascript

anyway...that's off the top of my head. it's easy to implement and is os
independent.

cheers.
Steve [ Mi, 18 April 2007 16:13 ] [ ID #1691381 ]

Re: OT

"Steve" <no.one [at] example.com> wrote in message
news:iGpVh.15$go5.4 [at] newsfe12.lga...
Yes, the OS part has bothered me too. Fat32 wouldn't work either.
You went to far more trouble than I had expected, but I appreciate it very
much :))
Thanks very much indeed Steve,
Highest regards,
vinnie
Vince Morgan [ Mi, 18 April 2007 16:21 ] [ ID #1691383 ]

Re: OT

"Vince Morgan" <vinhar [at] REMOVEoptusnet.com.au> wrote in message
news:46262917$0$16554$afc38c87 [at] news.optusnet.com.au...
| "Steve" <no.one [at] example.com> wrote in message
| news:iGpVh.15$go5.4 [at] newsfe12.lga...
| Yes, the OS part has bothered me too. Fat32 wouldn't work either.
| You went to far more trouble than I had expected, but I appreciate it very
| much :))
| Thanks very much indeed Steve,
| Highest regards,
| vinnie

no problem. let me know if that's something you're wanting to do.
Steve [ Mi, 18 April 2007 16:32 ] [ ID #1691384 ]
PHP » alt.php » OT

Vorheriges Thema: SSL curl connection not working
Nächstes Thema: i'm such a noob...