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:

1 Like

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 {}

1 Like