มาร่วมเป็นกำลังใจให้เว็บด้วยการสมัครสมาชิกวีไอพี ~~ เลือกปีที่ท่านต้องการได้โดยไม่ต้องเรียงปี ~~ ปีละ 350 บาท สมัคร 2 ปีลดเหลือ 600 บาท ~~ มีไลน์กลุ่ม VIP จำนวนหลายร้อยท่าน เอาไว้ปรึกษางานซ่อม ~~ เข้าถึงข้อมูลด้านเทคนิค ข้อมูลเชิงลึกมากมาย.....
0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้
ลองดูภาพของจริงที่มีปัญหากันตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
YOUTUBE BBCODE v2.6Updated by NaoCreated By Karl BensonLink to Mod | Support Topic | DonateCompatibilityFor SMF 1.1.x and SMF 2.x (MySQL only)IntroductionEmbed 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. Featureso 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=595A40209CB17411o 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 Koreao Supports various formats- YouTube Page url- Direct Embed url- ID onlyo 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 100pxo 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 flasho Supports the following languages (both in ISO and UTF modes)- English, British, Brazilian, French, German, Italian, Polish, Portuguese, Spanish, Swedish and Turkish.InstallationAny 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 1Installing 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 1Since 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 LinksManual Installation Of ModsHow Do I Modify Files?SupportPlease use the modification thread for support with this modification.(Please don't ask me to do the edits for you)Changelog2.6 - 5th February 2010o Ownership given to Naoo Updated readme and descriptiono Added French Language (translated by Nao)o Added support for SMF 2.0 RC2 (eh, finally...?)2.5 - 24th April 2009o Ownership given to Runico Added Dutch Language (translated by Tom Te Selle)2.4 - 5th October 2008o Ensured compatible with SMF 2.0 Beta 4 and SMF 1.1.6o 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 package2.3 - 18th March 2008o Ensured compatible with SMF 2.0 Beta 3 Publico Added Polish language strings (Thanks to Nolt)2.2 - 21st February 2008o Added &rel=1 to all embed links as YouTube seesm to require it now.2.1 - 31st January 2008o Support for YouTube Playlist linkso Optimized preg and rewrote regexo Changed max size supported to 780pxo Now builds the object based on browser[/size]
ก่อนจะแก้ไข 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]
array( 'tag' => 'hr', 'type' => 'closed', 'content' => '<hr style="clear: both;" />', 'block_level' => true, ),
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]', ),
'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]),
'youtube' => array('code' => 'youtube', 'before' => '[youtube=425,350]', 'after' => '[/youtube]', 'description' => 'แสดงคลิป VDO YouTube'),