Page 1 of 1

sIFR with phpwcms

Posted: Mon 28. Nov 2005, 15:03
by Kosse
Hi,

as said in previous post I managed to get sIFR (same as GT MOD but with other advantages, like cut/paste the content) working. Master Frold asked me to post it here, and as I can't refuse him nothing ;), here it goes:

You'll have to look at sIFR page to know what it does: http://www.mikeindustries.com/sifr/


Here's how I did:

1) I created in include/inc_module/mod_sifr

in mod_sifr I put:
sifr-addons.js
sIFR-print.css
sIFR-screen.css
sifr.js
(those 4 files are from sIFR package)
and:
the_font.swf (in my case: sweden.swf, follow instructions of sIFR to understand howto, it's easy, just create a swf file with your font actually)

2) Created a code snippet I called siFR.php that i put in
/phpwcms_code_snippets/siFR.php

Code: Select all

<link rel="stylesheet" href="include/inc_module/mod_sifr/sIFR-print.css" type="text/css" media="print" />
<link rel="stylesheet" href="include/inc_module/mod_sifr/sIFR-screen.css" type="text/css" media="screen" />
<script src="include/inc_module/mod_sifr/sifr-addons.js" type="text/javascript"></script>
<script src="include/inc_module/mod_sifr/sifr.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
/* Replacement calls. Please see documentation for more information. */

if(typeof sIFR == "function"){
    var tmplz = named({sFlashSrc : "include/inc_module/mod_sifr/sweden.swf", sColor : "#000", sFlashVars: "textalign=left"});
    sIFR.replaceElement("h1", tmplz);
    sIFR.replaceElement("h2", tmplz);
    sIFR.replaceElement("h3", tmplz);
    sIFR.replaceElement("h4", tmplz);
    sIFR.replaceElement("h5", tmplz);
};

//]]>
</script>

3) Then I just put in header of TEMPLATE the following:
{PHP:phpwcms_code_snippets/siFR.php}

VoilĂ . Enjoy.
Soon I'll publish a live demo of it.

Cheers

Posted: Mon 28. Nov 2005, 15:07
by frold
Thanks - Guru Kosse :D

And regarding a demo: http://www.idest.com/csshacks/pages/cha ... F_demo.htm

Posted: Mon 28. Nov 2005, 19:36
by StudioZ
hmmm... very very interesting guys 8)
Thanks for sharing :)

Cheers, :)

Posted: Mon 28. Nov 2005, 20:25
by Kosse
Example (phpwcms 1.2 if I remember well seem sto be working on all releases): http://www.memoire-meyer.be/index.php?index

i'm sure Fulvio and u all guys will come up with nicer and more integrated versions ;)

Cheers

Posted: Mon 28. Nov 2005, 21:10
by Ben
Nice work, Kosse! I haven't looked into the code at all, but I was wondering if it does and "browser sniffing" to see if you have Flash installed. If you didn't, then it would be cool to simply display standard html text.

(I know, I know ... everyone has Flash these days, so it isn't that important.) :)

Posted: Mon 28. Nov 2005, 21:15
by Kosse
hi -again- Ben,
it actually displays text if u haven't flash installed :) with the css!!

Cheers

Posted: Mon 28. Nov 2005, 21:17
by Ben
Very cool, Kosse.