Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: SMFHacks.com Team on February 16, 2012, 11:16:04 AM

Title: SA Google+ intergration
Post by: SMFHacks.com Team on February 16, 2012, 11:16:04 AM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=3278)

Requirements:

Features:

Creating your application:

now you have your OAuth2 client id, OAuth2 client secret keys input these into gplus admin area



SA Google+ is released under the Mozilla Public License v1.1Requirements:

Features:

Creating your application:

[li]Click on [/li][/list]
Title: Re: SA Google+ intergration
Post by: shumilica on February 25, 2012, 07:48:14 PM
After doing everything required, put an image for login (you can use this one if you want for the mod: www.fcrp.ro/forum/sign-in-with-google.png ), clicking the image and allowing my app to access the info, i get this error:
Quote
Fatal error: Uncaught exception 'apiServiceException' with message 'Error calling GET https://www.googleapis.com/plus/v1/people/me?alt=json&key=4142341.apps.googleusercontent.com: (404) Not Found' in /home/xxxxxx/public_html/forum/gplusauth/io/apiREST.php:86 Stack trace: #0 /home/xxxxxx/public_html/forum/gplusauth/io/apiREST.php(56): apiREST::decodeHttpResponse(Object(apiHttpRequest)) #1 /home/fcrpro/public_html/forum/gplusauth/service/apiServiceResource.php(148): apiREST::execute(Object(apiServiceRequest)) #2 /home/xxxxxx/public_html/forum/gplusauth/contrib/apiPlusService.php(204): apiServiceResource->__call('get', Array) #3 /home/xxxxxx/public_html/forum/Sources/GPlus/GPlusHooks.php(228): PeopleServiceResource->get('me') #4 /home/xxxxxx/public_html/forum/Sources/GPlus/GPlus.php(98): gplus_init_auth() #5 /home/xxxxxx/public_html/forum/Sources/GPlus/GPlus.php(50): gplus_main() #6 /home/xxxxxx/public_html/forum/index.php(153): GPlus() #7 {main} thrown in /home/xxxxxx/public_html/forum/gplusauth/io/apiREST.php on line 86

Any thoughts?
Title: Re: SA Google+ intergration
Post by: SA™ on February 26, 2012, 04:02:11 AM
the special userID "me" does only work only if you are calling on behalf of an OAuth authenticated user looking at your query URL you tried to call it with your simple API key this is why it won't work As there is no user connected with this query the API does not know who "me" is and therefore returns a 404.

so 4142341 is the key you have specifyed wich is incorrect see here for setting up properly
http://www.sa-smf.com/community/index.php?action=kb;area=article;cont=42
Title: Re: SA Google+ intergration
Post by: shumilica on February 26, 2012, 07:10:18 AM
I changed that number when posting the error here, but it wasn't about the key. It was because i was trying to log on with a google apps account which doesn't have g+ enabled.
When I tried to log in from a google account with g+ it worked flawlessly.

Sorry for the trouble, maybe you can make a workaround so that it will return an understandable error to the one who wants to login with these kind of credentials?
Title: Re: SA Google+ intergration
Post by: SA™ on February 26, 2012, 02:36:40 PM
to me these api errors are understandble but i can see that it may not be the case for every one usaly a quick google finds and anser
Title: Re: SA Google+ intergration
Post by: Adrek on February 29, 2012, 10:18:51 AM
Great, now we have FB, Twitter and G+ integration in SMF :D

Just one question, how can I add button 'login with g+' in SimplePortal block?
Title: Re: SA Google+ intergration
Post by: SA™ on February 29, 2012, 05:03:20 PM
you can use gplus_show_auth_login(); todo this
Title: Re: SA Google+ intergration
Post by: GlitchPC on March 08, 2012, 05:46:20 PM
SA™...

I'm going to be installing this mod in the next few minutes.  I was wondering...for end-user privacy purposes...is there any sample information you can provide me that I can include in my site's privacy policy regarding the use of this application?  If not...can you direct me to any sample information I may be able to use and/or edit to fulfill Google's requirement for this?

Thanks, in advance...


Edit...

What if I don't want users to be able to register using Google+?  Do I have to enter any of the following info?

Custom login url

Custom login Image

Default membergroup ID

I just want those who already have a Google+ account to be able to share like the Facebook mod does.

By the way...I will be installing those two, as well, as soon as I get this all figured out...
Title: Re: SA Google+ intergration
Post by: SA™ on March 09, 2012, 06:25:52 PM
QuoteI'm going to be installing this mod in the next few minutes.  I was wondering...for end-user privacy purposes...is there any sample information you can provide me that I can include in my site's privacy policy regarding the use of this application?  If not...can you direct me to any sample information I may be able to use and/or edit to fulfill Google's requirement for this?

Thanks, in advance...

i usaly just point to the registr page but make sure you have the reg agreement enabled

QuoteEdit...

What if I don't want users to be able to register using Google+?  Do I have to enter any of the following info?

Custom login url

Custom login Image

Default membergroup ID

I just want those who already have a Google+ account to be able to share like the Facebook mod does.

By the way...I will be installing those two, as well, as soon as I get this all figured out...

this mod isnt coded just to use the gplus 1 button
Title: Re: SA Google+ intergration
Post by: GlitchPC on March 10, 2012, 01:04:29 AM
Thanks...

I see that, now.  Not really what I was looking for but, thanks for the information.   :)
Title: Re: SA Google+ intergration
Post by: distante on March 12, 2012, 12:23:59 AM
Hey SA, It's possible to change the code of "boards to show google+1 button on" for don't show the google+1 button in the boards that I put? because It's more easy in that way!
Title: Re: SA Google+ intergration
Post by: SA™ on March 12, 2012, 01:17:47 AM
in sources/gplus/gplushooks.php

