[Mediawiki-l] undefined variable
Andreas Meyer
anmeyer at anup.de
Sat Jun 27 10:01:25 UTC 2009
Hello!
Richard Alan <richard.philippines at gmail.com> schrieb:
> You say you installed AddMetas but did you use the functionality? If so then
hm, I think I use the functionality. In LocalSettings.php I added
require_once("$IP/extensions/AddMetas.php");
> what were the lines that you added to the article page? Also what version of
> MediaWiki did you install it on?
There are no articles yet. The version I use is mediawiki-1.14.0
http://www.insilence.de
Datenbank: MySQL 5.0.45
HTTP Server: Apache
PHP Version: 5.2.6 (Zend: 2.2.0)
Regards
Andreas Meyer
A man, a miss, a car -- a curve,
He kissed the miss and missed the curve
Mein öffentlicher GPG-Schlüssel unter:
http://gpg-keyserver.de/pks/lookup?search=anmeyer&fingerprint=on&op=index
> On Sat, Jun 27, 2009 at 5:22 PM, Andreas Meyer <anmeyer at anup.de> wrote:
>
> > Hello!
> >
> > I installed AddMetas.php and get this in the error-logfile of Apache:
> >
> > Undefined variable: parser in /vwww/insilence/root/extensions/AddMetas.php
> > on line 25
> > Trying to get property of non-object in
> > /vwww/insilence/root/extensions/AddMetas.php on line 25
> >
> >
> > The function in AddMetas.php looks like this:
> >
> > function wfAddMetas( &$out, &$text ) {
> > global $wgTitle, $wgParser, $wgRequest, $action;
> > if(
> > $action !== 'edit'
> > && $action !== 'history'
> > && $action !== 'delete'
> > && $action !== 'watch'
> > && strpos( $parser->mTitle->mPrefixedText, 'Special:' ) === false
> > && $parser->mTitle->mNamespace !== 8
> > )
> > {
> > $name = $wgTitle->getPrefixedDBKey();
> >
> > $out->addMeta( 'Description', 'you meta description');
> > $out->addMeta( 'Keywords', $name.', your meta keywords' );
> > //$out->addMeta( 'Author', 'the author');
> > //$out->addMeta( 'Rating', 'General');
> > //$out->addMeta( 'Revisit', '1 DAYS');
> > //$out->addMeta( "revisit-after", "5 days");
> > }
> > return true;
> > }
> >
> > I am not a PHP-specialist. What is wrong?
> >
> > Regards
> > --
> > Andreas Meyer
> >
> > A man, a miss, a car -- a curve,
> > He kissed the miss and missed the curve
> >
> > Mein öffentlicher GPG-Schlüssel unter:
> > http://gpg-keyserver.de/pks/lookup?search=anmeyer&fingerprint=on&op=index
> >
> > _______________________________________________
> > MediaWiki-l mailing list
> > MediaWiki-l at lists.wikimedia.org
> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
More information about the MediaWiki-l
mailing list