Haumis wbb hilfe 
Registrierung Kalender Mitgliederliste Teammitglieder Suche Häufig gestellte Fragen Zur Startseite
Galerie Datenbank Zum Portal

Startseite| Das Board| wbb2| wbblite| Wo finde ich was| Veränderungen| Grafik-Bereich-WBB2| Boardspiele| Vorstellungen| Allgemeines| Trainingscenter|
Haumis wbb hilfe » WBB2 » Es klappt nicht » Youtube BB code hack geht nicht richtig » Hallo Gast [Anmelden|Registrieren]
Letzter Beitrag | Erster ungelesener Beitrag Druckvorschau | An Freund senden | Thema zu Favoriten hinzufügen
Neues Thema erstellen Antwort erstellen
Zum Ende der Seite springen Youtube BB code hack geht nicht richtig
Autor
Beitrag « Vorheriges Thema | Nächstes Thema »
tobi3
Grünschnabel

[meine Galerie]


Dabei seit: 29.07.2009
Beiträge: 1
Postid: 490
Youtube BB code hack geht nicht richtig Beitrag Nr.: 1     Auf diesen Beitrag antworten Zitatantwort auf diesen Beitrag erstellen Diesen Beitrag editieren/löschen Diesen Beitrag einem Moderator melden       Zum Anfang der Seite springen

Zitat:
@ Mandala

ich habe dafür vor einiger Zeit mal einen Hack geschrieben der es erlaubt youTube und myVideo Files als bbcode ins Board zu integrieren

den Hack hänge ich gerne mal hier mit an
sollte dieses nicht gewünscht sein, bitte löschen

der Hack ist ausserdem in meinem Board und dem nobody-hilfe Board downloadbar



Der Hack ist ganz gut nur leider öffnet sich bei mir kein Fenster wenn ich auf die Buttons klicke obwohl ich alles so gemacht habe wie in der Anleitung.
Im Internet Explorer funktioniert das ganze aber in Opera nicht, das ist das komische, dachte erst es geht allgemein nicht aber wenn ich z.B. nen Foto einfüge über den bbcode button öffnet sich auch das Fenster für (img]xxx[/img) in Opera.

Hier mal meine bbcode.js
code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
var bbtags = new Array(); 

// browser detection 
var myAgent = navigator.userAgent.toLowerCase(); 
var myVersion = parseInt(navigator.appVersion); 
var is_ie = ((myAgent.indexOf("msie") != -1) && (myAgent.indexOf("opera") == -1)); 
var is_win = ((myAgent.indexOf("win")!=-1) || (myAgent.indexOf("16bit")!=-1)); 

function setmode(modeValue) { 
document.cookie = "bbcodemode="+modeValue+"; path=/; expires=Wed, 1 Jan 2020 00:00:00 GMT;"; 
} 

function normalMode(theForm) { 
if (theForm.mode[0].checked) { 
return true; 
} 
else { 
return false; 
} 
} 

function getArraySize(theArray) { 
for (i = 0; i < theArray.length; i++) { 
if ((theArray[i] == "undefined") || (theArray[i] == "") || (theArray[i] == null)) return i; 
} 

return theArray.length; 
} 

function pushArray(theArray, value) { 
theArraySize = getArraySize(theArray); 
theArray[theArraySize] = value; 
} 

function popArray(theArray) { 
theArraySize = getArraySize(theArray); 
retVal = theArray[theArraySize - 1]; 
delete theArray[theArraySize - 1]; 
return retVal; 
} 


function smilie(theSmilie) { 
addText(" " + theSmilie, "", false, document.bbform); 
} 

function closetag(theForm) { 
if (!normalMode(theForm)) { 
if (bbtags[0]) addText("[/"+ popArray(bbtags) +"]", "", false, theForm); 
} 

setFocus(theForm); 
} 

function closeall(theForm) { 
if (!normalMode(theForm)) { 
if (bbtags[0]) { 
while (bbtags[0]) { 
addText("[/"+ popArray(bbtags) +"]", "", false, theForm); 
} 
} 
} 

setFocus(theForm); 
} 


function fontformat(theForm,theValue,theType) { 
setFocus(theForm); 

if (normalMode(theForm)) { 
if (theValue != 0) { 

var selectedText = getSelectedText(theForm); 
var insertText = prompt(font_formatter_prompt+" "+theType, selectedText); 
if ((insertText != null) && (insertText != "")) { 
addText("["+theType+"="+theValue+"]"+insertText+"[/"+theType+"]", "", false, theForm); 
} 
} 
} 
else { 
if(addText("["+theType+"="+theValue+"]", "[/"+theType+"]", true, theForm)) { 
pushArray(bbtags, theType); 
} 
} 

theForm.sizeselect.selectedIndex = 0; 
theForm.fontselect.selectedIndex = 0; 
theForm.colorselect.selectedIndex = 0; 

setFocus(theForm); 
} 


