Facebook grabs the Mediawiki logo instead of the site logo

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Facebook grabs the Mediawiki logo instead of the site logo

jidanni
Here Facebook grabs the Mediawiki logo instead of the site logo.

http://www.facebook.com/groups/tg.taiwan/permalink/374509135949001/?comment_id=374537129279535&offset=0&total_comments=1

Doing the same experiment with e.g.,
http://en.wikipedia.org/wiki/1st_clan_chief ,
a page also without any user embedded images,
oddly does not cause the mediawiki logo to be chosen.

Though it does not choose the site logo, at least it doesn't choose the
mediawiki logo.

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Facebook grabs the Mediawiki logo instead of the site logo

Chad
On Mon, Jun 4, 2012 at 7:35 PM,  <[hidden email]> wrote:

> Here Facebook grabs the Mediawiki logo instead of the site logo.
>
> http://www.facebook.com/groups/tg.taiwan/permalink/374509135949001/?comment_id=374537129279535&offset=0&total_comments=1
>
> Doing the same experiment with e.g.,
> http://en.wikipedia.org/wiki/1st_clan_chief ,
> a page also without any user embedded images,
> oddly does not cause the mediawiki logo to be chosen.
>
> Though it does not choose the site logo, at least it doesn't choose the
> mediawiki logo.
>

Didn't we discuss this almost a year ago?

Indeed, we did:
http://lists.wikimedia.org/pipermail/mediawiki-l/2011-July/037710.html

-Chad

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Facebook grabs the Mediawiki logo instead of the site logo

John Du Hart
Yeah I remember that.
On Jun 4, 2012 7:45 PM, "Chad" <[hidden email]> wrote:

> On Mon, Jun 4, 2012 at 7:35 PM,  <[hidden email]> wrote:
> > Here Facebook grabs the Mediawiki logo instead of the site logo.
> >
> >
> http://www.facebook.com/groups/tg.taiwan/permalink/374509135949001/?comment_id=374537129279535&offset=0&total_comments=1
> >
> > Doing the same experiment with e.g.,
> > http://en.wikipedia.org/wiki/1st_clan_chief ,
> > a page also without any user embedded images,
> > oddly does not cause the mediawiki logo to be chosen.
> >
> > Though it does not choose the site logo, at least it doesn't choose the
> > mediawiki logo.
> >
>
> Didn't we discuss this almost a year ago?
>
> Indeed, we did:
> http://lists.wikimedia.org/pipermail/mediawiki-l/2011-July/037710.html
>
> -Chad
>
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Facebook grabs the Mediawiki logo instead of the site logo

Jon Robson
It's because the site logo is added via a background image and the
only image it finds in that image next to the text "page is the
powered by MediaWiki". It would show the site logi if the logo was
changed to an image tag instead. Alternatively a meta tag such as
<meta property="og:image" content="..path/sitelogo.png" /> could be
added to the head of the document (possibly via some kind of hook) to
get the desired effect.

On Tue, Jun 5, 2012 at 12:47 AM, John Du Hart <[hidden email]> wrote:

> Yeah I remember that.
> On Jun 4, 2012 7:45 PM, "Chad" <[hidden email]> wrote:
>
>> On Mon, Jun 4, 2012 at 7:35 PM,  <[hidden email]> wrote:
>> > Here Facebook grabs the Mediawiki logo instead of the site logo.
>> >
>> >
>> http://www.facebook.com/groups/tg.taiwan/permalink/374509135949001/?comment_id=374537129279535&offset=0&total_comments=1
>> >
>> > Doing the same experiment with e.g.,
>> > http://en.wikipedia.org/wiki/1st_clan_chief ,
>> > a page also without any user embedded images,
>> > oddly does not cause the mediawiki logo to be chosen.
>> >
>> > Though it does not choose the site logo, at least it doesn't choose the
>> > mediawiki logo.
>> >
>>
>> Didn't we discuss this almost a year ago?
>>
>> Indeed, we did:
>> http://lists.wikimedia.org/pipermail/mediawiki-l/2011-July/037710.html
>>
>> -Chad
>>
>> _______________________________________________
>> Wikitech-l mailing list
>> [hidden email]
>> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>>
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l



--
Jon Robson
http://jonrobson.me.uk
@rakugojon

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Facebook grabs the Mediawiki logo instead of the site logo

jidanni
In reply to this post by jidanni
But both my page and the Wikipedia page both have only the site logo, and 'powered by' footer icons.
How does Facebook know not to mistakenly show a 'powered by' icon for Wikipedia but not my site?
Unfair!

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Facebook grabs the Mediawiki logo instead of the site logo

jidanni
In reply to this post by Jon Robson
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?!

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Facebook grabs the Mediawiki logo instead of the site logo

Jon Robson
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,  <[hidden email]> 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
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Facebook grabs the Mediawiki logo instead of the site logo

jidanni
OK, this extract works for 1.20
function JidanniOpenGraphMetaPageHook(&$out,&$sk){global $wgLogo;
  $out->addHeadItem("meta:property:og:image",
  Html::element('meta',array('property'=>'og:image','content'=>wfExpandUrl($wgLogo)))."\n");return true;}
$wgHooks['BeforePageDisplay'][] = 'JidanniOpenGraphMetaPageHook';

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l