Created
April 13, 2009 06:45
-
-
Save newism/94313 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function insert($at, $html) | |
{ | |
global $SESS; | |
$SESS->cache['lg'][LG_POL_addon_id]['snippets'][$at][] = $html; | |
} | |
function insert_css($css, $file = TRUE, $at = "head") | |
{ | |
if($file) | |
{ | |
$this->insert($at, '<link rel="stylesheet" type="text/css" charset="utf-8" href="'.$css.'">'); | |
} | |
else | |
{ | |
$this->insert($at, '<style type="text/css" charset="utf-8">'.NL.$css.NL.'</style>'); | |
} | |
} | |
function insert_js($js, $file = TRUE, $at = "body") | |
{ | |
if($file) | |
{ | |
$this->insert($at, '<script type="text/javascript" src="'.$js.'" charset="utf-8"></script>'); | |
} | |
else | |
{ | |
$this->insert($at, '<script type="text/javascript">'.NL.$js.NL.'</script>'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment