Joomla!吧

Sunday, May 20th

Last update04:29:37 AM GMT

You are here: Joomla教程 >> Joomla入门教程 >> 解决Joomla插件安装后自动禁用的问题

解决Joomla插件安装后自动禁用的问题

很多朋友发现Joomla的插件安装之后还必须到后台的插件管理进行激活后才能使用,为什么Joomla系统要这样设置呢?Joomla8通过查询Joomla官方网站更新日志发现,原来是Joomla为了Joomla网站的安全和避免发生事故所采取的一种措施,是自从Joomla1.5.18开始采用的。不过还是有一些朋友觉得这东西麻烦,不如去掉,Joomla8查询了一下Joomla官方教程文档后发现了一个简单的方法,在此公布一下解决方法。

很容易,只需要在文件夹libraries/joomla/plugin找到文件:helper.php,然后去掉其中122-136行的一下代码:

if(!$shutdown_handler_installed)  
{  
// only register the shutdown function if we are capable of checking the errors (reqs PHP 5.2+)  
if (version_compare("5.2", phpversion(), "<="))  
{  
  // you can only register a static method if it is declared static  
  // we can't declare static b/c it breaks on PHP4  
  // therefore we instantiate the helper for this one purpose  
  $pluginHelper = new JPluginHelper;  
  register_shutdown_function(array($pluginHelper, 'shutdown'));  
  }  
  // we may not have installed the handler, but setting this to true  
  // will prevent us from continually running the version compare  
  $shutdown_handler_installed = true;  

OK,只要这样这个问题就得以完美解决。

评论 

 
0 # mania 2011-01-17 19:34
:zzz
回复 | 引用并回复 | 引用
 

发表评论


验证码
刷新