Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

siFR module implementation question


Reply


8 Posts   1925 Views

Avatar
alxndr

Community Member, 1 Post

22 March 2009 at 5:39am

Hi all,

Though the sifr module has its page it lacks the detailed installation guide. Also the http://doc.silverstripe.com/doku.php?id=modules:sifr
page is missing.
Can somebody point me in the right direction for a proper sifr module installation?
Like after putting the sifr folder in the root, where exactly has to be added the calls for the Sifr::replaceElement() and Sifr::loadSifr() to Page.php file. And why there are two instances in the readme file, code pasted below:

// Page.php
      class Page_Controller extends ContentController {
         function init() {
            parent::init();
            Sifr::replaceElement("h1", "calliopemvb",'sColor:"#fe6e0e",sLinkColor:"#fe6e0e", sBgColor:"#f6f6f5", sHoverColor:"#fe6e0e"');
            Sifr::loadSifr();
         }
      }
   ||| IN > 0.2 |||
      // Page.php
      class Page_Controller extends ContentController {
         function init() {
            parent::init();
            Sifr::add_font('din', 'themes/obcrest/fonts/Din-Bold.swf');
            Sifr::replace_element('din', 'h3', "'.sIFR-root { text-align: left; color: #001755;'");
            Sifr::activate_sifr();
         }
      }

Avatar
Willr

Forum Moderator, 5513 Posts

22 March 2009 at 10:31pm

Edited: 22/03/2009 10:32pm

The 2 instances is because the code required to run the module changed in 0.2 version of the module (as in the README).

You need to put the code that relates to the version of the sifr module you downloaded in your Page.php in mysite/code/ folder.

The reason this has changed between the 2 versions is because in the module version 0.1 it used the 2.0.7 version of sifr.js, the 0.2 version of the module uses the new beta sifr 3.0 which has different include systems.

Avatar
TerryMiddleton

Community Member, 108 Posts

4 April 2009 at 11:28pm

Willr,

I have a question. In the readme file you say: * Drop your sifr flash file in this file.

What does this mean? I don't see a sifr flash file in the download. Do you mean to drop the folder sifr into the fonts folder?

I understand how it's implement. But I'm not getting how to get the module installed and ready for implementation.

I'm sure it's super simple so I must be missing something very obvious. Can you help?

Terry

Avatar
Willr

Forum Moderator, 5513 Posts

4 April 2009 at 11:34pm

Drop your sifr flash file in this file.

Refers to your font flash file that you need. Eg by exporting the swf of the font file with flash or one of the online tools - eg http://www.sifrgenerator.com/

Avatar
TerryMiddleton

Community Member, 108 Posts

5 April 2009 at 12:20am

Willr,

Thank you for the ultra quick reply. Okay, I'm getting closer.

I got my swf file and dropped it into the flash folder. That was easy.

I realized that I miscommunicated. I"ll try again; my apologies.

I'm struggling with where the directory of sifr needs to be.

I downloaded and extracted the sifr module. Where does the sifr folder need to be in order to deploy? Under mysite\sifr? or under themes\sifr?

Terry

Avatar
Willr

Forum Moderator, 5513 Posts

5 April 2009 at 12:30am

Its just like any other module, all modules go in the top level with cms/ sapphire/ jsparty etc.

Avatar
TerryMiddleton

Community Member, 108 Posts

5 April 2009 at 12:58am

Willr,

Thanks again. I"m getting closer. I appreciate your help.

Terry

Avatar
TerryMiddleton

Community Member, 108 Posts

5 April 2009 at 2:06am

Willr,

Just wanted to let you know - I got it working. Thanks a million for the help. It's really simple once I got my head around it and understood how it all pieced together.

Thanks again,

Terry