function bbcode(theForm, theTag, promptText) { 
if ( normalMode(theForm) || (theTag=="IMG")) { 
var selectedText = getSelectedText(theForm); 
if (promptText == '' || selectedText != '') promptText = selectedText; 

inserttext = prompt(tag_prompt + "\n[" + theTag + "]xxx[/" + theTag + "]", promptText); 
if ( (inserttext != null) && (inserttext != "") ) { 
addText("[" + theTag + "]" + inserttext + "[/" + theTag + "]", "", false, theForm); 
} 
} 
else { 
var donotinsert = false; 
for (i = 0; i < bbtags.length; i++) { 
if (bbtags[i] == theTag) donotinsert = true; 
} 

if (!donotinsert) { 
if(addText("[" + theTag + "]", "[/" + theTag + "]", true, theForm)){ 
pushArray(bbtags, theTag); 
} 
} 
else { 
var lastindex = 0; 

for (i = 0 ; i < bbtags.length; i++ ) { 
if ( bbtags[i] == theTag ) { 
lastindex = i; 
} 
} 

while (bbtags[lastindex]) { 
tagRemove = popArray(bbtags); 
addText("[/" + tagRemove + "]", "", false, theForm); 
} 
} 
} 
} 

function namedlink(theForm,theType) { 
var selected = getSelectedText(theForm); 

var linkText = prompt(link_text_prompt,selected); 
var prompttext; 

if (theType == "URL") { 
prompt_text = link_url_prompt; 
prompt_contents = "http://"; 
} 
else { 
prompt_text = link_email_prompt; 
prompt_contents = ""; 
} 

linkURL = prompt(prompt_text,prompt_contents); 


if ((linkURL != null) && (linkURL != "")) { 
var theText = ''; 

if ((linkText != null) && (linkText != "")) { 
theText = "["+theType+"="+linkURL+"]"+linkText+"[/"+theType+"]"; 
} 
else { 
theText = "["+theType+"]"+linkURL+"[/"+theType+"]"; 
} 

addText(theText, "", false, theForm); 
} 
} 


function flash(theForm, theTag, promptText) { 

if(promptText=='') promptText=getSelectedText(theForm); 


if (theTag == "tube") { 
inserttext = prompt("Es ist nur die Nummer nach V= einzugeben", promptText); 
} 
if (theTag == "mytube") { 
inserttext = prompt("Es ist nur die Nummer nach watch/ einzugeben", promptText); 
} 
} 

function dolist(theForm) { 
listType = prompt(list_type_prompt, ""); 
if ((listType == "a") || (listType == "1")) { 
theList = "[list="+listType+"]\n"; 
listEend = "[/list="+listType+"] "; 
} 
else { 
theList = "[list]\n"; 
listEend = "[/list] "; 
} 

listEntry = "initial"; 
while ((listEntry != "") && (listEntry != null)) { 
listEntry = prompt(list_item_prompt, ""); 
if ((listEntry != "") && (listEntry != null)) theList = theList+"[*]"+listEntry+"\n"; 
} 

addText(theList + listEend, "", false, theForm); 
} 


function addText(theTag, theClsTag, isSingle, theForm) 
{ 
var isClose = false; 
var message = theForm.message; 
var set=false; 
var old=false; 
var selected=""; 

if( message.textLength>=0 ) { // mozilla, firebird, netscape 
if(theClsTag!="" && message.selectionStart!=message.selectionEnd) { 
selected=message.value.substring(message.selectionStart,message.selectionEnd); 
str=theTag + selected+ theClsTag; 
old=true; 
isClose = true; 
} 
else { 
str=theTag; 
} 

message.focus(); 
start=message.selectionStart; 
end=message.textLength; 
endtext=message.value.substring(message.selectionEnd,end); 
starttext=message.value.substring(0,start); 
message.value=starttext + str + endtext; 
message.selectionStart=start; 
message.selectionEnd=start; 

message.selectionStart = message.selectionStart + str.length; 

if(old) { return false; } 

set=true; 

if(isSingle) { 
isClose = false; 
} 
} 
if ( (myVersion >= 4) && is_ie && is_win) { // Internet Explorer 
if(message.isTextEdit) { 
message.focus(); 
var sel = document.selection; 
var rng = sel.createRange(); 
rng.colapse; 
if((sel.type == "Text" || sel.type == "None") && rng != null){ 
if(theClsTag != "" && rng.text.length > 0) 
theTag += rng.text + theClsTag; 
else if(isSingle) 
isClose = true; 

rng.text = theTag; 
} 
} 
else{ 
if(isSingle) isClose = true; 

if(!set) { 
message.value += theTag; 
} 
} 
} 
else 
{ 
if(isSingle) isClose = true; 

if(!set) { 
message.value += theTag; 
} 
} 

message.focus(); 

return isClose; 
} 


