Joomla插件未运行(已安装)

Joomla插件未运行(已安装),joomla,joomla-extensions,joomla1.7,Joomla,Joomla Extensions,Joomla1.7,我已经为Joomla“编写”了一个插件!我之所以说“编写”是因为它实际上是别人的,但它是为Joomla1.5设计的,我正在尝试将它升级到Joomla1.7中运行。但是,它已安装,不想运行。我试着让它无中生有地产生一个错误,但它不会给我任何东西。 我甚至不确定它是否是Joomla 1.7代码,但我希望你也能帮上忙 <?php // no direct access defined( '_VALID_MOS' ) or die( 'Restricted access' ); jimport

我已经为Joomla“编写”了一个插件!我之所以说“编写”是因为它实际上是别人的,但它是为Joomla1.5设计的,我正在尝试将它升级到Joomla1.7中运行。但是,它已安装,不想运行。我试着让它无中生有地产生一个错误,但它不会给我任何东西。 我甚至不确定它是否是Joomla 1.7代码,但我希望你也能帮上忙

<?php

// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );

jimport('joomla.plugin.plugin');

class plgContentRegisteredTags extends JPlugin
{
    function plgContentRegisteredTags (&$subject, $params)
    {
        parent::__construct($subject,$params);
    }

    function onPrepareContent ( $context, &$article, &$params, $page=0 )
    {
        global $mainframe;
        //if ( !$published ) return true;

        // define the regular expression for the bot
        $regex1 = "#{reg}(.*?){/reg}#s";
        $regex2 = "#{noreg}(.*?){/noreg}#s";

        // perform the replacement
        $article->text = preg_replace_callback(
            $regex1,
            create_function(
                '$matches',
                'global $my;
                if($my->id) return $matches[1];
                return "";'
            ),
            $article->text
        );

        $article->text = preg_replace_callback(
            $regex2,
            create_function(
                '$matches',
                'global $my;
                if(!$my->id) return $matches[1];
                return "";'
            ),
            $article->text
        );

        return true;
    }
}

Joomla中的插件插件!存储在相对于站点根目录的
plugins/plugin type/plugin\u name/
中。组件存储在
Components/
目录中

例如,pagebreak内容插件位于“plugins/content/pagebreak/”处,包含以下文件:

plugins/content/pagebreak/pagebreak.php
plugins/content/pagebreak/pagebreak.xml
plugins/content/pagebreak/index.html          // not an active file

您可以阅读关于

安装后的文件名及其位置(相对于joomla根目录)?我有一段时间没有使用joomla,但我记得组件文件名有命名约定。我认为应该是
componentname.php
。所以它应该是
registeredtags.php
而不是
helloworld.php
?我还对你如何尝试访问插件感兴趣。好的,那么这个组件的目的是什么?访问组件的常用方法是通过
my.domain/index.php?option=com\u registeredtags
直接调用它们。但从您的定义来看,您似乎想要一个插件而不是组件?插件有另一种安装清单(xml)格式。您应该了解有关创建这些文件的教程。另一个来源是可以分析的其他插件的安装,因为新版本的文档通常很少。