พัฒนาโดย :: Mr_Simon
Version ::V2.0.0
ดาวน์โหลดได้ที่ :: https://www.mindphp.com/download/files/9 ... 0-zip.html
ไฟล์ที่ใช้ในการติดตั้งเเละวิธีการติดตั้ง
เปิดไฟล์ ->posting.php,
ค้นหา ::
โค้ด: เลือกทั้งหมด
display_custom_bbcodes();
โค้ด: เลือกทั้งหมด
// Mod : Special_chars --------------------------------
display_special_chars();
// Mod : Special_chars --------------------------------
ค้นหา ::
โค้ด: เลือกทั้งหมด
// Additional tables
โค้ด: เลือกทั้งหมด
// Mod : Special_chars --------------------------------
define('SPECIAL_CHARS_TABLE', $table_prefix . 'special_chars');
// Mod : Special_chars --------------------------------
ค้นหา ::
โค้ด: เลือกทั้งหมด
?>
โค้ด: เลือกทั้งหมด
// Mod : Special_chars --------------------------------
function display_special_chars()
{
global $db, $template, $user, $cache, $config;
if (isset($config['sc_chars_on_off']) && $config['sc_chars_on_off'])
{
// Add lang
$user->setup('mods/info_acp_special_chars');
if (($special_chars = $cache->get('_special_chars')) === false)
{
$and_chars_type = !empty($config['sc_chars_type']) ? ' AND chars_type
= ' . (int) $config['sc_chars_type'] : '';
$sql = 'SELECT chars_iso, chars_display, chars_langname
FROM ' . SPECIAL_CHARS_TABLE . '
WHERE chars_display = 1'.
$and_chars_type . '
ORDER BY chars_order ASC';
$result = $db->sql_query($sql);
$count = 0 ;
$special_chars = array(); // Reset
while ($row = $db->sql_fetchrow($result))
{
$special_chars[] = array(
'chars_iso' => $row['chars_iso'],
'chars_langname' => $row['chars_langname'],
'count' => $count,
);
$count++;
}
$db->sql_freeresult($result);
// Cache displayed special chars
$cache->put('_special_chars', $special_chars);
}
// Make table and send data...
if (sizeof($special_chars))
{
foreach ($special_chars as $row)
{
$template->assign_block_vars('td', array(
'ISO' => $row['chars_iso'],
'LANGNAME' => (isset($user->lang[$row['chars_langname']])) ?
$user->lang[$row['chars_langname']] : $user->lang['SC_NO_LANGNAME'],
'ADD_ROW' => ($row['count'] % 22 == 0) ? '</tr><tr>' : '',
));
}
$template->assign_vars(array(
'S_SPECIAL_CHARS' => true,
));
}
}
}
// Mod : Special_chars --------------------------------
ค้นหา ::
โค้ด: เลือกทั้งหมด
<div id="format-buttons">
โค้ด: เลือกทั้งหมด
<!-- IF S_SPECIAL_CHARS -->
<!-- INCLUDE special_chars.html -->
<!-- ENDIF -->
โค้ด: เลือกทั้งหมด
<!-- BEGIN custom_tags -->
โค้ด: เลือกทั้งหมด
<!-- IF S_SPECIAL_CHARS --><input type="button" class="button2" name="bbchars" id="bbchars" value="Ω" style="font-weight:bold; width: 30px" onclick="change_chars();" title="{L_BBCODE_CHARS_HELP}" /><!-- ENDIF -->
ค้นหา ::
โค้ด: เลือกทั้งหมด
/**
* Caret Position object
*/
โค้ด: เลือกทั้งหมด
/**
* Help zoom function...
* Mod : Special_chars
*/
function zoom(chr)
{
var zooms=document.getElementById("zoom");
var zoom=zooms.firstChild;
if(zoom.nodeType==1) {zoom=zooms.childNode[1]};
var size=zoom.length;
if (chr.value !=" ")
{
document.getElementById("zoom").firstChild.replaceData(0, size, chr);
}
else
{
document.getElementById("zoom").firstChild.replaceData(0, size, " ");
}
}
แสดงผลการติดตั้ง