หมวดไฟฟ้า/อิเล็กทรอนิกส์/คอมพิวเตอร์ => Programming => ห้องคอมพิวเตอร์ => ห้อง SMF 2.0.X => ข้อความที่เริ่มโดย: Auto Man ที่ 19 กรกฎาคม 2559, 16:59:52

หัวข้อ: เพิ่ม Tag [Blink]....[/Blink]
เริ่มหัวข้อโดย: Auto Man ที่ 19 กรกฎาคม 2559, 16:59:52
Readme
This mod will add a blink tag on your forum's Post.template, You can leave feedback on the Simple Machines Community forum at http://simplemachines.org/community Enjoy. AwwLilMaggie
File Edits
./Themes/default/languages/Modifications.english.php
Find (at the end of the file): [Select]
?>
Add Before: [Select]
$txt['blink'] = 'Blink';

./Themes/default/languages/Modifications.english_british.php
Find (at the end of the file): [Select]
?>
Add Before: [Select]
$txt['blink'] = 'Blink';
This operation isn't vital to the installation of this mod.

./Sources/Subs.php
Find: [Select]
         array(
            'tag' => 'black',
            'before' => '<span style="color: black;">',
            'after' => '</span>',
         ),
Add Before: [Select]
         array(
            'tag' => 'blink',
            'before' => '<span style="text-decoration: blink;">',
            'after' => '</span>',
         ),

./Themes/default/Post.template.php
Find: [Select]
         'hr' => array('code' => 'hr', 'before' => '
', 'description' => $txt[531]),
Add Before: [Select]
         'blink' => array('code' => 'blink', 'before' => '[blink]', 'after' => '[/blink]', 'description' => $txt['blink']),

File Operations
Move the included file "blink.gif" to "./Themes/default/images/bbc".
หัวข้อ: เพิ่ม Tag [Blink]....[/Blink]
เริ่มหัวข้อโดย: Auto Man ที่ 07 ตุลาคม 2559, 14:08:20
ตามไปดูกันที่ ลงม็อดยัง ไม่ลงม็อดก็ใช้ไม่ได้
http://custom.simplemachines.org/mods/index.php?mod=924
หัวข้อ: เพิ่ม Tag [Blink]....[/Blink]
เริ่มหัวข้อโดย: Auto Man ที่ 07 ตุลาคม 2559, 14:25:48
[blink]อักษรกระพริบ[/blink]

ลองไปแก้ไขดู Cutom BBCodes Manager
http://custom.simplemachines.org/mods/index.php?mod=3699

รายละเอียด ลองไปศึกษากัน
http://www.simplemachines.org/community/index.php?topic=527734.0

- BBC tags are all in Subs.php file, parse_bbc() function.
- Exactly. There is a quick documentation about creating custom BBC between lines 918-999.

SomeBody could help me with this custom bbcode?
Code: [Select]
array(
   'tag' => 'rand',
   'type' => 'unparsed_content',
   'content' => '<script language="JavaScript" type="text/javascript"><!--var string = "$1";var img = string.split(",");var aCaso = Math.floor(Math.random() * img.length);document.write("<img src='"+img[aCaso]+"' />");// --></script>',
   ),
When i put this code in my subs.php, the board is just a blank page.
I can't understand very well the quick guide to see where i'm wrong... Thank you so much.

Edit: i'm on RC4.

Edit2: I want the code give me a random image froma a provided list.
For example:
Code: [Select]
[rand]IMGlink1,IMGlink2,...,IMGlinkn[/rand]

มาจากที่นี่ ลองเข้าไปอ่านดู
http://www.simplemachines.org/community/index.php?topic=298863.0