当前位置: 首页>>代码示例>>PHP>>正文


PHP CKunenaTools::getTemplateImage方法代码示例

本文整理汇总了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');
?>
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:31,代码来源:form.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;
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:38,代码来源:kunena.smile.class.php


注:本文中的CKunenaTools::getTemplateImage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。