[Hejes-devel] [1087] added some facebook og metatags

hejes-devel at nytud.hu hejes-devel at nytud.hu
Sun Feb 2 16:36:31 CET 2014


Revision: 1087
Author:   mihaltz
Date:     2014-02-02 16:36:31 +0100 (Sun, 02 Feb 2014)
Log Message:
-----------
added some facebook og metatags

Modified Paths:
--------------
    trunk/web2py/applications/helyesiras_webdev/databases/storage.sqlite
    trunk/web2py/applications/helyesiras_webdev/progress.log
    trunk/web2py/applications/helyesiras_webdev/views/blog/show.html
    trunk/web2py/applications/helyesiras_webdev/views/layout.html

Modified: trunk/web2py/applications/helyesiras_webdev/databases/storage.sqlite
===================================================================
(Binary files differ)

Modified: trunk/web2py/applications/helyesiras_webdev/progress.log
===================================================================
--- trunk/web2py/applications/helyesiras_webdev/progress.log	2014-02-02 15:33:12 UTC (rev 1086)
+++ trunk/web2py/applications/helyesiras_webdev/progress.log	2014-02-02 15:36:31 UTC (rev 1087)
@@ -989,3 +989,58 @@
 [2013-12-12 16:04:05] EDIT helyesiras_webdev/views/blog/show.html: 0
 [2013-12-12 16:07:53] EDIT helyesiras_webdev/views/default/aboutus.html: 0
 [2013-12-12 16:08:16] EDIT helyesiras_webdev/views/default/aboutus.html: 0
+[2013-12-12 16:37:39] EDIT helyesiras_webdev/views/blog/show.html: 1
+[2013-12-12 16:38:22] EDIT helyesiras_webdev/views/blog/show.html: 0
+[2013-12-13 12:17:33] EDIT helyesiras_webdev/views/blog/show.html: 0
+[2013-12-13 12:29:00] EDIT helyesiras_webdev/views/layout.html: 2
+[2013-12-13 12:29:40] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 12:29:44] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 12:34:10] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 12:34:11] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 12:34:52] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 12:35:31] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 12:36:16] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 12:36:26] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 12:36:28] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 12:36:53] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 12:36:55] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 12:43:28] EDIT helyesiras_webdev/views/blog/show.html: 0
+[2013-12-13 12:43:56] EDIT helyesiras_webdev/views/layout.html: 1
+[2013-12-13 12:45:04] EDIT helyesiras_webdev/views/blog/show.html: 0
+[2013-12-13 12:46:40] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 12:46:47] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 13:00:07] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 13:06:41] EDIT helyesiras_webdev/views/layout.html: 1
+[2013-12-13 13:07:20] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 13:07:47] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 13:08:29] EDIT helyesiras_webdev/views/blog/show.html: 0
+[2013-12-13 13:13:30] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 13:14:32] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 13:17:16] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 13:18:00] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 13:19:31] EDIT helyesiras_webdev/views/layout.html: 1
+[2013-12-13 13:20:20] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 13:21:32] EDIT helyesiras_webdev/views/blog/show.html: 1
+[2013-12-13 13:23:37] EDIT helyesiras_webdev/views/blog/show.html: 0
+[2013-12-13 13:25:10] EDIT helyesiras_webdev/views/blog/show.html: 1
+[2013-12-13 13:25:19] EDIT helyesiras_webdev/views/blog/show.html: 0
+[2013-12-13 13:26:28] EDIT helyesiras_webdev/views/blog/show.html: 0
+[2013-12-13 13:26:34] EDIT helyesiras_webdev/views/blog/show.html: 0
+[2013-12-13 13:27:07] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 13:27:29] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 13:27:31] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-13 13:28:51] EDIT helyesiras_webdev/views/layout.html: 1
+[2013-12-13 13:29:24] EDIT helyesiras_webdev/views/layout.html: 1
+[2013-12-13 13:29:34] EDIT helyesiras_webdev/views/layout.html: 0
+[2013-12-17 12:32:58] EDIT helyesiras_webdev/views/blog/show.html: 0
+[2013-12-17 18:14:48] UPLOAD /usr/local/opt/web2py.2.4.6-stable/applications/helyesiras_webdev/static/blog/karifa.gif: 1244
+[2013-12-17 18:15:44] DELETE helyesiras_webdev/static/blog/karifa.gif: -1244
+[2013-12-17 18:18:23] UPLOAD /usr/local/opt/web2py.2.4.6-stable/applications/helyesiras_webdev/static/blog/gyertya.gif: 1398
+[2013-12-19 12:57:00] UPLOAD /usr/local/opt/web2py.2.4.6-stable/applications/helyesiras_webdev/static/blog/paragraf.jpg: 39
+[2013-12-24 10:23:32] UPLOAD /usr/local/opt/web2py.2.4.6-stable/applications/helyesiras_webdev/static/blog/pezsgo.jpg: 148
+[2014-01-09 11:49:30] UPLOAD /usr/local/opt/web2py.2.4.6-stable/applications/helyesiras_webdev/static/blog/baba.jpg: 2014
+[2014-01-09 11:52:11] DELETE helyesiras_webdev/static/blog/baba.jpg: -2014
+[2014-01-09 11:52:28] UPLOAD /usr/local/opt/web2py.2.4.6-stable/applications/helyesiras_webdev/static/blog/baba.jpg: 1977
+[2014-01-21 17:18:18] UPLOAD /usr/local/opt/web2py.2.4.6-stable/applications/helyesiras_webdev/static/blog/zsiroskenyer.jpg: 922
+[2014-01-22 10:43:32] UPLOAD /usr/local/opt/web2py.2.4.6-stable/applications/helyesiras_webdev/static/blog/offshore.jpg: 1391
+[2014-01-23 09:34:55] UPLOAD /usr/local/opt/web2py.2.4.6-stable/applications/helyesiras_webdev/static/blog/lemon.jpg: 697

