Page 1 2 

Moderators: Derry, Goldie, Harpo
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Honorary Mechanic
Posted
.

http://www.youtube.com/watch_popup?v=X15xenTcUNI

that is a link as i have it @ youtube.com

All that Youtube allows is links like that
i cant insert any code (html...etc)
they even have to be to inside the youtube-domain.

As you notice that links opens a new screen (call it a pop-up if you want)
the size is not determined...whatever your browser feels like.


---------
Question:
---------

How to set the SIZE of that new screen inside the link ?



Radio

.
 
Posts: 1053 | Registered: February 27, 2007Reply With QuoteEdit or Delete MessageReport This Post
Guru 'Geezer' Mechanic
Picture of larryd
Posted Hide Post
When I click your link, I get a FLV file. It plays in my browser because I have Flash player installed and it knows how to play flv files. FLV files are meant to be played inside a skinned player which has the ability to set the display size and add player controls.

I would imagine that you could forgo the player as you did with your link and place it inside an i-frame sized as you want.
 
Posts: 5125 | Registered: December 03, 2006Reply With QuoteEdit or Delete MessageReport This Post
Honorary Mechanic
Posted Hide Post
Are you shure Larry ?

I think you should see a Youtube player !

dont you recognize that Youtube-player bar ?

Its NOT a flv file Big Grin (not on my pc)

(unless something strange is happening there downunder ?)

Try to find a spot where you can even check the source (just inside the lower and right browser borders)
and you see that this is a real html page with a youtube player on it.


I would like to have a link to this were i can set the size...something like this fantasy:

http://www.youtube.com/watch_p...width=300,height=250


How ?

As explained i can only place a link (that maybe might contain some parameters in html or maybe in js)
so a frame is not possible unless you can construct that from a link only.



Radio
 
Posts: 1053 | Registered: February 27, 2007Reply With QuoteEdit or Delete MessageReport This Post
Guru 'Geezer' Mechanic
Picture of larryd
Posted Hide Post
You are right, I missed seeing the player bar at the bottom. Looking at the source code, I see that the width and height are being set to 100% (full browser window). I do not see any way to override these since the values are hard-coded into the source (i.e., not variables).

I get an error on your last link, so do not know what effect you are trying to get. I suppose using an i-frame is not possible? If you are looking for some type of dynamic, resizable window, then maybe the DynamicDrive.com HTML Window widget would work.
 
Posts: 5125 | Registered: December 03, 2006Reply With QuoteEdit or Delete MessageReport This Post
Honorary Mechanic
Posted Hide Post
Wink Must be late there Larry Roll Eyes

You got an error...because that was a "fantasy" link
it wont work...if it would then i would not have to ask,
it was just to show you the kind of thing i was looking for.(something i could add to get a preset size)

On Youtube in this case i can only put a single URL
and it has to be one that starts with:

http://www.youtube.com/watch_popup?v=X15xenTcUNI

not because i want that but because Youtube wants that
(anything not starting with their domain will be refused...as a protective measure).

So the size-preset needs to be part of the url
i have no idea how i can generate a frame with
the above in it...using just 1 single URL.

But i have seen links...even with javascript or html-code in them (as part of the link).

The reason for all this is that it already works
and it pops-up a player with the video
all thats missing is to preset the size.

To sum it up:

What can i add to mentioned URL to preset the size of the screen that it will open.
(instead of non-specified or 100% like it is right now)
if it has to be a frame or anything else...i dont mind, as long as i can add it to the URL
 
Posts: 1053 | Registered: February 27, 2007Reply With QuoteEdit or Delete MessageReport This Post
Guru 'Geezer' Mechanic
Picture of larryd
Posted Hide Post
While it is possible to add parameters to a link, the web page executed by the link must be coded to accept those parameters and do something with them. You cannot arbitrarily add parameters and expect them to work.

