HTML Helper Addition - script_tag() |
[eluser]OregonGold[/eluser]
I noticed there was a link_tag() helper but not a script_tag() helper. So i decided to add it in. If you want it, enjoy. PLEASE NOTE!!! the forum is removing the script tags from the code below, So remove the forward slash from all instances of the word script "s/cript" Code: // ------------------------------------------------------------------------ usage Code: echo script_tag('javascript/jquery.js'); produces Code: <s/cript src="http://www.domain.com/javascript/jquery.js" type="text/javascript"></s/cript>
[eluser]Medikal[/eluser]
Nice job man, looks good. I'm always trying to think of ideas to make, can never think of any
[eluser]Unknown[/eluser]
html code is to easy but main thing is create the page. and done anything. Photo to Canvas
[eluser]OregonGold[/eluser]
[quote author="semon" date="1291224434"]html code is to easy but main thing is create the page. and done anything. Photo to Canvas[/quote] I have no clue what you just said. This is a helper, they have a helper for everything else so why just just add this to the list. Its not needed just like link_tag or img() but its there.
[eluser]Dennis Rasmussen[/eluser]
[quote author="OregonGold" date="1291225575"][quote author="semon" date="1291224434"]html code is to easy but main thing is create the page. and done anything. url removed[/quote] I have no clue what you just said. This is a helper, they have a helper for everything else so why just just add this to the list. Its not needed just like link_tag or img() but its there.[/quote] Hi OregonGold, say hello to the forum spam (it's a spam reply)
[eluser]Unknown[/eluser]
[quote author="OregonGold" date="1291197101"] Code: // ------------------------------------------------------------------------ You are missing a piece of code to work right.. "if (is_array($src)){foreach ($src as $k=>$v){" Code: if ( ! function_exists('script_tag'))
[eluser]ShoeLace1291[/eluser]
You also have to add an extra closing bracket (}) after the first $script .= ">[removed]"; I got an unexpected t else error and adding that bracket fixed it. |
Welcome Guest, Not a member yet? Register Sign In |