Richlinks revisited

@JanJo I had the same dilemna, however I found one of the fields was a dropdown for free to demo models, such as the low poly astronaut I went with.

It’s pretty cool, I can’t lie

Does the template work?
Do you have a link?

The only link I can share is the link to the site itself, changing the model does not allow for the showing of specific models selected, but you can goto Model Editor and choose Astronaut in Select Model: to view one of the demo models.

Ah, for clarification I thought you were saying you couldn’t find a 3d model to test the websites functionality with, but I believe you are referring to the original topic

I still could figure out a variant that uses a normal IFrame ($:/plugins/richlink/iframe)as fallback if no special template is found .
The code below produces a mysterious double display with both Iframe and template…

I am a little lost.

(By the way where is the square bracket on a mac…?)

\define abevregexp() ([a-zA-Z0-9_]{5}).*
\define showframe()
<$tiddler tiddler="$:/plugins/richlink/iframe" >
     <$transclude/>
</$tiddler>
\end
\define applytemplate(signum)
<$list filter="[prefix[$:/plugins/richlink]search:title:[$signum$]]" variable="template" emptyMessage=<<showframe>> >
<$tiddler tiddler=<<template>> >
     <$transclude/>
</$tiddler>
</$list>
\end

\define richlink(link, 1, 2, 3)
<$vars link="$link$" 1="$1$" 2="$2$" 3="$3$">
<$set name="domain" filter="""[[$link$]split[://]last[]] +[search-replace::regexp[www.],[]]
+[search-replace::regexp<abevregexp>,[@$1]]""">
 <$macrocall $name=applytemplate signum=<<domain>> />
</$set>
<$set name="filetype" filter="""[[$link$]split[.]last[]addprefix[@]]""" >
 <$macrocall $name=applytemplate signum=<<filetype>> />
</$set>
</$vars>
\end

As a windows user, my guess is it is hidden, if not forgotten, because it does not meet Apples artistic sensibilities, or there is an expensive addon you can get only on the Pro :nerd_face:

Waiting for Santa, I have found my bug: It is caused by assigning two “signums” one by domain and one by filetype. I have to find a way to simplify this… after christmas :wink:

Ho-ho-ho … I was able to repair the macro … except for cross-scripting becoming more and more prohibited, you will have to reinstall the templates, because their titles had to be changed to distinguish between filetype and domain.
_enjoy!
Jan

I found out at last where square and curly brackets are hidden on my mac-keyboaord - it is option + 5 6 for and option + 8 9 for {}

It’s been a while…

for wikipedia to display an icon and article title:

change the first line of the macro to:

\define abevregexp() ^(?:(?:[a-z]{2,3}|m).)?([a-zA-Z0-9_]{5}).*

and use the template

$__plugins_richlink_d@wikipedia.json (1.3 KB)

to display 3d CAD models in .gtfl .glb and .stl

3D viewer.json (25.0 KB)

and the template files:

$__plugins_richlink_f3dmodel@gltf@glb.json (1.5 KB)

$__plugins_richlink_f3dmodel@stl.json (1.4 KB)

Iframes now work with <<richlink iframe “…”>>

See

option+caps+( to obtain [ and option+caps+) to obtain ] by the way option+( gives {

This is looking really good! Any chance we are getting it packaged up as a “plugin” proper? Just let me know!

The nature of this thing was modular, to make inventions like @Ste_W 's possible. But you are of course free to use a plugin-packer.

I’m getting some inconsistent behaviour:

TW downloaded on my PC, does NOT show image, DOES show jsfiddle, does show the text file. The Online hosted version of the same TW…DOES show the picture, does NOT show jsfiddle, does NOT show the text.

Is this just my companies internet restrictions or the same for everyone.

P.s. I can’t tell if disqus works because I’m fairly sure that’s blocked.

jsfiddle link changed to https.

Text now shows online. No clue. Didn’t change anything!
Just the offline pic..I can live with that.