mirror of
https://github.com/bcit-ci/CodeIgniter.git
synced 2025-02-20 11:13:29 +08:00
...
parent
6e377ef6a5
commit
71d0afd33f
@ -1 +1,62 @@
|
||||
Hi
|
||||
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 :)
|
Loading…
x
Reference in New Issue
Block a user