1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-08 23:56:58 +02:00

EONE-36 (Improvement): Added media class. Icons are now imported and removed during plugin install/uninstall.

This commit is contained in:
CaMer0n
2010-03-14 02:11:23 +00:00
parent 637cf91009
commit ab53f91431
9 changed files with 241 additions and 299 deletions

View File

@@ -26,7 +26,7 @@ function iconpicker_shortcode($parm)
$str = "";
$size_section = array();
$lastsize = "";
$lastsize = "16";
if($sql->db_Select_gen($qry))
{
@@ -34,17 +34,17 @@ function iconpicker_shortcode($parm)
{
list($tmp,$tmp2,$size) = explode("_",$row['media_category']);
if($lastsize!='' && ($size != $lastsize))
if($str !='' && ($size != $lastsize))
{
$size_section[] = $str;
$str = "";
$str = "";
}
$str .= "<a href='#".$row['media_url']."' title='{$filepath}' onclick=\"e107Helper.insertText('{$row['media_url']}','{$name}','{$name}-iconpicker'); return false; \"><img class='icon picker list%%size%%' src='".$tp->replaceConstants($row['media_url'])."' alt='{$row['media_name']}' /></a>";
$lastsize = $size;
}
return '<div id="'.$name.'-iconpicker-ajax"><div class="field-spacer iconpicker">'.str_replace('%%size%%', '', implode('</div><div class="field-spacer iconpicker">', $size_section)).'</div></div>';