[MOD] Simple Integration of YouTube and Google Video Videos

EftelyA

Yaşayan Forum Efsanesi
22 Kas 2007
9,097
59
EsEs
bu mod Advanced BBCode Boxa google video ve youtube sembollerini ekler.





#############################################################################################################################
#############################################################################################################################
##
## MOD Title: Simplified integration of youtube and google-video in advanced bbcode box
## MOD Author: A. Djabri < [email protected], https://tik.lat/9aCqU >
## MOD Description: This mod adds 2 image buttons to your advanced BBcode box, one for youtube and one for google-video. Based on Freddie's Mod < [email protected] > https://tik.lat/pdw0k
## MOD Version: 1.0.0
##
## Installation Level: easy
## Installation Time: 2 Minutes
## Files To Edit: 2
## mods/bbcode_box/bbcode_box.js
## templates/subSilver/posting_body.tpl
##
## Included Files: 2
## googlevid.gif, youtube.gif
##
## Verified Compatability: phpBB v 2.0.21
##
## topic on aokas.com with a screenshot : https://tik.lat/VThW3
##
###############################################################################################################################
##
## Author Notes: Copy included images into mods/bbcode_box/images/ !!!
##
#############################################################################################################################
##
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##
#############################################################################################################################
#
#-----[ OPEN ]------------------------------------------
#
# If subSilver is your template
#
templates/subSilver/posting_body.tpl

#
#-----[ FIND ]------------------------------------------
#
<img border="0" src="mods/bbcode_box/images/ram.gif" name="ram" type="image" onClick="BBCram()" onMouseOver="helpline('ram')" class="postimage" alt="Real Media">

#
#-----[ INLINE, AFTER, ADD ]------------------------------------------
#
<img border="0" src="mods/bbcode_box/images/googlevid.gif" name="GVideo" type="image" onClick="BBCGVideo()" onMouseOver="helpline('googlevid')" class="postimage" alt="GoogleVid"><img border="0" src="mods/bbcode_box/images/youtube.gif" name="youtube" type="image" onClick="BBCyoutube()" onMouseOver="helpline('youtube')" class="postimage" alt="Youtube">

#
#-----[ OPEN ]------------------------------------------
#
mods/bbcode_box/bbcode_box.js

#
#-----[ FIND ]------------------------------------------
#
symbol_help = "Insert Symbol Into Post";

#
#-----[ AFTER, ADD ]------------------------------------------
#
GVideo_help="Insert videoID: [video width=# height=#]http://video.google.com/googleplayer.swf?docId=VideoID[/video]";
youtube_help="Insert videoID: [video width=# height=#]http://www.youtube.com/v/VideoID[/video]";

#
#-----[ FIND ]------------------------------------------
#
var symbol = 0;

#
#-----[ AFTER, ADD ]------------------------------------------
#
var youtube = 0;
var GVideo = 0;

#
#-----[ FIND ]------------------------------------------
#
function helpline(help) {

#
#-----[ BEFORE, ADD ]------------------------------------------
#

function BBCGVideo() {
var FoundErrors = '';
var enterID = prompt("Please enter the ID of the video (Try: -4190938042466443086)", "");
if (!enterID) {
FoundErrors += " You have not entered an ID.";
}
var enterW = prompt("Enter the video file width", "400");
if (!enterW) {
FoundErrors += " You didn't enter the video file width.";
}
var enterH = prompt("Enter the video file height", "350");
if (!enterH) {
FoundErrors += " You didn't enter the video file height.";
}
if (FoundErrors) {
alert("Error:"+FoundErrors);
return;
}
var ToAdd = "[video width="+enterW+" height="+enterH+"]http://video.google.com/googleplayer.swf?docId="+enterID+"[/video]";
PostWrite(ToAdd);
}

function BBCyoutube() {
var FoundErrors = '';
var enterID = prompt("Please enter the ID of the video (Try: vwl98dU0kY8)", "");
if (!enterID) {
FoundErrors += " You have not entered an ID.";
}
var enterW = prompt("Enter the video file width", "400");
if (!enterW) {
FoundErrors += " You didn't enter the video file width.";
}
var enterH = prompt("Enter the video file height", "350");
if (!enterH) {
FoundErrors += " You didn't enter the video file height.";
}
if (FoundErrors) {
alert("Error:"+FoundErrors);
return;
}
var ToAdd = "[video width="+enterW+" height="+enterH+"]http://www.youtube.com/v/"+enterID+"[/video]";
PostWrite(ToAdd);
}

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
#
#############################################################################################################################
#############################################################################################################################
 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.