Jump to:

10928 Posts in 2612 Topics by 1809 members

All other Modules

SilverStripe Forums » All other Modules » siFR module implementation question

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 1870 Views
  • alxndr
    Avatar
    Community Member
    1 Post

    siFR module implementation question Link to this post

    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();
             }
          }

  • Willr
    Avatar
    Forum Moderator
    5483 Posts

    Re: siFR module implementation question Link to this post

    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.

  • TerryMiddleton
    Avatar
    Community Member
    108 Posts

    Re: siFR module implementation question Link to this post

    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

  • Willr
    Avatar
    Forum Moderator
    5483 Posts

    Re: siFR module implementation question Link to this post

    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/

  • TerryMiddleton
    Avatar
    Community Member
    108 Posts

    Re: siFR module implementation question Link to this post

    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

  • Willr
    Avatar
    Forum Moderator
    5483 Posts

    Re: siFR module implementation question Link to this post

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

  • TerryMiddleton
    Avatar
    Community Member
    108 Posts

    Re: siFR module implementation question Link to this post

    Willr,

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

    Terry

  • TerryMiddleton
    Avatar
    Community Member
    108 Posts

    Re: siFR module implementation question Link to this post

    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

    1870 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.