Am 03.07.2013 13:47, schrieb Ori Livneh: > >> How to contruct the background-image filename from a value in one of the >> OpenID PHP modules ? >> > For a single rule, you can get away with something like: > $wgHooks[ 'BeforePageDisplay' ][ ] = function ( &$out, &$skin ) { $out->addHeadItem( 'oauth-provider', '<style>.oauth { color: red; }</style>' ); return true; };
50% okay, but there's a remaining problem for my specific construct, because the script path is needed to fetch the image, but it is the article path in that hook context: "index.php/skin/icons/Google_large.png" which of course fails to load the image. Is there any help ? How can the script path be used (instead of the article path) ? =================== $wgHooks[ 'BeforePageDisplay' ][ ] = function ( &$out, &$skin ) { $out->addHeadItem( 'openidstyle', '<style>#openid_provider_Google_icon { background-image: url(skin/icons/Google_large.png); } </style>' ); return true; }; _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l