The web page is question is apparently generated by YouTube, probably from a template, and has the width and height hard-coded to be 100% and thus cannot be changed. I suppose you could write a PHP script that would intercept this page, then locate and alter the width & height, then display the altered page.

I do not see any advantage to doing this over just using an i-frame and including the link in the Filepath field.
 
Posts: 5125 | Registered: December 03, 2006Reply With QuoteEdit or Delete MessageReport This Post
Honorary Mechanic
Posted Hide Post
.

Ok Great Razz Razz

so lets do it the frame way !

I have no idea
 
Posts: 1053 | Registered: February 27, 2007Reply With QuoteEdit or Delete MessageReport This Post
Honorary 'Aussie' Mechanic
Picture of postyr
Posted Hide Post
Like Larry, I also get an error, but it is with the javascript. The error says “Invalid Argument, watch_popup, line 46”. However, line 46 reads
“_gel('watch-player-div').style.height = percentHeight;
so I’m not sure where the error lays.

As for the iFrame, simply paste the required html code into a new code object on a new page, then use that page as the source for the iFrame.
 
Posts: 1159 | Location: Australia | Registered: April 17, 2007Reply With QuoteEdit or Delete MessageReport This Post
Honorary 'Creative' Mechanic
Picture of Klimt
Posted Hide Post
Have you tried something like this script?
 
Posts: 1743 | Location: Vienna, Austria | Registered: July 17, 2006Reply With QuoteEdit or Delete MessageReport This Post
Guru 'Geezer' Mechanic
Picture of larryd
Posted Hide Post
Using an i-frame - I just pasted the link into the Filepath field. The link is just an HTML page just like any other HTML page you would link into an i-frame.
 
Posts: 5125 | Registered: December 03, 2006Reply With QuoteEdit or Delete MessageReport This Post
Honorary Mechanic
Posted Hide Post
.

I'm not shure if you understand it
so i explain it again:

I have a so called "user-page" @ Youtube
this is a prefabricated page by Youtube.

There is nothing i can change to that page
because it's not me who makes that page,
there is no option for that.

But there's a few fields where you can add
a link (URL)to something...but it has to be
going to the Youtube-domain.

I can NOT add scripts,html,frames...etc

So i can not add a frame either.

Yes ofcourse i could make a frame on my
own website (outside of youtube)
but that is not what i want to do
and it would be pointless cause i cant link to
it from youtube anyway.


All i could try is to add some parameters..instructions...whatever to the only
thing that is allowed which is the link as mentioned at the top of this thread.

Yes i do understand that a frame would work
because that 100% would be limited to the size of that frame.
if i would show the result of mentioned link inside such a frame.

But the point is i have no frame @ youtube
and i cant make one @ youtube either.
i cant link to a frame somwhere else.

Look here:

http://www.youtube.com/user/djmambito

that is my youtube-page
it is all generated by youtube
all i can do is upload some videos
and set some colors/styles and even upload a background picture.

When you scroll down you will see on the
LEFT-side:

**** TIP OF THE WEEK ****test***
http://www.youtube.com/watc...
****************************

That is the link i'm talking about
it is part of the text that they allow you to enter there
i can not put any code or scripts in there.
Now if you click on that link it will open
a page that is also generated by Youtube
and it's size is kind of unspecified (allthough in its source it says 100%)
since it seems to depend on whatever your browser decides
(maybe it uses some previous used sizes)

