ข่าวประชาสัมพันธ์

มาร่วมเป็นกำลังใจให้เว็บด้วยการสมัครสมาชิกวีไอพี ~~ เลือกปีที่ท่านต้องการได้โดยไม่ต้องเรียงปี ~~ ปีละ 350 บาท สมัคร 2 ปีลดเหลือ 600 บาท ~~ มีไลน์กลุ่ม VIP จำนวนหลายร้อยท่าน เอาไว้ปรึกษางานซ่อม ~~ เข้าถึงข้อมูลด้านเทคนิค ข้อมูลเชิงลึกมากมาย.....


ผู้เขียน หัวข้อ: ใส่มอด Youtube BBCode 2.6 ได้แล้ว วันดีคืนดีกลับไม่แสดงวิดีโอออกมา  (อ่าน 2818 ครั้ง)

0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้

ออนไลน์ Auto Man

  • Administrator
  • หัวหน้าศูนย์ซ่อมสร้าง
  • *****
  • เจ้าของกระทู้
  • Joined: ก.ย. 2558
  • กระทู้: 37625
  • สมาชิกลำดับที่ : 1
  • เพศ: ชาย
  • มือผู้ให้ย่อมสูงกว่ามือผู้รับ
    • เว็บชุมชนคนรักช่างยนต์
    • อีเมล์
   ติดตั้งมอด Youtube BBCode 2.6 เข้าไปในเว็บ 2.0.11ได้แล้ว  แต่ต่อมาวันดีคืนดี
กลับไม่แสดงวิดีโอออกมา  เห็นแต่แถบดำซีกเดียวยาวลงไป กดไปที่แถบดำ ก็ไม่มีผลใดๆ
นึกว่าเป็นชั่วคราว  แต่ไปๆ มาๆ เป็นนานเลย  ต้องหาวิธีแก้ไขแล้ว  แปลกดีไม่รู้ว่าเกิดจากอะไร
มอดใหม่ๆ ก็ไม่ได้ติดตั้งเข้าไปแล้ว

อ้างถึง
  ลองดูภาพของจริงที่มีปัญหากัน

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
สวัสดีคุณ...ผู้เยี่ยมชม  กด ❤ ถูกใจโพสท์นี้ หรือยัง...
ต้องการสมัครสมาชิก VIP สมัครได้ที่นี่...   หรือทาง Line ID: k.sonchai

ออนไลน์ Auto Man

  • Administrator
  • หัวหน้าศูนย์ซ่อมสร้าง
  • *****
  • เจ้าของกระทู้
  • Joined: ก.ย. 2558
  • กระทู้: 37625
  • สมาชิกลำดับที่ : 1
  • เพศ: ชาย
  • มือผู้ให้ย่อมสูงกว่ามือผู้รับ
    • เว็บชุมชนคนรักช่างยนต์
    • อีเมล์
  งานนี้เดือดร้อนแอดมึน  เอ๊ย...แอดมินอย่างเรา 5 5 5

   ไม่รู้ใครมีประสบการณ์เรื่องนี้บ้าง  มาช่วยหน่อย   ^-^
สวัสดีคุณ...ผู้เยี่ยมชม  กด ❤ ถูกใจโพสท์นี้ หรือยัง...
ต้องการสมัครสมาชิก VIP สมัครได้ที่นี่...   หรือทาง Line ID: k.sonchai

ออนไลน์ Auto Man

  • Administrator
  • หัวหน้าศูนย์ซ่อมสร้าง
  • *****
  • เจ้าของกระทู้
  • Joined: ก.ย. 2558
  • กระทู้: 37625
  • สมาชิกลำดับที่ : 1
  • เพศ: ชาย
  • มือผู้ให้ย่อมสูงกว่ามือผู้รับ
    • เว็บชุมชนคนรักช่างยนต์
    • อีเมล์
ต้องไปไล่ย้อนหลังว่า ตอนติดตั้งมีการโมอะไร ตรงไหน

อ้างถึง
YOUTUBE BBCODE v2.6
Updated by Nao
Created By Karl Benson
Link to Mod | Support Topic | Donate

Compatibility
For SMF 1.1.x and SMF 2.x (MySQL only)

Introduction
Embed Youtube videos into posts with the use of [ Invalid YouTube link ] bbcode.

It's the ultimate friendly YouTube mod for BBCode addicts, supporting various link formats (including Playlist links), safely and securely parsing the information for the piece of mind of forum admins.
It is, however, severely outdated when compared with its successor, Aeva, which has support for many more video websites and many more options.

