image plugin |
[eluser]steel_slasher[/eluser]
this is my first contribution the the CI development/expansion basically i wanted to load images in HTML without all the slashes and speech marks so i thought i would make a helper at first but realised i would only need one function so i moved to a plug-in. Basically you load the plug-in like so: Code: $this->load->plugin('image'); and to output the image HTML you use this function: Code: $file = "myimage.gif"; a default path can be set in the plugin file itself (this bit needs testing at the min): Code: <?php Code: $path="/system/images/" Code: $path="/whatever/folder/youwant/" if you want to use the default path just call the function with the file variable Code: $file = "myimage.gif"; if you want to load several images then an array can be used Code: $files= array("file1.gif", "file2.gif", "file3.gif"); here is the source: Code: <?php if there are any problems please say and also i am planning to expand to cover other media types like flash but then it would become a helper. Download it here: http://sitecrackerz.wordpress.com/2008/0...-app-ever/
[eluser]Pascal Kriete[/eluser]
Sounds very similar to the img() function of the html helper, but thanks for sharing nonetheless. Btw, your link has one too many 'my-first...'.
[eluser]steel_slasher[/eluser]
[quote author="inparo" date="1207868756"]Sounds very similar to the img() function of the html helper, but thanks for sharing nonetheless. Btw, your link has one too many 'my-first...'.[/quote] i couldnt find that function and damn wordpress for giving me a stupid link |
Welcome Guest, Not a member yet? Register Sign In |