Esempio n. 1
0
</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');
?>
Esempio n. 2
0
 /**
  * function to retrieve the emoticons out of the database
  *
  * @author Niels Vandekeybus <*****@*****.**>
  * @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;
 }