當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。