Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Google Authorship

Asked Modified Viewed 1,256 times
I
ImproperUsername
I
  • Member, joined since
  • Contributed 90 posts on the community forums.
  • Started 19 threads in the forums
  • Started this discussions
asked
Member

I manually added Google Authorship to my site by editing maincore.php, but it would be cool if something could be done to do this more elegantly.

// User profile link
function profile_link($user_id, $user_name, $user_status, $class = "profile-link") {
   global $locale, $settings;

   $class = ($class ? " class='$class'" : "");

   if ((in_array($user_status, array(0, 3, 7)) || checkrights("M")) && (iMEMBER || $settings['hide_userprofiles'] == "0")) {
      //$link = "<a href='".BASEDIR."profile.php?lookup=".$user_id."'".$class.">".$user_name."</a>";
      
      
      
   // to display google plus link on only news and article pages   
      if ($user_id == 1 && (strpos(curPageURL(),"news.php?readmore=")>0 || strpos(curPageURL(),"articles.php?article_id=")>0)){

         $link = "<a rel='me' href='".BASEDIR."profile.php?lookup=".$user_id."'".$class.">".$user_name."</a>";
         $link = $link." <a target='_blank' href='My-google-plus-profile-URL-here?rel=author' title='My Google Plus profile'><img border=0 src='path-to-icon-googleplus16.png' /></a>";
         } else {
         $link = "<a rel='me' href='".BASEDIR."profile.php?lookup=".$user_id."'".$class.">".$user_name."</a>";

         }
   } elseif ($user_status == "5" || $user_status == "6") {
      $link = $locale['user_anonymous'];
   } else {
      $link = $user_name;
   }

   return $link;
}
0 replies
There are no post found.

Labels

None yet

Statistics

  • Views 0 views
  • Posts 0 posts
  • Votes 0 votes
  • Topic users 1 member

1 participant

I
I
  • Member, joined since
  • Contributed 90 posts on the community forums.
  • Started 19 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet