โดย thatsawan » 18/06/2014 2:19 pm
- 18-6-2557 14-07-32.png (115.16 KiB) Viewed 3976 times
รายละเอียด :: mod นี้จะเพิ่มการโพสต์หน้าความสามารถในการแทรกตัวอักษรพิเศษ BBCode
พัฒนาโดย :: Mr_Simon
Version ::V2.0.0
ดาวน์โหลดได้ที่ :: https://www.mindphp.com/download/files/9 ... 0-zip.html
ไฟล์ที่ใช้ในการติดตั้งเเละวิธีการติดตั้ง
เปิดไฟล์ ->posting.php,
ค้นหา ::
เติมท้าย ::
โค้ด: เลือกทั้งหมด
// Mod : Special_chars --------------------------------
display_special_chars();
// Mod : Special_chars --------------------------------
เปิดไฟล์ ->includes/constants.php,
ค้นหา ::
เติมท้าย ::
โค้ด: เลือกทั้งหมด
// Mod : Special_chars --------------------------------
define('SPECIAL_CHARS_TABLE', $table_prefix . 'special_chars');
// Mod : Special_chars --------------------------------
เปิดไฟล์ ->includes/functions_display.php,
ค้นหา ::
เติมก่อน ::
โค้ด: เลือกทั้งหมด
// 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 --------------------------------
เปิดไฟล์ ->styles/prosilver/template/posting_buttons.html,
ค้นหา ::
เติมก่อน ::
โค้ด: เลือกทั้งหมด
<!-- IF S_SPECIAL_CHARS -->
<!-- INCLUDE special_chars.html -->
<!-- ENDIF -->
ค้นหา ::
เติมก่อน ::
โค้ด: เลือกทั้งหมด
<!-- 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 -->
เปิดไฟล์ ->styles/prosilver/template/editor.js
ค้นหา ::
เติมก่อน ::
โค้ด: เลือกทั้งหมด
/**
* 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, " ");
}
}
***จากนั้นให้ทำการ คัดลอกไฟล์ทั้งหมดที่มี ในโฟลเดอร์ root ไปวาง เเล้วทำการ เปิด Browser :: /install_sc.php***
แสดงผลการติดตั้ง
- 18-6-2557 14-09-19.png (97.44 KiB) Viewed 3976 times
- 18-6-2557 14-10-45.png (140.25 KiB) Viewed 3976 times
[attachment=2]18-6-2557 14-07-32.png[/attachment]
[b]รายละเอียด :: [/b] mod นี้จะเพิ่มการโพสต์หน้าความสามารถในการแทรกตัวอักษรพิเศษ BBCode
[b]พัฒนาโดย ::[/b] Mr_Simon
[b]Version ::[/b]V2.0.0
[b]ดาวน์โหลดได้ที่ :: [/b] https://www.mindphp.com/download/files/92-89-special-chars-v2-0-0-zip.html
[b]ไฟล์ที่ใช้ในการติดตั้งเเละวิธีการติดตั้ง [/b]
[color=#0000FF]เปิดไฟล์ ->posting.php, [/color]
ค้นหา :: [code=php]display_custom_bbcodes();[/code]
เติมท้าย :: [code=php]// Mod : Special_chars --------------------------------
display_special_chars();
// Mod : Special_chars --------------------------------
[/code]
[color=#0000FF]เปิดไฟล์ ->includes/constants.php, [/color]
ค้นหา :: [code=php]// Additional tables [/code]
เติมท้าย :: [code=php]// Mod : Special_chars --------------------------------
define('SPECIAL_CHARS_TABLE', $table_prefix . 'special_chars');
// Mod : Special_chars --------------------------------
[/code]
[color=#0000FF]เปิดไฟล์ ->includes/functions_display.php, [/color]
ค้นหา :: [code]?>[/code]
เติมก่อน :: [code=php]// 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 --------------------------------
[/code]
[color=#0000FF]เปิดไฟล์ ->styles/prosilver/template/posting_buttons.html, [/color]
ค้นหา :: [code=php]<div id="format-buttons">[/code]
เติมก่อน :: [code=php]<!-- IF S_SPECIAL_CHARS -->
<!-- INCLUDE special_chars.html -->
<!-- ENDIF -->
[/code]
ค้นหา :: [code=php]<!-- BEGIN custom_tags -->[/code]
เติมก่อน :: [code=php] <!-- 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 -->
[/code]
[color=#0000FF]เปิดไฟล์ ->styles/prosilver/template/editor.js [/color]
ค้นหา :: [code=php]/**
* Caret Position object
*/[/code]
เติมก่อน :: [code=php]/**
* 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, " ");
}
}
[/code]
***จากนั้นให้ทำการ คัดลอกไฟล์ทั้งหมดที่มี ในโฟลเดอร์ root ไปวาง เเล้วทำการ เปิด Browser :: /install_sc.php***
แสดงผลการติดตั้ง
[attachment=1]18-6-2557 14-09-19.png[/attachment]
[attachment=0]18-6-2557 14-10-45.png[/attachment]