Google+ : Multiple +1 on same page, different content - google-plus

I've tried to find an answer to this (both in the dev docs and here), but with no luck.
The "+1 button" works fine on normal pages (where there's just the single +1). But I have a page with multiple entities (to use the terms of Drupal: A View displaying multiple nodes) where I'd like to add "share buttons". So far I've added Twitter and Facebook.
Twitter is the simplest as it just takes the string you give it..
Facebook takes an url, but you can specify your own url.
When I try to specify my own url for +1 I get this Error:
Unsafe JavaScript attempt to access frame with URL http://one80.seasites.se/whats-up from frame with URL https://plusone.google.com/_/+1/hover?hl=sv&url=http%3A%2F%2Fone80.seasites.se%2Fwhats-up%2Fl%25C3%25B6rdag&t=1342724634133&source=widget&isSet=false&referer=http%3A%2F%2Fone80.seasites.se%2Fwhats-up&jsh=m%3B%2F_%2Fapps-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3Dr4LFRxx-_oY.sv.%2Fsv%3D1%2Fam%3D!ZCfx2q5v6YmYvWjcTQ%2Fd%3D1%2Frs%3DAItRSTNI50TT3SY8R9klRLc_1sBJ5_Rp3g#id=I3_1342724634541&parent=http%3A%2F%2Fone80.seasites.se&rpctoken=619983104&_methods=mouseEvent%2CtrackingEvent%2ConVisibilityChanged%2C_onopen%2C_ready%2C_onclose%2CcloseOrHideThisBubble%2C_close%2C_open%2C_resizeMe%2C_renderstart. Domains, protocols and ports must match.
rs=AItRSTOQ10u7fGwgD-LqzsOa-fsgdlhDCg:173
ec.a.v rs=AItRSTOQ10u7fGwgD-LqzsOa-fsgdlhDCg:173
xh rs=AItRSTOQ10u7fGwgD-LqzsOa-fsgdlhDCg:203
q.get rs=AItRSTOQ10u7fGwgD-LqzsOa-fsgdlhDCg:211
ec.w rs=AItRSTOQ10u7fGwgD-LqzsOa-fsgdlhDCg:173
Rh rs=AItRSTOQ10u7fGwgD-LqzsOa-fsgdlhDCg:208
q.w rs=AItRSTOQ10u7fGwgD-LqzsOa-fsgdlhDCg:220
Rb rs=AItRSTOQ10u7fGwgD-LqzsOa-fsgdlhDCg:30
Xg rs=AItRSTOQ10u7fGwgD-LqzsOa-fsgdlhDCg:187
(anonymous function) rs=AItRSTOQ10u7fGwgD-LqzsOa-fsgdlhDCg:226
To explain why I want to use separate URL:
every node is something like an event, every node has it's own url (which contains an image and text/info). So when you click Like (for FB) it gets the title, info & image and includes it in the post (So it says "What's up - Gathering", instead of a generic "What's up" and no/the same image).
I'd like to accomplish the same with G+.
Is there a way to accomplish this for G+?? Have I missed something??
I guess one way to do this is by using an iframe for each of the nodes and pull in a special version of the "node page" with just the g+-button. But that's a pretty nasty hack (and not that fun to set up).
Any ideas are welcome!

The error you're seeing is actually due to an issue in Chrome. The +1 button should automatically recover.
You can explicitly specify target pages by using the href attribute. Your markup will look like this in practice:
<g:plusone href="http://example.com/targeturl"></g:plusone>
Or like this with HTML5 syntax:
<div class="g-plusone" data-href="http://example.com/targeturl"></div>
If these don't work, can you share a link to a page where you're seeing it not work? I can take a look :)

Related

What is the working of Browser and Page in QTP/UFT?

