本文整理汇总了PHP中icms_core_DataFilter::getSmileys方法的典型用法代码示例。如果您正苦于以下问题:PHP icms_core_DataFilter::getSmileys方法的具体用法?PHP icms_core_DataFilter::getSmileys怎么用?PHP icms_core_DataFilter::getSmileys使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类icms_core_DataFilter
的用法示例。
在下文中一共展示了icms_core_DataFilter::getSmileys方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: xoopsSmilies
/**
* @deprecated This is not used anywhere in the core
* @todo Remove after 2.0
* Displays smilie image buttons used to insert smilie codes to a target textarea in a form
* $textarea_id is a unique of the target textarea
*/
function xoopsSmilies($textarea_id)
{
icms_core_Debug::setDeprecated('icms_form_elements_Dhtmltextarea.', sprintf(_CORE_REMOVE_IN_VERSION, '2.0'));
$smiles =& icms_core_DataFilter::getSmileys();
if (empty($smileys)) {
if ($result = icms::$xoopsDB->query("SELECT * FROM " . icms::$xoopsDB->prefix('smiles') . " WHERE display='1'")) {
while ($smiles = icms::$xoopsDB->fetchArray($result)) {
//hack smilies move for the smilies !!
echo "<img src='" . ICMS_UPLOAD_URL . "/" . htmlspecialchars($smiles['smile_url']) . "' border='0' onmouseover='style.cursor=\"hand\"' alt='' onclick='xoopsCodeSmilie(\"" . $textarea_id . "_tarea\", \" " . $smiles['code'] . " \");' />";
//fin du hack
}
}
} else {
$count = count($smiles);
for ($i = 0; $i < $count; $i++) {
if ($smiles[$i]['display'] == 1) {
//hack bis
echo "<img src='" . ICMS_UPLOAD_URL . "/" . icms_core_DataFilter::htmlSpecialChars($smiles['smile_url']) . "' border='0' alt='' onclick='xoopsCodeSmilie(\"" . $textarea_id . "_tarea\", \" " . $smiles[$i]['code'] . " \");' onmouseover='style.cursor=\"hand\"' />";
//fin du hack
}
}
}
//hack for more
echo " [<a href='#moresmiley' onmouseover='style.cursor=\"hand\"' alt='' onclick='openWithSelfMain(\"" . ICMS_URL . "/misc.php?action=showpopups&type=smilies&target=" . $textarea_id . "_tarea\",\"smilies\",300,475);'>" . _MORE . "</a>]";
}
示例2: _renderSmileys
/**
* prepare HTML for output of the smiley list.
*
* @return string HTML
*/
private function _renderSmileys()
{
$smiles =& icms_core_DataFilter::getSmileys();
$ret = '';
$count = count($smiles);
$ele_name = $this->getName();
for ($i = 0; $i < $count; $i++) {
$ret .= "<img onclick='xoopsCodeSmilie(\"" . $ele_name . "_tarea\", \" " . $smiles[$i]['code'] . " \");' onmouseover='style.cursor=\"pointer\"' src='" . ICMS_UPLOAD_URL . "/" . htmlspecialchars($smiles[$i]['smile_url'], ENT_QUOTES) . "' border='0' alt='' />";
}
$ret .= " [<a href='#moresmiley' onclick='javascript:openWithSelfMain(\"" . ICMS_URL . "/misc.php?action=showpopups&type=smilies&target=" . $ele_name . "_tarea\",\"smilies\",300,475);'>" . _MORE . "</a>]";
return $ret;
}
示例3: isset
$type = isset($_POST['type']) ? trim(StopXSS($_POST['type'])) : $type;
if ($action == 'showpopups') {
xoops_header(false);
// show javascript close button?
$closebutton = 1;
switch ($type) {
case 'smilies':
$target = isset($_GET['target']) ? trim($_GET['target']) : '';
if ($target == '' || !preg_match('/^[0-9a-z_]*$/i', $target)) {
} else {
echo "<script type=\"text/javascript\"><!--//\r\n\t\t\t\tfunction doSmilie(addSmilie) {\r\n\t\t\t\tvar currentMessage = window.opener.xoopsGetElementById(\"" . $target . "\").value;\r\n\t\t\t\twindow.opener.xoopsGetElementById(\"" . $target . "\").value=currentMessage+addSmilie;\r\n\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//-->\r\n\t\t\t\t</script>\r\n\t\t\t\t";
echo '</head><body>
<table width="100%" class="outer">
<tr><th colspan="3">' . _MSC_SMILIES . '</th></tr>
<tr class="head"><td>' . _MSC_CODE . '</td><td>' . _MSC_EMOTION . '</td><td>' . _IMAGE . '</td></tr>';
$smiles = icms_core_DataFilter::getSmileys(1);
$count = count($smiles);
if ($count > 0) {
$rcolor = 'even';
for ($i = 0; $i < $count; $i++) {
echo "<tr class='{$rcolor}'><td>" . $smiles[$i]['code'] . "</td>\r\n\t\t\t\t\t\t\t<td>" . $smiles[$i]['emotion'] . "</td>\r\n\t\t\t\t\t\t\t<td><img onmouseover='style.cursor=\"pointer\"' onclick='doSmilie(\" " . $smiles[$i]['code'] . " \");' src='" . ICMS_UPLOAD_URL . "/" . $smiles[$i]['smile_url'] . "' alt='' /></td></tr>";
$rcolor = $rcolor == 'even' ? 'odd' : 'even';
}
} else {
echo 'Could not retrieve data from the database.';
}
echo '</table>' . _MSC_CLICKASMILIE;
}
break;
case 'avatars':
?>
示例4: getSmileys
/**
* Get the smileys
*
* @param bool $all
* @return array
*/
public function getSmileys($all = false)
{
icms_core_Debug::setDeprecated('icms_core_DataFilter::getSmileys', sprintf(_CORE_REMOVE_IN_VERSION, '1.4'));
return icms_core_DataFilter::getSmileys($all);
}