Imported Image Link to website

114 views
Skip to first unread message

Joey Fortson

unread,
Jun 12, 2020, 2:41:54 AM6/12/20
to TiddlyWiki
Hey everyone, 

I have imported an image (image/jpeg) and would like to create a link to an external site within the image (ie. https://www.wikipedia.com). I am attempting to use the list-thumbnails filter

<div style="font-size:0.7em;text-align:center;margin-top:2em;margin-bottom:2em;">
<<list-thumbnails filter:"[tag[Thumb-June]]" width:"200" height:"250">>
</div>

When the link field is added and the external site is entered it seems to only want to link to a non existent tiddler. Totally cool normally, but in this situation I would like the image, when selected, to attempt to access an external site. I have tried using the url, source, and link fields but no luck. Any thoughts or pointers?

Thanks

Mark S.

unread,
Jun 12, 2020, 10:10:55 AM6/12/20
to TiddlyWiki
Where did you get the list-thumbnail macro? The code for it probably needs to be hacked.

In general, for external image links, I use HTML tags <a href=...><img .../></a>

It could be rolled easily enough with list widgets, but if you already have code you like, it might be easier to modify it.

Eric Shulman

unread,
Jun 12, 2020, 11:13:24 AM6/12/20
to TiddlyWiki
On Friday, June 12, 2020 at 7:10:55 AM UTC-7, Mark S. wrote:
Where did you get the list-thumbnail macro? The code for it probably needs to be hacked.

$:/core/macros/thumbnails

it's in the standard distribution (empty.html)

-e

Mark S.

unread,
Jun 12, 2020, 11:18:14 AM6/12/20
to TiddlyWiki

But, why doesn't it show up when typing "list-thumbnails" into the search box? How is it supposed to be discovered?

Eric Shulman

unread,
Jun 12, 2020, 11:28:11 AM6/12/20
to tiddl...@googlegroups.com
On Friday, June 12, 2020 at 8:18:14 AM UTC-7, Mark S. wrote:
But, why doesn't it show up when typing "list-thumbnails" into the search box? How is it supposed to be discovered?

There is this:
and this:

but I'd say that it's "underdocumented" in that it doesn't really give the usage, and the only example is the "thumbnail-right" macro.

I found it using $:/AdvancedSearch "Shadows" tab, search for "$:/core/macros"

-e

Mark S.

unread,
Jun 12, 2020, 12:19:58 PM6/12/20
to TiddlyWiki


On Friday, June 12, 2020 at 8:28:11 AM UTC-7, Eric Shulman wrote:

I found it using $:/AdvancedSearch "Shadows" tab, search for "$:/core/macros"

-e


“But look, you found the notice, didn’t you?”
“Yes,” said Arthur, “yes I did. It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying ‘Beware of the Leopard.”

 

Mark S.

unread,
Jun 12, 2020, 12:22:19 PM6/12/20
to TiddlyWiki
@Joey Fortson

So, can we count on the image name starting with http:// .. or are the actual images you're thinking of on relative paths?

I'm trying to work if there is a way to detect that the image is external.

On Thursday, June 11, 2020 at 11:41:54 PM UTC-7, Joey Fortson wrote:

Joey Fortson

unread,
Jun 12, 2020, 2:17:39 PM6/12/20
to tiddl...@googlegroups.com
I'm sure you guys figured it out but i just used the list-thumbnails that the tiddlywiki site uses. I am not very skilled in the coding. The name is currently just a basic name that will display on the bottom of the image when it is in the thumbnail-list. I can try to change the name to a url if that might help. Just to reiterate the image has been imported into TW so no need to reference an external image. I am just hoping to redirect a click on that image (when it is displayed in the list-thumbnails) to an external website. 

Mark S.

unread,
Jun 12, 2020, 3:02:14 PM6/12/20
to TiddlyWiki
If the link doesn't start with http://... , how would the list-thumbnails know where you wanted to link to?

Will all the links in your filter set be external, or only some of them?

Thanks!

On Friday, June 12, 2020 at 11:17:39 AM UTC-7, Joey Fortson wrote:
I'm sure you guys figured it out but i just used the thumbnail-list that the tiddlywiki site uses. I am not very skilled in the coding. The name is currently just a basic name that will display on the bottom of the image when it is in the thumbnail-list. I can try to change the name to a url if that might help. Just to reiterate the image has been imported into TW so no need to reference an external image. I am just hoping to redirect a click on that image (when it is displayed in the list-thumbnails) to an external website. 

Joey Fortson

unread,
Jun 12, 2020, 7:52:02 PM6/12/20
to TiddlyWiki
Hey Mark,

All links will be external... and they will be technically tied to another url: hyper:// but http:// doesn't work either. I'll attach a couple pics just so we are on the same page. I am afraid I may have not described correctly.


imagewithfields.jpg - These are the fields I am using with the imported image. I have tried others with no luck. Hopefully there is a field I may not be aware of that I can just put the url in and call it a day. 
When I click on the thumbnail of the above image within the thumbnail-list, it attempts to open a tiddler rather than the site. hence:
linkcreatingtiddler.jpg - This is the tiddler that is wanting to be created after using the link field.

Seriously appreciate the help, sorry if I sent you on a wrong path.
imagewithfields.jpg
linkcreatingtiddler.JPG

Mark S.

unread,
Jun 12, 2020, 9:50:02 PM6/12/20
to TiddlyWiki
This is a quick hack of the original list-thumbnails macro. It is invoked as

<<list-ext-thumbnails filter .... etc. >>

All the links assume an external target.

A more universal approach would detect http:// or https:// and switch the link type accordingly. We'll leave that as an exercise ;-)

Good luck!
macros_thumbnails2.json

Joey Fortson

unread,
Jun 12, 2020, 10:58:46 PM6/12/20
to TiddlyWiki
You tha man. I appreciate you wasting your time on this. Really appreciate it. I'll get dirty with it.

Thanks

Joey Fortson

unread,
Jun 12, 2020, 11:43:08 PM6/12/20
to TiddlyWiki
If there was any question, it works perfectly. 

Thanks again Mark
Reply all
Reply to author
Forward
0 new messages