[TW5] HowTo display image dynamically

175 views
Skip to first unread message

magev958

unread,
Sep 18, 2015, 6:49:42 AM9/18/15
to TiddlyWiki
Hi all
I have a public Dropbox-folder with a bunch of images that I like to show based on title in all tiddler tagged "Tag1" in my TW5.
 
E.g.
 
I guess i need some kind of macro, but I can't figure out how to do it
 
/Magnus

Tobias Beer

unread,
Sep 18, 2015, 7:08:59 AM9/18/15
to tiddl...@googlegroups.com
Mi Magnus

Presumably, the problem lies in how dropbox changed access to subfolders (for free accounts).
There was a time when you could access those in your public folder via relative paths.
For some long-time users, like me, that is still working.
These days you need to get the public link for each file. :-(

Perhaps take a look at Photobucket, unless you have some semi-private images you don't want hosted.
This works well in combination with...

ximg @ tb5

Best wishes,

— tb

magev958

unread,
Sep 18, 2015, 7:14:59 AM9/18/15
to TiddlyWiki
I'm too is a long term user of Dropbox and is so lucky to have the relative-path-folders :)

Tobias Beer

unread,
Sep 18, 2015, 8:04:53 AM9/18/15
to tiddl...@googlegroups.com
Hi again,

Didn't look close enough at your syntax.
What you probably need to use is a (preferably global) helper macro;
along with the macrocall widget to have your parameters evaluated.

Something along the lines of... (untested)

\define dropbox(folder,file)
<img src="https://dl.dropboxusercontent.com/$folder$/$file$" />
\end

<$macrocall $name="dropbox" folder="foo" file={{!!title}}/>

Best wishes,

— tb

magev958

unread,
Sep 19, 2015, 4:02:59 PM9/19/15
to TiddlyWiki
Thank You, it works perfectly! :)

/Magnus

magev958

unread,
Apr 22, 2016, 7:51:29 AM4/22/16
to TiddlyWiki
I used this macro in TW 5.1.9 on Tiddlyspot but it does not seem to work in TW 5.1.11. Has something changed and how can I edit my macro to work again?

\define dropbox(folder,file)
<img src="https://dl.dropboxusercontent.com/u/955759/$folder$/$file$.jpg" />
\end

<$list filter="[is[current]tag[species]]">
  <div class="bigger_image">
    <$macrocall $name="dropbox" folder="Orchidelirium" file={{!!title}}/>
  </div>
</$list>

Ste Wilson

unread,
Apr 22, 2016, 8:13:01 AM4/22/16
to TiddlyWiki
I don't know if this i relevant or helpful but pancake.io lets you use dropbox as a static server site again.

magev958

unread,
Apr 22, 2016, 8:49:31 AM4/22/16
to TiddlyWiki
That might be very interesting, I'll check it out, thanks :)

Jeremy Ruston

unread,
Apr 22, 2016, 10:40:22 AM4/22/16
to tiddl...@googlegroups.com
Hi Magev958

I used this macro in TW 5.1.9 on Tiddlyspot but it does not seem to work in TW 5.1.11. Has something changed and how can I edit my macro to work again?

I don’t think there have been any changes to the core that would prevent that code from working. Perhaps the Dropbox URI has changed?

Best wishes

Jeremy
Reply all
Reply to author
Forward
0 new messages