RandomImage (from a folder) **Working**

17 views
Skip to first unread message

Mike

unread,
Dec 4, 2009, 6:00:09 PM12/4/09
to TiddlyWiki
http://www.strm.us/tw/examples_twgg/RandomImage.html

Here is my solution. . . not the most eloquent, but working great for
me
Works best in folders with varied image names, doesn't do so well with
spaces and special characters

Any Thoughts?

Have a Great Day !

Mike

Mike

unread,
Dec 5, 2009, 5:43:41 PM12/5/09
to TiddlyWiki
Updated to use LaunchApplicationPlugin

as per Mark S's advise (http://groups.google.com/group/tiddlywiki/
browse_thread/thread/8332016c695e9ad9)

Enjoy,

Mike

Eric Shulman

unread,
Dec 5, 2009, 5:50:18 PM12/5/09
to TiddlyWiki


On Dec 4, 3:00 pm, Mike <eris...@gmail.com> wrote:
> http://www.strm.us/tw/examples_twgg/RandomImage.html
>
> Here is my solution. . . not the most eloquent, but working great for
> me
> Works best in folders with varied image names, doesn't do so well with
> spaces and special characters

http://www.TiddlyTools.com/#QuoteOfTheDayPlugin
-------------------
2008.01.16 1.4.0 support using a local image file directory instead of
tiddler name for getting list of items. If specified tiddler does not
exist in the document, macro attempts to use tiddlername as a local
directory name (using either absolute or relative path) and get list
of all JPG/GIF/PNG files.
-------------------

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

Måns

unread,
Dec 5, 2009, 8:54:06 PM12/5/09
to TiddlyWiki

> http://www.TiddlyTools.com/#QuoteOfTheDayPlugin
> -------------------
> 2008.01.16 1.4.0 support using a local image file directory instead of
> tiddler name for getting list of items. If specified tiddler does not
> exist in the document, macro attempts to use tiddlername as a local
> directory name (using either absolute or relative path) and get list
> of all JPG/GIF/PNG files.

Great!! - I have used QuoteOfTheDayPlugin a lot, but I didn't know
this function..
You can even do this: <<QOTD .\ 3000>> to randomize images in the
rootfolder
and this:
<<QOTD .\FolderTitleAlsoExistsAsTiddlerTitle 3000>> to override an
existing tiddler which has the same title as a folder..
However you can't override a tiddler with more than one word like this
<<QOTD .\[[title also exist as tiddlername]] 3000>>
You can refer to a folder with more than one word, if it doesn't exist
as a tiddler <<QOTD [[folder name]] 3000>>

Eric - would it be possible to integrate some kind of predefined
imagesize - maybe even caption of image title?

Regards Måns Mårtensson

Mike

unread,
Dec 6, 2009, 5:31:31 PM12/6/09
to TiddlyWiki
WoW - now that is eloquent code :)

I love the QOTD plugin, had the most recent version, but had not read
the most recent info tiddler . . . (shame on me)
I had fun playing with my code either way, a good learning
experience !

One Question. . . .
How can I replicate the formatting of (position and size of the image)
[>img(400px+,auto)[Family Picture|images/famslide-11.jpg]]

I have
{{floatright{{{random img{<<QOTD "..\Pictures\home" inline 30000>>}}}

CSS
.floatright { float:right; }
.random img { width:400px !important; }

But the alignment is not just right, very close though . . . . (mixing
with a table menu / tagglytagging / ect.)
(An example of my layout in the Home / Work Tiddler -
http://www.strm.us/tw/newlayout.html)

Thanks for all of your great plugins !

Mike P.

Mike

unread,
Dec 7, 2009, 8:35:35 AM12/7/09
to TiddlyWiki
Figured it out. . .
should have been
{{floatright{{{random img{<<QOTD "..\Pictures\home" inline
30000>>}}}}}}
I forgot to close the floatright. . . DOH!

Works great, Excellent solution !

Mike P.

On Dec 6, 4:31 pm, Mike <eris...@gmail.com> wrote:
> WoW - now that is eloquent code :)
>
> I love the QOTD plugin, had the most recent version, but had not read
> the most recent info tiddler . . . (shame on me)
> I had fun playing with my code either way, a good learning
> experience !
>
> One Question. . . .
> How can I replicate the formatting of (position and size of the image)
> [>img(400px+,auto)[Family Picture|images/famslide-11.jpg]]
>
> I have
> {{floatright{{{random img{<<QOTD "..\Pictures\home" inline 30000>>}}}
>
> CSS
> .floatright { float:right; }
> .random img { width:400px !important; }
>
> But the alignment is not just right, very close though . . . . (mixing
> with a table menu / tagglytagging / ect.)
> (An example of my layout in the Home / Work Tiddler -http://www.strm.us/tw/newlayout.html)
Reply all
Reply to author
Forward
0 new messages