From charlie at cre8tivegroup.com Mon Oct 1 15:37:56 2007 From: charlie at cre8tivegroup.com (Charlie Fiskeaux II) Date: Mon, 01 Oct 2007 11:37:56 -0400 Subject: [sIFR3-dev] sIFR rewritten in Flash 9 with text resize detection Message-ID: <47011454.3000001@cre8tivegroup.com> Hello, I've never been a part of sIFR development before, but I wanted to introduce myself! I've been intrigued by sIFR for a while, but had never put a lot of time into looking at it heavily to see whether it was truly a good option for embedding fonts in websites (due to accessibility, usability, etc., etc.). Recently I had some free time and decided to finally take a look! I was impressed by what I saw, but saw that v3 was under development and not released yet, so since I had some free time, I decided to try and rewrite sIFR myself, just for fun! So, I rewrote it using AS3 in Flash 9 and added a few things like leading and letter spacing. Also, I modified the Flash embedding code so that it embeds the Flash movies using only an object tag, without an embed tag. This makes the resulting HTML valid, since embed tags were never part of the official HTML spec (and yes, it does work in all browsers; I learned this technique a short while ago and have been using it ever since). But the coolest part, in my opinion, is the text resize detection. Taking the idea from an A List Apart article (http://www.alistapart.com/articles/fontresizing, I didn't use any of their code, just their idea), I added Javascript so that the Flash modules are resized whenever the user dynamically resizes their text while viewing the page (Ctrl++, Ctrl+-, etc.). I also added a flag to allow the developer to turn this behavior off if they don't want to use it on their site. I've been calling my version sIFR f9 (for Flash 9), but I wanted to contribute it back to the sIFR community, in case some of my work is useful for a future official sIFR release. You can check it out here: http://www.cre8tivegroup.com/cf/sifr_f9.zip (Ignore the content of the sample index.html, I just pulled a page from a previous project to test my new version.) I hope it's useful! -- *Charlie Fiskeaux II* Interactive Media Developer Cre8tive Group 304 E Main Street Wilmore, KY 40390 p. 859/858-9054 x29 f. 859/858-8029 http://www.cre8tivegroup.com/charlie -------------- next part -------------- An HTML attachment was scrubbed... URL: From branstrom at gmail.com Mon Oct 1 16:30:35 2007 From: branstrom at gmail.com (=?UTF-8?Q?Fredrik_Br=C3=A4nstr=C3=B6m?=) Date: Mon, 1 Oct 2007 18:30:35 +0200 Subject: [sIFR3-dev] sIFR rewritten in Flash 9 with text resize detection In-Reply-To: <47011454.3000001@cre8tivegroup.com> References: <47011454.3000001@cre8tivegroup.com> Message-ID: <22410ce30710010930w1d5d2e35n9fdb4c28620eccb7@mail.gmail.com> This sounds great... I've been thinking about writing a plugin for MooTools that does the same thing as sIFR, and if I may, I will probably use this as my primary inspiration when I come around to it. Is it faster than sIFR 3? Does it only work with Flash 9? How crossbrowser is it? Fredrik On 01/10/2007, Charlie Fiskeaux II wrote: > > Hello, I've never been a part of sIFR development before, but I wanted to > introduce myself! I've been intrigued by sIFR for a while, but had never put > a lot of time into looking at it heavily to see whether it was truly a good > option for embedding fonts in websites (due to accessibility, usability, > etc., etc.). Recently I had some free time and decided to finally take a > look! I was impressed by what I saw, but saw that v3 was under development > and not released yet, so since I had some free time, I decided to try and > rewrite sIFR myself, just for fun! > > So, I rewrote it using AS3 in Flash 9 and added a few things like leading > and letter spacing. Also, I modified the Flash embedding code so that it > embeds the Flash movies using only an object tag, without an embed tag. This > makes the resulting HTML valid, since embed tags were never part of the > official HTML spec (and yes, it does work in all browsers; I learned this > technique a short while ago and have been using it ever since). > > But the coolest part, in my opinion, is the text resize detection. Taking > the idea from an A List Apart article ( > http://www.alistapart.com/articles/fontresizing, I didn't use any of their > code, just their idea), I added Javascript so that the Flash modules are > resized whenever the user dynamically resizes their text while viewing the > page (Ctrl++, Ctrl+-, etc.). I also added a flag to allow the developer to > turn this behavior off if they don't want to use it on their site. > > I've been calling my version sIFR f9 (for Flash 9), but I wanted to > contribute it back to the sIFR community, in case some of my work is useful > for a future official sIFR release. > > You can check it out here: http://www.cre8tivegroup.com/cf/sifr_f9.zip > (Ignore the content of the sample index.html, I just pulled a page from a > previous project to test my new version.) > > I hope it's useful! > > -- > > *Charlie Fiskeaux II* > Interactive Media Developer > Cre8tive Group > 304 E Main Street > Wilmore, KY 40390 > > p. 859/858-9054 x29 > f. 859/858-8029 > > http://www.cre8tivegroup.com/charlie > > _______________________________________________ > sifr3-dev mailing list > sifr3-dev at lists.novemberborn.net > http://lists.novemberborn.net/mailman/listinfo/sifr3-dev > > -- Fredrik Br?nstr?m http://fredrik.branstrom.name -------------- next part -------------- An HTML attachment was scrubbed... URL: From charlie at cre8tivegroup.com Mon Oct 1 16:43:32 2007 From: charlie at cre8tivegroup.com (Charlie Fiskeaux II) Date: Mon, 01 Oct 2007 12:43:32 -0400 Subject: [sIFR3-dev] sIFR rewritten in Flash 9 with text resize detection In-Reply-To: <22410ce30710010930w1d5d2e35n9fdb4c28620eccb7@mail.gmail.com> References: <47011454.3000001@cre8tivegroup.com> <22410ce30710010930w1d5d2e35n9fdb4c28620eccb7@mail.gmail.com> Message-ID: <470123B4.7000000@cre8tivegroup.com> I'm not sure if it's faster than sIFR 3, I haven't tried sIFR 3, to be honest! It only works with Flash 9, due to it being written in ActionScript 3, and I've tested it successfully in Opera 9, Safari 3, Firefox 2, IE 5.5, 6, & 7. -- *Charlie Fiskeaux II* Interactive Media Developer Cre8tive Group 304 E Main Street Wilmore, KY 40390 p. 859/858-9054 x29 f. 859/858-8029 http://www.cre8tivegroup.com/charlie Fredrik Br?nstr?m wrote: > This sounds great... I've been thinking about writing a plugin for > MooTools that does the same thing as sIFR, and if I may, I will > probably use this as my primary inspiration when I come around to it. > > Is it faster than sIFR 3? Does it only work with Flash 9? How > crossbrowser is it? > > Fredrik > > On 01/10/2007, *Charlie Fiskeaux II* > wrote: > > Hello, I've never been a part of sIFR development before, but I > wanted to introduce myself! I've been intrigued by sIFR for a > while, but had never put a lot of time into looking at it heavily > to see whether it was truly a good option for embedding fonts in > websites (due to accessibility, usability, etc., etc.). Recently I > had some free time and decided to finally take a look! I was > impressed by what I saw, but saw that v3 was under development and > not released yet, so since I had some free time, I decided to try > and rewrite sIFR myself, just for fun! > > So, I rewrote it using AS3 in Flash 9 and added a few things like > leading and letter spacing. Also, I modified the Flash embedding > code so that it embeds the Flash movies using only an object tag, > without an embed tag. This makes the resulting HTML valid, since > embed tags were never part of the official HTML spec (and yes, it > does work in all browsers; I learned this technique a short while > ago and have been using it ever since). > > But the coolest part, in my opinion, is the text resize detection. > Taking the idea from an A List Apart article > (http://www.alistapart.com/articles/fontresizing > , I didn't use > any of their code, just their idea), I added Javascript so that > the Flash modules are resized whenever the user dynamically > resizes their text while viewing the page (Ctrl++, Ctrl+-, etc.). > I also added a flag to allow the developer to turn this behavior > off if they don't want to use it on their site. > > I've been calling my version sIFR f9 (for Flash 9), but I wanted > to contribute it back to the sIFR community, in case some of my > work is useful for a future official sIFR release. > > You can check it out here: > http://www.cre8tivegroup.com/cf/sifr_f9.zip > (Ignore the content of the sample index.html, I just pulled a page > from a previous project to test my new version.) > > I hope it's useful! > > -- > > *Charlie Fiskeaux II* > Interactive Media Developer > Cre8tive Group > 304 E Main Street > Wilmore, KY 40390 > > p. 859/858-9054 x29 > f. 859/858-8029 > > http://www.cre8tivegroup.com/charlie > > > _______________________________________________ > sifr3-dev mailing list > sifr3-dev at lists.novemberborn.net > > http://lists.novemberborn.net/mailman/listinfo/sifr3-dev > > > > > -- > Fredrik Br?nstr?m > http://fredrik.branstrom.name -------------- next part -------------- An HTML attachment was scrubbed... URL: From amclin at kaadesigngroup.com Mon Oct 1 16:46:50 2007 From: amclin at kaadesigngroup.com (Anthony McLin) Date: Mon, 01 Oct 2007 09:46:50 -0700 Subject: [sIFR3-dev] Calculating ratios crashes browsers In-Reply-To: References: <46FBFB4D.5030301@kaadesigngroup.com> <2AB2D8E8-8D0D-4A57-B20A-EA9BAD2530B8@novemberborn.net> <46FC19A5.8020701@kaadesigngroup.com> Message-ID: <4701247A.2040905@kaadesigngroup.com> Here's some more info from more testing: IE6 - no problem Safari 2.04 - shows the ratios popup, then crashes Firefox 1.06 OSX - shows the ratios popup, then crashes Firefox 1.5.0.9 OSX - shows the ratios popup, then crashes Firefox 2.0.0.1 OSX - shows the ratios popup, then crashes Firefox 2.0.0.7 XP - crashes (can't tell if the ratios popup is occurring before the crash) Dropping the wmode declaration eliminates the crashing: http://www.buildingmomentuminc.com/test/sifrtest2.html -Anthony Mark Wubben wrote: > On Sep 27, 2007, at 10:59 PM, Anthony McLin wrote: >> Here's an example: >> >> http://www.buildingmomentuminc.com/test/sifrtest.html > > Not seeing a crash in Firefox/Mac. It is indeed crashing on > Firefox/Windows, that's pretty weird. The problem with IE seems to be > that in it's never ending quest for annoying users it's asking > permission to show the confirm() dialog with the ratios. The > permission can only be given for the current page view, and therefore > nothing shows up. Kinda annoying, not sure if I can work around that. > Would it be fine if the ratio calculation would be a non-IE feature? > > Can you stop Firefox from crashing by disabling the wmode and/or > delayCSS options? > > -- > Mark > -- Anthony McLin Senior Web Developer amclin at kaadesigngroup.com T 310.821.1400 ext. 266 F 310.821.1440 KAA Design Group, Inc. 4201 Redwood Avenue Los Angeles, CA 90066 ARCHITECTURE | LANDSCAPE | BRAND EXPERIENCE | INTERIORS http://www.kaadesigngroup.com From mark at novemberborn.net Mon Oct 1 20:51:32 2007 From: mark at novemberborn.net (Mark Wubben) Date: Mon, 1 Oct 2007 22:51:32 +0200 Subject: [sIFR3-dev] Calculating ratios crashes browsers In-Reply-To: <4701247A.2040905@kaadesigngroup.com> References: <46FBFB4D.5030301@kaadesigngroup.com> <2AB2D8E8-8D0D-4A57-B20A-EA9BAD2530B8@novemberborn.net> <46FC19A5.8020701@kaadesigngroup.com> <4701247A.2040905@kaadesigngroup.com> Message-ID: <31965B43-1BCF-4495-B402-87F28BE6D47A@novemberborn.net> Impressive! Interestingly enough test2 also crashes my Safari install. Guess I'll have to do some debugging here! Just to make sure, if you calculate ratios for the demo, does it crash as well? On Oct 1, 2007, at 6:46 PM, Anthony McLin wrote: > Here's some more info from more testing: > > IE6 - no problem > Safari 2.04 - shows the ratios popup, then crashes > Firefox 1.06 OSX - shows the ratios popup, then crashes > Firefox 1.5.0.9 OSX - shows the ratios popup, then crashes > Firefox 2.0.0.1 OSX - shows the ratios popup, then crashes > Firefox 2.0.0.7 XP - crashes (can't tell if the ratios popup is > occurring before the crash) > > > Dropping the wmode declaration eliminates the crashing: > http://www.buildingmomentuminc.com/test/sifrtest2.html > > -Anthony > > Mark Wubben wrote: >> On Sep 27, 2007, at 10:59 PM, Anthony McLin wrote: >>> Here's an example: >>> >>> http://www.buildingmomentuminc.com/test/sifrtest.html >> >> Not seeing a crash in Firefox/Mac. It is indeed crashing on >> Firefox/Windows, that's pretty weird. The problem with IE seems to be >> that in it's never ending quest for annoying users it's asking >> permission to show the confirm() dialog with the ratios. The >> permission can only be given for the current page view, and therefore >> nothing shows up. Kinda annoying, not sure if I can work around that. >> Would it be fine if the ratio calculation would be a non-IE feature? >> >> Can you stop Firefox from crashing by disabling the wmode and/or >> delayCSS options? >> >> -- >> Mark >> > > > -- > Anthony McLin > Senior Web Developer > amclin at kaadesigngroup.com > T 310.821.1400 ext. 266 > F 310.821.1440 > > KAA Design Group, Inc. > 4201 Redwood Avenue > Los Angeles, CA 90066 > > ARCHITECTURE | LANDSCAPE | BRAND EXPERIENCE | INTERIORS > http://www.kaadesigngroup.com > > _______________________________________________ > sifr3-dev mailing list > sifr3-dev at lists.novemberborn.net > http://lists.novemberborn.net/mailman/listinfo/sifr3-dev From amclin at kaadesigngroup.com Tue Oct 2 18:03:54 2007 From: amclin at kaadesigngroup.com (Anthony McLin) Date: Tue, 02 Oct 2007 11:03:54 -0700 Subject: [sIFR3-dev] Calculating ratios crashes browsers In-Reply-To: <31965B43-1BCF-4495-B402-87F28BE6D47A@novemberborn.net> References: <46FBFB4D.5030301@kaadesigngroup.com> <2AB2D8E8-8D0D-4A57-B20A-EA9BAD2530B8@novemberborn.net> <46FC19A5.8020701@kaadesigngroup.com> <4701247A.2040905@kaadesigngroup.com> <31965B43-1BCF-4495-B402-87F28BE6D47A@novemberborn.net> Message-ID: <4702880A.4020403@kaadesigngroup.com> I can't seem to generate the error with the demo, but instead with the demo the Flash text is not drawn http://buildingmomentuminc.com/test/temppage/sifr3-r308/demo/index.html -Anthony Mark Wubben wrote: > Impressive! Interestingly enough test2 also crashes my Safari install. > Guess I'll have to do some debugging here! > > Just to make sure, if you calculate ratios for the demo, does it crash > as well? > > On Oct 1, 2007, at 6:46 PM, Anthony McLin wrote: > >> Here's some more info from more testing: >> >> IE6 - no problem >> Safari 2.04 - shows the ratios popup, then crashes >> Firefox 1.06 OSX - shows the ratios popup, then crashes >> Firefox 1.5.0.9 OSX - shows the ratios popup, then crashes >> Firefox 2.0.0.1 OSX - shows the ratios popup, then crashes >> Firefox 2.0.0.7 XP - crashes (can't tell if the ratios popup is >> occurring before the crash) >> >> >> Dropping the wmode declaration eliminates the crashing: >> http://www.buildingmomentuminc.com/test/sifrtest2.html >> >> -Anthony >> >> Mark Wubben wrote: >>> On Sep 27, 2007, at 10:59 PM, Anthony McLin wrote: >>>> Here's an example: >>>> >>>> http://www.buildingmomentuminc.com/test/sifrtest.html >>> >>> Not seeing a crash in Firefox/Mac. It is indeed crashing on >>> Firefox/Windows, that's pretty weird. The problem with IE seems to be >>> that in it's never ending quest for annoying users it's asking >>> permission to show the confirm() dialog with the ratios. The >>> permission can only be given for the current page view, and therefore >>> nothing shows up. Kinda annoying, not sure if I can work around that. >>> Would it be fine if the ratio calculation would be a non-IE feature? >>> >>> Can you stop Firefox from crashing by disabling the wmode and/or >>> delayCSS options? >>> >>> -- >>> Mark >>> >> >> >> -- >> Anthony McLin >> Senior Web Developer >> amclin at kaadesigngroup.com >> T 310.821.1400 ext. 266 >> F 310.821.1440 >> >> KAA Design Group, Inc. >> 4201 Redwood Avenue >> Los Angeles, CA 90066 >> >> ARCHITECTURE | LANDSCAPE | BRAND EXPERIENCE | INTERIORS >> http://www.kaadesigngroup.com >> >> _______________________________________________ >> sifr3-dev mailing list >> sifr3-dev at lists.novemberborn.net >> http://lists.novemberborn.net/mailman/listinfo/sifr3-dev > -- Anthony McLin Senior Web Developer amclin at kaadesigngroup.com T 310.821.1400 ext. 266 F 310.821.1440 KAA Design Group, Inc. 4201 Redwood Avenue Los Angeles, CA 90066 ARCHITECTURE | LANDSCAPE | BRAND EXPERIENCE | INTERIORS http://www.kaadesigngroup.com From mark at novemberborn.net Tue Oct 2 19:27:40 2007 From: mark at novemberborn.net (Mark Wubben) Date: Tue, 2 Oct 2007 21:27:40 +0200 Subject: [sIFR3-dev] Calculating ratios crashes browsers In-Reply-To: <4702880A.4020403@kaadesigngroup.com> References: <46FBFB4D.5030301@kaadesigngroup.com> <2AB2D8E8-8D0D-4A57-B20A-EA9BAD2530B8@novemberborn.net> <46FC19A5.8020701@kaadesigngroup.com> <4701247A.2040905@kaadesigngroup.com> <31965B43-1BCF-4495-B402-87F28BE6D47A@novemberborn.net> <4702880A.4020403@kaadesigngroup.com> Message-ID: <11D6FDA0-D4CE-45E4-B22A-4BD10CFB333B@novemberborn.net> On Oct 2, 2007, at 8:03 PM, Anthony McLin wrote: > I can't seem to generate the error with the demo, but instead with the > demo the Flash text is not drawn Text is drawn here (at least in Camino). This is all very weird! -- Mark From mark at novemberborn.net Thu Oct 11 10:41:25 2007 From: mark at novemberborn.net (Mark Wubben) Date: Thu, 11 Oct 2007 12:41:25 +0200 Subject: [sIFR3-dev] sIFR updates Message-ID: <6C28B60D-C226-4770-85A6-6AF992E73E5F@novemberborn.net> Hi all, I've just published a post with some updates. You can find it at: Kind regards, -- Mark From j.huijkman at edendesign.nl Thu Oct 11 12:01:53 2007 From: j.huijkman at edendesign.nl (Johan Huijkman) Date: Thu, 11 Oct 2007 14:01:53 +0200 Subject: [sIFR3-dev] sifr3-dev Digest, Vol 20, Issue 5 Message-ID: Op dit moment kan ik uw e-mail niet beantwoorden. In verband met de geboorte van mijn zoon ben ik vanaf maandag 8 t/m vrijdag 19 oktober afwezig. Voor dringende kwesties kunt u contact opnemen met Flip Wegner (f.wegner at edendesign.nl), Joost Holthuis (j.holthuis at edendesign.nl) of Nils Hendriks(n.hendriks at edendesign.nl) Met vriendelijke groeten, Johan Huijkman From j.huijkman at edendesign.nl Fri Oct 12 12:02:04 2007 From: j.huijkman at edendesign.nl (Johan Huijkman) Date: Fri, 12 Oct 2007 14:02:04 +0200 Subject: [sIFR3-dev] sifr3-dev Digest, Vol 20, Issue 6 Message-ID: Op dit moment kan ik uw e-mail niet beantwoorden. In verband met de geboorte van mijn zoon ben ik vanaf maandag 8 t/m vrijdag 19 oktober afwezig. Voor dringende kwesties kunt u contact opnemen met Flip Wegner (f.wegner at edendesign.nl), Joost Holthuis (j.holthuis at edendesign.nl) of Nils Hendriks(n.hendriks at edendesign.nl) Met vriendelijke groeten, Johan Huijkman From hassinger.paul at ipaul.com Sat Oct 13 06:56:46 2007 From: hassinger.paul at ipaul.com (Paul Hassinger) Date: Sat, 13 Oct 2007 01:56:46 -0500 Subject: [sIFR3-dev] sIFR 3 rollover function Message-ID: <1192258606.18673.21.camel@localhost> I have modified the source from the 1.2 official add-ons to create a rollback function that seems to work with the v3 release (tested with version 3, revision 304). In using some tinyMCE functions to edit content, I needed sIFR turned off and then the content saved without the sIFR styles... (and reactivated when completed) thus, a rollback function similar to in the 1.2 Official add-ons I haven't spent a lot of time with sIFR and am not that familiar with it and the differences to v3, so any comments, etc, improvements, help from the developers there, public, etc would be good. Hopefully this helps the developers there and/or is helpful to someone. Basically, I just made it so it seems to work with the existing code I have here, with minimal testing in Firefox on Linux. <1 attachment (rename .txt with .js extension)> Thanks, Paul Hassinger hassinger.paul at ipaul.com -------------- next part -------------- /* sIFR Unofficial Rollback addon for 3.x Modified by Paul Hassinger - hassinger.paul at ipaul.com - http://www.ipaul.com (modified from sIFR 2.0.1 Official Add-ons 1.2) Copyright 2005 Mark Wubben This software is licensed under the CC-GNU LGPL */ if(typeof sIFR == "object"){ sIFR.removeDecoyClasses = function(){ function removeClass(node, sClass){ if(node && node.className != null){ node.className = node.className.replace(/\bsIFR-hasFlash\b/, ""); }; }; return function(){ removeClass(document.documentElement); removeClass(document.getElementsByTagName("body")[0]); }; }(); sIFR.rollback = function(){ function rollback(sSelector){ //named.extract(arguments, {sSelector:function(value){sSelector=value}}); if(sSelector == null){ sSelector = ""; } else { sSelector += ">"; }; sIFR.removeDecoyClasses(); //sIFR.bHideBrowserText = false; if(doRollback(sSelector+"embed") == false){ doRollback(sSelector+"object"); };console.log(document.documentElement); }; function doRollback(sSelector){ var node, nodeParent, nodeAlternate, nodeAlternateChild, nodeAlternateNextChild, indexNodeToRemove; var listNodes = parseSelector(sSelector); var i = listNodes.length - 1; var bHasRun = false; while(i >= 0){ node = listNodes[i]; listNodes.length--; nodeParent = node.parentNode; if(node.getAttribute("sifr") == "true"){ /* Flash blockers may add other nodes as siblings to the Flash element. Thus, we remove all children of nodeParent, and look for nodeAlternate at the same time */ indexNodeToRemove = 0; while(indexNodeToRemove < nodeParent.childNodes.length){ node = nodeParent.childNodes[indexNodeToRemove]; if(node.className == "sIFR-alternate"){ nodeAlternate = node; indexNodeToRemove++; continue; }; nodeParent.removeChild(node); }; if(nodeAlternate != null){ nodeAlternateChild = nodeAlternate.firstChild; while(nodeAlternateChild != null){ nodeAlternateNextChild = nodeAlternateChild.nextSibling; nodeParent.appendChild(nodeAlternate.removeChild(nodeAlternateChild)); nodeAlternateChild = nodeAlternateNextChild; }; nodeParent.removeChild(nodeAlternate); }; if(!sIFR.UA.bIsXML && sIFR.UA.bUseInnerHTMLHack){ nodeParent.innerHTML += ""; }; nodeParent.className = nodeParent.className.replace(/\bsIFR\-replaced\b/, ""); bHasRun = true; }; i--; }; return bHasRun; }; return rollback; }(); }; From hassinger.paul at ipaul.com Sat Oct 13 07:22:23 2007 From: hassinger.paul at ipaul.com (Paul Hassinger) Date: Sat, 13 Oct 2007 02:22:23 -0500 Subject: [sIFR3-dev] sIFR 3 rollover function In-Reply-To: <1192258606.18673.21.camel@localhost> References: <1192258606.18673.21.camel@localhost> Message-ID: <1192260143.18673.26.camel@localhost> I apologize, the previous version I attached was an incorrect copy (this one uses the sIFR v3 removeFlashClass function instead of the remove decoy and I cleaned up a lose console.log function. Attached is a correct version of what I meant to send earlier. <1 attachment (rename .txt with .js extension)> Thanks, Paul Hassinger hassinger.paul at ipaul.com On Sat, 2007-10-13 at 01:56 -0500, Paul Hassinger wrote: > I have modified the source from the 1.2 official add-ons to create a > rollback function that seems to work with the v3 release (tested with > version 3, revision 304). > > In using some tinyMCE functions to edit content, I needed sIFR turned > off and then the content saved without the sIFR styles... (and > reactivated when completed) thus, a rollback function similar to in the > 1.2 Official add-ons > > I haven't spent a lot of time with sIFR and am not that familiar with it > and the differences to v3, so any comments, etc, improvements, help from > the developers there, public, etc would be good. Hopefully this helps > the developers there and/or is helpful to someone. Basically, I just > made it so it seems to work with the existing code I have here, with > minimal testing in Firefox on Linux. > > <1 attachment (rename .txt with .js extension)> > > Thanks, > Paul Hassinger > hassinger.paul at ipaul.com -------------- next part -------------- /* sIFR Unofficial Rollback addon for 3.x Modified by Paul Hassinger - hassinger.paul at ipaul.com - http://www.ipaul.com (modified from sIFR 2.0.1 Official Add-ons 1.2) Copyright 2005 Mark Wubben This software is licensed under the CC-GNU LGPL */ if(typeof sIFR == "object"){ sIFR.rollback = function(){ function rollback(sSelector){ if(sSelector == null){ sSelector = ""; } else { sSelector += ">"; }; sIFR.removeFlashClass(); if(doRollback(sSelector+"embed") == false){ doRollback(sSelector+"object"); }; }; function doRollback(sSelector){ var node, nodeParent, nodeAlternate, nodeAlternateChild, nodeAlternateNextChild, indexNodeToRemove; var listNodes = parseSelector(sSelector); var i = listNodes.length - 1; var bHasRun = false; while(i >= 0){ node = listNodes[i]; listNodes.length--; nodeParent = node.parentNode; if(node.getAttribute("sifr") == "true"){ /* Flash blockers may add other nodes as siblings to the Flash element. Thus, we remove all children of nodeParent, and look for nodeAlternate at the same time */ indexNodeToRemove = 0; while(indexNodeToRemove < nodeParent.childNodes.length){ node = nodeParent.childNodes[indexNodeToRemove]; if(node.className == "sIFR-alternate"){ nodeAlternate = node; indexNodeToRemove++; continue; }; nodeParent.removeChild(node); }; if(nodeAlternate != null){ nodeAlternateChild = nodeAlternate.firstChild; while(nodeAlternateChild != null){ nodeAlternateNextChild = nodeAlternateChild.nextSibling; nodeParent.appendChild(nodeAlternate.removeChild(nodeAlternateChild)); nodeAlternateChild = nodeAlternateNextChild; }; nodeParent.removeChild(nodeAlternate); }; if(!sIFR.UA.bIsXML && sIFR.UA.bUseInnerHTMLHack){ nodeParent.innerHTML += ""; }; nodeParent.className = nodeParent.className.replace(/\bsIFR\-replaced\b/, ""); bHasRun = true; }; i--; }; return bHasRun; }; return rollback; }(); }; From j.huijkman at edendesign.nl Sat Oct 13 12:01:22 2007 From: j.huijkman at edendesign.nl (Johan Huijkman) Date: Sat, 13 Oct 2007 14:01:22 +0200 Subject: [sIFR3-dev] sifr3-dev Digest, Vol 20, Issue 7 Message-ID: Op dit moment kan ik uw e-mail niet beantwoorden. In verband met de geboorte van mijn zoon ben ik vanaf maandag 8 t/m vrijdag 19 oktober afwezig. Voor dringende kwesties kunt u contact opnemen met Flip Wegner (f.wegner at edendesign.nl), Joost Holthuis (j.holthuis at edendesign.nl) of Nils Hendriks(n.hendriks at edendesign.nl) Met vriendelijke groeten, Johan Huijkman From j.huijkman at edendesign.nl Sun Oct 14 12:01:47 2007 From: j.huijkman at edendesign.nl (Johan Huijkman) Date: Sun, 14 Oct 2007 14:01:47 +0200 Subject: [sIFR3-dev] sifr3-dev Digest, Vol 20, Issue 8 Message-ID: Op dit moment kan ik uw e-mail niet beantwoorden. In verband met de geboorte van mijn zoon ben ik vanaf maandag 8 t/m vrijdag 19 oktober afwezig. Voor dringende kwesties kunt u contact opnemen met Flip Wegner (f.wegner at edendesign.nl), Joost Holthuis (j.holthuis at edendesign.nl) of Nils Hendriks(n.hendriks at edendesign.nl) Met vriendelijke groeten, Johan Huijkman From mark at novemberborn.net Sun Oct 14 18:02:48 2007 From: mark at novemberborn.net (Mark Wubben) Date: Sun, 14 Oct 2007 20:02:48 +0200 Subject: [sIFR3-dev] sIFR 3 rollover function In-Reply-To: <1192260143.18673.26.camel@localhost> References: <1192258606.18673.21.camel@localhost> <1192260143.18673.26.camel@localhost> Message-ID: <7BEC96A9-524A-40C1-B9E1-2059833FD5B1@novemberborn.net> Good stuff. Perhaps you could add it to the wiki for the time being? -- Mark On Oct 13, 2007, at 9:22 AM, Paul Hassinger wrote: > I apologize, the previous version I attached was an incorrect copy > (this > one uses the sIFR v3 removeFlashClass function instead of the remove > decoy and I cleaned up a lose console.log function. > > Attached is a correct version of what I meant to send earlier. > > <1 attachment (rename .txt with .js extension)> > > Thanks, > Paul Hassinger > hassinger.paul at ipaul.com > > > On Sat, 2007-10-13 at 01:56 -0500, Paul Hassinger wrote: >> I have modified the source from the 1.2 official add-ons to create a >> rollback function that seems to work with the v3 release (tested with >> version 3, revision 304). >> >> In using some tinyMCE functions to edit content, I needed sIFR turned >> off and then the content saved without the sIFR styles... (and >> reactivated when completed) thus, a rollback function similar to >> in the >> 1.2 Official add-ons >> >> I haven't spent a lot of time with sIFR and am not that familiar >> with it >> and the differences to v3, so any comments, etc, improvements, >> help from >> the developers there, public, etc would be good. Hopefully this helps >> the developers there and/or is helpful to someone. Basically, I just >> made it so it seems to work with the existing code I have here, with >> minimal testing in Firefox on Linux. >> >> <1 attachment (rename .txt with .js extension)> >> >> Thanks, >> Paul Hassinger >> hassinger.paul at ipaul.com >> > _______________________________________________ > sifr3-dev mailing list > sifr3-dev at lists.novemberborn.net > http://lists.novemberborn.net/mailman/listinfo/sifr3-dev