シンプルなプラグインを Joomla 2.5 インストールにデプロイしようとしています。クラス宣言の外側にあるプラグインのコードが実行され、2 つのスクリプト タグがヘッドに追加されます。ただし、内部のコードは何もしません。$article->title や $article->text を変更できません。さまざまな記事からそのままコピーして貼り付けましたが、すべてが 1.5 についてしか話していないようです。私が見つけた1.7のものは、onPrepareContentをonContentPrepareに変更することについてのみ言及しています。どちらも何もしないようです。助けていただければ幸いです!
    <?php
    // No direct access.
    defined( '_JEXEC' ) or die( 'Restricted access' );
    class plgContentPicasaGallery extends JPlugin
    {
        /**
         *
         * @param   string  The context of the content being passed to the plugin.
         * @param   mixed   An object with a "text" property.
         * @param   array   Additional parameters.
         * @param   int     Optional page number. Unused. Defaults to zero.
         * @return  boolean True on success.
         */
        public function onContentBeforeDisplay($context, &$article, &$params, $page = 0)
        {
            if (is_object($article)) {
                $article->text = "omfg, wtf?";
                return true;
            } else {
                $article = "omfg, I'm not an object, wtf?";
                return true;
            }
        }
    }