From 71d0afd33fd6f5777f43263d76a9757525b28258 Mon Sep 17 00:00:00 2001 From: World Wide Web Server <_www@Dwight-Schrutte.local> Date: Wed, 4 Jul 2012 16:05:07 -0700 Subject: [PATCH] ... --- sIFR-helper.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/sIFR-helper.md b/sIFR-helper.md index 40816a2b..b01a8184 100755 --- a/sIFR-helper.md +++ b/sIFR-helper.md @@ -1 +1,62 @@ -Hi \ No newline at end of file +Here's my sIFR helper. + +1. Put "sifr_helper.php" in "helpers" folder. +2. Swf-fonts, sifr's css, and sifr's js, as a default i put it in "<?php echo base_url(); ?>/statics/sifr/". + - In your view put these lines. +[code] +<link rel="stylesheet" href="<?php echo base_url(); ?>statics/sifr/sIFR-screen.css" type="text/css" media="screen" /> +<link rel="stylesheet" href="<?php echo base_url(); ?>statics/sifr/sIFR-print.css" type="text/css" media="print" /> + +[removed][removed] +[/code] + + - You can change this line to specify your path for your swf-font, in sifr_helper.php. +[code] + $swfpath = base_url().'statics/sifr/'; +[/code] + +NOW, load your new helper by editing config/autoload.php +[code] +$autoload['helper'] = array('url', 'html', 'sifr'); +[/code] +OR by loading it in you controller +[code] +$this->load->helper('sifr'); +[/code] +Finally you're ready to use it ! +just write this code in your view ...! +[code] +echo sifr_it('Test'); +//and it returns a string which contain the header and the script with the default values +[/code] + +And also you can passing custom values by array +[code] +echo sifr_it('Test with costum', array("link"=>"http://www.google.com", "font"=>"font_name")); +//and it returns a string which contain the header and the script with your custom values +/* +HERE ARE THE DEFAULT VALUES : + $swfpath = base_url().'statics/sifr/';//SWF-fonts path + $id = '';//for custom id, [DON'T repeat it in the same page] + $link = '';//link for heading + $header = '1';//heading size 1,2,3,4,5,6 + $font = 'tradegothic';//font name + $sColor = '#000000';//heading color + $sLinkColor = 'null';//[if] link color + $sHoverColor = 'null';//Hover color + $sBgColor = 'null';//heading background color + $nPaddingTop = '0';/PaddingTop + $nPaddingRight = '0';//PaddingRight + $nPaddingBottom = '0';//PaddingBottom + $nPaddingLeft = '0';//PaddingLeft + $textalign = '';//textalign {center, right, left} + $offsetLeft = '';//offsetLeft=N Pushes text Npx to the right + $offsetTop = '';/offsetTop=N Pushes text Npx down. + $underline = '';//underline={true, false} Adds underline to links on hover + $sCase = '';//Case {upper, lower} + $sWmode = '';//sWmode {transparent, opaque} !!! unrecommended !!! +*/ +[/code] + +Enjoy .. +Amr Tamimi - Brainythink :) \ No newline at end of file