I've added the extension to localsetting.php and then I clicked 'edit' and added the code {{#setmainimage:Sunset.jpg}}. However when I click 'facebook like' it doesn't use the image 'sunset.jpg' and I've checked the meta data and there it hasn't changed the og:image source. How do I use this extension? What am I doing wrong?
Topic on Extension talk:OpenGraphMeta
Try changing NewFromDBKey to NewFromTitle, this code seems to rely on an older(?) version of the Title class.
What are you talking about? Title::newFromDBKey still exists and always has. And since we have a DB key it's the right method to use. While Title::newFromTitle does not exist and is conceptually ridiculous.
Sorry, I just assumed that the reason this extensions doesn't seem to work with newer versions of MW was that it tried calling newFromDBkey like this Title::newFromDBkey($data['dbkey'], NS_FILE)
, whereas newFromDBkey now only seems to accept one parameter. Using newFromText instead, or something like Title::newFromDBkey( "File:" . $data['dbkey'] )
made it work for me. rotsee (talk) 19:02, 17 September 2012 (UTC)
This worked for me as well!! Thanks rotsee.
Thanks!
Is your wiki publicly available so I can debug?