简体   繁体   中英

Custom php code in joomla component , pages

我们怎样才能在joomla中使用php代码。喜欢任何可用的组件,插件,模块。

You can use Jumi, it's a plugin/component/module that allows you to do precisely that.

Link: http://extensions.joomla.org/extensions/edition/custom-code-in-content/1023

Always search for Extension in http://extensions.joomla.org/extensions . There are couple of Extension like Jumi , PHP , DirectPHP , Add PHP , Include PHP and so on that you can use

You should take this component for refrence. http://code.google.com/p/joomla-php/

And think of the disabling the filtering of code within Joomla. Joomla and the Edtior you use proably filter the code when you save.

Configure Joomla! Article filters

By default Joomla! 'cleans' content on saving, removing script tags, event attributes (such as onclick, onmouseover etc.) and style tags.

A simple article parameter change is all that is required to fix this.

Joomla! 1.5

See this article - http://docs.joomla.org/Why_does_some_HTML_get_removed_from_articles_in_version_1.5.8%3F

Joomla! 1.7

In the Joomla! Article Manager, click on the Options button In the Options Dialog, click on the Text Filters tab. For the Super Users group, or any other trusted user group, set Filter Type to No Filtering. Make sure that you only set this option for user groups that can be trusted as setting the Filter Type to No Filtering will essentially allow the user to include any html in an article.

Joomla! 2.5

In the Joomla! Global Configuration, click on the Text Filters tab. For the Super Users group, or any other trusted user group, set Filter Type to No Filtering. Make sure that you only set this option for user groups that can be trusted as setting the Filter Type to No Filtering will essentially allow the user to include any html in an article.

and the Editor (JCE)

In the JCE Control Panel, click on the Editor Profiles button.

Click on the Profile name that the user, usergroup or component is assigned to, eg: 'Default'

Click on the Editor Parameters tab, then on the Options tab.

Check that the Allow Javascript or Allow CSS or Allow PHP options are set to Yes (depending on which code type you need to insert).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM