2016-11-09 6 views

答えて

1

私は、xmlファイル

<scriptfile>script.php</scriptfile> 

に追加することで、スクリプトファイル内で答えを見つけ

<?php 
// No direct access to this file 
defined('_JEXEC') or die('Restricted access'); 

/** 
* Script file of yourplugin component. 
*/ 
class plgSystemyourplginInstallerScript 
{ 
    /** 
    * method to run after an install/update/uninstall method. 
    */ 
    public function postflight($type, $parent) 
    { 
     $db = JFactory::getDbo(); 
     $query = $db->getQuery(true); 

     $fields = array(
      $db->quoteName('ordering').' = '.(int) 999, 
     ); 

     $conditions = array(
      $db->quoteName('element').' = '.$db->quote('wraprotect'), 
      $db->quoteName('type').' = '.$db->quote('plugin'), 
     ); 

     $query->update($db->quoteName('#__extensions'))->set($fields)->where($conditions); 

     $db->setQuery($query); 
     $db->execute(); 
     // $parent is the class calling this method 
     // $type is the type of change (install, update or discover_install) 
    } 
} 

プラグイン名を編集することを忘れないでください とjoomlaの1.5編集中#__extensions#__plugins 行を削除してください$db->quoteName('type').' = '.$db->quote('plugin')

関連する問題