function getSelectedText(theForm) { 
var message = theForm.message; 
var selected = ''; 

if(navigator.appName=="Netscape" && message.textLength>=0 && message.selectionStart!=message.selectionEnd ) 
selected=message.value.substring(message.selectionStart,message.selectionEnd); 

else if( (myVersion >= 4) && is_ie && is_win ) { 
if(message.isTextEdit){ 
message.focus(); 
var sel = document.selection; 
var rng = sel.createRange(); 
rng.colapse; 

if((sel.type == "Text" || sel.type == "None") && rng != null){ 
if(rng.text.length > 0) selected = rng.text; 
} 
} 
} 

return selected; 
} 

function setFocus(theForm) { 
theForm.message.focus(); 
} 

function opensmiliewindow(x,y,sid) { 
window.open("misc.php?action=moresmilies&sid="+sid, "smilies", "toolbar=no,scrollbars=yes,resizable=yes,width="+x+",height="+y); 
} 



Wäre klasse wenn jemand rauskriegen würdest warum sich bei mir kein Fenster beim klicken öffnet...
Danke schon mal, gruß Tobi

__________________
Wbb 2.1.6
MySQL-Version: 5.0.51a-3ubuntu5.4-log
PHP-Version: 5.2.9-1nmm1
29.07.2009 12:22 tobi3 ist offline E-Mail an tobi3 senden Beiträge von tobi3 suchenNehmen Sie tobi3 in Ihre Freundesliste auf
Speddy20537 Speddy20537 ist männlich
Tripel-As


images/avatars/avatar-14.gif
[meine Galerie]


Dabei seit: 05.06.2009
Beiträge: 228
Postid: 500
Beitrag Nr.: 2     Auf diesen Beitrag antworten Zitatantwort auf diesen Beitrag erstellen Diesen Beitrag editieren/löschen Diesen Beitrag einem Moderator melden       Zum Anfang der Seite springen

versuch mal bittes dies zu machen.



php:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
3.bearbeiten der Datei: ./js/bbcode.js

Suche nach: (Falls noch keiner meiner BBCodes eingebaut wurdealsoGoogleVideo oder MyVideo)
-----------
inserttext prompt(((theTag == "IMG") ? (img_prompt) : (tag_prompt)) + "\n[" theTag "]xxx[/" theTag "]"promptText);

Und ersetze es durch folgendes:
-------------------------------
switch (theTag) {
    default: inserttext prompt(((theTag == "IMG") ? (img_prompt) : (tag_prompt)) + "\n[" theTag "]xxx[/" theTag "]"promptText); break;
    case 'youtube'inserttext prompt(youtube_prompt "\n[" theTag "]Ihre YouTube ID[/" theTag "]"promptText); break;
}

Falls sie doch eingebaut sind dann füge füge unter:
---------------------------------------------------
default: inserttext prompt(((theTag == "IMG") ? (img_prompt) : (tag_prompt)) + "\n[" theTag "]xxx[/" theTag "]"promptText); break;

folgendes ein:
--------------
case 'youtube'inserttext prompt(youtube_prompt "\n[" theTag "]Ihre YouTube ID[/" theTag "]"promptText); break;
02.08.2009 02:00 Speddy20537 ist offline E-Mail an Speddy20537 senden Homepage von Speddy20537 Beiträge von Speddy20537 suchenNehmen Sie Speddy20537 in Ihre Freundesliste auf
Baumstruktur | Brettstruktur
Gehe zu:
Neues Thema erstellen Antwort erstellen
Haumis wbb hilfe » WBB2 » Es klappt nicht » Youtube BB code hack geht nicht richtig

Views heute: 55.450 | Views gestern: 60.482 | Views gesamt: 71.361.381
Powered by Burning Board 2.3.6 © 2001-2004 WoltLab GmbH
Am Netz seit dem 3.6.2009 - Powered by © haumis-Team
Style & Buttons © by FriendsbistroTeam
Boardregeln Impressum & Haftungsauschluss Datenschutzerklärung