So, if you want to be able to directly post YouTube URLs without tags and still have them embedded, I would recommend upgrading to Aeva or Aeva Media. Check its package file to find a conversion script inside it. It also converts tags from many other older mods such as [ytplaylist] or Google Video BBCode, etc.
Just extract the conversion script via FTP to your directory where SMF runs from. Put your forum in maintenance mode, and then point to it in your browser.

Features
o Adds a BBCode Button to Insert [ Invalid YouTube link ] bbcode.
o Supports standard YouTube videos and YouTube playlists
- Standard: eg

- Playlist: eg http://www.youtube.com/view_play_list?p=595A40209CB17411
o Supports links from YouTube's global site, and several localized sites (if you need support for all localised sites, use Aeva instead)
 > Global (with or without www.) | Brasil | France | India | Ireland | Israel | Italia | Japan | Nederland | Polska | Espana | United Kingdom
 > Australia | Hong Kong | Mexico | New Zealand | Deutsche | Canada | Russia | Taiwan | South Korea
o Supports various formats
- YouTube Page url
- Direct Embed url
- ID only
o Specify sizes (Optional)
- eg [youtube=425,350][/youtube]
- Defaulting to default YouTube sizes if not specified
- Size Protection to prevent embedding videos larger than 780px or less than 100px
o Safe from a security standpoint
- Properly validates/sanitizes/parses the video id before including it in the url
- Disables script access (allowScriptAccess="never")
o Alternative link and/or text provided for
- Invalid video id/links
- Printer friendly versions
- Disabled bbcoded
- Disabled flash
o Supports the following languages (both in ISO and UTF modes)
- English, British, Brazilian, French, German, Italian, Polish, Portuguese, Spanish, Swedish and Turkish.

Installation

Any previous versions of this mod need to be uninstalled prior to installing this version.

Installation slightly varies depending on SMF version.

SMF 1.1.1 to 1.1.4 & SMF 2.0 Beta 1
Installing the mod will only fully install the mod on the SMF Default Core Theme.
For all other themes which have a custom Post.template.php a manual edit will be required to add the BBCode Button.
(SMF 2.0 Beta 1 Only) You can choose to have the SMF Package Manager attempt* to perform the manual edit on all themes.

