Hi Gustavo
Assuming the TW5 file is being served from the same domain as the wrapper
HTML file, you should be able to handle it very simply by reaching into the
iframe and setting the theme by setting the $:/theme tiddler. Something
like this:
var hostIframe = newWindow.window.document.getElementById("myIFrame");
hostIframe.src = "myTiddlyWiki.html"; // Relative URL of tiddlywiki file
hostIframe.addEventListener("load",function(event) {
var $tw = hostIframe.contentWindow.$tw;
$tw.wiki.addTiddler(new $tw.Tiddler({
title: "$:/theme",
text: "$:/themes/tiddlywiki/snowwhite"
}));
});
Best wishes
Jeremy.
On Thu, Mar 20, 2014 at 7:28 PM, Gustavo Martins
<[email protected]>wrote:
> Hi all!
>
> I'm testing the TW5 to be embedded in an application I'm developing
> (Apache FLEX) as IFrame, and I'm thinking a way to toggle the appearance
> depending on the user logged into the system (login is done in PHP and
> mySQL database). .
>
> I thought of something that makes a comparison between a field recorded
> section (if (! Isset ($ _SESSION ['usuarioID']))) and the content of the
> tiddler "$:/status/UserName".
>
> If they match it switches to the "Snow White" for example, if they are
> different it gets in "readonly"!
>
> Where could I create this comparison? as Macro? Plugin?
> Someone with knowledge in the area could give me an idea?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/d/optout.
>
--
Jeremy Ruston
mailto:[email protected]
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.