Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Playing Photo Bucket Videos in Forum

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
leesh695 Posted - 10 August 2008 : 06:53:44
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?<
13   L A T E S T    R E P L I E S    (Newest First)
ruirib Posted - 09 October 2008 : 18:45:31
Glad it helped you :).<
Cobia Posted - 09 October 2008 : 14:04:53
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.<
texanman Posted - 13 August 2008 : 16:30:43
Now wait a minute! Where is the $$$ ?! <
leesh695 Posted - 13 August 2008 : 15:05:22
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!<
ruirib Posted - 13 August 2008 : 09:02:39
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.<
balexandre Posted - 13 August 2008 : 08:55:55
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.<
ruirib Posted - 12 August 2008 : 20:52:57
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>"

<
ruirib Posted - 12 August 2008 : 19:24:42
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.<
leesh695 Posted - 12 August 2008 : 16:43:56
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.<
ruirib Posted - 12 August 2008 : 14:56:31
So I guess it would be a matter of adding the specific photobucket code, no?<
Carefree Posted - 12 August 2008 : 14:41:11
No, Ruirib, it doesn't. That may explain why it isn't working.<
ruirib Posted - 12 August 2008 : 06:14:29
Does the mod include code to display photobucketvideos?<
leesh695 Posted - 12 August 2008 : 05:50:26
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.<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000 Version 3.4.07