FIND
โค๊ด: [Select]
         'flash' => array('code' => 'flash',
ADD BEFORE
โค๊ด: [Select]
         'youtube' => array('code' => 'youtube', 'before' => '[ Invalid YouTube link ]', 'description' => $txt['youtube']),

You will also need to place a copy of the youtube.gif in each of your themes bbc image folders (eg Themes/{themename}/images/bbc)

If you're using a language different than the ones supported this mod (listed above), then you will need to add the following to the Modifications.{language}.php for each theme (The language folder can be found eg Themes/{themename}/languages/)

FIND
โค๊ด: [Select]
?>
ADD BEFORE (and translate as necessary the language strings)
โค๊ด: [Select]
$txt['youtube'] = 'YouTube';
$txt['youtube_invalid'] = '#Invalid YouTube Link#';

SMF 2.0 Beta 2 / Beta 3 / Beta 3 Public / RC 1
Since SMF 2.0 Beta 2, the BBCode buttons have been moved from the templates and into the source files.
Therefore no manual edits will normally be required. Installing the mod will automatically install it on ALL themes.

However you will still need to place a copy of the youtube.gif in each of your themes bbc image folders (eg Themes/{themename}/images/bbc)

And if your using a language different than the ones supported this mod (listed above), then you will need to add the following to the Modifications.{language}.php for each theme (The language folder can be found eg Themes/{themename}/languages/)

FIND
โค๊ด: [Select]
?>
ADD BEFORE (and translate as necessary the language strings)
โค๊ด: [Select]
$txt['youtube'] = 'YouTube';
$txt['youtube_invalid'] = '#Invalid YouTube Link#';

Useful Links
Manual Installation Of Mods
How Do I Modify Files?

Support
Please use the modification thread for support with this modification.
(Please don't ask me to do the edits for you)

Changelog
2.6 - 5th February 2010
o Ownership given to Nao
o Updated readme and description
o Added French Language (translated by Nao)
o Added support for SMF 2.0 RC2 (eh, finally...?)
2.5 - 24th April 2009
o Ownership given to Runic
o Added Dutch Language (translated by Tom Te Selle)
2.4 - 5th October 2008
o Ensured compatible with SMF 2.0 Beta 4 and SMF 1.1.6
o Added YouTube FullScreen parameter (so player shows full screen button)
o Fixed encoded ampersands as &
o Added Support for YouTube India (in), South Korea (kr) and Israel (il)
o Moved all language strings into a single file [languagestrings.xml] (save repetition) in the package
2.3 - 18th March 2008
o Ensured compatible with SMF 2.0 Beta 3 Public
o Added Polish language strings (Thanks to Nolt)
2.2 - 21st February 2008
o Added &rel=1 to all embed links as YouTube seesm to require it now.
2.1 - 31st January 2008
o Support for YouTube Playlist links
o Optimized preg and rewrote regex
o Changed max size supported to 780px
o Now builds the object based on browser
[/size]
สวัสดีคุณ...ผู้เยี่ยมชม  กด ❤ ถูกใจโพสท์นี้ หรือยัง...
ต้องการสมัครสมาชิก VIP สมัครได้ที่นี่...   หรือทาง Line ID: k.sonchai


ออนไลน์ Auto Man

  • Administrator
  • หัวหน้าศูนย์ซ่อมสร้าง
  • *****
  • เจ้าของกระทู้
  • Joined: ก.ย. 2558
  • กระทู้: 37625
  • สมาชิกลำดับที่ : 1
  • เพศ: ชาย
  • มือผู้ให้ย่อมสูงกว่ามือผู้รับ
    • เว็บชุมชนคนรักช่างยนต์
    • อีเมล์
  หลังจากสำรองไฟล์ต้นฉบับไว้แล้ว ก็มาติดตั้ง Mod Youtube BBCode 2.6 เข้าไป
มีไฟล์อะไร แก้ไขอะไรบ้าง ไปดูกัน

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ

สวัสดีคุณ...ผู้เยี่ยมชม  กด ❤ ถูกใจโพสท์นี้ หรือยัง...
ต้องการสมัครสมาชิก VIP สมัครได้ที่นี่...   หรือทาง Line ID: k.sonchai

ออนไลน์ Auto Man

  • Administrator
  • หัวหน้าศูนย์ซ่อมสร้าง
  • *****
  • เจ้าของกระทู้
  • Joined: ก.ย. 2558
  • กระทู้: 37625
  • สมาชิกลำดับที่ : 1
  • เพศ: ชาย
  • มือผู้ให้ย่อมสูงกว่ามือผู้รับ
    • เว็บชุมชนคนรักช่างยนต์
    • อีเมล์
ลองใส่ภาพวิดีโอจากยูทูปเข้าไป โดยใช้แท็กยูทูป

ไปดูผลกัน

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ

สวัสดีคุณ...ผู้เยี่ยมชม  กด ❤ ถูกใจโพสท์นี้ หรือยัง...
ต้องการสมัครสมาชิก VIP สมัครได้ที่นี่...   หรือทาง Line ID: k.sonchai

ออนไลน์ Auto Man

  • Administrator
  • หัวหน้าศูนย์ซ่อมสร้าง
  • *****
  • เจ้าของกระทู้
  • Joined: ก.ย. 2558
  • กระทู้: 37625
  • สมาชิกลำดับที่ : 1
  • เพศ: ชาย
  • มือผู้ให้ย่อมสูงกว่ามือผู้รับ
    • เว็บชุมชนคนรักช่างยนต์
    • อีเมล์
  เมื่อไม่ได้ ก็ถอนการติดตั้งออกไป (ถ้ามอดตัวไหนมีปัญหาให้ถอนการติดตั้งออกก่อน
ก่อนที่จะมีการติดตั้งมอดตัวอื่นๆ เข้าไป เดี๋ยวจะพัวพันกันจนถอนการติดตั้งไม่ได้)


เมื่อถอนมอดออกแล้ว การแสดงผลเป็นดังภาพครับ

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ

สวัสดีคุณ...ผู้เยี่ยมชม  กด ❤ ถูกใจโพสท์นี้ หรือยัง...
ต้องการสมัครสมาชิก VIP สมัครได้ที่นี่...   หรือทาง Line ID: k.sonchai

ออนไลน์ Auto Man

  • Administrator
  • หัวหน้าศูนย์ซ่อมสร้าง
  • *****
  • เจ้าของกระทู้
  • Joined: ก.ย. 2558
  • กระทู้: 37625
  • สมาชิกลำดับที่ : 1
  • เพศ: ชาย
  • มือผู้ให้ย่อมสูงกว่ามือผู้รับ
    • เว็บชุมชนคนรักช่างยนต์
    • อีเมล์
ที่เป็นอย่างนั้น น่าจะแก้ไขไฟล์ไม่ครบ มีอยู่ไฟล์หนึ่งชื่อว่า ./Themes/Default/Post.template.php

มาจากบทความนี้ http://www.ie11.info/forum/index.php/topic,1204.0.html
ลองดู

อ้างถึง
ก่อนจะแก้ไข SMF ควร สำรองข้อมูลทุกครั้งก่อนแก้ไข


เปิดไฟล์
Sources/Subs.php

แล้วหาโค้ดส่วนนี้ออกมา

โค๊ด: [Select]
array(
            'tag' => 'hr',
            'type' => 'closed',
            'content' => '<hr style="clear: both;" />',
            'block_level' => true,
         ),


พิมพ์ Enter ขึ้นบรรทัดใหม่  แล้วเพิ่มโค้ดด้านล่างนี้ไว้หลังโค้ดที่หาออกมา

โค๊ด: [Select]
array(
            'tag' => 'youtube',
            'type' => 'unparsed_commas_content',
            'test' => '\d+,\d+\]',
            'content' => '<object width="$2" height="$3"><param name="movie" value="http://www.youtube.com/v/$1" ></param><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" width="$2" height="$3"></embed></object>',
            'validate' => create_function('&$tag, &$data, $disabled', '
               if (isset($disabled[\'url\']))
                  $tag[\'content\'] = \'$1\';'),
            'disabled_content' => '<a href="$1" target="_blank">$1[/url]',
         ),

เสร็จแล้วเปิดไฟล์ Default/Post.template.php ครับ
(ถ้าใช้งานธีมอื่นที่ไม่ใช่ Default ก็แก้ไขไฟล์ในธีมนั้นๆนะครับ  ถ้าในธีมไม่มีก็แก้ไขไฟล์ Default น่ะแหละครับ)

หาโค้ดส่วนนี้ครับ

โค๊ด: [Select]
'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]),
พิมพ์ Enter ขึ้นบรรทัดใหม่  แล้ววางโค้ดด้านล่างนี้ต่อท้ายครับ

โค๊ด: [Select]
'youtube' => array('code' => 'youtube', 'before' => '[youtube=425,350]', 'after' => '[/youtube]', 'description' => 'แสดงคลิป VDO YouTube'),


เท่านี้เราก็สามารถโพสต์ Video Youtube ในบอร์ดด้วยโค้ด ได้แล้วครับ
แต่เพื่อให้ง่ายต่อการใช้งานบอร์ด  เรามาเพิ่มปุ่มสำหรับโค้ดนี้กันนะครับ

ก่อนอื่นก็ต้องหารูปภาพที่เหมาะสมที่สื่อให้รู้ถึงว่าเป็นโค้ดโพสต์เพลง
ตั้งชื่อเป็น youtube.gif ขนาด 23x22 pixels  (หรือจะเล็กกว่านิดหน่อยก็ได้ครับ ถ้าให้ดีควรจะเป็นภาพพื้นใสนะครับ) 

Save ไฟล์ไว้ที่  Themes/default (หรือธีมที่ใช้งาน) /images/bbc/youtube.gif

หรือจะเอา่รูปจากที่นี่ก็ได้ครับ

แค่นี้ก็เป็นอันจับขั้นตอนการทำแล้วครับ

ขอบคุณ พญาอินทรีย์แห่งความมืด
zone-it.com/5322[/color][/size]

ขอบคุณครับผม
สวัสดีคุณ...ผู้เยี่ยมชม  กด ❤ ถูกใจโพสท์นี้ หรือยัง...
ต้องการสมัครสมาชิก VIP สมัครได้ที่นี่...   หรือทาง Line ID: k.sonchai

ออนไลน์ Auto Man

  • Administrator
  • หัวหน้าศูนย์ซ่อมสร้าง
  • *****
  • เจ้าของกระทู้
  • Joined: ก.ย. 2558
  • กระทู้: 37625
  • สมาชิกลำดับที่ : 1
  • เพศ: ชาย
  • มือผู้ให้ย่อมสูงกว่ามือผู้รับ
    • เว็บชุมชนคนรักช่างยนต์
    • อีเมล์
  มันจะเกี่ยวกับมอดตัวนี้มั๊ยเนี่ย...  Regbar Warning 1.0.5

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ


ไม่เกี่ยวว๊อย... เอาออกแล้ว ก็ยังไม่แสดงวิดีโอ
« แก้ไขครั้งสุดท้าย: 14 สิงหาคม 2559, 05:20:06 โดย Auto Man »
สวัสดีคุณ...ผู้เยี่ยมชม  กด ❤ ถูกใจโพสท์นี้ หรือยัง...
ต้องการสมัครสมาชิก VIP สมัครได้ที่นี่...   หรือทาง Line ID: k.sonchai