Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 MOD: OnlineVideos 1.1
 New Topic  Reply to Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 7

thelodger
Junior Member

United Kingdom
296 Posts

Posted - 21 March 2009 :  09:20:13  Show Profile  Reply with Quote
The code in video.js is

function EmbedYT(URL, width, height, menu, quality, bg, bg2){
//Checks if the menu constant is entered (correctly)
if(menu != true && menu != false && menu != "true" && menu != "false"){
menu = true; //Replace with default. Default = true.


I guess thats correct?
Go to Top of Page

phoenixtaz13
Junior Member

129 Posts

Posted - 21 March 2009 :  12:19:11  Show Profile  Reply with Quote
in video.js file, for youtube, i made some changes...

heres what i did with mine:
function EmbedYT(URL, width, height){
	
	if(URL == null || URL == "illegal" || width == null || height == null){
		//Nope, we can't.
		document.writeln(" error: illegal use of flash tag! ");
	}else{
		
				
		//below is the coded i added and change for youtube embed.
		
		document.writeln('<OBJECT WIDTH="' + width + '" HEIGHT="' + height + '">');
		document.writeln('<PARAM NAME="MOVIE" VALUE="' + URL + '&hl=en&fs=1"></param>');
		document.writeln('<PARAM NAME="allowFullScreen" VALUE="true"></param>');
		document.writeln('<PARAM NAME="allowscriptaccess" VALUE="always"></param>');
				
		document.writeln('<EMBED SRC="' + URL + '&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" WIDTH="' + width + '" HEIGHT="' + height + '" ></EMBED></OBJECT>');
	}
}


and then in posting video it looks like this:
[tube]http://video[/tube]

hope this helps you.... :)


Edited by - phoenixtaz13 on 21 March 2009 12:24:57
Go to Top of Page

thelodger
Junior Member

United Kingdom
296 Posts

Posted - 21 March 2009 :  12:40:04  Show Profile  Reply with Quote
Yeah I have changed it to yours, but the buttons still dont work, they highlight as normal but when you click on any of the video buttons nothing happens.
Go to Top of Page

MikeB.Lynn
New Member

54 Posts

Posted - 21 March 2009 :  13:01:33  Show Profile  Reply with Quote
lodger got a link to your site?
Go to Top of Page

thelodger
Junior Member

United Kingdom
296 Posts

Posted - 21 March 2009 :  13:29:40  Show Profile  Reply with Quote
http://www.forumsuperstars.com/

log on with the test account, poker:

password test!

Edited by - thelodger on 21 March 2009 13:30:19
Go to Top of Page

MikeB.Lynn
New Member

54 Posts

Posted - 21 March 2009 :  15:44:32  Show Profile  Reply with Quote
You made the buttons and they are being written.
Check your inc_post_buttons.asp file
Seems to me this is where your missing the activation of them
Go to Top of Page

thelodger
Junior Member

United Kingdom
296 Posts

Posted - 21 March 2009 :  16:04:03  Show Profile  Reply with Quote
Ok will have a look, thanks very much.
Go to Top of Page

thelodger
Junior Member

United Kingdom
296 Posts

Posted - 21 March 2009 :  16:22:58  Show Profile  Reply with Quote
Nope all looks fine with inc_post_buttons.asp. I have followed the mod exact, indeed done it twice, but still the buttons don't work :(
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 21 March 2009 :  18:49:54  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
Try deleting your temporary internet files.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

thelodger
Junior Member

United Kingdom
296 Posts

Posted - 22 March 2009 :  07:23:21  Show Profile  Reply with Quote
Yeah, tried that, very strange, sure its just something simple.
Go to Top of Page

MikeB.Lynn
New Member

54 Posts

Posted - 22 March 2009 :  11:36:41  Show Profile  Reply with Quote
Question-
How do I disable the autostart on the wmv videos?
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20580 Posts

Posted - 22 March 2009 :  12:29:48  Show Profile  Visit HuwR's Homepage  Reply with Quote
add a
<PARAM name="autostart" VALUE="false"> to the object tag
Go to Top of Page

MikeB.Lynn
New Member

54 Posts

Posted - 22 March 2009 :  17:22:20  Show Profile  Reply with Quote
My fault. I should have been more specific.
Herein is my issue.
I want to embed hd720P MPG's on my forum.
Using the wmv tags it doesn't work using the MOD code:

Function ReplaceWMVTags(fString)
Dim oTag, cTag
Dim roTag, rcTag
Dim oTagPos, cTagPos
Dim nTagPos
Dim counter1, counter2
Dim strCodeText
Dim Tagcount
Dim strTempString, strResultString
TagCount = 2
Dim CodeTags(2,2,2)
Dim strArray, strArray2

CodeTags(1,1,1) = "[wmv]"
CodeTags(1,2,1) = "[/wmv]"
'if mlev > 0 then
'user logged in, show the media
CodeTags(1,1,2) = "<div class=""media""><script language=""javascript"">EmbedWMVideoT("""
CodeTags(1,2,2) = """,580,400,true)</script></div><div class=""break""></div>"
'else
'user not logged in, show a link to the media
'CodeTags(1,1,2) = "<div class=""wbf""><img src=""images\delete.gif"" border=0 align=""absmiddle""> You're not logged in! Click <a href=""vid.asp?s="
'CodeTags(1,2,2) = "&t=w"" title=""click to watch"" target=""_new"">here</a> to watch this clip.</div><div class=""break""></div>"
'end if

CodeTags(2,1,1) = "[WMV]"
CodeTags(2,2,1) = "[/WMV]"
CodeTags(2,1,2) = CodeTags(1,1,2)
CodeTags(2,2,2) = CodeTags(1,2,2)

strResultString = ""
strTempString = fString

for counter1 = 1 to TagCount

oTag = CodeTags(counter1,1,1)
roTag = CodeTags(counter1,1,2)
cTag = CodeTags(counter1,2,1)
rcTag = CodeTags(counter1,2,2)
oTagPos = InStr(1, strTempString, oTag, 1)
cTagPos = InStr(1, strTempString, cTag, 1)

if (oTagpos > 0) and (cTagPos > 0) then
strArray = Split(strTempString, oTag, -1)
for counter2 = 0 to Ubound(strArray)
if (Instr(1, strArray(counter2), cTag) > 0) then
strArray2 = split(strArray(counter2), cTag, -1)
strCodeText = trim(strArray2(0))
if instr(strCodeText,",") > 0 or _
instr(strCodeText,")") >0 or _
instr(strCodeText,"(") >0 or _
instr(strCodeText,";") >0 or _
instr(strCodeText,"""") >0 or _
instr(strCodeText,"<") >0 or _
instr(strCodeText,">") >0 or _
instr(strCodeText,"[") >0 or _
instr(strCodeText,"]") >0 or _
instr(strCodeText,",") >0 then
strCodeText = "illegal"
end if
strResultString = strResultString & roTag & strCodeText & rcTag & strArray2(1)
else
strResultString = strResultString & strArray(counter2)
end if
next

strTempString = strResultString
strResultString = ""
end if
next

ReplaceWMVTags = strTempString
end function


So I duplicated the above instance changed the wmv's to mpg's and added it to the end of the mod:
Function ReplaceMPGTags(fString)
Dim oTag, cTag
Dim roTag, rcTag
Dim oTagPos, cTagPos
Dim nTagPos
Dim counter1, counter2
Dim strCodeText
Dim Tagcount
Dim strTempString, strResultString
TagCount = 2
Dim CodeTags(2,2,2)
Dim strArray, strArray2

CodeTags(1,1,1) = "[mpg]"
CodeTags(1,2,1) = "[/mpg]"
'if mlev > 0 then
'user logged in, show the media
CodeTags(1,1,2) = "<div class=""media""><script language=""javascript"">EmbedWMVideoT("""
CodeTags(1,2,2) = """,580,400,true)</script></div><div class=""break""></div>"
'else
'user not logged in, show a link to the media
'CodeTags(1,1,2) = "<div class=""wbf""><img src=""images\delete.gif"" border=0 align=""absmiddle""> You're not logged in! Click <a href=""vid.asp?s="
'CodeTags(1,2,2) = "&t=w"" title=""click to watch"" target=""_new"">here</a> to watch this clip.</div><div class=""break""></div>"
'end if

CodeTags(2,1,1) = "[MPG]"
CodeTags(2,2,1) = "[/MPG]"
CodeTags(2,1,2) = CodeTags(1,1,2)
CodeTags(2,2,2) = CodeTags(1,2,2)

strResultString = ""
strTempString = fString

for counter1 = 1 to TagCount

oTag = CodeTags(counter1,1,1)
roTag = CodeTags(counter1,1,2)
cTag = CodeTags(counter1,2,1)
rcTag = CodeTags(counter1,2,2)
oTagPos = InStr(1, strTempString, oTag, 1)
cTagPos = InStr(1, strTempString, cTag, 1)

if (oTagpos > 0) and (cTagPos > 0) then
strArray = Split(strTempString, oTag, -1)
for counter2 = 0 to Ubound(strArray)
if (Instr(1, strArray(counter2), cTag) > 0) then
strArray2 = split(strArray(counter2), cTag, -1)
strCodeText = trim(strArray2(0))
if instr(strCodeText,",") > 0 or _
instr(strCodeText,")") >0 or _
instr(strCodeText,"(") >0 or _
instr(strCodeText,";") >0 or _
instr(strCodeText,"""") >0 or _
instr(strCodeText,"<") >0 or _
instr(strCodeText,">") >0 or _
instr(strCodeText,"[") >0 or _
instr(strCodeText,"]") >0 or _
instr(strCodeText,",") >0 then
strCodeText = "illegal"
end if
strResultString = strResultString & roTag & strCodeText & rcTag & strArray2(1)
else
strResultString = strResultString & strArray(counter2)
end if
next

strTempString = strResultString
strResultString = ""
end if
next

ReplaceMPGTags = strTempString
end function

Plus all the necessary (I think) codes that are needed in the other files. Well I got it to work. Unfortunately the videos autostart. Now when I change the red areas to false the normal wmv files don't autostart but the mpg videos still do.
Any ideas???

Edited by - MikeB.Lynn on 22 March 2009 17:24:17
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20580 Posts

Posted - 22 March 2009 :  18:06:31  Show Profile  Visit HuwR's Homepage  Reply with Quote
what does this EmbedWMVideoT javascript function look like ?
Go to Top of Page

MikeB.Lynn
New Member

54 Posts

Posted - 22 March 2009 :  18:18:50  Show Profile  Reply with Quote
From the video.js file. and I've tried it using EmbedWMVideo and EmbedWMVideoT (as written in the original file) same results

function EmbedWMVideo(URL, width, height, autostart){
if(autostart != true && autostart != "true" && autostart != "1" && autostart != 1){
autostart = 0; //Replace with default. Default = 0 (false).
}else{
autostart = 1; //Replace with 1, being zero.
}//See if we can continue.
if(URL == null){
//Nope, we can't.
document.writeln("No URL entered");
}else{
//Add the code to the document.
document.writeln('<OBJECT ID="MediaPlayer" WIDTH="' + width + '" HEIGHT="' + height + '" CLASSID="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" ');
document.writeln('STANDBY="Please wait while the Windows Media Player components load" TYPE="application/x-oleobject" />');
document.writeln('<PARAM NAME="FileName" VALUE="' + URL + '" />');
document.writeln('<PARAM name="autostart" VALUE="'+ autostart +'" />');
document.writeln('<PARAM name="volume" VALUE="50" />');
document.writeln('<PARAM name="ShowControls" VALUE="true" />');
document.writeln('<param name="ShowStatusBar" value="true" />');
document.writeln('<param name="SHOWTRACKER" value="true" />');
document.writeln('<PARAM name="ShowDisplay" VALUE="false" />');
document.writeln('<embed width="' + width + '" height="' + height + '" src="' + URL + '" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" type="application/x-mplayer2" autostart="'+ autostart +'" transparentstart="1" loop="0" ShowControls=1 controller="true" SHOWTRACKER=1 showstatusbar=1 showdisplay=0></embed></object>');
}
}

Edited by - MikeB.Lynn on 22 March 2009 18:25:29
Go to Top of Page
Page: of 7 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.13 seconds. Powered By: Snitz Forums 2000 Version 3.4.07