URL Helper Extended - anchor_img() added |
[eluser]Isern Palaus[/eluser]
Hello, I am improving my website and doing all I can for a simply use of the features included in views and this includes the anchors on the images. I ever use a images with a especific width and height but I have added the attributes on the image for distributing on this forum and using in their scripts. I based my code on the original anchor() and the img(). It is only a modificaction including one inside the other. Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); How to use it? It is very simple to use: Code: <?php Also... Code: <?=anchor_img('test.html','images/logo.png');?> Wish you like it. Regards, -- Isern Palaus
[eluser]stuffradio[/eluser]
Cool stuff! You should have used a different variable name than $aatt ![]()
[eluser]Isern Palaus[/eluser]
[quote author="stuffradio" date="1212985636"]Cool stuff! You should have used a different variable name than $aatt ![]() Hello stuffradio, What kind of variable did you use for this kind of function? Because there is a A Attributes and Image Attributes :S. Thank you, -- Isern Palaus
[eluser]stuffradio[/eluser]
well I'm just saying that the name of the variable doesn't sound like it means much to the general user. A good variable has a name that makes sense. Example: Images could be Code: $img Links Code: $link Edit: I do understand your variables now though.
[eluser]tjmthome[/eluser]
Hi, I recently realize about the need of a helper like the one you are sharing, but it has a little problem: im working with $config['url_suffix'] = ".html"; then; the output shows some like this: Code: <a href="http://localhost/prods/my_prods.html"><img src="prod_shoe.jpg.html" alt="boots"></a> |
Welcome Guest, Not a member yet? Register Sign In |