如何在"Joomla管理"面板中添加新页面 [英] How to add a new page to Joomla Admin panel

查看:123
本文介绍了如何在"Joomla管理"面板中添加新页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Joomla的新手.我需要在Joomla管理面板中添加一个新的自定义PHP页面(不在主站点上),以显示我自己的表中的一些数据. 我的Joomla版本是3.4.1稳定版.

I'm new to Joomla. I need to add a new custom PHP page inside Joomla admin panel (not on the main site) to display some data from my own tables. My Joomla version is 3.4.1 Stable.

请帮助我.

谢谢.

推荐答案

可能可以插入一个页面来显示数据-但我认为最好的选择是正确地进行操作,而不会窃取任何东西)可能是开发一个小的组件来最好地处理它.

You might be able to inject a single page to display the data - but I think more than likely your best bet (to do it properly without hacking stuff) might be to develop a small component to handle it best.

通过创建管理组件,您可以创建所需的页面并根据您的决定显示数据.

By creating the admin component you can create the page you want and display your data however you decide.

如果内存可以正确地为我服务,则可以创建一个文件夹(例如com_mycomponent),然后在该目录中创建"mycomponent.php".然后,您将php代码添加到该页面以执行您想要的任何操作.当然,这是最基本的准系统想法.

If memory serves me correctly, you can create a folder (say com_mycomponent) and create 'mycomponent.php' in that directory. Then you add your php code to that page to do whatever you want. Of course, this is for the most basic - barebones idea.

我会扩展,因为据我所知,我们将需要一个安装程序来实际安装"组件(尽管自从我在Joomla中大量开发以来已经有一段时间了).如果您不创建安装程序,我认为它将导致系统内部错误.

I will expand because to the best of my understanding we will need an installer to actually 'install' the component (although it's been a while since I've developed heavily in Joomla). If you don't create the installer I think it will cause errors within the system.

  • 创建目录

  • Create your directory

在目录中创建一个或两个目录

Create one or two directories in the directory

  • 管理员( 必填 )
  • 站点(可选)

在admin目录(如果创建了站点目录,则在站点目录中)中创建"mycomponent.php"并编写所需的 代码添加到管理文件(和/或站点文件)中.

Create 'mycomponent.php' in the admin directory (and site directory if you created one) and write your desired code into the admin file (and/or) site file.

在com_mycomponent中创建"mycomponent.xml"文件

Create 'mycomponent.xml' file in com_mycomponent

打开'mycomponent.xml'文件并粘贴以下代码

Open 'mycomponent.xml' file and paste the below code

<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.4.0">
<name>Your Name</name>
<creationDate>2015-05-13</creationDate>
<author>You</author>
<authorEmail>you@example.com</authorEmail>
<description>My Joomla Component</description>
<files folder="site">
<filename>mycomponent.php</filename>
</files>

<administration>
<menu>MyComponent</menu>
<files folder="admin">
<filename>mycomponent.php</filename>
</files>
</administration>
</extension>

  • 如果您未创建站点"目录,则可以删除以下内容:

  • You can remove the following if you did not create the 'site' directory:

    <files folder="site">
    <filename>mycomponent.php</filename>
    </files>
    

  • Zip com_mycomponent下的所有内容都命名为 com_mycomponent.zip

  • Zip All the contents under com_mycomponent lets name it com_mycomponent.zip

    登录到您的joomla管理员并安装com_mycomponent(以相同的方式 您将下载任何扩展程序)

    Login to your joomla admin and install com_mycomponent (the same way you would any extension you download)

    安装后,您可以在以下位置查看页面 http://yoursite.com/administrator/index.php?option=com_mycomponent

    After it installs, you can view your page at http://yoursite.com/administrator/index.php?option=com_mycomponent

    这篇关于如何在"Joomla管理"面板中添加新页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