Author |
Topic |
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 23 March 2009 : 01:50:24
|
no idea then, sorry, as it looks like it should work fine. |
|
|
phoenixtaz13
Junior Member
129 Posts |
Posted - 23 March 2009 : 03:16:16
|
to: thelodger
hello.... good day to you.... :)
in inc_code.js file, u should have this inside(youtube exmple):
// Youtube Video
function tube() {
var text = getText();
if (helpstat){
alert("YouTube Video.\n\nUSE: [tube]YouTube Video URL[/tube]");
} else if (basic) {
AddTxt=" [tube]" + text + "[/tube]";
AddText(AddTxt);
} else {
if (text) {
txt=prompt("YouTube Video URL",text);
} else {
txt=prompt("YouTube Video URL","URL");
}
if(txt!=null) {
AddTxt=" [tube]" + txt + "[/tube]";
AddText(AddTxt);
}
}
}
now try to click ur youtube icon... it should now work.... :)
then in inc_func_common.asp for youtube:
Function ReplaceTubeTags(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) = "[tube]"
CodeTags(1,2,1) = "[/tube]"
if mlev > 0 then 'added this to control the video from playing
CodeTags(1,1,2) = "<div class=""tube""><script language=""javascript"">EmbedYT("""
CodeTags(1,2,2) = """,425,344)</script></div><div class=""break""></div>"
else
'not login or registered do nothing.
end if
CodeTags(2,1,1) = "[TUBE]"
CodeTags(2,2,1) = "[/TUBE]"
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 mlev > 0 then 'to prevent displaying the link
strCodeText = replace(strCodeText,"/watch?v=","/v/")
else
strCodeText = replace(strCodeText,strCodeText, "<br><br><div align='center'><font color='red'>Your not Login. Pls Login or Register to watch the video.</font></div>")
end if
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 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
ReplaceTubeTags = strTempString
end function
to embed video: [tube]http://video[/tube]
with my code above, if ur not login or registered, u wont be able to view the video.... hope this helps you... :)
|
Edited by - phoenixtaz13 on 23 March 2009 07:43:27 |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 23 March 2009 : 06:39:15
|
he wasn't asking about embedding youtube videos. |
|
|
phoenixtaz13
Junior Member
129 Posts |
Posted - 23 March 2009 : 07:00:57
|
quote: Originally posted by HuwR
he wasn't asking about embedding youtube videos.
hi huwr.... good day to you... :)
i was replying to thelodger... at his site, the youtube button is not working...
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 23 March 2009 : 07:14:37
|
since your reply was nowhere near his post, it may have been helpfull to mention who/what you were replying too. |
|
|
phoenixtaz13
Junior Member
129 Posts |
Posted - 23 March 2009 : 07:42:34
|
quote: Originally posted by HuwR
since your reply was nowhere near his post, it may have been helpfull to mention who/what you were replying too.
hi huwr.... :)
i apologise.... my bad... i thought i did, i will edit my post above....
|
|
|
thelodger
Junior Member
United Kingdom
296 Posts |
Posted - 23 March 2009 : 12:16:40
|
Cheers will try that now. |
|
|
thelodger
Junior Member
United Kingdom
296 Posts |
Posted - 23 March 2009 : 14:19:05
|
Hi, well the buttons now are working so things are looking up, problem now is once we embed a video, nothing at all shows even when were logged in? |
|
|
thelodger
Junior Member
United Kingdom
296 Posts |
Posted - 23 March 2009 : 14:21:50
|
Strange thing is, when we preview the post the video shows, but once its posted, nothing at all shows. |
|
|
MikeB.Lynn
New Member
54 Posts |
Posted - 23 March 2009 : 18:25:28
|
Lodger- I had that same issue and spent 3 hours working on it. Funny how one stupid error on my part caused such grief.
Make sure you've also edited inc_header.asp it should something like this: '## START - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT Response.Write "<meta name=""copyright"" content=""This Forum code is Copyright (C) 2000-05 Michael Anderson, Pierre Gorissen, Huw Reddick and Richard Kinser, Non-Forum Related code is Copyright (C) " & strCopyright & """>" & vbNewline '## END - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT Response.Write "<script type=""text/javascript"" src=""video.js""></script>" Response.Write "</head>" & vbNewLine & _
Also be sure you have uploaded the video.js file to your forum directory (which you probably have cause you can see it in preview)
|
Edited by - MikeB.Lynn on 23 March 2009 18:36:38 |
|
|
phoenixtaz13
Junior Member
129 Posts |
Posted - 24 March 2009 : 00:39:36
|
to thelodger,
recheck ur installation....
a code for video.js should be in the inc_header.asp file, just like what mikeb.lynn said...
in inc_func_common.asp file...
(UCase(Right(strArray(Counter-1), 6)) <> "[TUBE]") and _ (UCase(Right(strArray(Counter-1), 5)) <> "TUBE]") and _
fString = ReplaceTubeTags(fString) ' Youtube video
the code above, u should have this in ur inc_func_common.asp and make sure its in the right place... and remove other video Functions that has [tube][/tube], only Function ReplaceTubeTags(fString) should have [tube][/tube]...
recheck ur video.js file... this EmbedYT should be in ur video.js...
from what i see, ur problem is somewhere in the inc_func_common.asp file and video.js
hope this helps u... :)
|
|
|
thelodger
Junior Member
United Kingdom
296 Posts |
Posted - 24 March 2009 : 02:14:19
|
OK thanks for all your help. I will do this as soon as I get in from work tonight. |
|
|
thelodger
Junior Member
United Kingdom
296 Posts |
Posted - 24 March 2009 : 13:39:26
|
all working fine, TVM guys, but this has now created another problem, I have active users on the forum and all is working fine, but when I put this on, the active users show that no one is on the forum, when I know we have about 50 members on it. Any cure so its back showing who is on? |
|
|
thelodger
Junior Member
United Kingdom
296 Posts |
Posted - 24 March 2009 : 13:44:00
|
I am guessing thats a problem with not showing none members the videos, any cure to this please? |
|
|
phoenixtaz13
Junior Member
129 Posts |
Posted - 25 March 2009 : 03:57:03
|
as to my knowledge, not showing the video to none member is not the cause of it... recheck ur code on active users mod...
but if u still want to remove the restriction from not showing video from non-members, simply remove or comment out the ones in red: in inc_func_common.asp file, Function ReplaceTubeTags(fString)
if mlev > 0 then 'to prevent displaying the link strCodeText = replace(strCodeText,"/watch?v=","/v/") else strCodeText = replace(strCodeText,strCodeText, "<br><br><div align='center'><font color='red'>Your not Login. Pls Login or Register to watch the video.</font></div>") end if
as for ur active user mod, recheck ur code in inc_func_common.asp
hope this help u out.... :)
|
|
|
Topic |
|
|
|