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)
 Playing Photo Bucket Videos in Forum
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

leesh695
Junior Member

101 Posts

Posted - 10 August 2008 :  06:53:44  Show Profile  Reply with Quote
Hi,

I have Balex's Video Mod 1.00 installed on my forum but, I cannot get any photo bucket videos to play.

http://s301.photobucket.com/albums/nn80/SinnSinn/?action=view¤t=clip0099.flv

I have tried for a while to modify the code to make the video above play, but have been unsuccesful.

Can anyone please help me?<

Edited by - leesh695 on 10 August 2008 06:54:33

leesh695
Junior Member

101 Posts

Posted - 12 August 2008 :  05:50:26  Show Profile  Reply with Quote
Hi,

I really need this feature and I try to make it work and I just cant. I would be willing to pay someone to help me make this work.<
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 12 August 2008 :  06:14:29  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
Does the mod include code to display photobucketvideos?<


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

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 12 August 2008 :  14:41:11  Show Profile  Reply with Quote
No, Ruirib, it doesn't. That may explain why it isn't working.<
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 12 August 2008 :  14:56:31  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
So I guess it would be a matter of adding the specific photobucket code, no?<


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

leesh695
Junior Member

101 Posts

Posted - 12 August 2008 :  16:43:56  Show Profile  Reply with Quote
quote:
Originally posted by ruirib

So I guess it would be a matter of adding the specific photobucket code, no?



Yeah, ive tried doing it myself but im not to good with asp & I cant get it to work.<
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 12 August 2008 :  19:24:42  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
Well I must say that I don't know the code for this that well, but here is what I did, simply by looking at similar code and I managed to get it working. This is all I will do, if it suits you, great, if not, too bad.

1. Inside the function ChkUrls, in inc_func_common.asp, add the lines in red:


                                (UCase(Right(strArray(Counter-1), 6)) <> "[GVID]") and _
				(UCase(Right(strArray(Counter-1), 10)) <> "[METACAFE]") and _
				(UCase(Right(strArray(Counter-1), 5)) <> "[WMA]") and _
				(UCase(Right(strArray(Counter-1), 4)) <> "[QT]") and _
				(UCase(Right(strArray(Counter-1), 5)) <> "[PBT]") and _
				(UCase(Right(strArray(Counter-1), 4)) <> "[RV]") and _
				(UCase(Right(strArray(Counter-1), 7)) <> "FLASH]""") and _
				(UCase(Right(strArray(Counter-1), 5)) <> "WMV]""") and _
				(UCase(Right(strArray(Counter-1), 4)) <> "QT]""") and _
			        (UCase(Right(strArray(Counter-1), 5)) <> "PBT]") and _
				(UCase(Right(strArray(Counter-1), 4)) <> "RV]""") and _
				(UCase(Right(strArray(Counter-1), 7)) <> "[FLASH]") and _


2. At the end of the function formatStr, in inc_func_common.asp, add the red line:



	fString = ReplaceWMVTags(fString)			' windows media
	fString = ReplaceRVTags(fString)			' Real video
	fString = ReplacePhotoBucketVideoTags(fString)		

	FormatStr = fString
	on Error goto 0



3. Near the end of inc_func_common.asp, just before the WriteFooter sub, add this code:


