Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1772

PostPosted: Fri Jul 15, 2011 8:45 am Reply with quote

hey guys!

google+ catch many users at the moment

i found a solution to put a xHTML valid +1 button in the News Module.
[ 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! ]


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
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Wed Jul 20, 2011 6:03 am Reply with quote

Excellent stuff! Thanks!

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
Susann
Moderator



Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Wed Jul 20, 2011 11:18 am Reply with quote

Thanks for posting. However, if you are interested search for clickjacking + Google +1 button and maybe likejacking too.
 
View user's profile Send private message
neralex







PostPosted: Thu Jul 21, 2011 12:15 pm Reply with quote

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 ... Sad

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 
Susann







PostPosted: Thu Jul 21, 2011 1:24 pm Reply with quote

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.
 
killing-hours
RavenNuke(tm) Development Team



Joined: Oct 01, 2010
Posts: 438
Location: Houston, Tx

PostPosted: Sun Jul 24, 2011 6:07 pm Reply with quote

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 
View user's profile Send private message
neralex







PostPosted: Fri Aug 12, 2011 3:31 pm Reply with quote

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
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©