]> git.mxchange.org Git - friendica.git/commitdiff
Adding metadata in the schema.org format.
authorMichael Vogel <icarus@dabo.de>
Sun, 26 Jan 2014 08:58:41 +0000 (09:58 +0100)
committerMichael Vogel <icarus@dabo.de>
Sun, 26 Jan 2014 08:58:41 +0000 (09:58 +0100)
mod/display.php
view/default.php

index efae937e16f59bcaea10e14e0ad8ecec355ff42a..75e51d5a90e2789cfce24d39dc925e12a02afbdf 100644 (file)
@@ -99,7 +99,7 @@ function display_content(&$a, $update = 0) {
                notice( t('Access to this profile has been restricted.') . EOL);
                return;
        }
-       
+
        if ($is_owner) {
                $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
 
@@ -216,12 +216,20 @@ function display_content(&$a, $update = 0) {
                $a->page['htmlhead'] .= '<meta name="fulltitle" content="'.$title.'" />'."\n";
                $a->page['htmlhead'] .= '<meta name="description" content="'.$description.'" />'."\n";
 
+               // Schema.org microdata
+               $a->page['htmlhead'] .= '<meta itemprop="name" content="'.$title.'" />'."\n";
+               $a->page['htmlhead'] .= '<meta itemprop="description" content="'.$description.'" />'."\n";
+               $a->page['htmlhead'] .= '<meta itemprop="image" content="'.$r[0]["thumb"].'" />'."\n";
+               $a->page['htmlhead'] .= '<meta itemprop="author" content="'.$author_name.'" />'."\n";
+
+               // Dublin Core
                $a->page['htmlhead'] .= '<meta name="DC.title" content="'.$title.'" />'."\n";
                $a->page['htmlhead'] .= '<meta name="DC.description" content="'.$description.'" />'."\n";
 
+               // Open Graph
                $a->page['htmlhead'] .= '<meta property="og:type" content="website" />'."\n";
                $a->page['htmlhead'] .= '<meta property="og:title" content="'.$title.'" />'."\n";
-               //<meta property="og:image" content="" />
+               $a->page['htmlhead'] .= '<meta property="og:image" content="'.$r[0]["thumb"].'" />'."\n";
                $a->page['htmlhead'] .= '<meta property="og:url" content="'.$r[0]["plink"].'" />'."\n";
                $a->page['htmlhead'] .= '<meta property="og:description" content="'.$description.'" />'."\n";
                $a->page['htmlhead'] .= '<meta name="og:article:author" content="'.$author_name.'" />'."\n";
index 792b2fbbcd3f5c8ea3786d1e2f07adacfcb0d69a..78ca97ac94c0c2a4cb050c09ab5094a3962b6c05 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html >\r
-<html>\r
+<html itemscope itemtype="http://schema.org/Blog" />\r
 <head>\r
   <title><?php if(x($page,'title')) echo $page['title'] ?></title>\r
   <script>var baseurl="<?php echo $a->get_baseurl() ?>";</script>\r