I always get a doubt that:
What exactly is the difference between the working of Browser and Page.
I know it is a hierarchy and that stuff, but how does the tool differentiates the browser and page and what is use of having both of them.
For example, if I use descriptive programming, and type:
Browser("title:=Google").Page("title:=Google").something
irrespective of the Browser (which may be IE / Chrome / Firefox) it will use the browser with the title = Google. And same is for the page.
Please elaborate. I am confused.
There's an explanation of what Browser and Page are supposed to represent on HP's blog.
In short Page has no semantic meaning, it is just used in order to organize the object repository more cleanly (so that you don't get hundreds of objects under one Browser object). If you're using descriptive programming (as I see from your example) then the Page has no meaning (since every browser has only one Page) and having a description for the page adds nothing.
I would replace the line with:
Browser("title:=Google").Page("title:=.*").something
Or
Browser("title:=Google").Page("micclass:=Page").something

Drupal - Simple Edit can't find

Ok, I have been searching for days on how to fix the vimeo urls on this page: https://www.createjobsforusa.org
Basically, I just got an SSL certificate and I'd like to change http://{the vimeo url} vimeo linking videos to https://{the vimeo url} Simple edit is all I need, but I can't find where the videos are located.
Content Blocks? All I get are settings for this. Pages? So, I go to "Content" and I see a huge list of pages in there, I see a page called "Home", so I click on the Edit link and the body of the page is blank? Ok, so this has to be coming from someplace else, but where?
Can someone please help me with how to find the vimeo video URLs and change them to "https://" instead of "http://"
I think the View is called: A-Spots... here are pics of what I get when I click on the Edit A-Spot View:
What exactly am I supposed to do here? Seems like so much to do, but every option I seem to choose still doesn't give me the option to change the vimeo URLs.
A view just select nodes (or other entities) to show them. If you edit a view, you just change the way those nodes are selected or shown; you don't edit the nodes a view selects to show.
If you look at the preview of that view, you will notice it shows some numbers; those numbers are node IDs. Just edit the node from https://www.createjobsforusa.org/node/55291246/edit; replace 55291246 with the other IDs shown, and you will be able to edit all the nodes used from the view.
If that doesn't work, https://www.createjobsforusa.org/admin/content lists all the content in the site. Just look for the nodes whose ID is the one shown in that preview, and edit them.

WebKit losing parameters in URLs with skip links

We have some generated pages whose URLs contain parameters, like http://example.com/page.do?param1=hello. These pages contain named anchors inside, <a name="here">like this</a>. And there are corresponding links that reference the named anchors, like this. Most folks today call these "skip links".
Clicking a skip link should result in the browser creating and following a URL that matches the original one, with the named anchor tacked on at the end: http://example.com/page.do?param1=hello#here
On Firefox and IE, this works fine. On Chrome, Safari and other WebKit-based browsers, the parameters are lost, leading to http://example.com/page.do?#here which is invalid for our site, and just causes a 404 error.
Interestingly, if you manually put the full link in the location bar and press Enter, it behaves properly.
I've googled around a while and seen a lot of discussion about WebKit having problems with skip links, but none of them match the situation here where it's losing parameters.
Is this loss of parameters a known bug? Has anyone seen a workaround?
I encountered the same issue. From what I can say this is related to the usage of a meta tag like this: <base href="http://example.com" />. Once it is set my links point to example.com#foo instead of example.com?foo=bar#foo.
Knowing that I found this question. So the anchor tag behavior is a known thing:
Is it recommended to use the <base> html tag?
Since I can't remove the base tag I'll try to handle this with JavaScript.

Google+ +1 Button Snippet+ Problem

I have integrated the Google +1 button into a website ( http://www2.highpoint.edu ).
I tried to use schema.org <meta> tags to provide Name, Description, and Image for the +Snippets information, but it doesn't work.
When I use the +1 button and try to post to Google+ about the website, it picks an image that I don't want. And it won't pick the image I have set with the <meta> tag.
My questions:
How do I get the +Snippet data populated from schema.org metadata?
For a page with 2 or more +1 buttons, can I have different name/description/image for each +1 button? Or must every +1 button on the page use the same metadata?
EDIT
I think it is best to use Open Graph Protocol instead of schema.org. That is, schema.org shouldn't be used at all. Facebook supports Open Graph Protocol, so you can kill 2 birds with 1 stone this way.
More importantly, Facebook provides a great debugging tool that tells you what exactly is getting parsed for a given URL: http://developers.facebook.com/tools/debug
I am still not sure about having multiple +1 buttons on the same page with each +1 button having distinctly different meta data.
In response to question 1:
I checked your page. It looks like you have a normal meta title and description. This should work for the +1 button, but it may take some time for the +1 button to pick up the changes you've made.
If you'd like control of the image, though, you will need to use schema.org markup or open graph as described in the official FAQ: http://code.google.com/apis/+1button/#plus-snippet
And for question 2:
If you are using schema.org markup, the +1 button will read the content for the itemscope nearest the top of the page's source code.
It does not work for me either. I have both Schema.org and Open Graph in the web page (eg. http://r.mycrep.net/3Nkh/), Multiple validators (Facebook's and one other) read info correctly.
I guess that Google still does not support metadata for everybody :-(

Where can I read how to make web notifiers such as the StackExchange at the top left side of StackOverflow screen?

I'm not even sure what the name of that is to be able to make a search... but I would like to make those kind of things. Facebook has that too with the messages, notifications and friends requests. Thanks
I'm not sure if you expect anyone to give you a complete tutorial with source code included? :) You should probably do some digging around yourself, since a concrete answer on this could mean to write a few pages :)
How can you dig around?
Thé tool for a job like that is Firebug (IMO).
With bigger tasks like these it makes sense to try to split it up in smaller pieces.
Let's say you go for a widget like the user profile popup on SO.
you need some HTML to display in a popup: right click on any html element on the popup and click the 'inspect element' menu item. This brings you to the HTML tab in firebug. This allows you to figure out how the HTML is structured
you need some CSS to style that popup: when you're browsing the html structure, you might already have noticed that on the right side of it is the CSS that is applied to the active element
you might want to use some animation effects: for that you could use jquery. Have a look here to find out more on which effects are available and how they can be triggered. Fading is used in the profile popup on SO.
then you might ask yourself the question where SO get's that html structure from, right? To find out more about which server calls are made you can use the 'NET' tab in Firebug. (When you hover over your user name (only the first time?), then you should notice there's a call made to something like: http://stackoverflow.com/users/profile-link-stats?_=someLongNumberHere
In firebug you can then inspect the request and response. You should notice that the response is some HTML structure. This HTML structure is then inserted into the DOM.
Sooooo you can kinda glue it all together now:
the user hovers over his user name
the hovering triggers a server call (see step 4): use jquery hover to attach a handler to the user link. (subsequent hovers don't trigger that server call, so there needs to be a check to see if that profile popup was already loaded or not)
when the server call successfully returns (see jquery get), the returned html is inserted into the DOM and a fadeIn effect is triggered.
it seems a mouseout is used to fadeOut the popup
I HOPE this is the answer you were looking for. It took me a while ;)
You probably need to check out stackapps