I saw this thread Embed Youtube subscribe counter? and I am wondering where does this button come from ?
I asked it on that thread but I don't think anyone noticed that
I tried some code for myself but this gives a js error Uncaught Error: Bad hint
<iframe data-gapiattached="true" frameborder="0" scrolling="no"
src="http://www.youtube.com/subscribe_embed?bsv&usegapi=1&channel=HERE CHANNELNAME"
style="overflow: hidden; height: 24px; width: 170px; border: 0;">
</iframe>
It looks like a plusone.js button but nothing to find.
Hope someone can shine some light on this youtube channel subscribe button :-)
only change this - channel=HERE CHANNELNAME
UPDATE:
Above is not the right embed code. It is a part of the plusone.js code from google
The right embed code is:
<div class="g-ytsubscribe" data-channel="CHANNELNAME"></div>
<script src="https://apis.google.com/js/plusone.js"></script>
This works but still no documentation found so if anyone knows where to find the official code please let me know
Related
I have published a Google Sheet and have modified the iframe embedded on my website to show a certain range of cells only. I am pretty sure the modification has been done correctly, yet when the iframe is embedded, I am getting the error seen in the screenshot Google Sheet. The iframe used is the following:
<iframe src="https://docs.google.com/spreadsheets/d/e/xxxxx-1vTvQphG_8AomL4TacudrbUYMRlWuL_nITRnPMBeVEOz8bJ6y-3DXFdCqmZ7io9wgyvi6eEBl7Dju2qT/pubhtml?gid=1922308330$amp;widget=true&headers=true&chrome=false&range=A1:B1" style="border:1px solid gray;" width="500" height="600"></iframe>
What am I doing wrong?
There is $ between gid and amp in the link, it should be &
Change your code from:
<iframe src="https://docs.google.com/spreadsheets/d/e/xxxxx-1vTvQphG_8AomL4TacudrbUYMRlWuL_nITRnPMBeVEOz8bJ6y-3DXFdCqmZ7io9wgyvi6eEBl7Dju2qT/pubhtml?gid=1922308330$amp;widget=true&headers=true&chrome=false&range=A1:B1" style="border:1px solid gray;" width="500" height="600"></iframe>
To:
<iframe src="https://docs.google.com/spreadsheets/d/e/xxxxx-1vTvQphG_8AomL4TacudrbUYMRlWuL_nITRnPMBeVEOz8bJ6y-3DXFdCqmZ7io9wgyvi6eEBl7Dju2qT/pubhtml?gid=1922308330&widget=true&headers=true&chrome=false&range=A1:B1" style="border:1px solid gray;" width="500" height="600"></iframe>
Reference:
What is & used for
Am using code provided by Google Developers to add Youtube button to website. When button is activated and the link to Youtube is made, I get a message on Youtube that "The channel does not exist."
See following code:
<script src="https://apis.google.com/js/platform.js"></script>
<div class="g-ytsubscribe" data-channelid="UC73r_CJEG-2kH6VY1lW7gIQ" data-
layout="default" data-count="hidden"></div>
Have also tried i frame api:
<iframe data-gapiattached="true" frameborder="0" scrolling="no" height="25px"
width="174px" style="padding-right: 10px"
src="http://www.youtube.com/subscribe_embed?bsv&usegapi=1&channel=UC73r_CJEG-
2kH6VY1lW7gIQ">
</iframe></h6>
<div align="center">
<script src="https://apis.google.com/js/platform.js"></script>`
With i frame api, web page shows Youtube icon with an exclamation point and the word "Error".
Am using Dreamweaver CS5 and Safari.
If i understood the code, you want generate a suscriber button.
you can see this doc:
https://developers.google.com/youtube/youtube_subscribe_button?hl=nl
This code Work for me.
<script src="https://apis.google.com/js/platform.js"></script>
<div class="g-ytsubscribe" data-channelid="UC73r_CJEG-2kH6VY1lW7gIQ" data-layout="default" data-count="default"></div>
http://jsfiddle.net/carlosrojas_o/9LLzjd7h/
I have a website with an iFrame on it that loads fine when I am on a desktop browser, but not on iOS (I haven't tried any other mobile OS's). The code I used for the iFrame is
<div data-role="content">
<iframe src="http://hungrcraft.co.nf/" width="100%" height="100%" frameborder="0" scrolling="auto" style="position: absolute;top: 0;left: 0" seamless>
</iframe>
</div>
along with
body, html
{
margin: 0; padding: 0; overflow: hidden;
}
#content
{
position:absolute; left: 0; right: 0; bottom: 0; top: 0;
}
in a css/text style tag.
As I said earlier, this loads on desktop web browsers, and in IE11 emulations, but not on iOS (tested 3.1.3-7.0.4). Is there something I did wrong? Is this a bug with iFrames? HTML? HTML5? Something else?
Try embedding the iFrame, it's a push but it may work.
<embed src="http://hungrcraft.co.nf/"</embed>
P.S I have tried on my iTouch 5, it's loading fine for me.
EDIT: Looks like you have a redirect loop. On hungrcraft.co.nf/mobile#page5 you have an iframe for hungrcraft.co.nf. However, it appears that hungrcraft.co.nf detects if you are on a mobile device which redirects the iframe to http://hungrcraft.co.nf/mobile/?url=http%3A%2F%2Fhungrcraft.co.nf%2F displaying your mobile page in the iframe that was supposed to show your homepage.
Original Post:
What device are you using? That site you linked pulls up fine in my iPhone 5 with iOS 7.0.4.
I'm developing a blog app, and using windows live writer 2011 to embed a YouTube video is pretty straight forward, but I've encounter a strange issue. Here is what I did,
I copy a link from the YouTube site, for example, http://www.youtube.com/watch?v=3Kk-yZ7VpeA
From WLW I insert video From the web and paste the link in it
WLW shows the video without any problems
I view Source in WLW, it gives the following html <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:bb7a51da-b141-42e1-9e93-72967dd2f73d" class="wlWriterEditableSmartContent"><embed src="http://www.youtube.com/v/3Kk-yZ7VpeA?hd=1" type="application/x-shockwave-flash" wmode="transparent" width="448" height="252"></embed></div>
All these are working fine with preview and everything, but when I publish it, it shows up a black squaure of image instead of the video on my site. Moreover, the html WLW sent to the server is the following: <div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:bb7a51da-b141-42e1-9e93-72967dd2f73d" class="wlWriterEditableSmartContent"><div id="7bd0cee8-cce8-4b10-8833-6e30cefafd64" style="margin:0px;padding:0px;display:inline;"><div><img src="http://127.0.0.1:10000/devstoreaccount1/ray/blog/image/2011/05/videob8758375cccf.jpg" style="border-style:none;" alt="" /></div></div></div>
Note the "embed" tag was no longer there and an "img" was instead created. I don't really know why WLW sent what it sent and how to fix this issue, could someone help point out please.
Thank you so much!
I got it figured out. I added
<supportsEmbeds>Yes</supportsEmbeds>
to wlwmanifest.xml file. Without this line, WLW shows the blog capabilities for "Embeds" as "Unknown" and it messes with the embed tag.
I've been trying to get modal windows working on a new site for some time now. I first tried jqmodal and had no issues displaying the modals, but the close buttons never worked - or at least they worked on some pages but not on others. I put a great deal of effort into debugging and couldn't find the issue.
I recently tried out greybox to see if I had better luck, but ran into a very similar issue. The close button at the top-right works fine, but I can't make a button within the modal that acts as a close. I've tried:
onclick="parent.parent.GB_hide();"
and similar variants but they just load whatever href is set to within the modal. However, if I do:
onclick="top.window.location.href='www.google.com'; parent.parent.GB_hide();"
this will close the modal and open Google, as intended. What I can't figure out is why I can't make a button that will just plain close it.
I feel like I'm missing something pretty fundamental since I keep running into similar issues. Incidentally the site is written in ASP.NET MVC with jquery and I'm primarily testing on Firefox right now.
I also realize this question is a bit vague, so I appreciate any thoughts and can supply more info if requested. Thanks in advance!
Edit: I still have no idea how to proceed. Nick's ideas were well taken but I see no Javascript errors on the page with either Firebug or Venkman. As far as I can tell the window should be closing.
Why would the second 'onclick' event above work, but not the second?
If I read your issue right, you simply are having problems closing the modal dialog.
I just put together an example using jqModal:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="Scripts/jquery-1.3.2.js" type="text/javascript"></script>
<script src="Scripts/tmp/jqModal.js" type="text/javascript"></script>
<style type="text/css">
.jqmWindow
{
display: none;
position: fixed;
top: 17%;
left: 50%;
margin-left: -300px;
width: 600px;
background-color: #EEE;
color: #333;
border: 1px solid black;
padding: 12px;
}
.jqmOverlay
{
background-color: #000;
}
.jqmWindow
{
position: absolute;
}
</style>
<script type="text/javascript">
$().ready(function() {
$('#dialog').jqm();
$('#jqmOpen').click(function() {
$('#dialog').jqmShow();
return false;
});
});
</script>
</head>
<body>
Open
<div class="jqmWindow" id="dialog">
Close
<input type="button" class="jqmClose" value="Close" id="jqmCloseBtn" name="jqmCloseBtn" />
Some text in the modal dialog
</div>
</body>
</html>
I have put both a hyperlink and a button just for example. It appears that jqModal needs/looks for the class to attach the close trigger.
EDIT:
I just tried your exact code from above and I didn't get a JavaScript error but also nothing happened, which is to be expected as my code does not know what GB_hide() is. So this got me thinking.
Is the button your clicking on like:
<input type="button" value="Close" id="Button1" name="Button1" onclick="parent.parent.GB_hide();" />
If so what is parent.parent.GB_hide()? Could GB_hide() be a function your are not implementing on this page.
Firebug shows me that parent.parent is the Window, so after putting:
<script type="text/javascript">
function GB_hide() {
alert('Close');
}
</script>
on the page I now get an alert displayed.
rather then using google give page url where you want to redirect
OnClientClick="top.window.location.href='http://localhost/yourpagename.aspx'; parent.parent.GB_hide();"
is the code to close and redirect jquery grey box on button click.