On Tue, Sep 9, 2008 at 11:24 AM, alinome.net <[EMAIL PROTECTED]> wrote:
>
> WikiCreole uses {{ }} for images. Using it for files too would be a
> backward compatible extension to the standard. I've read nothing in
> WikiCreole about file links. I think the markup for links would be
> suitable for files too in both BoltWire and WikiCreole with an
> aditional "file:":
It seems images and files should use the same notation, because both
involve uploads. Unless you ftp things up, you need to do file_uploads
of both images and downloadable files.
> [[file:boltwire2.32.zip|download the last version]]
This would conflict with the interwiki markup.
> In fact, file links are more similar to page links than to images.
> Anyway those alternatives are very easy to implement (and all of them
> could co-exist, I think) and backward compatible.
>
>> > $BOLTvar['$en'] = '<span lang="en" xml:lang="en">';
>> > $BOLTvar['$en_end'] = '</span>';
>>
>> > [[anypage|some words in other language and {en}these words in
>> > English{en_end}]]
>>
>> > I get the <span> rendered as text :-( I have not searched why yet.
>> > That's why I
>> > thought an image with parameters wouldn't work inside a link.
This is a bit curious. In the example below, #1 & #3 work as expected,
but not #2, like you reported. I added it to the roadmap, and will
have to look into this more to understand exactly what's happening.
I'm considering this a bug. Though there may be a reason for it...
> I know, but how can I put HTML tags inside a text link? I was using
> {vars} because that is the sintax used by the "personalized tags" of
> CMS Made Simple, a CMS I'm porting one of my sites from. In that CMS
> you create tags that are PHP programs, and then called them in the
> page with {tag_name}. Using {vars} in BoltWire allows me to keep the
> original tags! Anyway the important thing I need is to use HTML inside
> the link texts.
I'm sorry for this. I'll look into it some more.... Ha, curiosity got
the best of me.
Line 480 of markups.php says this:
$label = BOLTtemplatemarkup($label, $pageLink, 'link',
'vars,func,style');
That is, only orders: vars, func, and style get processed. I changed
it to vars,func,style,fmt and my html tags get substituted properly.
Not sure it would do it for your span tags though.
There were reasons I limited which rules were processed here, but I
don't recall exactly what they were... :( It could have just been
performance, as it does this whole thing on every link, but it could
be more. Perhaps you can test it with some different values and let
me know if you report and problems. We could make it configurable, or
just expand it, or whatever.
Or... We could just rename the last fmt>html rule to the first
style>html rule. That will make it processed with the other things.
For yoru specific situation, you might try copying the block>span rule
to style>span and see if it doesn't solve your problem.
>> >> The problem with the wiki-creole syntax is BoltWire's extensive use of
>> >> variables like this {id}. As these are processed before links
>> >> {{image}} would turn into {} after the {image} markup failed to find a
>>
>> > I didn't think about that! Oops. I'll see what can be done. Perhaps
>> > just to
>> > ignore "variables" whose name inside the outer {} is {something}. By
>> > the way,
>> > there's more { and } in another WikiCreole markup:
>>
>> One option is to process {{}} before {} and then use a function to
>> translate that into [^ ^] for BoltWire's handling later, at the
>> appropriate time. It might work pretty easy. Essentially it lets
>> BoltWire keep doing all the heavy lifting--you just translate one
>> syntax to the other. And sites using [^ ^] will continue to work as
>> well.
>
> A third simpler option could be to change the regular expression in
> the {} markup, indicating that no additional { can be at the start and
> no additional } at the end.
Yes, as long as you do a look behind and/or look ahead--which are
notoriously complicated and I understand, very time consuming. Which
would adversely affect performance I fear. Which is why I suggested
the alternate approach--something like:
MarkUp('pre', 'embed', '/\{\{[-_a-zA-Z0-9\.\/\|]+\}\}/e',
'creoleUpload("$1")'); // {{image.gif}}
The creoleUpload function takes image.gif, parses out the label and
and attributes and then returns
"[^$file label=$label $attr^]"
This would then later be processed by BoltWire as an ordinary upload...
Cheers,
Dan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---