Modified: trunk/web2py/applications/helyesiras_webdev/views/blog/show.html
===================================================================
--- trunk/web2py/applications/helyesiras_webdev/views/blog/show.html	2014-02-02 15:33:12 UTC (rev 1086)
+++ trunk/web2py/applications/helyesiras_webdev/views/blog/show.html	2014-02-02 15:36:31 UTC (rev 1087)
@@ -4,6 +4,9 @@
   response.title = post.posts.title + ' – ' + response.title
 pass
 response.meta.description = 'Hírek, érdekességek, helyesírási kérdések - a helyesírás.mta.hu portál blogja'
+response.meta.og_image = URL('static', 'blog/' + post.posts.image_filename, host=True)
+import re
+response.meta.description = re.sub(r'<[^<>]+>', '', MARKMIN(post.posts.lead).xml())
 }}
 
 {{extend 'layout.html'}}
@@ -32,6 +35,7 @@
 <div id="blog-container">
 
 {{#=response.toolbar()}}
+
 <a href="{{=URL(c='blog', f='index')}}" id="blog-header-image">
     <img src="http://htp-devel.nytud.hu/helyesiras_webdev/static/images/blog_h.png">
     <h3><em>Helyes blog</em><br>

Modified: trunk/web2py/applications/helyesiras_webdev/views/layout.html
===================================================================
--- trunk/web2py/applications/helyesiras_webdev/views/layout.html	2014-02-02 15:33:12 UTC (rev 1086)
+++ trunk/web2py/applications/helyesiras_webdev/views/layout.html	2014-02-02 15:36:31 UTC (rev 1087)
@@ -21,14 +21,22 @@
     <!-- Speaking of Google, don't forget to set your site up: 
      http://google.com/webmasters -->
     <meta name="google-site-verification" content="" />
-    
+                
     <!--  Mobile Viewport Fix
       j.mp/mobileviewport & davidbcalhoun.com/2010/viewport-metatag 
       device-width: Occupy full width of the screen in its current orientation
       initial-scale = 1.0 retains dimensions instead of zooming out if page height > device height
       maximum-scale = 1.0 retains dimensions instead of zooming in if page width < device width
       -->
-    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
+
+    <!-- Facebook OpenGraph metadata -->
+    <meta property="og:title" content="{{=response.title}}"/>
+    <meta property="og:image" content="{{=response.meta.og_image or URL('static', 'images/helyesiras_mta_hu__fb_logo.png', host=True)}}"/> <!-- TODO: use 200x200 image -->                                    
+    <!-- TODO: <meta property="og:url" content="{{=URL(host=True)}}"/> <!-- TODO: add unnamed parameter ('blog page') if blog/show --->
+    <meta property="og:description" content="{{=response.meta.description}}"/>
+    <!-- TODO: og:type, og:site_name -->
+    <!-- TODO: fix fb Like button metadata warnings -->
     
     <!-- Place favicon.ico and apple-touch-icon.png in the root of your domain and delete these references -->
     <link rel="shortcut icon" href="{{=URL('static','favicon.ico')}}" type="image/x-icon">




More information about the Hejes-devel mailing list