2012-03-23 27 views
-3

このプラグインをJoomla 1.7に変換しようとしていますが、私はPHPについて十分理解していません。どんな種類の助けにも感謝します。プラグインのコード変換Joomla 1.5からJoomla 1.7/2.5

URL:http://extensions.joomla.org/extensions/content-sharing/mailing-a-newsletter-bridges/10400

<?php 
    // no direct access 
    defined('_JEXEC') or die('Restricted access'); 

    jimport('joomla.plugin.plugin'); 

    class plgSystemAutoresponder extends JPlugin{ 

     function onUserAfterSave($user, $isnew, $succes, $msg){ 
      //$mainframe->redirect("index.php?option=com_contact");//Put your new page URL here 
      global $mainframe; 

      // convert the user parameters passed to the event 
      // to a format the external application 
      $args = array(); 
      $args['username'] = $user['username']; 
      $args['email']  = $user['email']; 
      $args['fullname'] = $user['name']; 
      $args['password'] = $user['password']; 

      $email1 = $user['email']; 
      $name1 = $args['username']; 
      $email = $args['email']; 
      $name = $args['username']; 

      //load plugin parameters 
      $plugin=&JPluginHelper::getPlugin('autoresponder'); 
      $pluginParams = new JParameter($plugin->params); 

      $responderUrl   = $this->params->get('responder_url'); 
      $MetaWebFormId  = $this->params->get('meta_web_form_id'); 
      $MetaSplitId   = $this->params->get('meta_split_id'); 
      $Unit     = $this->params->get('unit'); 
      $Redirect    = $this->params->get('redirect'); 
      $MetaRedirectOnlist = $this->params->get('meta_redirect_onlist'); 
      $MetaAdtracking  = $this->params->get('meta_adtracking'); 
      $MetaMessage   = $this->params->get('meta_message'); 
      $MetaRequired   = $this->params->get('meta_required'); 
      $MetaForwardVars  = $this->params->get('meta_forward_vars'); 

      $mainframe->redirect($responderUrl."?from=".$email."&name=".$name."&meta_web_form_id=".$MetaWebFormId."&meta_split_id="."&unit=".$Unit."&redirect=".$Redirect."&meta_redirect_onlist=".$MetaRedirectOnlist."&meta_adtracking=".$MetaAdtracking."&meta_message=".$MetaMessage."&meta_required=".$MetaRequired."&meta_forward_vars=".$MetaForwardVars); 

     } 
    } 
?> 

私はJoomlaの1.7にXMLを更新しました。しかし、Joomlaの1.7がエラーを与えていることはライン38と54

Line 38: `$pluginParams = new JParameter($plugin->params);` 
Line 54: ` $mainframe->redirect($responderUrl."?from=".$email."&name=".$name."&meta_web_form_id=".$MetaWebFormId."&meta_split_id="."&unit=".$Unit."&redirect=".$Redirect."&meta_redirect_onlist=".$MetaRedirectOnlist."&meta_adtracking=".$MetaAdtracking."&meta_message=".$MetaMessage."&meta_required=".$MetaRequired."&meta_forward_vars=".$MetaForwardVars);` 
+1

だから、あなたはここで誰かがあなたのためにそれを変換したいですか? –

+0

あなたのコードではどこが38と54のようですか?また、非推奨/削除されたクラスのドキュメントをチェックしましたか? – Joseph

+0

38行目と54行目が下に示されています。いいえ、私はちょうど正しい方向に私を向けるいくつかの1つをしたい。 – havok

答えて

0

はまた - 、ここでは偉大な詳細なソースと変更の例を見てみましょう:

http://www.theartofjoomla.com/topics/upgrading.html 
http://www.theartofjoomla.com/converting-old-extensions.html 
http://www.theartofjoomla.com/home/9-developer/112-upgrading-a-plugin-to-joomla-16.html 
http://www.theartofjoomla.com/home/41-extensions/132-more-on-upgrading-plugins-to-joomla-16.html 
http://www.theartofjoomla.com/home/9-developer/135-database-upgrades-in-joomla-16.html 
関連する問題