Tags:
archive_me1Add my vote for this tag create new tag
view all tags
I'd like to see some way to form WikiWords with spaces. Here's one possible way that would probably be pretty low impact.

Select a character (say ~). Then a word like ~Wiki~Words~with~Spaces would display as "Wiki Words with Spaces" but still be a WikiWord. If you needed a tilde at the front of an otherwise legal WikiWord, you could double it:

~~WikiWord~Wiki ==> ~WikiWord~Wiki

This has minimal impact because most WikiWords will NOT start with ~ and anything that is not otherwise a Wiki word (or start with ~) will not be affected. The only changes would be if you had a document that contained words in mixed case that start with tilde and are NOT WikiWords.

-- AlWilliams - 07 Sep 2000


That is a nice idea. Probably could be combined with FlexibleWikiWords.

In your example, writing ~Wiki~Words~with~Spaces gets rendered as Wiki Words with Spaces . How about the link? Should it poin to a topic called WikiWordswithSpaces ?

I would like to discuss the syntax. Most TWiki rules are pairs like *bold* , _italic_ and so on. A leading tilde would be an exeption to this rule. It would be nice to find a syntax that takes this into account, may be FlexibleWikiWords that contain optional tilde characters?

FYI, at work we did beautify WikiWords for the generated pages on the public website. For example, the knowledge base entry http://www.takefive.com/faq/kbCreateAndModifyPythonVcsAdaptors.html has the title "Create And Modify Python VCS Adaptors" and is generated from a TWiki topic called CreateAndModifyPythonVcsAdaptors . To beautify the titles we made a topic that contains a table like this:

Cpu CPU
Sniff SNiFF
SN iFF SNiFF
Vcs VCS
...
The script that generates the KB entries on the web site spaces WikiWords, reads this table and corrects the spaced words accordingly. This is not as elegant a solution, but quiet effective in beautifying WikiWords.

-- PeterThoeny - 07 Sep 2000


Another way to get spaces into WikiWords is to just use a character as a delimiter and put in spaces. The script could recognize ~Wiki Words with Spaces~ or [Wiki Words with Spaces] as WikiWords and link them. The spaces can be replaced with an appropriate character such as an underscore (_) character to create valid filenames. I believe that I have seen a wiki that used brackets for wiki names and links before, but I'm not sure. I think the links were written as =[This is a link|http://server.com/webpage.html].= This is used to create a LabeledExternalLink.

-- JamalWills - 08 Sep 2000


Again the LabeledExternalLink come from Tiki: http://www.todo.org/cgi-bin/en/tiki.cgi?c=v&p=WelcomeVisitors

The syntax is [http://server.com/webpage.html linkname]

-- WayneScott - 08 Sep 2000


I like the [Wiki Word] or Wiki Word syntax, but what about rendering? My original point was that I wish to make links that look any way that I want. So I don't want Wiki Word -- I'd rather see Wiki Word even though I coded it as Wiki Word.

-- AlWilliams - 08 Sep 2000


It is rendered without the brackets

-- WayneScott - 08 Sep 2000


But is that intuitive? How about the YetUndefined FlexibleWikiWords. How should a link like Wiki words with spaces be displayed while it is still undefined because if it is displayed as   Wiki words with spaces?   , the user won't know at first glance what the whole link is. ( It looks like the link is space only instead of the whole Wiki words with spaces ).

  1. Should it be shown as Wiki_words_with_spaces?
    or
  2. Should it be highlighted using <SPAN> tags like Wiki words with spaces? This does raise the RequiredEnvironmentForTWiki.
    Or
  3. Should we just change the font color using font tags?
    or
  4. Should it be shown something like [Wiki words with spaces]?

etc.

-- ManpreetSingh - 17 Sep 2000


Actually I like the highlighting idea all the way around. It degrades gracefully. If your browser doesn't support it, it doesn't matter. You can also color the font blue to make it look more like a link:

Here is the rendering change in internalLink (in wiki.pm ): (hope I got the <'s in there correctly)

	 topicExists( $web, $page) ?
		  "$bar<A href=\"$scriptUrlPath/view$scriptSuffix/$web/$page\">$text</A>
		  : $foo?"$bar<SPAN STYLE='background : cornsilk;'>
			 <font color=#0000FF>$text</font></SPAN>
			 <A href=\"$scriptUrlPath/edit$scriptSuffix/$web/$page\">
			  ?</A>"
				: "$bar$text";

This looks like this:

My Odd Wiki Word?

It wouldn't be hard to do that to the exists side like that so that all links had the background, but since they are already links, I'm not sure how useful that is.

-- AlWilliams - 18 Sep 2000

Committed to CVS (TWiki Alpha). See FlexibleWikiWords.

-- PeterThoeny - 19 Sep 2000

Hey, I don't like cornsilk ! smile

I mean, the highlight color should be configurable per user in WebPreferences, as well as the #0000FF part.

-- ManpreetSingh - 19 Sep 2000


Not a problem. Try this:

	 my $bgcolor="";
	 my $fontcolor="";
	 $bgcolor = &wiki::getPrefsValue("NEWWIKIHIGHLIGHT");
	 if ($bgcolor eq "") { $bgcolor="cornsilk"; }
	 $fontcolor = &wiki::getPrefsValue("NEWWIKIFONTCOLOR");
	 if ($fontcolor eq "") { $fontcolor="#0000FF"; }
	 topicExists( $web, $page) ?
		  "$bar<A href=\"$scriptUrlPath/view$scriptSuffix/$web/$page\">$text<\/A>"
		  : $foo?"$bar<SPAN STYLE='background : $bgcolor;'><font color=$fontcolor>$text</font></SPAN><A href=\"$scriptUrlPath/edit$scriptSuffix/$web/$page\">?</A>"
				: "$bar$text";
-- AlWilliams - 19 Sep 2000

Commited the contribution to CVS. I used different variable names:

  • %NEWTOPICBGCOLOR% for background color of non existing topic.
  • %NEWTOPICFONTCOLOR% for font color of non existing topic.

These values are set in the TWikiPreferences. (Please note that you need to enable authentication for topic views in case you want to override the values in the user preferences.)

-- PeterThoeny - 19 Sep 2000

TopicClassification:
FeatureDone
Edit | Attach | Watch | Print version | History: r13 < r12 < r11 < r10 < r9 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r13 - 2000-09-20 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.