looking for imagelink macro and a way to link back to a tiddler containing the original embedded image(link)

53 views
Skip to first unread message

Måns

unread,
Mar 20, 2009, 10:41:23 PM3/20/09
to TiddlyWiki
Hi
I've tried to find Alan Hecht's ImageLinkMacro from this address:
http://www.personal.psu.edu/ach12/tiddlywiki/extensions.htm (provided
by http://sidebarpluginvault.tiddlyspot.com/)
But the link is broken.Does anyone have the macro?
Or have an alternative method for making an image into a clickable
link?
I'd like my pictures to become clickable links to the tiddlers from
where I fetched them into my table via fET.
Maybe this could be automated in some way?..

Here's an example of the code I use for fET when retrieving a picture
and a title when hovering the mouse over the picture, which is shown
in my table:
[img(55%,auto)["+store.getValue(tiddler,"title")+"|"+store.getValue
(tiddler,"image")+"]]
I just need the picture to "link back" to the tiddler from where it
was fetched, when clicked on...

Here's my full fET for a table I use as a formtemplate inside a custom
ViewTemplate (It contains both the imagefield of the tiddler holding
the table and pictures fetched from other tiddlers):

<<forEachTiddler where 'tiddler.tags.contains("X") && tiddler.data("Y")
&& tiddler.data("Z") && tiddler.data("Z").contains
(context.viewerTiddler.title)'
sortBy 'tiddler.data("Z")'
write
'(index < 200)? "|"+(index+1)+"|[["+tiddler.title+"]] | <<tag
"+tiddler.data("Y")+" \>\> | [["+tiddler.data("xx") +"]] | <<toggleTag
XX [["+tiddler.title+"]] nolabel \>\> | <<toggleTag YY
[["+tiddler.title+"]] nolabel \>\> |[img(55%,auto)["+store.getValue
(tiddler,"title")+"|"+store.getValue(tiddler,"image")+"]] |\n" : ""'
begin '"|sortable|k\n"
+"|>|>|>|!<<wikify %0 name@here \>\> | <<tiddler xxUpdate\>\> |
<<tiddler yyUpdate\>\> | |h\n"
+"|!#| <<wikify [img(55%,auto)[%1|%0]] image@here name@here \>\> |
<<tag XX \>\>|<<tag yy \>\>|![[XX]]|![[yy]]||h\n"'
end 'count+" X\n"' none '"no X\n"'>>

YS Måns Mårtensson

Eric Shulman

unread,
Mar 20, 2009, 10:49:45 PM3/20/09
to TiddlyWiki
> I'd like my pictures to become clickable links to the tiddlers from
> where I fetched them into my table via fET.
> Maybe this could be automated in some way?..
>
> Here's an example of the code I use for fET when retrieving a picture
> and a title when hovering the mouse over the picture, which is shown
> in my table:
> [img(55%,auto)["+store.getValue(tiddler,"title")+"|"+store.getValue
> (tiddler,"image")+"]]

> I just need the picture to "link back" to the tiddler from where it
> was fetched, when clicked on...

The TW standard syntax for a *linked* image is:
[img[...][link]]
where 'link' can be either an internal tiddler link, or an external
URL. Thus, for your fET-generated output, you would simply write
something like:

"[img(55%,auto)["+store.getValue(tiddler,"title")+"|"+store.getValue
(tiddler,"image")+"]["+tiddler.title+"]]"

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

Måns

unread,
Mar 21, 2009, 7:04:36 AM3/21/09
to TiddlyWiki
Excactly what I needed to know. Thanks Eric.

Now my generated "thumbnails in a table" functions as clickable links
to the tiddlers holding the initial imagefield captured by the fET
producing the table - and everything is produced automatically - it's
almost magic for me - discovering that this was even possible... a few
days ago I wouldn't have considered much of it doable in a TW.

I have no background whatsoever for expecting anything when it comes
to html, javascript or wikis -
I have never learned anything about or even tried writing html,
javascript,macros, scripts or just simple wikisyntax - before I
started with TW few months ago - so everything is new to me in these
areas - and I more or less excpected everything or nothing at all when
I started.
Diving into TW has been a great experience uptill now - and I have a
growing respect for both the "tinkers & tailors" - (programmers and
designers), the need for documentation and the active community around
an OpenSource project.

TiddlyWiki is very good for introducing novices like myself to
codewriting (copy/pasting snippets to see what happens, is enough for
someone who needs quick results ) - and it delivers the building
blocks for everyone to create tailored and original applications.
Of course my thoughts on these matters must be obvious for everyone
who participates in this project - and I understand that what I've
written on this groups threads - most certainly reveals that I am a
novice on these fields - but even so - I'd like to repeat and
encourage everyone who can - to participate in keeping up the good
pace in the devellopment of TW - because it delivers a platform - even
for someone like me - to discover so much - and get involved - in
such a short time.

I hope that I will keep on discovering new paths to the same end (as
is what I do most of the time :-)) - and one thing that I'm most
certain of - is that I've turned into a TW-prophet on my work - using
it in almost every aspect of teaching and communicating - with
students, parents and collegues.
All I wanted to say was: I think that TW is great!!

YS Måns Mårtensson

stevesuny

unread,
Jul 30, 2012, 1:21:15 PM7/30/12
to tiddl...@googlegroups.com, TiddlyWiki
Hi, reviving a very old thread: I found a version of the code here:

http://users.iit.demokritos.gr/~vatikiot/#[[ImageLink%20%28TW%202.0%20compatible%29]]

as I used to use this macro too .... but I can't exactly remember what functionality it provided that the standard [img[link][url]] did not.  Is anyone still using this macro, and if so, why?

Thanks,

//steve.
Reply all
Reply to author
Forward
0 new messages