[MOD] BBCode Strikethrough MOD

แนะนำ Mod ต่างๆ ของ PHPBB3 แนะนำความสามารถ ของ mod การติดตั้ง การเข้ากันได้กับเวอร์ชั่น

Moderator: mindphp

ภาพประจำตัวสมาชิก
thatsawan
PHP VIP Members
PHP VIP Members
โพสต์: 28508
ลงทะเบียนเมื่อ: 31/03/2014 10:02 am
ติดต่อ:

[MOD] BBCode Strikethrough MOD

โพสต์ที่ยังไม่ได้อ่าน โดย thatsawan »

6-6-2557 15-16-35.png
6-6-2557 15-16-35.png (58.13 KiB) Viewed 1287 times
รายละเอียด :: BBCode MOD เพิ่มความสามารถในการพิมพ์ข้อความขีดฆ่าในการโพสต์ เพิ่มเข้ามาในตัวเลือกโมดูล ACP เพื่อเปลี่ยนตำแหน่งของ [s] แท็ก BBCode ในมุมมองของการโพสต์แก้ไข
พัฒนาโดย :: all4phone
Version :: 1.0.3
ดาวน์โหลดได้ที่ :: https://www.mindphp.com/download/files/8 ... 3-zip.html
ไฟล์ที่ใช้ในการติดตั้ง ::
adm/style/overall_header.html,
includes/bbcode.php,
includes/constants.php,
includes/functions.php,
includes/functions_display.php,
includes/message_parser.php,
language/en/posting.php,
styles/prosilver/template/bbcode.html,
styles/prosilver/template/posting_buttons.html
วิธีการติดตั้ง ::
เปิดไฟล์ ->adm/style/overall_header.html,
ค้นหา ::

โค้ด: เลือกทั้งหมด

<link href="style/admin.css" rel="stylesheet" type="text/css" media="screen" /> 
เติมท้าย ::

โค้ด: เลือกทั้งหมด

<link href="style/strike.css" rel="stylesheet" type="text/css" media="screen" /> 
เปิดไฟล์ ->includes/bbcode.php,
ค้นหา ::

โค้ด: เลือกทั้งหมด

'#\[attachment=([0-9]+):$uid\]#'    => $this->bbcode_tpl('inline_attachment_open', $bbcode_id)
                        )
                    );
                break; 
เติมท้าย ::

โค้ด: เลือกทั้งหมด

// Begin BBCode Strikethrough MOD
 case 13:
                    $this->bbcode_cache[$bbcode_id] = array(
                        'str' => array(
                            '[s:$uid]'   => $this->bbcode_tpl('s_open', $bbcode_id),
                            '[/s:$uid]'   => $this->bbcode_tpl('s_close', $bbcode_id),
                        )
                    );
                break;
// End BBCode Strikethrough MOD             
ค้นหา ::

โค้ด: เลือกทั้งหมด

'email'        => '<a href="mailto:$1">$2</a>' 
เเทนที่ ::

โค้ด: เลือกทั้งหมด

'email'        => '<a href="mailto:$1">$2</a>',
// Begin BBCode Strikethrough MOD
's_open'    => '<span style="text-decoration: line-through">',
's_close'    => '</span>'
// End BBCode Strikethrough MOD             
เปิดไฟล์ ->includes/constants.php,
ค้นหา ::

โค้ด: เลือกทั้งหมด

// Number of core BBCodes
define('NUM_CORE_BBCODES', 12); 
แทนที่ ::

โค้ด: เลือกทั้งหมด

// Number of core BBCodes
define('NUM_CORE_BBCODES', 13); 
เปิดไฟล์ ->includes/functions.php,
ค้นหา ::

โค้ด: เลือกทั้งหมด

'S_SEARCH_HIDDEN_FIELDS'    => build_hidden_fields($s_search_hidden_fields), 
เติมท้าย::

โค้ด: เลือกทั้งหมด

// BEGIN strike Mod
        'S_STRIKE_ENABLE'             => (!empty($config['strike_enable'])) ? true : false,
        'S_STRIKE_POSITION'         => (!empty($config['strike_position'])) ? $config['strike_position'] : false,
// END strike MOD             
เปิดไฟล์ ->includes/functions_display.php,
ค้นหา ::

โค้ด: เลือกทั้งหมด

// Start counting from 22 for the bbcode ids (every bbcode takes two ids - opening/closing)
    $num_predefined_bbcodes = 22; 
แทนที่ ::

โค้ด: เลือกทั้งหมด

// Start counting from 24 for the bbcode ids (every bbcode takes two ids - opening/closing)
    $num_predefined_bbcodes = 24; 
เปิดไฟล์ ->includes/message_parser.php,
ค้นหา ::

โค้ด: เลือกทั้งหมด

'flash'            => array('bbcode_id' => 11,    'regexp' => array('#\[flash=([0-9]+),([0-9]+)\](.*?)\[/flash\]#uie' => "\$this->bbcode_flash('\$1', '\$2', '\$3')")) 
เเทนที่ ::

โค้ด: เลือกทั้งหมด

'flash'            => array('bbcode_id' => 11,    'regexp' => array('#\[flash=([0-9]+),([0-9]+)\](.*?)\[/flash\]#uie' => "\$this->bbcode_flash('\$1', '\$2', '\$3')")),
// Begin BBCode Strikethrough MOD
            's'            => array('bbcode_id' => 13,    'regexp' => array('#\[s\](.*?)\[/s\]#uise' => "\$this->bbcode_linethrough('\$1')"))
// End BBCode Strikethrough MOD             
ค้นหา ::

โค้ด: เลือกทั้งหมด

return '[flash=' . $width . ',' . $height . ':' 
. $this->bbcode_uid . ']' . $this->bbcode_specialchars($in) . '[/flash:' . $this->bbcode_uid . ']';
    } 
เติมท้าย::

โค้ด: เลือกทั้งหมด

// Begin BBCode Strikethrough MOD
/**
    * Parse s tag
    */
    function bbcode_linethrough($in)
    {
        if (!$this->check_bbcode('s', $in))
        {
            return $in;
        }

        return '[s:' . $this->bbcode_uid . ']' . $in . '[/s:' . $this->bbcode_uid . ']';
    }
// End BBCode Strikethrough MOD             
เปิดไฟล์ ->language/en/posting.php,
ค้นหา ::

โค้ด: เลือกทั้งหมด

'BBCODE_D_HELP'                => 'Flash: [flash=width,height]http://url[/flash]', 
เติมท้าย::

โค้ด: เลือกทั้งหมด

// Begin BBCode Strikethrough MOD
'BBCODE_ST_HELP'            => 'Strikethrough: [s]Text in here[/s]',
// End BBCode Strikethrough MOD            
เปิดไฟล์ ->styles/prosilver/template/bbcode.html,
ค้นหา ::

โค้ด: เลือกทั้งหมด

<!-- BEGIN i_open --><em><!-- END i_open -->
<!-- BEGIN i_close --></em><!-- END i_close -->
เติมท้าย ::

โค้ด: เลือกทั้งหมด

<!-- BEGIN s_open --><span style="text-decoration: line-through"><!-- END s_open -->
<!-- BEGIN s_close --></span><!-- END s_close -->
ค้นหา :: ค้นหา :: เปิดไฟล์ ->styles/prosilver/template/posting_buttons.html
ค้นหา ::

โค้ด: เลือกทั้งหมด

// Define the bbCode tags
    var bbcode = new Array();
    var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','
','
  • ','
',
'
  • ','
','[img]','[/img]','','','[flash=]', '[/flash]','[size=]','[/size]'
<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
    var imageTag = false;[/code]
แทนที่ ::

โค้ด: เลือกทั้งหมด

// Define the bbCode tags
    var bbcode = new Array();
    var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','
','
  • ','
','
  • ',
    '
','[img]','[/img]','','','[flash=]', '[/flash]', '[size=]','[/size]','[s]','[/s]'
<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
    var imageTag = false;[/code]
ค้นหา ::

โค้ด: เลือกทั้งหมด

d: '{LA_BBCODE_D_HELP}'
แทนที่ ::

โค้ด: เลือกทั้งหมด

d: '{LA_BBCODE_D_HELP}',
st: '{LA_BBCODE_ST_HELP}'
ค้นหา ::

