Below discussion started in
MoreExpansionInTemplateTopic.
--
PeterThoeny - 28 Sep 2002
Continuing this fine discussion with myself...
In
handleInternalTags, the implementation of
%SPACEDTOPIC% is
rather bizarre until you understand that it is only useful for
the ref-by feature. But there are lots of other places where you
would like a spaced out topic:
In those cases you don't want the
%20 and you
surely don't
want the
*. So, what to do?
I created a
%TOPICWITHSPACES% tag that simply puts a good old
space between the parts of the
WikiWord. I don't like
the need for both of these, so I'd prefer a more general
variable that would place arbitrary stuff between the wikiwords.
Comments?
--
RobertWithrow - 14 Jan 2002
Just so you don't spend too much time talking to yourself:
I would like the ability to display topic titles with spaces, but, how do you handle malformed
WikiWord topics (which I like to use), like:
I'm guessing your code treats each capital letter as the beginning of a new word, but maybe we could consider implementing other rules, for example: (I'm not sure how far ranging these changes would have to be.)
- Treat each capital letter as the beginning of a new word unless:
- It is a word on a special predefined list (like TWiki)
- There is a contiguous group of capital letters, then treat all but the last as part of a word (acronym) in all caps, treat the last as the beginning of a new word, unless:
- A numeric sequence (see below) starts after the last capital letter, then treat all the capital letters as one word.
- Numeric sequence: Treat a sequence of numerals, possibly including a recognized separator, prefix, or suffix (. , $ % etc??) as one word.
This is only a first pass, I'm probably overlooking some things that even I will think of later.
--
RandyKramer - 15 Jan 2002
I also like
WikiWord with spaces in title - easier to read, more friendly to Wiki beginners. I like also rules as above. Perhaps, after all rules were applied, we may have special variable in
WebPreferences, which will specify spaced spelling, if all rules fail (i.e. using : in place of space, having TWiki:Version4:Dot7 definition for Randy's example above).
Possibly we can have "hidden variable" with right spaced spelling (if rules fail) directly in the topic. Then, we can have wiki topic name (
WikiName) in edit box nicely rendered to spaced topic name in every link, not only in topic header. But having spelling in each topic will cause overhead (to open topic to check spelling), so maybe one central storage in web's
WebPreferences topic is better.
But:
Spaced Topic Names instead of
MixedCase would not look like Wiki anymore - is it a heresy? Or it is a Good Thing?
BTW: I just found about hidden variables in
UsabilityIdeas (Hidden access control method). You guys TWiki developers are soo incredibly good! You implemented it faster that I typed in my wish here!

I am really excited about TWiki possibilities! Thank you for making it possible!
--
PeterMasiar - 15 Jan 2002
Regarding the degenerate cases: I wasn't even thinking
about them.

I was ignorantly happy with the current algorithm
which just splits the topic where a capital letter follows
a lowercase letter. I didn't plan on changing that.
I was mostly complaining about the API situation: The current
%SPACEDTOPIC% variable doesn't really do what it's name
suggests, and it is really only useful for the specific case of
Ref-By.
BTW: I wonder what how well the current Ref-By works with RandyKramer's examples?
My current thiking is that this variable should be renamed
%SPLITTOPIC% (which would put spaces between the topic words)
and there should be a
%SPLITTOPIC{sep="%20*"}% version for
use by the
Ref-By code. While not backwards compatible, I don't
imagine this would be a big issue since I doubt anyone other than the current
TWiki06x01 code is using the current implementation. I'm going to code this up and move
this to a
FeatureEnhancementRequest. I don't have a clue
if one can dream up sufficient regexps to handle most cases or if
some kind of hinting would be necessary. I'll leave that to
more capable programmers!
Also, I plan on moving the expansion topic to another
FeatureEnhancementRequest. I've gotten that working pretty
well, to the point where I can do pretty complete XP tracking using
mostly standard
TWiki06x01.
--
RobertWithrow - 15 Jan 2002
Since we're brainstorming, I have two more things:
- Note that TWiki uses the topic title as the name of the file storing the content (which increases the problems for my next wish list item)
- I would like to be able to create topics with names like /etc/fstab, or ~/.mc/ini (the desire arose out of our efforts to create a glossary for BLT over on the Wikilearn web).
Clearly, file names like "/etc/fstab" or "~/.mc/ini" are problematic. I haven't invested any thought in this yet, but maybe a way to insert something almost like an escape code -- it is displayed one way in TWiki, but a different way in the file name.
Not an urgent requirement, by any means -- just a wish list item. (And, I think it would be solved if we had a database back end -- my concerns about this are somewhat alleviated since I found out about the
Namazu
search engine.
--
RandyKramer - 16 Jan 2002
This variable might be useful for
SpacedWikiWordPlugin as well.
--
MartinCleaver - 01 Oct 2002
RobertWithrow, if you are still lurking hereabouts... did you ever code up
%SPLITTOPIC% ? Or perhaps
%SPACEDTOPIC{sep=" "}% (for compatibility with existing implentation)? I find myself wanting this for a skin I'm working on.
--
MattWilkie - 23 Apr 2003
Check out my patch for
SpacedWikiWordPlugin.
It implements a %TOPICSPACED% variable.
Erm...
that name was not a wise choice, I guess.
%SPACEDTOPIC{sep=" "}% seems to make more sense.
--
PeterKlausner - 23 Apr 2003
Thanks Peter, but I need it outside the user content area. I followed the links to
CanIRenderWikiWordsSpacedOutInTemplates but am leery of implementing the edits there as they are two years old. Also if I understand it correctly, those changes would make all
WikiWords spaced out, not specific ones.
--
MattWilkie - 23 Apr 2003
Hmm. It works at least for the topic title requested above.
If you do
not apply the necessary patch from the installation instructions,
the plugin will do nothing than implement that variable.
If you follow my
modified patch instructions from 5 Feb 2003 in
SpacedWikiWordPluginDev,
you can turn it on/off depending on the skin.
--
PeterKlausner - 23 Apr 2003