Jump to content


Photo
- - - - -

Google +1 button


  • Please log in to reply
19 replies to this topic

#1 nielspeenanusoncom

nielspeenanusoncom

    Member

  • Members
  • PipPip
  • 13 posts

Posted 04 July 2011 - 10:59 AM

Hi team, Please consider adding a +1 button to the next PlatformPro version. (In the same fashion as the Twitter, Facebook, etc. buttons.) More info: http://www.google.co...ters/ 1/button/ Thanks, Niels

#2 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 04 July 2011 - 11:04 AM

http://wordpress.org...ogle plus&sort=

#3 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 04 July 2011 - 11:46 AM

Actually, I took pity on you ;) Here is google +1 in 2 lines of code! Add it to base functions.php http://www.pastie.org/2162310

#4 nielspeenanusoncom

nielspeenanusoncom

    Member

  • Members
  • PipPip
  • 13 posts

Posted 04 July 2011 - 02:31 PM

+1 for your reply ;-) Thanks Simon!

#5 [Deleted User]

[Deleted User]

    Super Member

  • Members
  • PipPipPipPip
  • 183 posts

Posted 04 July 2011 - 02:45 PM

Thanks - but how to just add it to the header? Thanks again.

#6 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 04 July 2011 - 05:38 PM

Martin, almost the same..http://www.pastie.org/2163662

#7 [Deleted User]

[Deleted User]

    Super Member

  • Members
  • PipPipPipPip
  • 183 posts

Posted 05 July 2011 - 05:39 PM

Thanks Simon :)

#8 alainafrederick

alainafrederick

    Super Member

  • Members
  • 108 posts

Posted 11 July 2011 - 03:10 PM

I tried adding this code and I do not see the Goggle+1 button anywhere. Do I copy/paste all of the code into just Platform Base - functions.php?

#9 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 11 July 2011 - 03:11 PM

Yes add it to platformbase/functions.php, making sure platformbase theme is active.

#10 Kate

Kate

    Advocate

  • Members
  • 3039 posts

Posted 11 July 2011 - 03:12 PM

Hey Alaina, Yes, you would copy/paste it to your PlatformBase's functions.php file. Is your PlatformBase theme active? BTW: There is a plugin for this in the WP repository if you just want to add it after pages/posts ;)

#11 smbengine

smbengine

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 12 July 2011 - 10:02 PM

Simon, it works like a charm but how can i use your code but select the small or medium plus one box?

#12 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 12 July 2011 - 10:08 PM

Chris, I have no idea ;) Assuming that js file has some kind of args you can pass to it..find a site using the small button and look at the source of the page.

#13 [Deleted User]

[Deleted User]

    Super Member

  • Members
  • PipPipPipPip
  • 183 posts

Posted 13 July 2011 - 05:02 AM

Christopher have you had a look here: http://www.google.co...ters/ 1/button/

#14 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 13 July 2011 - 06:23 AM

Change to ``

#15 loraxio

loraxio

    Advanced Member

  • Members

  • 54 posts
  • Framework Version:3.4.2
  • Country: Country Flag

Posted 14 July 2011 - 05:57 AM

Instant gratification! Good on ya, Simon...

the
 <g:plusone size="small">
doesn't seem to work, though.

Loving this now, because my social sharing tools match now!

#16 loraxio

loraxio

    Advanced Member

  • Members

  • 54 posts
  • Framework Version:3.4.2
  • Country: Country Flag

Posted 15 July 2011 - 05:17 AM

A bump for this thread because I wanted to share a plug-in that floats a set of share icons in the left side of the browser that goes well with this solution posted above.

It called: Twitter Facebook Social Share by Kunal Chichkar.

I took out a line of code in the twitter-facebook-google-plusone-share/tf_display.php file in order to be able to apply my own style. But the default styling options are okay too.

#17 bonngean

bonngean

    Advanced Member

  • Members
  • PipPipPip
  • 82 posts

Posted 31 July 2011 - 06:06 AM

I'd love to add this to my page without a plugin. (I'd rather use the hook)... but alas, it doesn't work.

I added your code:

 
	add_action( 'wp_head', create_function('','echo "<script type='text/javascript' src='https://apis.google.com/js/plusone.js'></script>";'));
	add_filter( 'pagelines_before_sharebar', create_function('', 'return "<span class='gp1'><g:plusone></g:plusone></span>";'));

To my functions.php file in pagelinesbase and it doesn't work for me either.

I've added plenty into functions.php before without problems. So, I'm not sure why this isn't working.

#18 cemyk

cemyk

    Member

  • Members
  • PipPip
  • 11 posts

Posted 01 August 2011 - 09:31 AM

I'm keen to hear about this too. This is my first attempt at a hook so appreciate an 'idiot-proof' explanation! My aim is to get the button to appear after each of my post's tags area. If I can get that working I'll remove the buddypress footer from the full post view, adding discreet buttons alongside the google+. www.mattrichardsillustration.com/blog

#19 o_st

o_st

    Member

  • Members
  • 19 posts

Posted 07 August 2011 - 01:19 PM

The code integration in functions-php for the share section works well enough. But you should be able to link to your google-profile in the header in the same way as you can link to your facebook or twitter profile.

#20 cas45

cas45

    Advanced Member

  • Members

  • 77 posts
  • Country: Country Flag

Posted 09 August 2011 - 02:48 PM

@pross Could we use "pagelines_before_branding_icons" to get this in the header? Any chance we can add this to the social media integration in Pagelines? I am more than willing to update the platform pro graphics and sprites. This looks like it is growing fast and I think more and more people are going to want to add it. Your help as always is appreciated.