sIFR with phpwcms

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
Post Reply
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

sIFR with phpwcms

Post 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
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

Thanks - Guru Kosse :D

And regarding a demo: http://www.idest.com/csshacks/pages/cha ... F_demo.htm
http://www.studmed.dk Portal for doctors and medical students in Denmark
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

hmmm... very very interesting guys 8)
Thanks for sharing :)

Cheers, :)
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post 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
Ben
Posts: 558
Joined: Wed 14. Jan 2004, 08:05
Location: Atlanta
Contact:

Post 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.) :)
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post by Kosse »

hi -again- Ben,
it actually displays text if u haven't flash installed :) with the css!!

Cheers
Ben
Posts: 558
Joined: Wed 14. Jan 2004, 08:05
Location: Atlanta
Contact:

Post by Ben »

Very cool, Kosse.
Post Reply