Feature suggestion: Links in different colors

137 views
Skip to first unread message

ikemitsu

unread,
Aug 10, 2012, 4:22:31 AM8/10/12
to twee...@googlegroups.com
I'm new to Twine and don't know if this issue has been up in history but I miss an ability to mark different kinds of links. In my current project I'd need two colors for links. With colors you could distinguish between links that have different "functions", for example the other link pushing the story forward and the other just offering some extra information. It would make reading much more clear and immediately more accessible to readers. I figure there is no way to do this currently, or does someone know a way? A link doesn't work when put inside html tags.

Ikemitsu

Måns

unread,
Aug 10, 2012, 5:45:11 AM8/10/12
to Tweecode / Twine
Hi Ikemitsu
If the core tiddlywiki we use for publishing twine stories was updated
to the latest core version we could utilize colored links plugin:
http://coloredlinks.tiddlyspot.com/ by Tobias Beer.
The ability to mix html- and tiddlywiki syntax could be provided by
the html formatting plugin http://www.tiddlytools.com/#HTMLFormattingPlugin
by Eric Shulman.

You *should* already be able to write html-links to "tiddlers" with
jQuery calls inside the html with the newer tiddlywiki core (ver.
2.6.5) - like this:
<html><div style='background: url(some image.jpg) repeat fixed; text-
align: center; height: 1.5em; z-index: 5;'> Text to show before link
text <a href="javascript:;"
onclick="story.displayTiddler(null,'TiddlerToOpen');
jQuery('#tiddlerDisplay').show(); return false;">Link Text</a> text to
show after link text
</div></html>

For the older version that we use with twine, you *might* be able to
do it with a "pure" javascript statement inside html tags like this
(untested):
<html><a href="javascript:void(0)"
onclick="story.closeAllTiddlers();story.displayTiddlers(null,
['This','That'])">This and That</a></html>

Where 'This' and 'That' are the the tiddlers that will be opened, when
you click the link (This and That)...

NB: Be aware that Google Groups automatically wraps long lines - my
examples should be treated as "oneliners"..

If you want to be able to customize more things I'd strongly recommend
that you download a fresh TiddlyWiki document from http://tiddlywiki.com
(it can be edited directly and used offline) - or setup a userspace
(also TiddlyWiki) at http://tiddlyspace.com, where you can have as
many tiddywikis (or stories) online as needed. Tiddlyspace lets you
publish your work online. It's all for free!!
PS: I have no personal interests in or connection to TiddlyWiki or
TiddlySpace - I'm just a happy user, who wants to spread the word :-)

If a published twine story was an updated version of tiddlywiki - we
would have access to all kinds of plugins and themes - AND the ability
to edit the story directly in the published material - (no need for a
html-editor)....

I don't have the skills to make it work my self (I have tried to
update themes in twine - however they don't work when they have been
updated ..) - so if anyone knows what to do - please do it :-) because
there are many, many great things to get from the the tiddlywiki
community, which could enhance the reading and publishing of twine
stories....

Cheers Måns Mårtensson

ikemitsu

unread,
Aug 10, 2012, 10:48:07 PM8/10/12
to twee...@googlegroups.com
Hello Måns and thanks for your answer!

I created two passages titled "This" and "That" and defined a CSS style called linkstyle2, and tried this in Twine:

<html><a href="javascript:void(0)"onclick="story.closeAllTiddlers();story.displayTiddlers(null, ['This','That'])"><div id="linkstyle2">This and That</div></a></html>

The style setting works but the link unfortunately doesn't. The This and That passagesses just won't open. I tried a few other modifications as well (with the help of someone who understand more about these things than I do), but didn't get the link work.

If I will use Twine, I think I'll end up marking the different link categories by some special characters or images around the links.

One handy way to use link styles in Twine, perhaps, could be by adding a third part within the link brackets, like:
 
[[ Linktext | passagetitle | linkstyle1 ]]

I find this link color feature very meaningful, I just wonder if others do.

I appreaciate simplicity in general and find Twine very easy to approach. I have no coding skills, I just want to write hypertext and interactive fiction. TiddlyWiki is somewhat aversive to me, it immediately seems complicated and technical.

Ikemitsu
Reply all
Reply to author
Forward
0 new messages