本文整理汇总了PHP中CKunenaTools::getTemplateImage方法的典型用法代码示例。如果您正苦于以下问题:PHP CKunenaTools::getTemplateImage方法的具体用法?PHP CKunenaTools::getTemplateImage怎么用?PHP CKunenaTools::getTemplateImage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKunenaTools
的用法示例。
在下文中一共展示了CKunenaTools::getTemplateImage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
</strong>
</td>
<td class="kcol-mid">
<?php
foreach ($topic_emoticons as $emoid => $emoimg) {
?>
<input type="radio" name="topic_emoticon" value="<?php
echo intval($emoid);
?>
" <?php
echo $this->emoid == $emoid ? ' checked="checked" ' : '';
?>
/>
<img src="<?php
echo $this->escape(JURI::Root() . CKunenaTools::getTemplateImage("icons/{$emoimg}"));
?>
" alt="" border="0" />
<?php
}
?>
</td>
</tr>
<?php
}
?>
<?php
// Show bbcode editor
CKunenaTools::loadTemplate('/editor/bbcode.php');
?>
示例2: getEmoticons
/**
* function to retrieve the emoticons out of the database
*
* @author Niels Vandekeybus <progster@wina.be>
* @version 1.0
* @since 2005-04-19
* @param boolean $grayscale
* determines wether to return the grayscale or the ordinary emoticon
* @param boolean $emoticonbar
* only list emoticons to be displayed in the emoticonbar (currently unused)
* @return array
* array consisting of emoticon codes and their respective location (NOT the entire img tag)
*/
function getEmoticons($grayscale, $emoticonbar = 0)
{
$kunena_db =& JFactory::getDBO();
$grayscale == 1 ? $column = "greylocation" : ($column = "location");
$sql = "SELECT code, `{$column}` FROM #__kunena_smileys";
if ($emoticonbar == 1) {
$sql .= " WHERE emoticonbar='1'";
}
$kunena_db->setQuery($sql);
$smilies = $kunena_db->loadObjectList();
KunenaError::checkDatabaseError();
$smileyArray = array();
foreach ($smilies as $smiley) {
// We load all smileys in array, so we can sort them
$iconurl = JURI::Root() . CKunenaTools::getTemplateImage("emoticons/{$smiley->{$column}}");
$smileyArray[$smiley->code] = '' . $iconurl;
// This makes sure that for example :pinch: gets translated before :p
}
if ($emoticonbar == 0) {
// don't sort when it's only for use in the emoticonbar
array_multisort(array_keys($smileyArray), SORT_DESC, $smileyArray);
reset($smileyArray);
}
return $smileyArray;
}