if(in_array($board,$show_gplus) && !empty($modSettings['gp_app_enabled']) && !empty($context['current_topic']) && !empty($_GET['topic']) && !empty($_GET['action']) != 'post'){

replace with

if(!in_array($board,$show_gplus) && !empty($modSettings['gp_app_enabled']) && !empty($context['current_topic']) && !empty($_GET['topic']) && !empty($_GET['action']) != 'post'){
Title: Re: SA Google+ intergration
Post by: distante on March 12, 2012, 03:21:35 AM
Thanks, that worked just fine
Title: Re: SA Google+ intergration
Post by: Nitesh Kunnath on March 18, 2012, 02:35:19 AM
Will this have issue with Enotify ? If so, then which set of code needs to be changed ? can you help me here ?
Title: Re: SA Google+ intergration
Post by: Nitesh Kunnath on March 18, 2012, 03:06:21 AM
I guess you forgot to provide Google+ login button.... I couldnt see a login button in registration (but could see the text for it to register via Google+)
And I tried, its throwing Enotify errors... May I get the appropriate code to fix this ?
Title: Re: SA Google+ intergration
Post by: SA™ on March 18, 2012, 03:12:40 AM
not forget just didnt have one to include in the mod

QuoteWill this have issue with Enotify ? If so, then which set of code needs to be changed ? can you help me here ?

post up sources/gplus/gplus.php pls
Title: Re: SA Google+ intergration
Post by: Nitesh Kunnath on March 18, 2012, 03:18:59 AM
Quote from: SA™ on March 18, 2012, 03:12:40 AM
not forget just didnt have one to include in the mod

QuoteWill this have issue with Enotify ? If so, then which set of code needs to be changed ? can you help me here ?

post up sources/gplus/gplus.php pls
Ok, so where should I add the image to make it work (I have my own G+ image)

Here is the requested file :)
Title: Re: SA Google+ intergration
Post by: SA™ on March 18, 2012, 03:19:30 AM
in gplus admin
Title: Re: SA Google+ intergration
Post by: Nitesh Kunnath on March 18, 2012, 03:22:15 AM
Quote from: SA™ on March 18, 2012, 03:19:30 AM
in gplus admin
Ok, I forgot to observe it closely :P
Custom login Image ;D ... :)
Title: Re: SA Google+ intergration
Post by: SA™ on March 18, 2012, 03:25:48 AM
in that file find

$gplus_log_url = !empty($modSettings['gp_app_custon_logurl']) ? $modSettings['gp_app_custon_logurl'] : $scripturl;

redirectexit($gplus_log_url);


replace with

if ((!empty($_SESSION['login_url']) && strpos($_SESSION['login_url'], 'enotify')) || empty($_SESSION['login_url'])){

   $gplus_log_url = !empty($modSettings['gp_app_custon_logurl']) ? $modSettings['gp_app_custon_logurl'] : $scripturl;

   redirectexit($gplus_log_url);
}
else{
   
    $temp = $_SESSION['login_url'];
    $gplus_log_url = !empty($modSettings['tw_app_log_url']) ? $modSettings['tw_app_log_url'] : $temp;
    unset($_SESSION['login_url']);
    redirectexit($gplus_log_url);
}
Title: Re: SA Google+ intergration
Post by: Nitesh Kunnath on March 18, 2012, 05:22:35 AM
Quote from: SA™ on March 18, 2012, 03:25:48 AM
in that file find

$gplus_log_url = !empty($modSettings['gp_app_custon_logurl']) ? $modSettings['gp_app_custon_logurl'] : $scripturl;

redirectexit($gplus_log_url);


replace with

if ((!empty($_SESSION['login_url']) && strpos($_SESSION['login_url'], 'enotify')) || empty($_SESSION['login_url'])){

   $gplus_log_url = !empty($modSettings['gp_app_custon_logurl']) ? $modSettings['gp_app_custon_logurl'] : $scripturl;

   redirectexit($gplus_log_url);
}
else{
   
    $temp = $_SESSION['login_url'];
    $gplus_log_url = !empty($modSettings['tw_app_log_url']) ? $modSettings['tw_app_log_url'] : $temp;
    unset($_SESSION['login_url']);
    redirectexit($gplus_log_url);
}

Thanks a lot buddy :)
Title: Re: SA Google+ intergration
Post by: Nitesh Kunnath on March 18, 2012, 05:34:47 AM
@SA:

I get this error while registering :(

Fatal error: Uncaught exception 'apiServiceException' with message 'Error calling GET https://www.googleapis.com/plus/v1/people/me?alt=json&key=...................................
Title: Re: SA Google+ intergration
Post by: SA™ on March 18, 2012, 06:17:27 PM
you registerd with google plus?

the plus/v1/people/me api returns a 404 Not Found when the user hasn't registered for Google+

Quote from: shumilica on February 26, 2012, 07:10:18 AM
It was because i was trying to log on with a google apps account which doesn't have g+ enabled.
When I tried to log in from a google account with g+ it worked flawlessly.
Title: Re: SA Google+ intergration
Post by: Nitesh Kunnath on March 18, 2012, 06:23:46 PM
Quote from: SA™ on March 18, 2012, 06:17:27 PM
you registerd with google plus?

the plus/v1/people/me api returns a 404 Not Found when the user hasn't registered for Google+

Quote from: shumilica on February 26, 2012, 07:10:18 AM
It was because i was trying to log on with a google apps account which doesn't have g+ enabled.
When I tried to log in from a google account with g+ it worked flawlessly.
I guess I logged in with my another account (Which isnt registered with Google+)...let me check once again !!!

BTW, is there a provision to show a message to user as : "Sorry friend, you need to have a Google+ account"

The current thrown error looks like the forum is having a bug and user will have a bad impression on forum !!!
Title: Re: SA Google+ intergration
Post by: Nitesh Kunnath on March 18, 2012, 06:27:56 PM
Update: I checked, its showing the same error for my actual gmail account which is registered with Google+

Can you try it here ? : http://forum.gizmolord.com
Title: Re: SA Google+ intergration
Post by: SA™ on March 18, 2012, 06:29:55 PM
yes we can catch errors with try and catch functions this will be done in the next realse

Quote from: die2mrw007 on March 18, 2012, 06:27:56 PM
Update: I checked, its showing the same error for my actual gmail account which is registered with Google+

Can you try it here ? : http://forum.gizmolord.com

thats a different error there is a fix here for that
http://www.sa-smf.com/community/index.php?action=kb;area=article;cont=48

Title: Re: SA Google+ intergration
Post by: Nitesh Kunnath on March 18, 2012, 06:35:24 PM
Quote from: SA™ on March 18, 2012, 06:29:55 PM
yes we can catch errors with try and catch functions this will be done in the next realse

Quote from: die2mrw007 on March 18, 2012, 06:27:56 PM
Update: I checked, its showing the same error for my actual gmail account which is registered with Google+

Can you try it here ? : http://forum.gizmolord.com

thats a different error there is a fix here for that
http://www.sa-smf.com/community/index.php?action=kb;area=article;cont=48


Line 32 ?? :o

I am confused.... its currently a closing tag (check screenshot).
I have attached the file too !!!
Title: Re: SA Google+ intergration
Post by: SA™ on March 18, 2012, 06:41:45 PM
wrong file apiFileCache.php os the one you want
Title: Re: SA Google+ intergration
Post by: Nitesh Kunnath on March 18, 2012, 06:51:32 PM
Quote from: SA™ on March 18, 2012, 06:41:45 PM
wrong file apiFileCache.php os the one you want
Ooops, extremely sorry !!! My mistake !!!
Just edited the apiFileCache.php file and now its perfect :)
Thanks to you !!!
Title: Re: SA Google+ intergration
Post by: distante on March 18, 2012, 09:07:28 PM
Quote from: SA™ on March 18, 2012, 06:29:55 PM
yes we can catch errors with try and catch functions this will be done in the next realse

Quote from: die2mrw007 on March 18, 2012, 06:27:56 PM
Update: I checked, its showing the same error for my actual gmail account which is registered with Google+

Can you try it here ? : http://forum.gizmolord.com

thats a different error there is a fix here for that
http://www.sa-smf.com/community/index.php?action=kb;area=article;cont=48



This is a must do fix?
Title: Re: SA Google+ intergration
Post by: Nitesh Kunnath on March 19, 2012, 02:19:48 AM
Quote from: distante on March 18, 2012, 09:07:28 PM
Quote from: SA™ on March 18, 2012, 06:29:55 PM
yes we can catch errors with try and catch functions this will be done in the next realse

Quote from: die2mrw007 on March 18, 2012, 06:27:56 PM
Update: I checked, its showing the same error for my actual gmail account which is registered with Google+

Can you try it here ? : http://forum.gizmolord.com

thats a different error there is a fix here for that
http://www.sa-smf.com/community/index.php?action=kb;area=article;cont=48



This is a must do fix?
I guess not actually..... I am using Enotify and hence some codes needs to be changed
Title: Re: SA Google+ intergration
Post by: SA™ on March 19, 2012, 02:49:14 AM
http://www.sa-smf.com/community/index.php?action=kb;area=article;cont=48

that one will be in the next version
Title: Re: SA Google+ intergration
Post by: SA™ on March 19, 2012, 03:16:30 AM
new version addded

Quoteadded check for valide gplus accounts when regisring
fixed issue with guest acesss dissabled
updated the gplus sdk to the latest version
added support for auto login
added support for importing avatars
fixxed issue Could not create storage directory:
Title: Re: SA Google+ intergration
Post by: distante on March 19, 2012, 07:44:25 AM
;) great!
Title: Re: SA Google+ intergration
Post by: Nitesh Kunnath on March 19, 2012, 10:19:06 AM
Quote from: SA™ on March 19, 2012, 03:16:30 AM
new version addded

Quoteadded check for valide gplus accounts when regisring
fixed issue with guest acesss dissabled
updated the gplus sdk to the latest version
added support for auto login
added support for importing avatars
fixxed issue Could not create storage directory:
Wow, thatz so fast update :)
Title: Re: SA Google+ intergration
Post by: SA™ on March 19, 2012, 03:17:03 PM
there be another one in a few days aswell that will use oauth2 authentacion flow  instead than we can get an email adresse and do auto register
Title: Re: SA Google+ intergration
Post by: Nitesh Kunnath on March 19, 2012, 03:29:41 PM
Quote from: SA™ on March 19, 2012, 03:17:03 PM
there be another one in a few days aswell that will use oauth2 authentacion flow  instead than we can get an email adresse and do auto register
Cool :)
Looking forward to it :)
Title: Re: SA Google+ intergration
Post by: SA™ on March 23, 2012, 05:30:35 AM
new version added

Quote
changed to oauth2 authentication
mod now works with standard google accounts aswell as plus accounts
added support for auto register
fixed approval promt now it only show on first authorisation
Title: Re: SA Google+ intergration
Post by: sadaam on March 23, 2012, 12:02:35 PM
Quote from: SA™ on February 16, 2012, 11:16:04 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=3278)

Reqirements:

  • CURL PHP extension
  • JSON PHP extension
  • PHP Version 5

Features:

  • Login with google+
  • Register with google+
  • Google+ logs
  • Set a custom login url
  • Set a custom login image
  • Choose what group google+ users goto
  • Google+1 button on boards you choose

Creating your application:

  • Visit the Google API Console to generate OAuth2 client id, OAuth2 client secret, and register your OAuth2 redirect uri.
    https://code.google.com/apis/console

  • Click on "Services" in the left column and turn on "Google+ API".

  • Click on "API Access" in the left column and click the button labeled "Create an OAuth2 client ID"

  • Give your application a name and click "Next"

  • Select "Web Application" as the "Application type"

  • Click on (more options) and in Authorized Redirect URIs enter
    http://www.example.com/index.php?action=gplus

  • in Authorized JavaScript Origins enter
    http://www.example.com

  • Click "Create client ID"

now you have your OAuth2 client id, OAuth2 client secret keys input these into gplus admin area

App setup guide with pictures (http://www.sa-smf.com/community/index.php?action=kb;area=article;cont=42)

SA Google+ is released under the Mozilla Public License v1.1

Dear, i do the following steps completly but google+1 buttons not appeare at any of mu forum board plz guide me brother....

""Creating your application:
Visit the Google API Console to generate OAuth2 client id, OAuth2 client secret, and register your OAuth2 redirect uri.
https://code.google.com/apis/console
Click on "Services" in the left column and turn on "Google+ API".
Click on "API Access" in the left column and click the button labeled "Create an OAuth2 client ID"
Give your application a name and click "Next"
Select "Web Application" as the "Application type"
Click on (more options) and in Authorized Redirect URIs enter
http://www.example.com/index.php?action=gplus
in Authorized JavaScript Origins enter
http://www.example.com
Click "Create client ID" "".............

plz guide me brother...
Title: Re: SA Google+ intergration
Post by: SA™ on March 23, 2012, 02:39:34 PM
set it up properly? everything is in gplus admin area
Title: Re: SA Google+ intergration
Post by: Adrek on March 31, 2012, 04:55:22 PM
Hi, today I noticed that there is one txt string that is not needed at login/register page.
I'm talking about $txt['gp_app_regonlyonce2']. In GPlus.template.php you have:
<div class="error">'.$txt['gp_app_regonlyonce1'].'<a href="'.$scripturl.'?action=gplus;area=logsync"> '.$txt['gp_app_regonlyonce2'].'</a> '.$txt['gp_app_regonlyonce2'].'</div>

So at this moment users will see Already registered? Click Here Here

The same thing is in SA Twitter Integration (Twitter.template.php):
<div class="error">'.$txt['tw_app_regonlyonce1'].'<a href="'.$scripturl.'?action=twitter;area=logsync"> '.$txt['tw_app_regonlyonce2'].'</a> '.$txt['tw_app_regonlyonce2'].'</div>
Title: Re: SA Google+ intergration
Post by: SA™ on April 01, 2012, 12:32:30 PM
we acutaly need to remove the Here part from $txt['gp_app_regonlyonce1'] and leave the other string there other wise the here link wont be visable
Title: Re: SA Google+ intergration
Post by: Adrek on April 01, 2012, 12:46:30 PM
i don't think that i understand.. I just removed second  '.$txt['gp_app_regonlyonce2'].' and it works fine, no need to touch $txt['gp_app_regonlyonce1'] :)
Title: Re: SA Google+ intergration
Post by: Eclipse16V on May 16, 2012, 04:09:03 AM
Hello,
maybe someone here can tell me where I must submit to the API, so this mod is.
'm Just not on and the instructions are no longer accessible.

It's about Facebook, Twitter and Google +.

Please help me.
Title: Re: SA Google+ intergration
Post by: vbgamer45 on May 16, 2012, 08:20:00 PM
Have taken over work/support of this mod.

What would help me out is if you any bugs that you know about why this modification let me know and I will try to get it fixed. Might back port it to 1.1.x as well not sure though.
Title: Re: SA Google+ intergration
Post by: Eclipse16V on May 17, 2012, 05:42:52 AM
I have to first find an explanation on how the whole set up on Google+.
Title: Re: SA Google+ intergration
Post by: Eclipse16V on May 18, 2012, 02:17:57 AM
I am now gone to the method in the existing manual only if I as wants to link my account get the following error message:
QuoteFatal error: Uncaught exception 'apiAuthException' with message 'Error fetching OAuth2 access token, message: 'invalid_grant'' in /.../gplusauth/auth/apiOAuth2.php:105 Stack trace: #0 /.../gplusauth/apiClient.php(138): apiOAuth2->authenticate(Array) #1 /.../Sources/GPlus/GPlusHooks.php(232): apiClient->authenticate() #2 /.../Sources/GPlus/GPlus.php(116): gplus_init_auth() #3 /.../Sources/GPlus/GPlus.php(51): gplus_main() #4 [internal function]: GPlus() #5 /.../index.php(155): call_user_func('GPlus') #6 {main} thrown in /.../gplusauth/auth/apiOAuth2.php on line 105

What am I doing wrong?
Title: Re: SA Google+ intergration
Post by: LOVELORD on August 28, 2012, 08:06:05 PM
I have problem when i try to register or do something with account i recive this error:

Server error
The website encountered an error while retrieving http://www.domain/index.php?action=gplus&code=sads122enm3uine932ni291niem9dfn9u3i2n9u1m092i1niern92i1p-. It may be down for maintenance or configured incorrectly.

I make application like it was said here. ANd enter details into google integrate settings in admin area...
Title: Re: SA Google+ intergration
Post by: Texan78 on August 28, 2012, 08:48:24 PM
The url is domain/index.php

Notice it is missing the domain.com

Double check your settings for your domain in the app and in the mod.

Sounds like the same issues as you are having with the other two integration mods. You don't have the mod and apps configured correctly for your domain.
Title: Re: SA Google+ intergration
Post by: LOVELORD on August 28, 2012, 09:28:55 PM
Quote from: Texan78 on August 28, 2012, 08:48:24 PM
The url is domain/index.php

Notice it is missing the domain.com

Double check your settings for your domain in the app and in the mod.

Sounds like the same issues as you are having with the other two integration mods. You don't have the mod and apps configured correctly for your domain.

Here is my like i have in google api:


Client ID:    

Email address:    

Client secret:    

Redirect URIs:    http://www.domain.rs/index.php?action=gplus
JavaScript origins:    http://www.domain.rs


I remove first 3 thing for security...

I dont know where is problem... This is configuration i use for forum
Title: Re: SA Google+ intergration
Post by: kamili34 on September 16, 2012, 07:34:28 AM
What I need to post here boards to show google+1 button on ? example, I post borardindex but still cant see google plus icon  ::)
Title: Re: SA Google+ intergration
Post by: Adrek on September 16, 2012, 07:46:46 AM
You have to add board ID.
for example: if link to board is http://www.simplemachines.org/community/index.php?board=59.0 board ID is 59

If you want to add more boards add another ID after comma.
Title: Re: SA Google+ intergration
Post by: kamili34 on September 16, 2012, 09:39:56 AM
Ok it works, but I set id board for example 5 but I see google plus icon only when I open a topic is that correct ?

How to put google + icon on index page ?
Title: Re: SA Google+ intergration
Post by: Adrek on September 16, 2012, 10:29:28 AM
Yeah, that's how this works.
For other Google +1 buttons you should check out Mod Site:
http://custom.simplemachines.org/mods/index.php?action=search;basic_search=google
I think that closest thing for this would be => http://custom.simplemachines.org/mods/index.php?mod=3354
Title: Re: SA Google+ intergration
Post by: hotwheels on December 21, 2012, 11:27:49 AM
Okay, trying not to clog up the site with another post, so i will just ask here for now.....I have been having problems with my site since i installed sa gplus and today i had over 60,000 gplus errors....I cleared all of the errors and shut off gplus, no errors for over an hour. I turned it back on and i am getting errors every minute........This is currently the main error i am getting:


Apply Filter: Only show the error messages of this URL
http://www.ratrodnation.com/forum/index.php?pretty;action=media&amp;sa=item;in=390desc;PHPSESSID=2532ea30df08bc1c3a3a424afb73e0d0
Apply Filter: Only show the errors with the same message
8: Undefined index: gp_app_custon_logimg
Apply Filter: Only show the errors from this file
File: /home/*****/public_html/forum/Sources/GPlus/GPlusHooks.php
Line: 74

Within 3 minutes of turning this back on, i already have over 382 errors.......


Apply Filter: Only show the error messages of this URL
http://www.ratrodnation.com/forum/index.php?pretty;board=canada;topic=canada-who.msg11635
Apply Filter: Only show the errors with the same message
8: Undefined index: gp_app_custon_logimg
Apply Filter: Only show the errors from this file
File: /home/*******/public_html/forum/Sources/GPlus/GPlusHooks.php
Line: 73

Apply Filter: Only show the error messages of this URL
http://www.ratrodnation.com/forum/index.php?pretty;board=canada;topic=canada-who.msg11635
Apply Filter: Only show the errors with the same message
8: Undefined index: gp_app_custon_logimg
Apply Filter: Only show the errors from this file
File: /home/********/public_html/forum/Sources/GPlus/GPlusHooks.php
Line: 72

This seems to be the most common factor "gp_app_custon_logimg"

Any help to solve my site errors, would be greatly appreciated.......
Title: Re: SA Google+ intergration
Post by: vbgamer45 on December 21, 2012, 11:35:26 AM
is it all the same message?
Title: Re: SA Google+ intergration
Post by: hotwheels on December 21, 2012, 11:37:20 AM
Yes, except for the line number.......seem to be 3 different lines. 72,73,74.
Title: Re: SA Google+ intergration
Post by: hotwheels on December 21, 2012, 11:43:22 AM
This is the php file area where the numbers go to:

<php>66:    

   

if (!$context['user']['is_logged']){
67:    

   

   
68:    

   

   

gplus_init_auth_url();
69:    

   

70:    

   

    $txt['guestnew'] = sprintf($txt['welcome_guest'], $txt['guest_title']);
71:    

   

       
72:    

   

    $buffer = preg_replace('~(' . preg_quote('<div class="info">'. $txt['guestnew']. '</div>') . ')~', '<a href="'.$authUrl.'"><img src="'.$modSettings['gp_app_custon_logimg'].'" alt="" /></a><div class="info">'. $txt['guestnew']. '</div>', $buffer);

   

==>73:    

   

    $buffer = preg_replace('~(' . preg_quote($txt['forgot_your_password']. '</a></p>') . ')~', $txt['forgot_your_password']. '</a></p><div align="center"><a href="'.$authUrl.'"><img src="'.$modSettings['gp_app_custon_logimg'].'" alt="" /></a></div>', $buffer);
74:    

   

    $buffer = preg_replace('~(' . preg_quote('<dt><strong><label for="smf_autov_username">'. $txt['username']. ':</label></strong></dt>') . ')~','<dt><strong>'.$txt['gp_app_rwf'].':</strong><div class="smalltext">'.$txt['gp_app_regmay'].'</div></dt><dd><a href="'.$authUrl.'"><img src="'.$modSettings['gp_app_custon_logimg'].'" alt="" /></a></dd><dt><strong><label for="smf_autov_username">'. $txt['username']. ':</label></strong></dt>', $buffer);
75:    

   

}
76:    

   

return $buffer;</php>
Title: Re: SA Google+ intergration
Post by: vbgamer45 on December 21, 2012, 12:12:22 PM
You need to set a Custom login Image in Google+ Settings
Title: Re: SA Google+ intergration
Post by: hotwheels on December 21, 2012, 12:54:25 PM
What exactly is that? I tried doing a google search and there really isn't any info on a custom log in image........

Okay, i found a custom image i think.......i used the link for the image. Now when i click on google plus and the description of the page i am trying to share on google plus which has an image, all i get is the google image i used for the sa gplus.....
Title: Re: SA Google+ intergration
Post by: vbgamer45 on December 21, 2012, 01:06:42 PM
If you have that link set the error log should disappear now.
Title: Re: SA Google+ intergration
Post by: hotwheels on December 21, 2012, 01:14:53 PM
It did get rid of the error, but now i can't share pictures with my google plus. The only image that uploads to google+ when i go to share a post, is the image that is set now in google+......

Is there a way to shut off this custom image section? I want to be able to use images that are in some of the threads, not just the custom image that is now set in the gplus mod.....
Title: Re: SA Google+ intergration
Post by: hotwheels on December 21, 2012, 01:19:46 PM
Okay, i did a little test and placed my google+ page link in the custom log in link section and got rid of the custom image url, and so far no errors and it finds an image in my post rather then the custom image url......much better. Thanks for your help.
Title: Re: SA Google+ intergration
Post by: Dblog on February 22, 2013, 05:56:06 AM
for me error says :
The redirect URI in the request: did not match a registered redirect URI
Title: Re: SA Google+ intergration
Post by: SA™ on February 22, 2013, 07:59:54 AM
what url did you put in your app
Title: Re: SA Google+ intergration
Post by: Dblog on February 22, 2013, 08:13:25 AM
forums's url (index page)
Title: Re: SA Google+ intergration
Post by: SA™ on February 22, 2013, 10:21:00 AM
instruction to create you app are on first post

Authorized Redirect should be
http://www.example.com/index.php?action=gplus
Title: Re: SA Google+ intergration
Post by: Dblog on February 22, 2013, 11:01:26 AM
i thought i shud replace example.com with my url
now, i edited and changed redirect URI as http://www.example.com/index.php?action=gplus in Google APIs console
i deleted cache and refreshed login page.
but still g+ login button links to my site.com/index.php?action=gplus (as it was given earlier)
Title: Re: SA Google+ intergration
Post by: SA™ on February 22, 2013, 11:18:45 AM
it is supposed to link to action=gplus
Title: Re: SA Google+ intergration
Post by: Dblog on February 22, 2013, 11:28:15 AM
i didnt understand !
g+ is showing error that mysite.com/index.php?action=gplus is not a registered URI, no matter what URI i use in G+ console
btw, i tried to check for pictures of instructions in this link : http://www.sa-smf.com/community/index.php?action=kb;area=article;cont=42
but that site is broken
Title: Re: SA Google+ intergration
Post by: SA™ on February 22, 2013, 01:19:37 PM
in gplusauth dir

config.php
'oauth2_redirect_uri' => $scripturl.'?action=gplus',

try hardcoding the url there
change
$scripturl.'?action=gplus
to
site.com/index.php?action=glus
Title: Re: SA Google+ intergration
Post by: Dblog on February 22, 2013, 02:10:20 PM
okay this worked
but its generating too many errors

: Undefined index: gp_app_custon_logimg
File: /home/mine/public_html/Sources/GPlus/GPlusHooks.php

i just installed G+ intergration and within 2 mins 66 errors popped
Title: Re: SA Google+ intergration
Post by: SA™ on February 22, 2013, 02:15:29 PM
setup the options in gplus admin specificly

gp_app_custon_logimg
wich is the login button image cant rember but i dont think there is one included by default you have to set it in gplus admin area
Title: Re: SA Google+ intergration
Post by: Dblog on February 23, 2013, 01:46:57 AM
thanks..i uploaded a custom login image and no errors now.
but i enabled G+ button on all topics, but its not showing anywhere

i mean, is there any way to show G+ button on all boards and topics, instead of manually entering all board IDs
Title: Re: SA Google+ intergration
Post by: SA™ on February 23, 2013, 10:41:24 AM
nope there isnt a way todo this not with this mod anyhow
Title: Re: SA Google+ intergration
Post by: ZenOokami on March 03, 2014, 07:32:47 PM
I know it's been awhile since a post in this forum, but I saw that this mod was updated this year.

I'm having the issue with the redirect_uri_mismatch error.
I've tried everything through this forum, but no go.

Is this due to a change with google?
Title: Re: SA Google+ intergration
Post by: vbgamer45 on March 03, 2014, 09:06:27 PM
Your url in facebook post be the same as your forum domain
Title: Re: SA Google+ intergration
Post by: gomzy on March 13, 2014, 06:52:34 AM
hi, i am using smf 2.0

i install the mod, it request for permission,  then after stuck on /forum/index.php?action=gplus&code=4/xxxxxx

any help please
Title: Re: SA Google+ intergration
Post by: mroyusa on March 26, 2014, 08:00:11 PM
omg was it too hard to include a google+ button for the register page. Once i find one do i put it in my theme/default/images/ ???

do you have a button to suggest or where to get one?
Title: Re: SA Google+ intergration
Post by: GamePersia on April 23, 2014, 03:15:35 AM
i go to "code.google.com/apis/console"
and turn on "Google+ API"
after that i cannot find what to do ??
as in given steps,..it says "Click on "API Access" in the left column and click the button labeled "Create an OAuth2 client ID""
but i can't see any OAuth2 client ID on left side.
Kindly help,..i think google changed some of it's theme.
Title: Re: SA Google+ intergration
Post by: gonza28 on August 01, 2014, 06:44:17 AM
Hi SA.
I am happy your mod co facebook integration.
You are a great.

Today I installed GplusIntegration and followed all the steps and console google.

I already have everything set up. Forum everything is enabled. The imagne of "button" is on imgur.com. Everything looks perfect.
When registering a user redirection fails.
I've checked many times to see what's wrong, but I find nothing.
In the console I left the default as mensiona URLs in the tutorial. I will upload an image to display. The tester etá user logged in correctly then G+

400. That's an error

Error: redirect_url_mismatch

The redirect URl in the request:
http://myforumxample.com/index.php?action=gplus

Help. hug
Title: Re: SA Google+ intergration
Post by: gonza28 on August 01, 2014, 09:09:55 AM
Solved!
By putting in the API as URIS OF REDIRECTION:
http://www.example.com/index.php?action=gplus
not work.

If we put: http://www.myforum.com/index.php?action=gplus
so if it worked.
Users can register correctly.
Thanks for the great work! ;)
Title: Re: SA Google+ intergration
Post by: vbgamer45 on August 01, 2014, 09:14:36 AM
Glad you got it to work.
Title: Re: SA Google+ intergration
Post by: desai_amogh on January 24, 2015, 09:40:17 PM
Getting database error while registering with username and password..

error in screenshot attached ..  please help..

(http://snag.gy/xgbzJ.jpg)


File: /public_html/Sources/Subs-Members.php  is here:
Line: 805

785: foreach ($regOptions['register_vars'] as $var => $val)
786: {
787: $type = 'string';
788: if (in_array($var, $knownInts))
789: $type = 'int';
790: elseif (in_array($var, $knownFloats))
791: $type = 'float';
792: elseif ($var == 'birthdate')
793: $type = 'date';
794:
795: $column_names[$var] = $type;
796: $values[$var] = $val;
797: }
798:
799: // Register them into the database.
800: $smcFunc['db_insert']('',
801: '{db_prefix}members',
802: $column_names,
803: $values,
804: array('id_member')
==>805: );
806: $memberID = $smcFunc['db_insert_id']('{db_prefix}members', 'id_member');
807:
808: // Update the number of members and latest member's info - and pass the name, but remove the 's.
809: if ($regOptions['register_vars']['is_activated'] == 1)
810: updateStats('member', $memberID, $regOptions['register_vars']['real_name']);
811: else
812: updateStats('member');
813:
814: // Theme variables too?
815: if (!empty($theme_vars))
816: {
817: $inserts = array();
818: foreach ($theme_vars as $var => $val)
819: $inserts[] = array($memberID, $var, $val);
820: $smcFunc['db_insert']('insert',
821: '{db_prefix}themes',
822: array('id_member' => 'int', 'variable' => 'string-255', 'value' => 'string-65534'),
823: $inserts,
824: array('id_member', 'variable')
825: );
Title: Re: SA Google+ intergration
Post by: vbgamer45 on January 25, 2015, 12:38:51 AM
This mod does not add a column called google_plus might be from another profile fields mod.
Title: Re: SA Google+ intergration
Post by: DSystem on February 12, 2015, 06:11:06 AM
I installed this mod and it's working perfectly.

So I have a doubt.

He wasn't supposed to get the email registered on google + and add the profile of the Forum Member?

Title: Re: SA Google+ integration
Post by: Miker1029 on March 19, 2015, 10:06:24 AM
Hi,

I was wondering if you could go into more detail on the Custom Login Image, I just Put a Pictures of g+ login in my domain and pointed to it, and of course it didn't work...

Also I have no G+ buttons on the forum,  I'm using SMF 2.0.9, With the BlackJack Theme...

I believe I have everything setup right tho...I can see on the bottom it's going to google and all that

Any Help

Mike
Title: Re: SA Google+ integration
Post by: Miker1029 on March 20, 2015, 07:36:04 AM
Update:

Ok I got it working for the Registration Screen, Haven't gotten farther then that yet...I had to use a .GIF not .JPG for the button...

I Got this Error:Fatal error: Call to undefined function twit_USettings() in /home/mike2769/public_html/Sources/GPlus/GPlusHooks.php on line 172

What happened with this is I already had my "3 Test" Gmail account registered in the forum, so when I clicked the Button I got the 400 Error from Google saying They don't know what's up, and then the forum said the E-mail already Existed...

SOOOO, I tried to Login, And got that Error When I clicked the Login Button on the SMF Top Menu....

SO, Went to my Backups and re-uploaded GPlusHooks.php (Think I edited, on the first page there was something about having all boards ON instead of OFF as default, Mighta Misread tho)..

Still Same error, Cleared Browser Cache in F.F. Same Error, So I tried with Chrome and It let me in, Went Directly to G+ Config and Shut it down, Which Allowed me to Log-In With FireFox...

Got me Confused...

Any Ideas??  I'm gonna try and Uninstall and Re Install and See if that fixes it....

Thanks for the Help.

Mike

EDIT:

Ok I GET The Error When coming back from the Error With google+ the page that show on return is:

http://www.android-x86.net/index.php?action=gplus;area=auto;agree

And Obviously this is the page I get the Error on:

http://www.android-x86.net/index.php?action=login

It Seems Once you get PAST that gplus error page (1st One) it clears out and you can log-in (Hence why Chrome worked)

Ok About all the Info I got, Running 2.0.9, Blackjack Theme (curve base)

AND it only gives that Error On the Second Login Link, Not the One on the very top the one on the list with home, profile, and all that, The Top one takes you to the Login Screen.... ODD!

Top Login Link: http://www.android-x86.net/index.php?action=login2

Menu Login Link: http://www.android-x86.net/index.php?action=login

Seems the Solution here is Obvious, SO where Do I edit the Link to Login from the Menu?  8-)
Title: Re: SA Google+ integration
Post by: Miker1029 on March 20, 2015, 08:12:50 AM
Ok, Google+ Log-in works, G+ Buttons Showing up, (Wish I could delete my first Post, LOL, Now I realize How stupid it was, but I'm not into Social Media, Just doing it for the forum)

Now If I could figure that Link, I looked in Sources/Subs, To Confusing...

If anyone has a Way to change the link it would be appreciated....

Mike
Title: Re: SA Google+ intergration - User Password?
Post by: Miker1029 on January 10, 2016, 01:20:55 PM
Hey All,

    I had a user the other day that wanted to turn off member sending E-mails to him and He was Unable Because He Registered with Google+ and It doesn't Have/Know What password to use, I tried on my test account, and My Google+ password didn't work....

Anyone have Any Idea How I can Figure out the Password, Or Ideally just Remove the "Current Password:" Check from the Profile Page....

Thanks,

Mike
Title: Re: SA Google+ intergration
Post by: nend on January 10, 2016, 10:24:10 PM
Hi vb

Just passing by this post and remembered about a bug I found in the Google+ Integration.

It seems like it has a dependency, I can't really remember where it was at exactly, I was planning to work on it myself but never got around to it.

If you enable "Enable Auto Login", it tries to call on a function from SA Twitter or SA Facebook, can't really recall which one exactly and don't have access to my work right now to say for sure. It is in that general area. So without one of the other mods installed with this one it fails.

Sorry I can't give any more details. Will do so when I can access my local files.  :-\
Title: Re: SA Google+ intergration
Post by: nend on January 10, 2016, 10:28:11 PM
Here
GPlusHooks.php
function gplus_loadTheme(){
    global $modSettings, $user_info, $context;

loadLanguage('GPlus');

if (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (isset($_REQUEST['action']) || in_array(isset($_REQUEST['action']), array('gplus'))))
    {
    $modSettings['allow_guestAccess'] = 1;
    }

if(isset($_SESSION['gplus']['idm']) && isset($_REQUEST['action']) && $_REQUEST['action'] == 'login' && !empty($modSettings['gp_app_enabledautolog'])){

$context['gplus_id'] = twit_USettings($_SESSION['gplus']['idm'],'id_member','gpid');

if (!empty($context['gplus_id'])) {
redirectexit('action=gplus;area=connectlog');   
}
    }


See
twit_USettings($_SESSION['gplus']['idm'],'id_member','gpid');
Title: Re: SA Google+ intergration
Post by: SMFHacks.com Team on January 10, 2016, 10:33:48 PM
Update fixed

1.0
!Fixed undefined twit_USettings bug
Title: Re: SA Google+ intergration
Post by: concorde7 on February 20, 2016, 02:21:14 AM
2 Questions.
1. I see no google+ option when logging in. Is that a theme or mod issue?
2. related to question 1 ... Can I just make a custom button for people to click ot login with since my theme doesnt have the g+ login button on the page?



Reseller Theme by Daniiel
SMF 2.0.11

1.    reCAPTCHA for SMF    0.9.9    
2.    Ad Managment    3.2    
3.    Misc Anti Spam    1.0    
4.    Anti-Spam Links    1.0.1    
6.    Add Social Media Icons To Profiles    1.2.0    
7.    SA GPlus    1.0    
8.    Optimus Brave    1.8.7    
9.    SMF 1.1.21 / 2.0.10 Update    
10.    SMF Articles    2.0.2    
12.    reCAPTCHA for SMF
Title: Re: SA Google+ intergration
Post by: Cizaquita on February 26, 2016, 02:33:26 AM
Quote from: concorde7 on February 20, 2016, 02:21:14 AM
2 Questions.
1. I see no google+ option when logging in. Is that a theme or mod issue?
2. related to question 1 ... Can I just make a custom button for people to click ot login with since my theme doesnt have the g+ login button on the page?



Reseller Theme by Daniiel
SMF 2.0.11

1.    reCAPTCHA for SMF    0.9.9    
2.    Ad Managment    3.2    
3.    Misc Anti Spam    1.0    
4.    Anti-Spam Links    1.0.1    
6.    Add Social Media Icons To Profiles    1.2.0    
7.    SA GPlus    1.0    
8.    Optimus Brave    1.8.7    
9.    SMF 1.1.21 / 2.0.10 Update    
10.    SMF Articles    2.0.2    
12.    reCAPTCHA for SMF

1- You need to configurate the URL image to login.
2- Yes yu can, only you need to add the image URL in the Google+ mod configuration.
Title: Re: SA Google+ intergration
Post by: Cizaquita on February 26, 2016, 02:38:33 AM
What is the default password when an user Register with "Auto" option?



QuoteI have an error, when i tried to register with my G+ account says that my name is too long and i can't register.

What is the problem? Mod error or SMF error?

Thanks.
Edit: Solved this question, I had modifie the Subs-member.php
Title: Re: SA Google+ intergration (PHP ERROR 'invalid_grant')
Post by: Cizaquita on May 19, 2016, 03:12:57 PM
Hi!

I am having this error:

PHP Fatal error:  Uncaught exception 'apiAuthException' with message 'Error fetching OAuth2 access token, message: 'invalid_grant'' in /var/sentora/hostdata/xxxxxx/public_html/xxxxxx/foro/gplusauth/auth/apiOAuth2.php:105\nStack trace:\n#0 /var/sentora/hostdata/xxxxxx/public_html/xxxxxx/foro/gplusauth/apiClient.php(138): apiOAuth2->authenticate(Array)\n#1 /var/sentora/hostdata/xxxxxx/public_html/xxxxxx/foro/Sources/GPlus/GPlusHooks.php(254): apiClient->authenticate()\n#2 /var/sentora/hostdata/xxxxxx/public_html/xxxxxx/foro/Sources/GPlus/GPlus.php(116): gplus_init_auth()\n#3 /var/sentora/hostdata/xxxxxx/public_html/xxxxxx/foro/Sources/GPlus/GPlus.php(51): gplus_main()\n#4 [internal function]: GPlus()\n#5 /var/sentora/hostdata/xxxxxx/public_html/xxxxxx/foro/index.php(161): call_user_func('GPlus')\n#6 {main}\n  thrown in /var/sentora/hostdata/xxxxxx/public_html/xxxxxx/foro/gplusauth/auth/apiOAuth2.php on line 105, referer: http://laresistencia.co/foro/index.php?action=login

I just checked the .php file and search in Google about this error but I don't know what is the problem.

Anybody can help me? Thanks!
Title: Re: SA Google+ intergration
Post by: jack001 on July 05, 2018, 11:35:26 AM
i am trying to apply for 2.1 beta4. It installed without any error but login isn't showing.
Any idea why?
Title: Re: SA Google+ intergration
Post by: vbgamer45 on July 05, 2018, 11:36:21 AM
This mod does not support 2.1 yet