โค้ด: เลือกทั้งหมด

<input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; 
width: 30px" onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}" />
เติมก่อน ::

โค้ด: เลือกทั้งหมด

<!-- IF S_STRIKE_ENABLE and S_STRIKE_POSITION == 1 -->
    <input type="button" 
class="button2" accesskey="st" name="addbbcode22" value="&thinsp;S&thinsp;" style="font-weight:bold;text-decoration: line-through; width: 30px" onclick="bbstyle(22)" title="{L_BBCODE_ST_HELP}" />
<!-- ELSE --><!-- ENDIF -->
ค้นหา ::

โค้ด: เลือกทั้งหมด

<input type="button" class="button2" 
accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onclick="bbstyle(2)" title="{L_BBCODE_I_HELP}" />
เติมก่อน ::

โค้ด: เลือกทั้งหมด

<!-- IF S_STRIKE_ENABLE and S_STRIKE_POSITION == 2 -->
    <input type="button" class="button2" 
accesskey="st" name="addbbcode22" value="&thinsp;S&thinsp;" style="font-weight:bold;text-decoration: line-through; width: 30px" onclick="bbstyle(22)" title="{L_BBCODE_ST_HELP}" />
<!-- ELSE --><!-- ENDIF -->
ค้นหา ::

โค้ด: เลือกทั้งหมด

<input type="button" class="button2" 
accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onclick="bbstyle(4)" title="{L_BBCODE_U_HELP}" />
เติมก่อน ::

โค้ด: เลือกทั้งหมด

<!-- IF S_STRIKE_ENABLE and S_STRIKE_POSITION == 3 -->
    <input type="button" class="button2" 
accesskey="st" name="addbbcode22" value="&thinsp;S&thinsp;" style="font-weight:bold;text-decoration: line-through; width: 30px" onclick="bbstyle(22)" title="{L_BBCODE_ST_HELP}" />
<!-- ELSE --><!-- ENDIF -->
ค้นหา ::

โค้ด: เลือกทั้งหมด

<!-- IF S_BBCODE_QUOTE -->
เติมก่อน ::

โค้ด: เลือกทั้งหมด

<!-- IF S_STRIKE_ENABLE and S_STRIKE_POSITION == 4 -->
    <input type="button" class="button2"
 accesskey="st" name="addbbcode22" value="&thinsp;S&thinsp;" style="font-weight:bold;text-decoration: line-through; width: 30px" onclick="bbstyle(22)" title="{L_BBCODE_ST_HELP}" />
<!-- ELSE --><!-- ENDIF -->
ค้นหา ::

โค้ด: เลือกทั้งหมด

<input type="button" class="button2" accesskey="c" 
name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" title="{L_BBCODE_C_HELP}" />
เติมก่อน ::

โค้ด: เลือกทั้งหมด

<!-- IF S_STRIKE_ENABLE and S_STRIKE_POSITION == 5 -->
    <input type="button" class="button2" 
accesskey="st" name="addbbcode22" value="&thinsp;S&thinsp;" style="font-weight:bold;text-decoration: line-through; width: 30px" onclick="bbstyle(22)" title="{L_BBCODE_ST_HELP}" />
<!-- ELSE --><!-- ENDIF -->
ค้นหา ::

โค้ด: เลือกทั้งหมด

<input type="button" class="button2" accesskey="l" 
name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" title="{L_BBCODE_L_HELP}" />
เติมก่อน ::

โค้ด: เลือกทั้งหมด

<!-- IF S_STRIKE_ENABLE and S_STRIKE_POSITION == 6 -->
    <input type="button" class="button2" accesskey="st" 
name="addbbcode22" value="&thinsp;S&thinsp;" style="font-weight:bold;text-decoration: line-through; width: 30px" onclick="bbstyle(22)" title="{L_BBCODE_ST_HELP}" />
<!-- ELSE --><!-- ENDIF -->
ค้นหา ::

โค้ด: เลือกทั้งหมด

<!-- IF S_BBCODE_IMG -->
เติมก่อน ::

โค้ด: เลือกทั้งหมด

<!-- IF S_STRIKE_ENABLE and S_STRIKE_POSITION == 7 -->
    <input type="button" class="button2" accesskey="st" 
