Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 15 of 15
  1. #1
    Regular Coder
    Join Date
    Jan 2011
    Posts
    302
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Google Plus Button

    I am having a problem on countyfairgrounds.net with the google plus badge. It apparently is not suppose to be placed in a section or division. - at least that is what the html validators say. So can someone tell me how to deal with this cause I cannot figure it out - I have read google's how to and I don't get it. Currently it is on the center of my page in the middle of my state pages. - um like on http://www.countyfairgrounds.net/colorado/colorado.php - center top

  • #2
    Regular Coder
    Join Date
    Mar 2013
    Posts
    262
    Thanks
    4
    Thanked 67 Times in 67 Posts
    https://developers.google.com/+/web/badge/

    Did you just copy/paste the code? It should be valid then. If not, try clicking on "Advanced options" and checking the "HTML5 valid syntax".
    My signature :)

  • #3
    Regular Coder
    Join Date
    Jan 2011
    Posts
    302
    Thanks
    7
    Thanked 0 Times in 0 Posts
    I am about ready to scream.
    Here is what the Yahoo validator is sending me, that I do not know how to fix

    Warning: Element name glus cannot be represented as XML 1.0.
    From line 389, column 1; to line 389, column 87
    </script>↩<glus href="https://plus.google.com/116862303206035368817" width="280" height="131"></gl
    Error: Element glus not allowed as child of element section in this context.
    (Suppressing further errors from this subtree.)


    From line 389, column 1; to line 389, column 87
    </script>↩<glus href="https://plus.google.com/116862303206035368817" width="280" height="131"></gl

  • #4
    Regular Coder patryk's Avatar
    Join Date
    Oct 2012
    Location
    /dev/couch
    Posts
    398
    Thanks
    2
    Thanked 64 Times in 64 Posts
    from where did you get your code?
    i never had problems with them....

    https://developers.google.com/+/web/+1button/
    https://developers.google.com/+/web/badge/

    and they won't validate, so don't worry about that. it's normal

    -------------------------------------------------------------------------------
    "Real Programmers can write assembly code in any language" - Larry Wall

  • #5
    Regular Coder
    Join Date
    Jan 2011
    Posts
    302
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Hi - I got my code at https://developers.google.com/+/web/+1button/ry

    same place...
    and as for it not validating. I really really want my pages to validate.
    I just did some rearranging
    try it on the oregon page

    http://www.countyfairgrounds.net/oregon/oregon.php - upper right above the google search box
    - it does validate for some reason.
    This is a love hate relationship with google. AND they make it hard for the normal person to understand. I do know some javascript and a little jquery - What I am really trying to do is have connect to my google plus countyfairgrounds page - so far NO luck and its not as if I have not been trying

  • #6
    Regular Coder
    Join Date
    Mar 2013
    Posts
    262
    Thanks
    4
    Thanked 67 Times in 67 Posts
    Well, that's the Google +1 button, not the badge.

    The badge on the colorado page is not using the HTML5 valid syntax version.

    https://developers.google.com/+/web/badge/

    Under advanced options, you have the HTML5 valid syntax option. If unchecked, you get this:

    Code:
    <g:plus href="https://plus.google.com/116862303206035368817" rel="publisher"></g:plus>
    Which is what you're using right now. Notice the
    Code:
    g:plus
    at the start. If you use the HTML5 valid syntax version, you get this:

    Code:
    <div class="g-plus" data-href="https://plus.google.com/116862303206035368817" data-rel="publisher"></div>
    Which is what you need to replace your code with.
    My signature :)

  • #7
    Regular Coder patryk's Avatar
    Join Date
    Oct 2012
    Location
    /dev/couch
    Posts
    398
    Thanks
    2
    Thanked 64 Times in 64 Posts
    ooookkkkk now i get it.
    it's html5 so you can't declare anything other than that in your document

    validate this : http://freedockstar.com/gplus.php (just whipped up)

    -------------------------------------------------------------------------------
    "Real Programmers can write assembly code in any language" - Larry Wall

  • #8
    Regular Coder
    Join Date
    Jan 2011
    Posts
    302
    Thanks
    7
    Thanked 0 Times in 0 Posts
    well we are making progress,
    try http://www.countyfairgrounds.net/pen...nnsylvania.php
    It now validates. - THERE is one major problem however, I cannot get from butting my division on the left side of it - moving it margin wise to the right seems to have no affect whatever. Can you help please?

  • #9
    Regular Coder
    Join Date
    Mar 2013
    Posts
    262
    Thanks
    4
    Thanked 67 Times in 67 Posts
    What Google does is basically find that div and replace it with a new div so that g-plus class no longer exists.

    What you can do is surround it with another class and apply your CSS to that. For example...

    Code:
    <div id="gplusparent">
    	<div class="g-plus" data-href="https://plus.google.com/116862303206035368817" data-rel="publisher"></div>
    </div>
    Then you can style it:

    Code:
    #gplusparent {
    	/* Add CSS */
    }
    My signature :)

  • #10
    Regular Coder
    Join Date
    Jan 2011
    Posts
    302
    Thanks
    7
    Thanked 0 Times in 0 Posts
    thank you ttkim - I did check the validation and it is okay in the validator. I suppose that as more people sign on - to google plus on the pennslyvania page I can move the division to the left side column.
    Do you know anything about the google publisher or author script tags that are suppose to go in the headers? Right now I have a author script tag but I "believe" I am suppose to have a publisher script tag.... I tried changing the word author to publisher and that did not work. Google does not make this easy for us.

  • #11
    Regular Coder
    Join Date
    Mar 2013
    Posts
    262
    Thanks
    4
    Thanked 67 Times in 67 Posts
    I think your tag is correct.

    Code:
    <link rel="author" href="https://plus.google.com/110452655751837512539" />
    From what I understand, you use publisher if you're linking to a G+ business page and author if you're linking to your Google+ profile. I'm not 100% certain on that though.

    What is the problem?
    My signature :)

  • #12
    Regular Coder
    Join Date
    Jan 2011
    Posts
    302
    Thanks
    7
    Thanked 0 Times in 0 Posts
    the problem is that I have the author thing on top of my pages
    and I believe I should have the publisher link thing on my pages.
    AND that PA page we linked google plus on goes to my profile and I really do not want the nation going to my profile but to this
    https://plus.google.com/u/0/b/116862...35368817/posts

  • #13
    Regular Coder
    Join Date
    Mar 2013
    Posts
    262
    Thanks
    4
    Thanked 67 Times in 67 Posts
    Code:
    <link rel="publisher" href="https://plus.google.com/u/0/116862303206035368817" />
    Have you tried that?
    My signature :)

  • #14
    Regular Coder
    Join Date
    Jan 2011
    Posts
    302
    Thanks
    7
    Thanked 0 Times in 0 Posts
    nice try

    Bad value publisher for attribute rel on element link: The string publisher is not a registered keyword or absolute URL.
    From line 14, column 1; to line 14, column 81
    Riedl" />↩<link rel="publisher" href="https://plus.google.com/u/0/116862303206035368817" />↩↩<!--
    Syntax of link type valid for <link>:
    A whitespace-separated list of link types listed as allowed on <link> in the HTML specification or listed as an allowed on <link> on the Microformats wiki without duplicate keywords in the list. You can register link types on the Microformats wiki yourself.

  • #15
    Regular Coder
    Join Date
    Mar 2013
    Posts
    262
    Thanks
    4
    Thanked 67 Times in 67 Posts
    Oh, I see what you mean. So it's not a Google error.

    http://www.w3.org/TR/html5/links.html#linkTypes

    That's a list of link types. According to that, the rel="publisher" is technically not a standard type. Google uses it, but it's not part of the w3c standard so the w3c validator will throw an error.
    My signature :)


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •