Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=3103)
Add the Google+ Icon to all posts
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg121.imageshack.us%2Fimg121%2F4144%2Fgoogleplus.png&hash=ce28eff8f8c50fa415bac6caf8bbfea2157267f0) (http://img121.imageshack.us/i/googleplus.png/)
Changelog:
v1.1: added option to choose first post only or all posts
v1.0: initial support for SMF 1.1.14 and SMF 2.0
Huh? I installed your mod almost a week ago. Why am I only seeing this thread now?
Anyway, I installed the mod to SMF 2.0 without problems, or I may have had to manually edit a few files, but I can remember. The mod's working as it should.
Thanks for the reply.
I have changed it slightly since the first version. Mainly there is now an option for all posts or just the first one.
Great mod!
Is there an update plan/idea for an option (a checkbox) in the "Modify Boards" to allow only specific boards to show the Google+ button?
Hi, Nice Mod
I've installed successfully, but unable to find any editing option. Where can be found it's editing option? how can I enable or disable this...
Waiting your response!
Are you using SMF 1.1.x or SMF 2.x?
In SMF 1 they are in the theme settings directory.
In SMF 2 they are in the misc directory, where all mods are enabled or disabled.
Yes!
I am using 1.1.114 and found these option in Current Theme Settings. You should also mention these instructions on the main Mod page.
Thanks for your guidance.
Quote from: qayyom on July 13, 2011, 03:03:39 AM
Yes!
I am using 1.1.114 and found these option in Current Theme Settings. You should also mention these instructions on the main Mod page.
Thanks for your guidance.
I have no added them to the main Mod Page, thanks for your feedback.
I installed this mod...
+1 Button is not showing in Admin, Global Moderator post
and in other post it is showing please help me
Are there any errors within the logs?
Also you mean its showing in the main forum categories but not in your hidden private categories?
There were no errors...
Successfully installed....
So its not showing at all? Or its just showing in certain boards?
What version of SMF are you using?
oh i will instole google + botum after that i will see it
Quote from: tinoest on July 19, 2011, 02:46:56 AM
So its not showing at all? Or its just showing in certain boards?
What version of SMF are you using?
Its not showing for just admin and moderator post..
In 2.0, the second line says, "Note Display Google Plus has to be checked". Where is this exact checkbox located? I can find nothing anywhere that says these words. I cannot get it to display in any theme. Thanks!
Quote from: booch_21 on July 19, 2011, 08:51:43 AM
In 2.0, the second line says, "Note Display Google Plus has to be checked". Where is this exact checkbox located? I can find nothing anywhere that says these words. I cannot get it to display in any theme. Thanks!
Can you see this?
Show google plus icon in post.
It should be directly above the line that you posted. That is the line that I mean by "Note Display Google Plus has to be checked"
I agree that could be clearer and i'll get that cleared up shortly in a new release.
Quote from: yogesh_gamer on July 19, 2011, 08:31:58 AM
Quote from: tinoest on July 19, 2011, 02:46:56 AM
So its not showing at all? Or its just showing in certain boards?
What version of SMF are you using?
Its not showing for just admin and moderator post..
So any post that any moderator or admin post in any forum category it doesn't show in?
There are no checks to limit it on users. If it works for normal users then it should work for users that are moderators or admin. Unless im misunderstanding your problem.
Works and looks great. Doesn't disable/delete properly, however. This may not be a concern to most... it is easy to fix if you accidentally install/enable it twice, too. Don't ask how I know....................... :o
I would almost kill for a similar Facebook mod that would show Recommend - for example:
http://developers.facebook.com/docs/reference/plugins/like/
*really* awesome would be if you could do such a thing and have it link on a specific group on FB. To allow a forum to register a group on FB and then post topics from the forum directly to the group page... just a thought.
If I could undertake it myself, I would.
I have installed and un-installed it here without issue quite a few times.
Do you know which files it was having issues with?
I can look into the API invovled with linking to a facebook group. Its quite easy to get a Facebook like or share button on the page, although I don't think that is quite what you want.
Actually clicking on your link that might be what you wanted.
I did submit a modification for that a while back, but made an error in the package that I only just picked up upon. Hopefully the admin's here will approve it shortly now its fixed.
QuoteSo any post that any moderator or admin post in any forum category it doesn't show in?
There are no checks to limit it on users. If it works for normal users then it should work for users that are moderators or admin. Unless im misunderstanding your problem.
please see all 3 attachment.. you will get what I want to say..
Plus button doesn't show in admin and global moderator post..
but shows in normal regular user post...
please see all 3 attachment
Thanks for the pictures to explain what you mean, I just don't quite understand why that would happen.
Do you have any other mod's installed?
Could you post your Display.template.php file?, its located in the following directory. Themes/default/
Thanks.
there are many mods but no one is for google +1 button...
I know, I just wondered if any were conflicting with this modification.
Do you have access to your Display Template?
I have tested it here with various user groups and its not exhibiting the same behavior as yours.
but mod was successfully installed...
if you need any file, i can attached here.
If you could the displaytemplate file would be useful.
First of all, thanks for your work and dedication with this mod.
Second, a couple of questions :D
Is this mod only for Default Theme? I say that because is working on default theme but not on custom modified theme i have (LiveMC (http://custom.simplemachines.org/themes/index.php?lemma=1002) to be exact). Any clues?
Thanks ;)
P.D: I have just noticed that in default theme i can click the +1 button in posts (Logged in Google+ with my account), the icon changes from 0 to +1 but i cant see anything about it in my Google+ profile, there is no mention to that +1 i just clicked, aswell if i reload the topic in forum, the +1 gone and the 0 is still there.
Any help would be very appreciated.
It is for the default theme only.
Are you using SMF 1.11.x or SMF 2.0 ?
Also it should, or atleast it does for me in the +1 links on my google account.
Thanks for you reply.
I use SMF 1.1.14
Is there any solution for using it on a modified theme? manual file modification maybe?
In the other hand, i think that the +1 problem in Google+ account is my website fault (or server), because if i search in Google for a thread, i see the +1 button on the right side of google result but if i click on it i get a red icon and an explanation of possible error causes.
Take a look.
Before clicking +1 button:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi251.photobucket.com%2Falbums%2Fgg285%2FKaos2K%2FCapturadepantalla2011-07-20alas201913.png&hash=4c7b491825a719a6d9883bf2ddb9e8e4b5a64a86)
After clicking +1 button:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi251.photobucket.com%2Falbums%2Fgg285%2FKaos2K%2FCapturadepantalla2011-07-20alas201933.png&hash=69d3523a0faf500444729d199d5850de2b86447b)
Possible causes of error:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi251.photobucket.com%2Falbums%2Fgg285%2FKaos2K%2FCapturadepantalla2011-07-20alas202346.png&hash=a8b47c80f291d947e194d04c0917dee47266eb0c)
In Google+ web interface it's impossible for me to share a link to a post of my forum (Only webpage index worked) because i get permanent "Error" as you can see in the pic below.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi251.photobucket.com%2Falbums%2Fgg285%2FKaos2K%2FCapturadepantalla2011-07-20alas203112.png&hash=0944e3e27112f38389bea073f428953bbe2fd6dc)
I dont have a clue why this is happening. (BTW i oftenly have problems sharing links on Facebook, it only works when the post i want to share was visited by Google's spiders and appear on search results, in other words, when Google has indexed it).
The code you want to add is the following to your Display.template.php file just above the following line.
// Maybe they want to report this post to the moderator(s)?
// Show the google+ icon.
if (!empty($settings['display_google_plus'])) {
if ($message['id'] == $context['topic_first_message'] || !empty($settings['display_google_plus_all'])) {
echo '<g:plusone href="' . $scripturl . '?topic=' . $context['current_topic'] . '" size="small"></g:plusone>
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>';
}
}
If its not working , I would first look at your cookies to ensure that they are correct.
Quote from: tinoest on July 20, 2011, 02:36:20 PM
The code you want to add is the following to your Display.template.php file just above the following line.
// Maybe they want to report this post to the moderator(s)?
// Show the google+ icon.
if (!empty($settings['display_google_plus'])) {
if ($message['id'] == $context['topic_first_message'] || !empty($settings['display_google_plus_all'])) {
echo '<g:plusone href="' . $scripturl . '?topic=' . $context['current_topic'] . '" size="small"></g:plusone>
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>';
}
}
If its not working , I would first look at your cookies to ensure that they are correct.
Thank you very much, working perfectly (at least i can see the button in my LiveMC modified theme). Now i have to resolve the other important problem... why Google+ doesn't like my website? :/
Any clues?
I see you have some facebook and twitter mods in your template aswell.
You might want to move the code I pasted above so that its near them.
With regards to your issue with the google+ not working, I would look at either the server settings or cookies.
I get the same error as you, but if I try it on a different site it works correctly. So something on your webserver is blocking it from connecting.
Yes, i have some mods to share topics in different social networks. It´s a good point to move the Google+ button code near them if i find the correct place in that big file called Display.template.php hehe :).
I'll take a look at server configuration or contact with my hosting support to see if they can do something with it.
By the way it's strange that the only links that doesn't work are the SMF forum related ones. I have MkPortal integrated with SMF and all exclusive MkPortal links works perfect on Facebook or Google+ or at least that is my impression, i have to investigate it to assure.
Thanks for your help again, i'll let you know if i will be able to solve the problem ;)
If you look for the following code in your template:
<div id="share_this">
You should put the google+ one near there to move it near the twitter icon.
Quote from: tinoest on July 20, 2011, 02:36:20 PM
The code you want to add is the following to your Display.template.php file just above the following line.
// Maybe they want to report this post to the moderator(s)?
// Show the google+ icon.
if (!empty($settings['display_google_plus'])) {
if ($message['id'] == $context['topic_first_message'] || !empty($settings['display_google_plus_all'])) {
echo '<g:plusone href="' . $scripturl . '?topic=' . $context['current_topic'] . '" size="small"></g:plusone>
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>';
}
}
If its not working , I would first look at your cookies to ensure that they are correct.
This code is present in my display.template.php
what is cookies?
Is there any need to attach any file?
if yes, i can attach here. just tell me the name and location of that file..
Quote from: Kindred on July 21, 2011, 01:02:06 AM
3- We have noted the type of site that you run. We typically will not provide support for such sites. We do not support those sites. We do not like those sites. We do not encourage those sites. We do not want those sites.
Quote from: Kindred on July 22, 2011, 07:59:46 AM
Quote from: Kindred on July 21, 2011, 01:02:06 AM
3- We have noted the type of site that you run. We typically will not provide support for such sites. We do not support those sites. We do not like those sites. We do not encourage those sites. We do not want those sites.
Hi Kindred.
Is that directed at me? Or other people whom have posted in this support thread.
EDIT: Ignore me, clicked on the link and realised it was aimed at yogesh_gamer
Quote from: yogesh_gamer on July 22, 2011, 05:34:09 AM
Quote from: tinoest on July 20, 2011, 02:36:20 PM
The code you want to add is the following to your Display.template.php file just above the following line.
// Maybe they want to report this post to the moderator(s)?
// Show the google+ icon.
if (!empty($settings['display_google_plus'])) {
if ($message['id'] == $context['topic_first_message'] || !empty($settings['display_google_plus_all'])) {
echo '<g:plusone href="' . $scripturl . '?topic=' . $context['current_topic'] . '" size="small"></g:plusone>
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>';
}
}
If its not working , I would first look at your cookies to ensure that they are correct.
This code is present in my display.template.php
what is cookies?
Is there any need to attach any file?
if yes, i can attach here. just tell me the name and location of that file..
I would appreciate it if you could attach the Display.Template.php file as requested.
Cookies are not related to your problem, that was in response to another member.
Quote from: tinoest on July 22, 2011, 09:41:05 AM
Quote from: yogesh_gamer on July 22, 2011, 05:34:09 AM
Quote from: tinoest on July 20, 2011, 02:36:20 PM
The code you want to add is the following to your Display.template.php file just above the following line.
// Maybe they want to report this post to the moderator(s)?
// Show the google+ icon.
if (!empty($settings['display_google_plus'])) {
if ($message['id'] == $context['topic_first_message'] || !empty($settings['display_google_plus_all'])) {
echo '<g:plusone href="' . $scripturl . '?topic=' . $context['current_topic'] . '" size="small"></g:plusone>
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>';
}
}
If its not working , I would first look at your cookies to ensure that they are correct.
This code is present in my display.template.php
what is cookies?
Is there any need to attach any file?
if yes, i can attach here. just tell me the name and location of that file..
I would appreciate it if you could attach the Display.Template.php file as requested.
Cookies are not related to your problem, that was in response to another member.
Ok.. here it is attachment...
Its due to another Mod that your using.
Move it this // Show the google+ icon.
if (!empty($settings['display_google_plus'])) {
if ($message['id'] == $context['topic_first_message'] || !empty($settings['display_google_plus_all'])) {
echo '<g:plusone href="' . $scripturl . '?topic=' . $context['current_topic'] . '" size="small"></g:plusone>
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>';
}
}
to be before this.
// Delete spam post link. But let's hide it if the poster is a mod or admin.
great mod...thanks
Quote from: tinoest on July 23, 2011, 04:22:15 AM
Its due to another Mod that your using.
Move it this // Show the google+ icon.
if (!empty($settings['display_google_plus'])) {
if ($message['id'] == $context['topic_first_message'] || !empty($settings['display_google_plus_all'])) {
echo '<g:plusone href="' . $scripturl . '?topic=' . $context['current_topic'] . '" size="small"></g:plusone>
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>';
}
}
to be before this.
// Delete spam post link. But let's hide it if the poster is a mod or admin.
Its working.......
Thanks Bhai...
First of all : Thanks for this mods ^^
I could install and uninstall it with no problem.
However, it seems that if I +1'ed a post in a thread => All post become +1'ed
Is it normal ?
It seems that the +1 is not for the the post but for the whole thread ; which miss the purpose to have a "+1" on any post though ...
I haven't check what is transmit to Google+ : would it be the thread's link, or the post I tried to +1'ed ?
[After reinstall]
It link the thread's URL without anything after the TOPIC_ID
Can you do anything to allow +1 to be for each post instead of the whole thread ?
Thanks anyway :)
[After some research]
I think all is here :
// Show the google+ icon.
if (!empty($modSettings['display_google_plus'])) {
if ($message['id'] == $context['topic_first_message'] || !empty($modSettings['display_google_plus_all'])) {
echo '<g:plusone href="' . $scripturl . '?topic=' . $context['current_topic'] . '" size="small"></g:plusone>
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>';
}
}
Instead of "$context['current_topic']" (or following) there should be a $context['current_msg'] or something like this ?
(Unfortunatly at work, but I'll try this evening)
Hi it does indeed apply it to the whole thread, as I would of thought you wanted to +1 the entire thread and not just the message within a thread.
You are correct in your assumption that you need to change $context[current_topic] to message['id'],
// Show the google+ icon.
if (!empty($modSettings['display_google_plus'])) {
if ($message['id'] == $context['topic_first_message'] || !empty($modSettings['display_google_plus_all'])) {
echo '<g:plusone href="' . $scripturl . '?topic=' . $context['current_topic'].'?msg=' .$message['id'] . '" size="small"></g:plusone>
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>';
}
}
Hi,
Well, some thread are worth to be +1'ed in a whole, but sometimes you just want to +1 a specific comment/post.
And the right code (tested right now) is actually :
// Show the google+ icon.
if (!empty($modSettings['display_google_plus'])) {
if ($message['id'] == $context['topic_first_message'] || !empty($modSettings['display_google_plus_all'])) {
echo '<g:plusone href="' . $scripturl . '?topic=' . $context['current_topic'].'?msg' .$message['id'] . '#msg' .$message['id'] . '" size="small"></g:plusone>
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>';
}
}
I hope it would be integrated in futur update of your great mod :)
Thanks again !
Thanks for updating the thread with the correct code, I hadn't managed to test what I had put. It was meant to give you an idea towards what it should be.
I'll look at integrating what you have as an tick-able option in the settings.
Great ^^
Thanks again !
Double-post just to add that the "+1" doesn't show on mobile phone (even Android's one).
I also had some complains about the fact that the only 2 first post of thread had the "+1" and not the other posts - I had no problem myself though.
If it helps for futur release ^^
using SMF 2.0 but its not showing up in admin so i cant enable/disable (not in misc either) installed without problems..
It should show up in the miscellaneous settings on the default theme.
If your running a custom theme then you will have to manually make the changes.
I'm also having the problem where it only shows on the first 2 or 3 posts on the thread, and even on the other posts it seems to +1 the entire thread and not the post.
I have this Mod (v1.0) installed, without errors during the installation.
But looks like i have almost the same issue like other here.
In a topic, the "GooglePlus"-Icon shows only on a some posts, not all the message, like i was thinking.
I attached my Display.template.php, maybe tinoest can help me?
thank you in advance.
Draffi
Quote from: Slug1 on July 13, 2011, 12:19:24 AM
Great mod!
Is there an update plan/idea for an option (a checkbox) in the "Modify Boards" to allow only specific boards to show the Google+ button?
+1There are boards for special members on my forum. I do not want these indexed by bots.
Quote from: jacbier on August 27, 2011, 09:54:08 AM
Quote from: Slug1 on July 13, 2011, 12:19:24 AM
Great mod!
Is there an update plan/idea for an option (a checkbox) in the "Modify Boards" to allow only specific boards to show the Google+ button?
+1
There are boards for special members on my forum. I do not want these indexed by bots.
I'll look at getting this implemented shortly.
I should get some free time in the next week to look at making the change.
Quote from: tinoest on August 28, 2011, 08:33:08 AM
I'll look at getting this implemented shortly.
I should get some free time in the next week to look at making the change.
If you can would that be great.
Quote from: tinoest on August 28, 2011, 08:33:08 AM
Quote from: jacbier on August 27, 2011, 09:54:08 AM
Quote from: Slug1 on July 13, 2011, 12:19:24 AM
Great mod!
Is there an update plan/idea for an option (a checkbox) in the "Modify Boards" to allow only specific boards to show the Google+ button?
+1
There are boards for special members on my forum. I do not want these indexed by bots.
I'll look at getting this implemented shortly.
I should get some free time in the next week to look at making the change.
Cool, thanks allot!
pls i mistakenly install this mod twice and i have uninstalled it but i am still getting this error
$txt['display_google_plus'] = 'Show google plus icon in posts'; $txt['display_google_plus_all'] = 'Show google plus icon in all posts, Note Display Google Plus has to be checked.';
pls what can i do
Is there a way to not display this icon in the Private Boards ?