public function NBBCPlugin_AfterNBBCSetup_Handler($Sender, $Args) { // $BBCode = new BBCode(); $BBCode = $Args['BBCode']; $BBCode->smiley_url = SmartAsset('/plugins/Emotify/design/images'); $Smileys = array(); foreach (self::GetEmoticons() as $Text => $Filename) { $Smileys[$Text] = $Filename . '.gif'; } $BBCode->smileys = $Smileys; }
/** * Returns an img tag. */ function Img($Image, $Attributes = '', $WithDomain = FALSE) { if ($Attributes == '') $Attributes = array(); if ($Image != '' && substr($Image, 0, 7) != 'http://' && substr($Image, 0, 8) != 'https://') $Image = SmartAsset($Image, $WithDomain); return '<img src="'.$Image.'"'.Attribute($Attributes).' />'; }
/** * Returns an img tag. */ function img($Image, $Attributes = '', $WithDomain = false) { if ($Attributes != '') { $Attributes = Attribute($Attributes); } if (!IsUrl($Image)) { $Image = SmartAsset($Image, $WithDomain); } return '<img src="' . $Image . '"' . $Attributes . ' />'; }
/** * Returns an img tag. */ function Img($Image, $Attributes = '', $WithDomain = FALSE) { if ($Attributes == '') { $Attributes = array(); } if (!IsUrl($Image)) { $Image = SmartAsset($Image, $WithDomain); } return '<img src="' . $Image . '"' . Attribute($Attributes) . ' />'; }
/** * Returns an img tag. */ function img($Image, $Attributes = '', $WithDomain = false) { if ($Attributes != '') { $Attributes = Attribute($Attributes); } if (!IsUrl($Image)) { $Image = SmartAsset($Image, $WithDomain); } return '<img src="' . htmlspecialchars($Image, ENT_QUOTES) . '"' . $Attributes . ' />'; }
/** * Returns nicely formatted html for an event date * * @param date $EventDate Date of the event * @return string html string showing the event date (translatable) */ private function FormatEventCalendarDate($EventDate, $IncludeIcon = FALSE) { if (!CheckPermission(array('Plugins.EventCalendar.View'))) { return; } if ($EventDate != '0000-00-00') { if ($IncludeIcon) { $Icon = '<img src="' . SmartAsset('/plugins/EventCalendar/design/images', TRUE) . '/eventcalendar.png" />'; } else { $Icon = ''; } return Gdn_Format::Date($EventDate, T('EventCalendarDateFormat', "<div id=\"EventCalendarDate\">{$Icon}On %A, %e. %B %Y</div>")); } }
/** * Returns an img tag. */ function img($Image, $Attributes = '', $WithDomain = false) { if ($Attributes != '') { $Attributes = Attribute($Attributes); } if (preg_match('/^(.*)AvatarFirstLetter_(.+)$/', $Image, $matches)) { $name = $matches[2]; $firstLetter = substr($name, 0, 1); $rgb = AvatarFirstLetter::stringToColor($name); $Image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQI12NgYAAAAAMAASDVlMcAAAAASUVORK5CYII='; $output = '<span class="AvatarFirstLetter" style="background-color: ' . $rgb . ';">'; $output .= '<img src="' . $Image . '"' . $Attributes . ' />'; $output .= '<span>' . $firstLetter . '</span>'; $output .= '</span>'; return $output; } if (!IsUrl($Image)) { $Image = SmartAsset($Image, $WithDomain); } return '<img src="' . $Image . '"' . $Attributes . ' />'; }