Embed Youtube subscribe counter? - youtube-api

How can i have the subscribe counter button like this site (http://atomsforpeace.info/) on the right on the top?

This is not the right embed code. It should be
<div class="g-ytsubscribe" data-channel="CHANNELNAME"></div>
<script src="https://apis.google.com/js/plusone.js"></script>
Read more here iframe www.youtube.com/subscribe_embed? google plus

Viewing the source of their page gives you the code they've used:
<iframe frameborder="0" hspace="0" marginheight="0" marginwidth="0" scrolling="no" style="position: static; top: 0px; width: 147px; margin: 0px; left: 0px; visibility: visible; height: 24px;" tabindex="0" vspace="0" width="100%" src="https://www.youtube.com/subscribe_embed?bsv&usegapi=1&channel=[YOUR CHANNEL NAME HERE]&theme=dark&hl=en-US&origin=http%3A%2F%2F[YOUR HOSTNAME HERE]&ic=1&jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.en.Hm9QrP5wPuw.O%2Fm%3D__features__%2Fam%3DEQ%2Frt%3Dj%2Fd%3D1%2Frs%3DAItRSTOJmMfO7AjAhJbN5yM-BshnzKg53Q#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled%2Conload&id=I0_1371683853533&parent=http%3A%2F%2F[YOUR HOSTNAME HERE]&rpctoken=33681162" data-gapiattached="true"></iframe>
(make sure you substitute for the [YOUR CHANNEL NAME HERE] and [YOUR HOST NAME HERE] blocks)

Related

Iframe display issues on iOS iPhones

I am experiencing a weird issue with iframes displayng on some phones and not displaying on some phones.
(Displays on all androids)
(Does not work on iphone 6,7 but works on 7 plus and the 7S and a few other iphones)
<div class="col-lg-6 col-md-6">
<iframe src='http://app.brandyourcar.com/signup/index/form-main-display-group-thingy' style='border: 0;' width='100%' height='770px' scrolling='no'></iframe>
</div>enter code here
I have tried a lot of the solutions on Stack and none seem to work for me.
few examples :1.) <div id="scroller" style="height: 400px; width: 100%; overflow: auto;">
<iframe height="100%" id="iframe" scrolling="no" width="100%" id="iframe" src="url" />
</div>
2.) <div id="scroller" style="height: 400px; width: 100%; overflow: auto;">
<iframe height="100%" id="iframe" scrolling="no" width="100%" id="iframe" src="data/testdocument.pdf" />
</div>
and many other Java script solutions.
This happens because the latest versions of safari have a new security feature called "prevent cross site tracking" enabled by default that doesn't allow the third party cookies. The user can disable this, but I'm trying to find a workaround to avoid the user intervention. For now, you can detect if the third party cookies are allowed and if not you can display an alert message saying how to disable this feature.
I hope it helps.

WordPress Widget Area Links Only Work From Home Page

WordPress Widget Area Links Only Work From Home Page
Below is the code in wootique theme footer 1 widget area. The links works fine from the home page but when any of the links is click again from the page that it landed on the homepage url is repeated in the url section of the page and it says page not found. This happens when you click any of the links.
Here is the code that I placed in the widget footer 1 area:
<div id="parent-footer">
<div id="first">Product Gallery</div>
<div id="second">Blog</div>
<a href ="XXXXXXXXXX.com/returns/"> <div id="third">Return Policy</div>
</div></a>
<style>
#parent-footer {
width: 200%;
white-space: nowrap;
}
#parent-footer div{
display: inline-block;
width: 33.3%;
color: #5BB191;
margin-left: 105px;
padding: -60px;
}
#first{
margin-right: 20px;
}
</style>
if the url is repeated like www.xxx.com/something/www.xxx.com/something the problem could be that it is interpreting the url as relative. Add http:// (or https if you are running on a secure link) to the url.

icheck-rails gem for Rails4

I am running with an Issue while integrating this gem, In THIS url there is a section that says:
iCheck includes several skins, most of them with multiple color schemes. Include them like this:
#import 'icheck/square/blue'
#import 'icheck/square/green'
I tried to add above line in end of app/assets/stylesheets/application.css but the style are not effecting. Behind the scene Javascript is working fine and it rendering below given HTML:
<div class="icheckbox_square-blue" style="position: relative;">
<input type="checkbox" data-color="blue" data-skin="square" class="icheck-me" style="position: absolute; opacity: 0;">
<ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: none repeat scroll 0% 0% rgb(255, 255, 255); border: 0px none; opacity: 0;"></ins>
</div>
To make iCheck gem work in Rails 4 follow every thing that's mentioned in THIS URL but do the below changes that I did to run it successfully:
Don't import in your stylesheet the way iCheck Gem doc say:
#import 'icheck/square/blue'
#import 'icheck/square/green'
In your application.css - add it this way:
*= require icheck/square/blue
*= require icheck/square/green

Firebug shows incorrect (possibly hijacked) link CouponDropDown

This is the first time I saw this... I have text in my code and it says Passport and Visa Requirements. This is my markup
<div class="rectangle"><span>Passport and Visa Requirements</span></div>
Crazy thing happens on the live server, somehow a link is injected on the word "visa". This is the markup I see in firebug.
<div class="rectangle">
<span>
Passport and
<a id="_GPLITA_0" title="Click to Continue > by CouponDropDown" style="text-decoration:underline" href="http://i.txtsrving.info/click?v=" in_rurl="http://i.txtsrving.info/click?v=" in_hdr="">
Visa
<img src="http://cdncache1-a.akamaihd.net/items/it/img/arrow-10x10.png" style="display: inline; vertical-align: super; margin: 0px 0px 0px 3px; padding: 0px; border: 0px none; height: 10px;">
</a>
Requirements
</span>
</div>
Is my htaccess file not configured properly? How do I deal with this? Is this a security issue?
http://www.bleepingcomputer.com/virus-removal/remove-coupondropdown
This is probably adware on your computer, affecting your browser. Your website is probably fine.

Popup message window in grails?

I have a Grails application with a form in it. Once the user has entered the data and submitted it, and it's been validated etc.. I need a message to popup in a little window to give the user some feedback - it needs to popup, rather than be displayed on the page. Can anyone advise me on the best way to do this?
I have implemented the same mechanism for my application, and I am using the jQuery plugin 'smartmodal' (used by the Nimble plugin originally). See here
You simply have to redirect the request in the controller validation code to a GSP page containing the following code:
<script type="text/javascript" src="${resource(file: 'jquery-1.3.2.js')}"></script>
<script type="text/javascript" src="${resource(file:'jquery.smartmodal.js')}"></script>
<LINK rel="stylesheet" href="./css/smartmodal.css">
...
<body>
...
<g:javascript>
$(function() {
$("#msg").hide();
$("#msg").modal({hide_on_overlay_click:false});
$("#msg").modal_show();});
</g:javascript>
<div id="msg">
My feedback message is here
</div>
<g:link controller="..." action="...">Close</g:link>
I hope it helps,
Fabien
EDIT:
An extract of the smartmodal.css file that will render the 'modal effect' is:
#modal_content {
display: none;
position: fixed;
left: 50%;
padding: 0px;
top: 10%;
background: #FFF;
border: 0px solid #d2d2d2;
width: 400px;
margin-left: -200px;
text-align: left;
}
#modal_overlay {
background-color: #000;
}
However if you want the complete file, it is available inside the great Nimble grails plugin

Resources