Author |
Message |
neralex
Site Admin
![](modules/Forums/images/avatars/201442295664a46e4575d46.jpg)
Joined: Aug 22, 2007
Posts: 1775
|
Posted:
Fri Jul 15, 2011 8:45 am |
|
hey guys!
google+ catch many users at the moment
i found a solution to put a xHTML valid +1 button in the News Module.
http://www.google.com/intl/en/webmasters/+1/button/
http://www.gabsoftware.com/tips/how-to-produce-valid-google-1-buttons/
open: modules/News/article.php
search:
Code:require_once 'mainfile.php';
|
add after:
Code:addJSToHead('https://apis.google.com/js/plusone.js','file');
|
search:
Code:themearticle($aaid, $informant, ...)
|
add before:
Code:// add 1+ button
$plus1 ='<div id="plusone-div"></div>
<script type="text/javascript">
gapi.plusone.render
(
"plusone-div",
{
"size": "small",
}
);
</script>';
|
notice: i must change in my theme the div-container of $plus1 to a inline-element for better validation and it works, too:
Code:$plus1 ='<span id="plusone-div"></span>
<script type="text/javascript">
gapi.plusone.render
(
"plusone-div",
{
"size": "small",
}
);
</script>';
|
add $plus1 at the end of themearticle in the article.php and your theme.php:
Code:themearticle($aaid, $informant, $..., $plus1)
|
a alternative way to load the js-file without addJSToHead:
put the follwing lines in your /includes/custom_files/custom_head.php
Code:<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
{parsetags: 'explicit'}
</script>
|
if you want the mouseover style from the NukeSEO Social Buttons, then you can use this little css class for your container or inline-element:
add to your style.css:
Code:.plusone01 {-moz-opacity:0.4; opacity:.40; filter:alpha(opacity=40); width:50px !important;}
.plusone01:hover {-moz-opacity:1; opacity:1; filter:alpha(opacity=100);}
|
add css-class into $plus1:
Code:$plus1 ='<span class="plusone01" id="plusone-div"></span>
<script type="text/javascript">
gapi.plusone.render
(
"plusone-div",
{
"size": "small",
}
);
</script>';
|
![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
Site Admin
![](modules/Forums/images/avatars/0c0adf824792d6d341ef4.gif)
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Wed Jul 20, 2011 6:03 am |
|
Excellent stuff! Thanks! |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Susann
Moderator
![](modules/Forums/images/avatars/4e3210db4efb891870d79.gif)
Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support
|
Posted:
Wed Jul 20, 2011 11:18 am |
|
Thanks for posting. However, if you are interested search for clickjacking + Google +1 button and maybe likejacking too. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jul 21, 2011 12:15 pm |
|
Thanks.
hmmm...
i found the site to this issue - its very interesting... wtf! oO
it was the best way to add this button xHTML valid. the <em> tag from google is soooo bad ...
give it a another xHTML valid way?
have any ideas? |
Last edited by neralex on Wed Jul 27, 2011 4:53 pm; edited 1 time in total |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Susann
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jul 21, 2011 1:24 pm |
|
I didn´t want to post the link above but you found it. In my opinion people/webmaster have rights to know about pros and cons of such "harmless buttons". Facebooks like button is a similar problem but an other story.
However, Google controlls us already and we will end up with around 80-90% websites with this button.
Because you asked.No, I don´t have no other idea currently to add this button in an other way. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
killing-hours
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/18f54b284d120ece8c103.gif)
Joined: Oct 01, 2010
Posts: 438
Location: Houston, Tx
|
Posted:
Sun Jul 24, 2011 6:07 pm |
|
Susann wrote: | Google controlls us already |
That is not so. At any point you can decide to play outside the "Google/FB" sandbox. The real issue is... will you? (generally speaking... not directed towards you Susann)
Sorry O.P.; Don't mean to hijack... just some food for thought.
Back from Colorado and already on my Soapbox 20 mins after being home... gah. =) |
_________________ Money is the measurement of time - Me
"You can all go to hell…I’m going to Texas" -Davy Crockett |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Aug 12, 2011 3:31 pm |
|
i have rediscovered with g + the google Services and i like g+ more than facebook. its very cool and the circles are a the best idea ever. you can set a lot of friend-networks in your own profile.
in the next time comes the g+ "fanpages" - i can't wait ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|