[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Loserjabber-devel] Magic Dialog
Replying to myself....
We'll also not auto-linkify when auto_url is on if the URL is within
<XMP>...</XMP>, <SCRIPT>, or <STYLE>. There may be some other cases we
have to look out for... I'm not an HTML expert. What other tags would
this be bad in?
In any case, adding exceptions and tuning this is easy ... it's not going
to be done via one big ugly regular expression (it couldn't be) ... I use
the HTML::TokeParser class from Perl which returns tokens as it parses
through it.
On Thu, 31 Aug 2000, Brad Fitzpatrick wrote:
> I propose most the magic be done server-side. Not all the magic, but
> most.
>
> Here is what I'll do server-side (once I'm back up in Seattle and on DSL):
>
> Protocol modes "postevent" and "editevent" will have new options:
>
> urlbase = <URL> # remap relative URLS from this absolute address
> # the clients can then send this if the user has
> # entered their absolute address in the options
>
> auto_url = 0 | 1 # if this is on, URLs that aren't already in the
> # middle of an <A>...</A> will be linkified
>
> Those two are easy to understand and even Windows users will use
> them. This one's a little trickier, but with a little bit of
> documentation people will understand:
>
> auto_ljlink = 0 | 1
>
> When on, LiveJournal will essentially do:
>
> s/\{(\w{1,15})(?:,\s*(.+?))?\}/"<A HREF=\/users\/$1\/".($2||$1)."<\/A>/eg;
>
> ... on the event. So you can type something like:
>
> Going to go hang out with {evan} now.
>
> And evan will be a link to his journal. Or:
>
> Going to go hang out with {evan, Evan} now. {blythe, That chick
> that hangs around me} is going also.
>
> Perhaps using {..} as the pattern to match is too common. Maybe {!user}
> or {{user....}}. Thoughts?
>
> So that's my plan. This way all clients can use it, and if we are
> consistent with the wording for these checkboxes in the dialogs, we can
> have a FAQ entry about it that's smaller.
>
> Another good reason to do this server side is that this is a bitch to do
> in C, and the current clients are written in C (LoserJabber), C++
> (Windows, BeOS), and Basic (Mac, and LizardJuice -- the new kick-ass Mac
> client). And it's hard to do in Basic too (everything's hard to do in
> Basic :)).
>
> Any magic outside this can be loserjabber-specific.
>
> Hopefully this makes your job easier, Evan. If you're really set on
> torturing yourself and doing it anyway, feel free. Or if you agree most
> should (could) be server-side but my proposal sucks, I'll listen to
> alternatives.
>
> - Brad
>
> On Wed, 30 Aug 2000 patrick@antispin.net wrote:
>
> > Figured I'd use this instead, per evan's request. My personally feeling on what would be easier to use would be a sort of scripting language which was the first example. That sounds easier to use, hence, i would use it. i don't use the make links ablity in the windows client because it seems out of the way. with keystrokes, the dialog would be ok, but jumping windows a lot is sort of annoying.
> > if i could set up options and then just type everything without windows poping up, that's the best. maybe i'm not completely understand the dialog. will we be able to set up other subtitutions besides links to friends ljs?
> > you mention the smiley face, but would i don't see how that fit with the dialog box. i think i need to play with it a little more.
> >
> > hope some of these comments make sense.
> > --
> > patrick@antispin.net
> > _______________________________________________
> > Loserjabber-devel mailing list
> > Loserjabber-devel@lists.sourceforge.net
> > http://lists.sourceforge.net/mailman/listinfo/loserjabber-devel
> >
>
> _______________________________________________
> Loserjabber-devel mailing list
> Loserjabber-devel@lists.sourceforge.net
> http://lists.sourceforge.net/mailman/listinfo/loserjabber-devel
>
_______________________________________________
Loserjabber-devel mailing list
Loserjabber-devel@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/loserjabber-devel