Index: openacs-4/packages/acs-templating/tcl/head-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/head-procs.tcl,v diff -u -r1.17 -r1.18 --- openacs-4/packages/acs-templating/tcl/head-procs.tcl 4 Mar 2010 19:51:34 -0000 1.17 +++ openacs-4/packages/acs-templating/tcl/head-procs.tcl 19 Sep 2010 10:23:50 -0000 1.18 @@ -161,6 +161,47 @@ ] } +ad_proc -public template::head::defaults_meta { + {-http_equiv ""} + {-name ""} + {-scheme ""} + {-content ""} + {-lang ""} +} { + Add a meta tag to the head section of the document to be returned to the + users client if the meta tag does not yet exist. + Either name or http_equiv must be supplied. + + @param http_equiv the http-equiv attribute of the meta tag, ie. the + HTTP header which this metadata is equivalent to + eg. 'content-type' + @param name the name attribute of the meta tag, ie. the metadata + identifier + @param scheme the scheme attribute of the meta tag defining which + metadata scheme should be used to interpret the metadata, + eg. 'DC' for Dublin Core (http://dublincore.org/) + @param content the content attribute of the meta tag, ie the metadata + value + @param lang the lang attribute of the meta tag specifying the language + of its attributes if they differ from the document language +} { + variable ::template::head::metas + + if {$http_equiv eq "" && $name eq ""} { + error "You must supply either -http_equiv or -name." + } + if { ![info exists metas($http_equiv,$name) ] } { + set metas($http_equiv,$name) [list \ + $http_equiv \ + $name \ + $scheme \ + $content \ + $lang \ + ] + } +} + + ad_proc -public template::head::add_style { {-style:required} {-title ""} Index: openacs-4/www/blank-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/www/blank-master.tcl,v diff -u -r1.48 -r1.49 --- openacs-4/www/blank-master.tcl 12 Jul 2009 01:12:33 -0000 1.48 +++ openacs-4/www/blank-master.tcl 19 Sep 2010 10:23:50 -0000 1.49 @@ -246,6 +246,19 @@ } } +# OpenGraph protocol http://opengraphprotocol.org for social networking +# Should these use parameterized values instead? +template::head::defaults_meta -name "og:title" -content $doc(title) +template::head::defaults_meta -name "og:type" -content "website" +template::head::defaults_meta -name "og:url" -content [ad_return_url -qualified] +template::head::defaults_meta -name "og:image" -content "[ad_url]/favicon.ico" +if { [info exists ::template::head::metas(,description)] } { + template::head::defaults_meta -name "og:description" -content "[lindex $::template::head::metas(,description) 3]" +} +template::head::defaults_meta -name "og:site_name" -content [ad_system_name] + + + template::head::prepare_multirows set event_handlers [template::get_body_event_handlers] # Retrieve headers and footers