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)
 YouTube forum code
 New Topic  Reply to Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 7

MaGraham
Senior Member

USA
1297 Posts

Posted - 31 January 2012 :  11:46:19  Show Profile  Reply with Quote
I'm going to keep checking back here to see when you figure this out. I've been wanting this! :)

Also, I have a secure website and even though I put the s after the http in the YouTube link, I am still getting the security warning. Someone said I needed to put something in the htaccess file. Does anyone know anything about this, or exactly what would eliminate the security warning?



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley

Edited by - MaGraham on 31 January 2012 17:55:19
Go to Top of Page

bobby131313
Senior Member

USA
1163 Posts

Posted - 31 January 2012 :  11:53:32  Show Profile  Visit bobby131313's Homepage  Reply with Quote
quote:
Does it work for you?


Actually, it was in FF, but now it's not.

Switch the order of your title tags
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 02 February 2012 :  00:39:08  Show Profile  Reply with Quote
Copying and pasting this post here from another post since I asked the question above.
Some of it will be repetitive with the first post here. SORRY! Hope that's okay! :)





I am Sooooo excited!! I just now figured this out! I did the YouTube Video Mod by lucapan so that
our members only have to enter the [youtube][/youtube] in a post to share a YouTube video.

Example: [youtube]https://www.youtube.com/watch?v=riqxOjd4alw[/youtube]

Like I said in my initial post here, we kept getting the security warning with the YouTube videos. So,
I had checked and rechecked and rechecked posts to see if someone had forgotten to add the s after the
http in the YouTube link they were using but I was not finding one single YouTube video that didn't
already have the s in the link.

And then it just now dawned on me; all of the actual "codes" to make the videos work aren't in the
actual posts but rather in the Snitz Files! Soooo just now, I went into each of the files that had been
modified with the YouTube Video Mod and I entered the s in the appropriate places. And, guess
what? It's working PERFECT now!!!!! We are no longer getting the security warning!!!

Ohhhhh PRAISE GOD from Whom all blessings flow!!!!!!

Yeah, I'm HAPPY!!!!!

Thank you so much for your precious time with this!!!


Here is his (lucapan) code for the YouTube Video Mod.

YouTube Video Mod Download in zip format


Oh, I was extremely detailed in this post for a reason. I don't think this mod is listed anywhere on the Snitz site.
This download is from this member's site. So, I just thought perhaps this post might be of help to someone doing
a search for an EASY means of posting a YouTube video on their website! :)



This solved my problem!



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 02 February 2012 :  12:28:01  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
quote:
Originally posted by bobby131313

quote:
Does it work for you?


Actually, it was in FF, but now it's not.


There is a version that deals with this in a much more flexible way. I think it was started by Marcel and balexandre rounded it up. It includes javascript functions that allow all the flexibility you want in a much simpler way. It allows you, for example, to handle the new shortened links with an easy addition and it has the added benefit of allowing videos from other sources, as flickr and photobucket.


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

webewitch
Starting Member

9 Posts

Posted - 28 April 2012 :  10:25:22  Show Profile  Visit webewitch's Homepage  Reply with Quote
I've added the full screen button and changed to the standard dimensions :

CodeTags(1,1,1) = "[youtube]"
CodeTags(1,2,1) = "[/youtube]"
CodeTags(1,1,2) = "<object width=""640"" height=""390""><param name=""movie"" value=""http://www.youtube.com/v/"
CodeTags(1,2,2) = "&fs=1""></param><param name=""allowFullScreen"" value=""true""></param><param name=""wmode"" value=""transparent""></param>"
CodeTags(1,1,3) = "<embed src=""http://www.youtube.com/v/"
CodeTags(1,2,3) = "&fs=1"" type=""application/x-shockwave-flash""allowfullscreen=""true"" wmode=""transparent"" width=""640"" height=""390""></embed></object>"

Edited by - webewitch on 28 April 2012 10:26:14
Go to Top of Page

webewitch
Starting Member

9 Posts

Posted - 30 April 2012 :  14:07:30  Show Profile  Visit webewitch's Homepage  Reply with Quote
I've changed the code a wee bit to the now standard size of 640x390 and added the fullscreen button:


CodeTags(1,1,1) = "[youtube]"
CodeTags(1,2,1) = "[/youtube]"
CodeTags(1,1,2) = "<object width=""640"" height=""390""><param name=""movie"" value=""http://www.youtube.com/v/"
CodeTags(1,2,2) = "&fs=1""></param><param name=""allowFullScreen"" value=""true""></param><param name=""wmode"" value=""transparent""></param>"
CodeTags(1,1,3) = "<embed src=""http://www.youtube.com/v/"
CodeTags(1,2,3) = "&fs=1"" type=""application/x-shockwave-flash""allowfullscreen=""true"" wmode=""transparent"" width=""640"" height=""390""></embed></object>"


One slight problem I have is that while most of the videos work on my iPhone a few don't . e.g. this one;

[youtube]http://www.youtube.com/watch?v=o-WZU1X--IM[/youtube]

Can't figure out what's so different about it. It shows fine on my website
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 02 May 2012 :  05:18:20  Show Profile  Reply with Quote
quote:
Originally posted by webewitch

I've changed the code a wee bit to the now standard size of 640x390 and added the fullscreen button:


CodeTags(1,1,1) = "[youtube]"
CodeTags(1,2,1) = "[/youtube]"
CodeTags(1,1,2) = "<object width=""640"" height=""390""><param name=""movie"" value=""http://www.youtube.com/v/"
CodeTags(1,2,2) = "&fs=1""></param><param name=""allowFullScreen"" value=""true""></param><param name=""wmode"" value=""transparent""></param>"
CodeTags(1,1,3) = "<embed src=""http://www.youtube.com/v/"
CodeTags(1,2,3) = "&fs=1"" type=""application/x-shockwave-flash""allowfullscreen=""true"" wmode=""transparent"" width=""640"" height=""390""></embed></object>"


One slight problem I have is that while most of the videos work on my iPhone a few don't . e.g. this one;

[youtube]http://www.youtube.com/watch?v=o-WZU1X--IM[/youtube]

Can't figure out what's so different about it. It shows fine on my website





YEA!! It works! Now we can do FULL SCREEN YouTube videos!!


THANK YOU!!!








"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 02 May 2012 :  05:22:39  Show Profile  Reply with Quote

Can you do a simple add-on so we can do a YouTube playlist by by using the [youtube][/youtube]?





"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Astralis
Senior Member

USA
1218 Posts

Posted - 07 February 2014 :  03:34:34  Show Profile  Send Astralis a Yahoo! Message  Reply with Quote
Is there an updated code for YouTube's IFRAME option, which is the standard option. It should be a piece of cake to code if no one has tried it yet.
Go to Top of Page

Maxime
Average Member

France
521 Posts

Posted - 07 February 2014 :  05:26:42  Show Profile  Visit Maxime's Homepage  Reply with Quote
I do not know if there is a code. But I use the mod fashion media that is on www.snitzbitz.com or there youtube, dailymotion, vemo and many others will see.

Cordially,
Maxime

Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)

Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 07 February 2014 :  08:06:20  Show Profile  Reply with Quote
quote:
Originally posted by Astralis

Is there an updated code for YouTube's IFRAME option, which is the standard option. It should be a piece of cake to code if no one has tried it yet.



This is the only Snitz post with any sort of YouTube code in it I believe, Astralis.


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 07 February 2014 :  12:08:12  Show Profile  Reply with Quote
Here's a stand-alone forum player I made in about 20 minutes for YouTube using their iframe API, so it's not difficult to code. This one keeps the option to limit the video play (under "preview") to 6 seconds or to play the entire video (under "watch").

"tubeframe.asp"