I want to add something to that link (which is all i'm allowed to do)
that will open that page in e predefined size.

Once again i can not generate a frame at youtube...youtube dont
have fully user-configurable pages.

I just figured (since i have seen js/html inside links)
that i could add something to that link that would do what i want.

This is for those that visit this Youtube page
not for visitors of my own (other) website where i could ofcourse do what i want.


Wink
 
Posts: 1053 | Registered: February 27, 2007Reply With QuoteEdit or Delete MessageReport This Post
Guru 'Geezer' Mechanic
Picture of larryd
Posted Hide Post
quote:
I just figured (since i have seen js/html inside links)
that i could add something to that link that would do what i want.
The only way I know of to embed javascript inside a link is to directly execute javascript code via a type of code like:
href="javascript:void(some javascript code here)" 
I suppose you execute a window.open() function which would allow you to set the window size.
 
Posts: 5125 | Registered: December 03, 2006Reply With QuoteEdit or Delete MessageReport This Post
Honorary Mechanic
Picture of Geek-u-like (Andrew)
Posted Hide Post
I think I get this one. As I see it there are two issues. (I could be way off)

1. Creating a popup and controlling its behaviour
2. Making Youtube provide the content for this popup in the way that you want.

This needs to start with your Youtube video, not in the popup page you provided the link for however. You can tailor the player as you wish (almost)
In the Youtube page, next to the embed code strip, there is a little cog icon, this enables you to customise the embed code for the player.

Say for example you wanted it set to 480x385 px, with no related videos, well select those options.

Then, in SS use what Klimt suggested and open a javascript popup wondow of the appopriate dimensions (you control) and then create a target page that contains the embed code for the Youtube video that you want played.

Have I understood this correctly?
(I'm sorry if I didn't)
 
Posts: 127 | Location: Elworth, Sandbach, Cheshire, England | Registered: October 20, 2006Reply With QuoteEdit or Delete MessageReport This Post
Honorary 'Aussie' Mechanic
Picture of postyr
Posted Hide Post
Andrew, your solution would be perfect, but I don’t think you quite understood Radio’s dilemma.

He cannot change any part of the Youtube page other than the link itself. Nor can he create an SS page to control the pop-up page, but I have combined both Larry’s and Roma’s ideas to hopefully create a solution.


Radio, the only way you can control the pop-up’s size is by code. However, as Larry suggested, you may be able to hide that code in the actual link.

By saying that you are allowed to edit the link, I am hoping this means anything between the opening and closing anchor tags, <A>your link stuff here</A>

If this is the case, your present code for the link reads as

<a href="http://www.youtube.com/watch_popup?v=X15xenTcUNI" target="_blank" title="http://www.youtube.com/watch_popup?v=X15xenTcUNI" rel="nofollow" dir="ltr">http://www.youtube.com/watc...</a>


Try changing that to

<a href="javascrpt:void(0); " onClick="javascript:window.open('http://www.youtube.com/watch_popup?v=X15xenTcUNI','','width=300,height=250'); return false;" title="http://www.youtube.com/watch_popup?v=X15xenTcUNI" rel="nofollow" dir="ltr">http://www.youtube.com/watc...</a>


I have tested the above code in a simple page using your Youtube pop-up video, which you can view here and it works fine.

The only things you need to change are the width and height values. I used your earlier suggestion of 300 wide and 250 high, but that is a bit small (or maybe that’s what you wanted).

The “return false” is important, because if you don’t include it, you will lose focus of the original page that holds the link.

If you really wanted to, you add to the above code and also set the pop-up to appear X amount of pixels from both top and/or left of the user’s screen.

Terry
 
Posts: 1159 | Location: Australia | Registered: April 17, 2007Reply With QuoteEdit or Delete MessageReport This Post
Guru 'Geezer' Mechanic
Picture of larryd
Posted Hide Post
postyr,

FYI, the purpose of the javascript void() function is to return a false or null value, so you do not need to resort to the onclick and return false method. This code works equally well and saves you some typing:
<a href="javascript:void(window.open('http://www.youtube.com/watch_popup?v=X15xenTcUNI','','width=300,height=250'))"
title="http://www.youtube.com/watch_popup?v=X15xenTcUNI" rel="nofollow"
dir="ltr">http://www.youtube.com/watc...</a>
 
Posts: 5125 | Registered: December 03, 2006Reply With QuoteEdit or Delete MessageReport This Post
Honorary 'Aussie' Mechanic
Picture of postyr
Posted Hide Post
Thanks Larry for your ever gifted insight. If you read my last post, I gave you credit first for the idea.

I did try your suggestion initially, but couldn’t quite get it to work, so went along with the “onClick” method.

I hope Radio accepts and can use your (and my) input.
 
Posts: 1159 | Location: Australia | Registered: April 17, 2007Reply With QuoteEdit or Delete MessageReport This Post
Honorary Mechanic
Picture of Geek-u-like (Andrew)
Posted Hide Post
Hi Terry

I really must have somebody elses head on today as I just did a search on the main youtube site for 'Agente Formiga' and found the same video here:

http://www.youtube.com/watch?v=X15xenTcUNI

I know its the same video as its got the same locator code at the end but with a 'watch' rather than a 'popup' variable.

All the controls are there on the page (behind the cog), no irritating uncontrollable popup.

So I really don't see what I'm not getting.

btw. I'm not trying to deminish your's and Larry's excellent solution however.
 
Posts: 127 | Location: Elworth, Sandbach, Cheshire, England | Registered: October 20, 2006Reply With QuoteEdit or Delete MessageReport This Post
Honorary Mechanic
Posted Hide Post
It's late so i tried very quickly
and it wont work...as far as i can see quickly.

< a ref....
at the beginning is obviously not allowed

Its like this...you can add a description of your page at youtube
its a field were you can enter plain text...you can also ad links
provided the are within the Youtube domain...such a link is part
of the text...there's no special link-input field...obviously
they recognize a link and highlight it.

So they want a real link that starts with: http//www.... i suppose
or at least something that you would also be able to put in your own browser's adress-bar
maybe that is a good idea...if it works from your adress-bar then it will work at youtube ?

I try more tomorrow..thanks so far Wink
 
Posts: 1053 | Registered: February 27, 2007Reply With QuoteEdit or Delete MessageReport This Post
Honorary Mechanic
Posted Hide Post
.

Let me explain a little more...go here:

http://www.youtube.com/watch?v=FadzTIxXZfY

on top close to the video area (right-side) there's two grey/white buttons:

one like this [<--->] and one like this [ / ]

they turn red on mouse over

when you press the [ / ] button it will pop-up a new player (on a small page)
it always comes out at the same size...but you can drag it to a different size
..that is what i try to achieve from a simple link. (dragging/resizing not important)

So i tried to find the link that is in that button...but its not that easy
you can find the code that takes care of that,when you check
the page's source code...here's that part:

  
<div id="player-open-popup" class="reverse-tooltip-wrapper">
				<button id="watch-longform-popup" class="master-sprite" onclick="yt.www.watch.player.openPopup('FadzTIxXZfY', 640, 360); this.blur(); return false;" onmouseover="yt.www.core.toggleSimpleTooltip(this, true)" onmouseout="yt.www.core.toggleSimpleTooltip(this, false)"></button>
				<div class="reverse-tooltip-wrapper-box hid"><div class="reverse-tooltip-box">Watch this video in a new window</div><img class="reverse-tooltip-box-bot" src="http://s.ytimg.com/yt/img/pixel-vfl73.gif"></div>
			</div>



That 'FadzTIxXZfY' is the video-id dont worry about that

Nice piece of hacking that would be...a cake for who solves it:




.



Radio
 
Posts: 1053 | Registered: February 27, 2007Reply With QuoteEdit or Delete MessageReport This Post
Guru 'Geezer' Mechanic
Picture of larryd
Posted Hide Post
If I understand you correctly, you want to change the way the YouTube template generates a page. Using the pop-up button on the youtube page executes code on the youtube page which is a window.open() command.

The code Terry gave you will work, but the problem is you do not have a way to embed that code into the youtube template. I do not have a youtube account, so I have no idea how you even created the page, much less having a clue if the youtube page can even be modified. Perhaps a query on a youtube forum would be more advantageous to you.
 
Posts: 5125 | Registered: December 03, 2006Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community Page 1 2  
 


™ & © 1998 - 2008, Virtual Mechanics Inc. All rights reserved.