name="addbbcode22" value="&thinsp;S&thinsp;" style="font-weight:bold;text-decoration: line-through; width: 30px" onclick="bbstyle(22)" title="{L_BBCODE_ST_HELP}" />
<!-- ELSE --><!-- ENDIF -->
ค้นหา ::

โค้ด: เลือกทั้งหมด

<!-- IF S_LINKS_ALLOWED -->
เติมก่อน ::

โค้ด: เลือกทั้งหมด

<!-- IF S_STRIKE_ENABLE and S_STRIKE_POSITION == 8 -->
    <input type="button" class="button2" accesskey="st" 
name="addbbcode22" value="&thinsp;S&thinsp;" style="font-weight:bold;text-decoration: line-through; width: 30px" onclick="bbstyle(22)" title="{L_BBCODE_ST_HELP}" />
<!-- ELSE --><!-- ENDIF -->
ค้นหา ::

โค้ด: เลือกทั้งหมด

<!-- IF S_BBCODE_FLASH -->
เติมก่อน ::

โค้ด: เลือกทั้งหมด

<!-- IF S_STRIKE_ENABLE and S_STRIKE_POSITION == 9 -->
    <input type="button" class="button2" accesskey="st" 
name="addbbcode22" value="&thinsp;S&thinsp;" style="font-weight:bold;text-decoration: line-through; width: 30px" onclick="bbstyle(22)" title="{L_BBCODE_ST_HELP}" />
<!-- ELSE --><!-- ENDIF -->
ค้นหา ::

โค้ด: เลือกทั้งหมด

<select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']',
 '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_BBCODE_F_HELP}">
เติมก่อน::

โค้ด: เลือกทั้งหมด

<!-- IF S_STRIKE_ENABLE and S_STRIKE_POSITION == 10 -->
    <input type="button" class="button2" accesskey="st" 
name="addbbcode22" value="&thinsp;S&thinsp;" style="font-weight:bold;text-decoration: line-through; width: 30px" onclick="bbstyle(22)" title="{L_BBCODE_ST_HELP}" />
<!-- ELSE --><!-- ENDIF -->
ค้นหา ::

โค้ด: เลือกทั้งหมด

<input type="button" class="button2" name="bbpalette" id="bbpalette" value="{L_FONT_COLOR}" onclick="change_palette();" title="{L_BBCODE_S_HELP}" />
เติมก่อน ::

โค้ด: เลือกทั้งหมด

<!-- IF S_STRIKE_ENABLE and S_STRIKE_POSITION == 11 -->
<input type="button" class="button2" accesskey="st" 
name="addbbcode22" value="&thinsp;S&thinsp;" style="font-weight:bold;text-decoration: line-through; width: 30px" onclick="bbstyle(22)" title="{L_BBCODE_ST_HELP}" />
<!-- ELSE --><!-- ENDIF -->
ค้นหา ::

โค้ด: เลือกทั้งหมด

<!-- BEGIN custom_tags -->
เติมก่อน ::

โค้ด: เลือกทั้งหมด

<!-- IF S_STRIKE_ENABLE and S_STRIKE_POSITION == 12 -->
    <input type="button" class="button2" accesskey="st" 
name="addbbcode22" value="&thinsp;S&thinsp;" style="font-weight:bold;text-decoration: line-through; width: 30px" onclick="bbstyle(22)" title="{L_BBCODE_ST_HELP}" />
<!-- ELSE --><!-- ENDIF -->
***จากนั้นให้ทำการ คัดลอกไฟล์ทั้งหมดที่มี ในโฟลเดอร์ root ไปวาง เเล้วทำการ เปิด Browser :: /install_strike.php***
ผลการติดตั้ง
ส่วนของ admin
6-6-2557 15-47-17.png
6-6-2557 15-47-17.png (148.88 KiB) Viewed 1287 times
ส่วนของ user
6-6-2557 15-42-33.png
6-6-2557 15-42-33.png (82.56 KiB) Viewed 1287 times
  • Similar Topics
    ตอบกลับ
    แสดง
    โพสต์ล่าสุด

ผู้ใช้งานขณะนี้

สมาชิกกำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และบุคลทั่วไป 47