<%
'###############################################################################
'##
'##	              Snitz Forums 2000 v3.4.07
'##
'###############################################################################
'##
'## Copyright © 2000-14 Michael Anderson, Pierre Gorissen,
'##	          Huw Reddick and Richard Kinser
'##
'## This program is free. You can redistribute and/or modify it under the
'## terms of the GNU General Public License as published by the Free Software
'## Foundation; either version 2 or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must remain intact in
'## the scripts and in the HTML output.  The "powered by" text/logo with a
'## link back to http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful but
'## WITHOUT ANY WARRANTY; without even an implied warranty of MERCHANTABILITY
'## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
'## for more details.
'##
'## You should have received a copy of the GNU General Public License along
'## with this program; If not, write to:
'##
'##	          Free Software Foundation, Inc.
'##	          59 Temple Place, Suite 330
'##	          Boston, MA 02111-1307
'##
'## Support can be obtained from our support forums at:
'##
'##	            http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'##
'##	             manderson@snitz.com
'##
'###############################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_header.asp"-->
<%
Response.Write	"      <table border=""0"" width=""100%"">" & vbNewLine & _
	"        <tr>" & vbNewLine & _
	"          <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
	"          " & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
	"          " & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpenTopic,"","align=""absmiddle""") & " YouTube Frame Player<br /></font></td>" & vbNewLine & _
	"        </tr>" & vbNewLine & _
	"      </table>" & vbNewLine & _
	"      <br />" & vbNewLine
If Request("VideoID")="" Then
	Call AnyForm
	WriteFooter
	Response.End
Else
	strVideoID=Request("VideoID")
	If left(strVideoID,13)="http://youtu." Then
		strVideoID=mid(strVideoID,17)
	End If
	For i = len(strVideoID) to 1 step -1
		If mid(strVideoID,i,5)="watch" Then
			strVideoID=mid(strVideoID,i+8,len(strVideoID)-9)
			Exit For
		End If
	Next
	For j = 1 to len(strVideoID)
		If mid(strVideoID,j,1)="&" Then
			strVideoID=left(strVideoID,j-1)
			Exit For
		End If
	Next
	%>
	<!-- 1. The <iframe> (and video player) will replace this <div> tag. -->
	<div id="player"></div>
	<%
	If Request("submit")="Preview" Then
		%>
		<script>
			// 2. This code loads the IFrame Player API code asynchronously.
			var tag = document.createElement('script');
			tag.src = "https://www.youtube.com/iframe_api";
			var firstScriptTag = document.getElementsByTagName('script')[0];
			firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
			// 3. This function creates an <iframe> (and YouTube player)
			//    after the API code downloads.
			var player;
			function onYouTubeIframeAPIReady() {
				player = new YT.Player('player', {
					height: '390',
					width: '640',
					videoId: '<%=strVideoID%>',
					events: {
						'onReady': onPlayerReady,
						'onStateChange': onPlayerStateChange
					}
				});
			}
			// 4. The API will call this function when the video player is ready.
			function onPlayerReady(event) {
				event.target.playVideo();
			}
			// 5. The API calls this function when the player's state changes.
			//    The function indicates that when playing a video (state=1),
			//    the player should play for six seconds and then stop.
			var done = false;
			function onPlayerStateChange(event) {
				if (event.data == YT.PlayerState.PLAYING && !done) {
					setTimeout(stopVideo, 6000);
					done = true;
				}
			}
			function stopVideo() {
				player.stopVideo();
			}
		</script>
		<%
	Else
		%>
		<script>
			// 2. This code loads the IFrame Player API code asynchronously.
			var tag = document.createElement('script');
			tag.src = "https://www.youtube.com/iframe_api";
			var firstScriptTag = document.getElementsByTagName('script')[0];
			firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
			// 3. This function creates an <iframe> (and YouTube player)
			//    after the API code downloads.
			var player;
			function onYouTubeIframeAPIReady() {
				player = new YT.Player('player', {
					height: '390',
					width: '640',
					videoId: '<%=strVideoID%>',
					events: {
						'onReady': onPlayerReady
					}
				});
			}
			// 4. The API will call this function when the video player is ready.
			function onPlayerReady(event) {
				event.target.playVideo();
			}
		</script>
	<%
	End If
	WriteFooter
	Response.End
