Thread: Google Plus 1

Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30
  1. #21
    Join Date
    May 2010
    Location
    WA State
    Posts
    1,678
    Plugin Contributions
    3

    Default Re: Google Plus 1

    Quote Originally Posted by Serious View Post
    So where in the html_header.php do I add the required script?
    It would be in includes/templates/template_default/common/ After you edit it, you want to place it in includes/templates/your_template/common/

  2. #22
    Join Date
    Feb 2011
    Posts
    665
    Plugin Contributions
    0

    Default Re: Google Plus 1

    Let me rephrase....

    I want to add the applicable script in the file named html_ header.php. I can get the the script from google, I'm just not sure on which line to put it.

    Make sense?

  3. #23
    Join Date
    Feb 2011
    Posts
    665
    Plugin Contributions
    0

    Default Re: Google Plus 1

    Anyone?

  4. #24
    Join Date
    May 2010
    Location
    WA State
    Posts
    1,678
    Plugin Contributions
    3

    Default Re: Google Plus 1

    If you're talking about the script itself, not the button code, it doesn't go in html_header.php. It goes in tpl_main_page.php right before the closing </body> tag.

  5. #25
    Join Date
    Feb 2011
    Posts
    665
    Plugin Contributions
    0

    Default Re: Google Plus 1

    This is what I'm talking about:
    <!-- Place this tag where you want the +1 button to render -->
    <g: plusone annotation="inline"></g: plusone>

    <!-- Place this render call where appropriate -->
    <script type="text/javascript">
    (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
    })();
    </script>

  6. #26
    Join Date
    May 2010
    Location
    WA State
    Posts
    1,678
    Plugin Contributions
    3

    Default Re: Google Plus 1

    Those are two different parts. The second part is the script and goes in tpl_main_page.php right before the closing </body> tag. The first part is the button code and goes where you would like it positioned on the page. If you want it at the top it would go in tpl_header.php, if you want it at the bottom it would go in tpl_footer.php.

  7. #27
    Join Date
    Feb 2011
    Posts
    665
    Plugin Contributions
    0

    Default Re: Google Plus 1

    Okay, but I'm still a little unclear as to exactly where in the tpl_header.php or tpl_footer.php the script should go.

    Line 1?
    line 15?
    line 4276362489?


    I'm so confused!!!!!!

  8. #28
    Join Date
    May 2010
    Location
    WA State
    Posts
    1,678
    Plugin Contributions
    3

    Default Re: Google Plus 1

    Quote Originally Posted by Serious View Post
    Okay, but I'm still a little unclear as to exactly where in the tpl_header.php or tpl_footer.php the script should go.

    Line 1?
    line 15?
    line 4276362489?


    I'm so confused!!!!!!
    The script does NOT go in either of those files, the button code does.

    It would go where you'd like it to appear on the page. In other words, the position relative to the other elements on the page. Look at what's on your page, find the code in the file that generates the element and place the button code in the same vicinity. For example, I have the button at the bottom so it is placed like this in my tpl_footer.php:

    <div id="siteinfoLegal" class="legalCopyright"><?php echo FOOTER_TEXT_BODY; ?></div> <br />
    <!--eof- site copyright display -->
    <br />
    <glusone></glusone>

  9. #29
    Join Date
    Feb 2011
    Posts
    665
    Plugin Contributions
    0

    Default Re: Google Plus 1

    FAWESOME!!

    Finally got it to work.
    Going to have to paly with the placement though, but at least it works!

    RescoCCC...THANKS!!!!

  10. #30
    Join Date
    May 2010
    Location
    WA State
    Posts
    1,678
    Plugin Contributions
    3

    Default Re: Google Plus 1

    Excellent. Glad you got it working.

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Google Plus One Button from Numinix and Schema.org itemprops
    By phil99 in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 28 Feb 2013, 04:35 PM
  2. v150 Facebook google plus twitter
    By oitem in forum General Questions
    Replies: 0
    Last Post: 4 Jun 2012, 06:56 PM
  3. Replies: 0
    Last Post: 22 Dec 2011, 12:59 AM
  4. Same Line - google plus - ask q - share
    By dmagic in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 7 Aug 2011, 07:03 PM

Posting Permissions

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