Function ReplacePhotoBucketVideoTags(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) = "[pbt]"
	CodeTags(1,2,1) = "[/pbt]"
	CodeTags(1,1,2) = "<div class=""media""><script language=""javascript"">EmbedPBV("""
	CodeTags(1,2,2) = """)</script></div><div class=""break""></div>"
	
 	CodeTags(2,1,1) = "[PBT]"
 	CodeTags(2,2,1) = "[/PBT]"
 	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))						 			
				strResultString = strResultString & roTag & strCodeText & rcTag & strArray2(1)
 		 		else
 		 			strResultString = strResultString & strArray(counter2)
 		 		end if	
 		 	next  

			strTempString = strResultString
 			strResultString = ""
 		end if
	next

	ReplacePhotoBucketVideoTags = strTempString 
end function


4. In video.js, add this code, at the end of the file, for example:


function EmbedPBV(URL){
	if(URL == null || URL == "illegal"){
		//Nope, we can't.
		document.writeln(" error: illegal use of PhotoBucketVideo tag! ");
	}else{
		//Add the code to the document.
		document.writeln('<embed width="448" height="361" type="application/x-shockwave-flash" wmode="transparent" src="http://i301.photobucket.com/player.swf?file='+ URL +'"> </embed>');
	}
}


Use the tags like this:

[pbt]
http://s301.photobucket.com/albums/nn80/SinnSinn/clip0099.flv
[/pbt]

You will need to insert the complete link to the file, but without parameters.

I hope this helps, as I really don't have the time to filter out the parameters to allow you to use the complete link,as per your post.

I tested this locally and it works.<


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

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 12 August 2008 :  20:52:57  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
To add a button, just as the mod does for other video types, here are the changes:

1. Save this icon as icon_PBT.gif, in your forum folder:

2. Add the line in to your icon_files.asp file:


Const strIconRealVideo = "icon_RV.gif|23|22"
Const strIconPBT = "icon_PBT.gif|23|22"


3. Add this function at the end of inc_code.js

function pbt() {
	var text = getText();
	if (helpstat){
		alert("PhotoBucket Video.\n\nUSE: [pbt]Real Video URL[/pbt]");
	} else if (basic) {
		AddTxt="[pbt]" + text + "[/pbt]";
		AddText(AddTxt);
	} else {
		if (text) {
			txt=prompt("PhotoBucket Video URL",text);
		} else {
			txt=prompt("PhotoBucket Video URL","Text");
		}
		if(txt!=null) {
			AddTxt=" [pbt] "+txt+" [/pbt]";
			AddText(AddTxt);
		}
	}
}

4. Add the parts in red to inc_post_buttons.asp. Don't forget the & _ at the end of the line before the last:

	"<a href=""Javascript:qtv();"" tabindex=""-1"">" & getCurrentIcon(strIconQuickTime,"Quicktime movie","align=""top""") & "</a>" & _
		"<a href=""Javascript:wmv();"" tabindex=""-1"">" & getCurrentIcon(strIconWMV,"Windows Media video","align=""top""") & "</a>" & _
		"<a href=""Javascript:rv();"" tabindex=""-1"">" & getCurrentIcon(strIconRealVideo,"Real Video","align=""top""") & "</a>" &_
	    "<a href=""Javascript:pbt();"" tabindex=""-1"">" & getCurrentIcon(strIconPBT,"PhotoBucket Video","align=""top""") & "</a>"

<


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

balexandre
Junior Member

Denmark
418 Posts

Posted - 13 August 2008 :  08:55:55  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message  Reply with Quote
Obrigado Rui.

Thank you Rui for the quick code, I will add this to the MOD and re-publish it.

Baptize and 1st Anniversary of my daughter with a house full of persons doesn't give me time to be with "you" here in the Forum.<

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"


Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 13 August 2008 :  09:02:39  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
No problem Bruno.

This works, but I'm not too sure about the ReplaceVideoTags function and the changes to ChkUrls, I didn't really have much time to understand what it does (it would require some time to test, which I don't have), so maybe have a look at it to make sure it's not doing more than it should.

Congrats on your daughter's baptism and birthday.<


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

leesh695
Junior Member

101 Posts

Posted - 13 August 2008 :  15:05:22  Show Profile  Reply with Quote
quote:
Originally posted by ruirib

No problem Bruno.

This works, but I'm not too sure about the ReplaceVideoTags function and the changes to ChkUrls, I didn't really have much time to understand what it does (it would require some time to test, which I don't have), so maybe have a look at it to make sure it's not doing more than it should.

Congrats on your daughter's baptism and birthday.



Thanks a lot for you help!<
Go to Top of Page

texanman
Junior Member

United States
410 Posts

Posted - 13 August 2008 :  16:30:43  Show Profile  Reply with Quote
Now wait a minute! Where is the $$$ ?! <
Go to Top of Page

Cobia
Starting Member

United States
39 Posts

Posted - 09 October 2008 :  14:04:53  Show Profile  Reply with Quote
ruirib
Thank you for the code, I have found it useful and the information about changing the link helped to display the videos from photobucket.<
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 09 October 2008 :  18:45:31  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
Glad it helped you :).<


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.15 seconds. Powered By: Snitz Forums 2000 Version 3.4.07