> To be more precise... you need to specify a valid relative or absolute
> path to the images in the IconMacro declaration.

Thank you Tobias, that was exact what I wanted to know
When I store the images in the same directory as the wiki, it works
with the local wiki.

Before I had the icon images in a subfolder named "img"

So for me there are two questions left:

1. How can I upload this images to my tiddlyspot page?
The tiddlyspot FAQ says that it is not possible:

Can I host images at my tiddlyspot.com site?
Updated 31 December, 2006
Currently, no.

In the future we may allow the uploading of small images [I doubt it -
SB;] so you can show logos, button icons, etc. in your TiddlyWiki, but
we're still arguing about that [as you can see from the previous
editorial comment - DB].

For now, you can use any of the various free file hosting services
like flickr, photobucket, imageshack, bubbleshare, etc.

2. How can I change this IconMacro when I want to have the images in
the subfolder "img"?

// version: beta 1.1
//replace macro buttons with icons
// params[0] = image location
//params[1] = image width
//params[2] = image height
//params[3] = image title (optional)
config.macros.icon={};
config.macros.icon.handler = function
(place,macroName,params,wikifier,paramString,tiddler)
{

               if (place.lastChild.tagName!="BR")
                     {
                     var tempTitle = place.lastChild.firstChild.title;
                     removeChildren(place.lastChild);
                     place.lastChild.className = "imgLink";
                     var img = createTiddlyElement
(place.lastChild,"img");
                     img.src = params[0];
                     if (params[3])
                         img.title = params[3];
                     img.width= params[1];
                     img.height =params[2];
                     }
};

//use icons for toolbar commands.
// used in view template like:
// <span macro='commandIcon jump jump.bmp'></span>
//params[0] = command name
//params[1] = image location
config.macros.commandIcon={};
config.macros.commandIcon.handler = function
(place,macroName,params,wikifier,paramString,tiddler)
{if(!e) var e = window.event;
    var img = createTiddlyElement(place,"img",null,"toolbarImg");
    img.src = params[1];
    img.onclick = function(){config.commands[params[0]].handler
(e,place,story.findContainingTiddler(place).getAttribute
("tiddler"));};
    img.title = config.commands[params[0]].tooltip;
}

setStylesheet(".toolbarImg {vertical-align: middle; cursor:pointer;}
\n","commandIconStyles");


Thanks in advance








--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to TiddlyWiki@googlegroups.com
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to