I believe this should help you: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/OpenGraphMeta/OpenGraphMeta.php?view=markup#l61
Personally I'd just install the extension though.. you may find you want the other things too :) Jon On Tue, Jun 19, 2012 at 1:40 PM, <[email protected]> wrote: > OK, <meta property="og:image" content="$wgLogo" /> > is what I need to add to the header of each page, as my site has no > images at all except for the logo. I use the latest git version of MediaWiki. > > In OutputPage.php we see > function addMeta( $name, $val ) { > array_push( $this->mMetatags, array( $name, $val ) ); > But then http://www.mediawiki.org/wiki/Manual:Hooks/BeforePageDisplay leads to > http://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_for_extension_developers > which makes one utterly totally lost. OK, then I found > http://www.mediawiki.org/wiki/Extension:OpenGraphMeta > which of course does exactly what I want... and much more. > But I don't to install any extensions. All I want is to add > that one little line > <meta property="og:image" content="$wgLogo" /> > with the $ variable (expanded > like $meta["og:image"] = wfExpandUrl($wgLogo); ) > or something. So how do I write the one line hook please?! -- Jon Robson http://jonrobson.me.uk @rakugojon _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
