为什么 Joomla 要求组件位于管理组件菜单中?

发布于 2024-11-28 20:06:53 字数 133 浏览 2 评论 0原文

看起来这不应该是一个问题,但我创建了一个通用 Ajax 组件来用于自定义 Ajax 调用。然而,我发现 Joomla 需要一个组件出现在管理员组件菜单上。您甚至必须在组件的 xml 文件中指定它才能正常工作。有办法阻止这一切吗?

谢谢!

It seems like this shouldn't be an issue, but I created a generec Ajax component to use for custom Ajax calls. However, I discovered that Joomla requirees a component to be present on the Administrator Components Menu. You even have to specify this in the Component's xml file for this to work properly. Is there anyway to stop this?

thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

空心空情空意 2024-12-05 20:06:53

Jams Kennard 的《Mastering Joomla 1.5 - Extension and Framework Development》一书中对如何创建 XML-RPC 扩展(如插件)有很好的解释。

在开始之前,请先查看这里:

另外,Joomla 来源可以提供很多相关信息

编辑:
好吧,我可以想象这样做的唯一方法是在安装组件后(或稍后)直接从数据库中删除链接:

在清单文件中:

<administration>
     <menu>Example Menu Item Text</menu>
     <submenu>
         <menu link="anoption=avalue">Example Submenu Item Text</menu>
     </submenu>
</administration>
<install>
     <sql>
         <file driver="mysql" charset="utf8">example.install.sql</file>
     </sql>
</install>

在 example.install.sql 中:

DELETE FROM jos_menu WHERE (title = "COM_YOUR_COMPONENT" OR title = "com_your_component") AND client_id = 1

但首先,我从未使用过它,我不知道 joomla 安装程序是否会按以下顺序运行它:

  1. 创建 manu item
  2. 删除 manu item

There is a good explanation in book "Mastering Joomla 1.5 - Extension and Framework Development" by Jams Kennard on how to create XML-RPC extensions like plugins.

Before you start have a look here:

Also Joomla sources can give a lot of related information

EDIT:
ok, let say the only way I can imagine doing this is to remove the link directly from the DB just after your component has been installed (or later):

in your manifest file:

<administration>
     <menu>Example Menu Item Text</menu>
     <submenu>
         <menu link="anoption=avalue">Example Submenu Item Text</menu>
     </submenu>
</administration>
<install>
     <sql>
         <file driver="mysql" charset="utf8">example.install.sql</file>
     </sql>
</install>

in example.install.sql:

DELETE FROM jos_menu WHERE (title = "COM_YOUR_COMPONENT" OR title = "com_your_component") AND client_id = 1

but to be onest, I've never used it and I don't known if joomla installer will run it in this order:

  1. create manu item
  2. delete manu item
痴梦一场 2024-12-05 20:06:53

有一个通过高级管理菜单来管理管理菜单的好方法

http://www .theartofjoomla.com/extensions/advanced-administrator-menu.html

您可以将组件分组到特殊或现有选项卡中以引起人们的注意

There is a good way to manage the administration menu through advanced admin menu

http://www.theartofjoomla.com/extensions/advanced-administrator-menu.html

You can group your component in a special or existing tab to bring it out of attention

柠檬色的秋千 2024-12-05 20:06:53

我知道在 Joomla 1.5 中它不需要组件位于该菜单中?只是不要告诉它把它放在菜单中!在组件的 XML 中,只需确保“管理”块没有“菜单”条目,如下所示:

<administration>
    <files>
        <filename>blah... </filename>
    </files>
</administration>

'

' 元素添加到 XML 中即可将其添加到管理组件菜单。创建一个安装后 SQL 文件来返回并删除您显式添加的菜单项对我来说似乎有点疯狂?

I know in Joomla 1.5 it does'nt require a component to be in that menu? Just don't tell it to put it in the menu! In your component's XML, just make sure the 'administration' block doesn't have a 'menu' entry, like so:

<administration>
    <files>
        <filename>blah... </filename>
    </files>
</administration>

Adding the '<menu>' element to the XML is what adds it to the admin components menu. Creating a post-install SQL file to go back and remove the menu item you've explicitly added seems a bit crazy to me?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文