End If
Sub AnyForm
	Response.Write	"<form action=""tubeframe.asp"" method=""post"">" & vbNewLine & _
		"	<table align=""center"" width=""75%"" cellpadding=""0"" cellspacing=""0"" style=""border-collapse:collapse;"" border=""0"" bgColor=""transparent"">" & vbNewLine & _
		"		<tr valign=""middle"">" & vbNewLine & _
		"			<td align=""center"" width=""100%"" bgColor=""" & strTableBorderColor & """>" & vbNewLine & _
		"				<table align=""center"" width=""100%"" cellpadding=""4"" cellspacing=""1"" style=""border-collapse:collapse;"" border=""1"">" & vbNewLine & _
		"					<tr valign=""middle"">" & vbNewLine & _
		"						<td align=""center"" width=""100%"" bgColor=""" & strHeadCellColor & """ colspan=""2"">" & vbNewLine & _
		"							<font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>YouTube IFrame Player</b>" & vbNewLine & _
		"							</font>" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"					</tr>" & vbNewLine & _
		"					<tr valign=""middle"">" & vbNewLine & _
		"						<td align=""right"" width=""50%"" bgColor=""" & strForumCellColor & """>" & vbNewLine & _
		"							<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><b>YouTube Video ID (or entire URL): </b>" & vbNewLine & _
		"							</font>" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"						<td align=""left"" width=""50%"" bgColor=""" & strForumCellColor & """>" & vbNewLine & _
		"							<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & vbNewLine & _
		"								<input type=""text"" style=""width:95%; color:maroon; font-strength:bold;"" maxlength=""50"" name=""VideoID"" value=""" & Request("VideoID") & """ />" & vbNewLine & _
		"							</font>" & vbNewLine & _
		"						</td>" & vbNewLine & _
		"					</tr>" & vbNewLine & _
		"				</table>" & vbNewLine & _
		"			</td>" & vbNewLine & _
		"		</tr>" & vbNewLine & _
		"		<tr valign=""top"">" & vbNewLine & _
		"			<td colspan=""2"" width=""100%"" align=""center"" bgColor=""transparent"">" & vbNewLine & _
		"				<button type=""image"" name=""submit"" value=""Watch"" style=""border:none; background:transparent;""><img  src=""" & strImageURL & "Watch.png"" alt=""Watch"" height=""35"" width=""70"" />   <button type=""image"" name=""submit"" value=""Preview"" style=""border:none; background:transparent;""><img  src=""" & strImageURL & "Preview.png"" alt=""Preview"" height=""35"" width=""70"" />" & vbNewLine & _
		"			</td>" & vbNewLine & _
		"		</tr>" & vbNewLine & _
		"	</table>" & vbNewLine & _
		"</form>" & vbNewLine
End Sub
%>


Here are two images for your image folder:

watch.png
preview.png

Edited by - Carefree on 10 February 2014 03:49:34
Go to Top of Page

Astralis
Senior Member

USA
1218 Posts

Posted - 10 February 2014 :  02:28:02  Show Profile  Send Astralis a Yahoo! Message  Reply with Quote
Carefree, any everyone, thank you!

This requires people to recognize the ID in the URL.

Do you think there's another way to discover the ID when the user inputs the entire URL?

For example, consider all these variations of the same video ID:

http://youtu.be/MhNDKZmxRLM?t=21s
http://youtu.be/MhNDKZmxRLM
http://youtube.com/watch?v=MhNDKZmxRLM
http://www.youtube.com/watch?v=MhNDKZmxRLM
http://fr.youtube.com/watch?v=MhNDKZmxRLM&list=RDzLWni7-2NXw
http://youtube.com/watch?v=MhNDKZmxRLM&ob=av3e
http://www.youtube.com/watch?v=MhNDKZmxRLM&feature=player_embedded

Edited by - Astralis on 10 February 2014 03:19:45
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 10 February 2014 :  03:36:24  Show Profile  Reply with Quote
No, it doesn't. It works either way, by video ID or by the entire URL.
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 10 February 2014 :  03:38:34  Show Profile  Reply with Quote
quote:

http://youtu.be/MhNDKZmxRLM?t=21s
http://youtu.be/MhNDKZmxRLM



Since these are not really "youtube" addresses but come from a different site altogether, I didn't try to support them. But I could change it to recognize them, as well. OK. Done. See above for code.

Edited by - Carefree on 10 February 2014 03:54:01
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.15 seconds. Powered By: Snitz Forums 2000 Version 3.4.07