phpBMS

Changeset 685

Show
Ignore:
Timestamp:
12/17/09 14:36:36 (2 years ago)
Author:
nate
Message:
  • Added some instructions to the MailChimp? module's adminsettings.php
  • Temporarily removed display of batch limit in the MailChimp? module's adminsettings.php.
  • Added access key to the cancel button on manual_list_sync.php
Location:
trunk/phpbms/modules/mailchimp
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/modules/mailchimp/adminsettings.php

    r677 r685  
    7474                                          */ 
    7575                                        $hasUuid = false; 
     76                                        $hasCompany = false; 
     77                                        $hasType = false; 
    7678                                        $mergeVars = $api->listMergeVars($variables["mailchimp_list_id"]); 
    7779                                        if($api->errorCode){ 
     
    8183                                        }//end if 
    8284                                                 
     85                                        $req = array(); 
    8386                                        foreach($mergeVars as $mergeVar){ 
    8487                                                 
    85                                                 if($mergeVar["tag"] == "UUID"){ 
    86                                                         $hasUuid = true; 
    87                                                         break; 
    88                                                 }//end if 
     88                                                switch($mergeVar["tag"]){ 
     89                                                         
     90                                                        case "UUID": 
     91                                                                $hasUuid = true; 
     92                                                                break; 
     93                                                         
     94                                                        case "COMPANY": 
     95                                                                $hasCompany = true; 
     96                                                                break; 
     97                                                         
     98                                                        case "TYPE": 
     99                                                                $hasType = true; 
     100                                                                break; 
     101                                                         
     102                                                }//end switch 
    89103                                                 
    90104                                        }//end foreach 
     
    108122                                        }//end if 
    109123                                         
     124                                        /** 
     125                                          *  If it doesn't have a company field, create it.  
     126                                          */ 
     127                                        if(!$hasCompany){ 
     128                                                $req = array( 
     129                                                        "req"=>false, 
     130                                                        "public"=>true, 
     131                                                        "field_type"=>"text" 
     132                                                ); 
     133                                                $api->listMergeVarAdd($variables["mailchimp_list_id"], "COMPANY", "Company", $req); 
     134                                                if($api->errorCode){ 
     135                                                        unset($variables["mailchimp_list_id"]); 
     136                                                        $this->updateErrorMessage = "Unable to change the MailChimp list id: ".$api->errorMessage." (".$api->errorCode.")"; 
     137                                                        return $variables; 
     138                                                }//end if 
     139                                                 
     140                                        }//end if 
     141                                         
     142                                        /** 
     143                                          *  If it doesn't have a type field, create it.  
     144                                          */ 
     145                                        if(!$hasType){ 
     146                                                $req = array( 
     147                                                        "req"=>false, 
     148                                                        "public"=>true, 
     149                                                        "field_type"=>"text" 
     150                                                ); 
     151                                                $api->listMergeVarAdd($variables["mailchimp_list_id"], "TYPE", "Type", $req); 
     152                                                if($api->errorCode){ 
     153                                                        unset($variables["mailchimp_list_id"]); 
     154                                                        $this->updateErrorMessage = "Unable to change the MailChimp list id: ".$api->errorMessage." (".$api->errorCode.")"; 
     155                                                        return $variables; 
     156                                                }//end if 
     157                                                 
     158                                        }//end if 
     159                                         
    110160                                         
    111161                                        /** 
     
    137187                        $fields[] = $theinput; 
    138188                         
    139                         $theinput = new inputCheckbox("mailchimp_secure", $therecord["mailchimp_secure"], "secure"); 
     189                        $theinput = new inputCheckbox("mailchimp_secure", $therecord["mailchimp_secure"], "Use SSL Connection"); 
    140190                        $fields[] = $theinput; 
    141191                         
     
    160210        <legend>Main</legend> 
    161211 
     212         
    162213        <input type="hidden" id="apikey_changed" name="apikey_changed" value="0" /> 
    163     <p><?php echo $theform->showField("mailchimp_apikey");?></p> 
     214    <p> 
     215                <?php echo $theform->showField("mailchimp_apikey");?> 
     216                <br/> 
     217                <span class="notes"> 
     218                        Your MailChimp api key may found under the "API Keys &amp; Info" section 
     219                        in your "Account" page (<a href="http://admin.mailchimp.com/account/api" >http://admin.mailchimp.com/account/api</a>). 
     220                </span> 
     221        </p> 
    164222        <input type="hidden" id="listid_changed" name="apilist_changed" value="0" /> 
    165         <p><?php echo $theform->showField("mailchimp_list_id");?></p> 
     223        <p><?php echo $theform->showField("mailchimp_list_id");?> 
     224                <br/> 
     225                <span class="notes"> 
     226                        The list id for the list can be found under the list's settings near 
     227                        the bottom of the page.  It should say "unique id for list |*list name*|" 
     228                        where |*list name*| is the name of the list. 
     229                        <br/> 
     230                        When selecting a list to use, be aware that the sync process will 
     231                        remove records (on the MailChimp side) that do not exist in the client 
     232                        table. 
     233                </span> 
     234        </p> 
    166235        <p><?php echo $theform->showField("mailchimp_secure");?></p> 
    167         <p><?php echo $theform->showField("mailchimp_batch_limit");?></p> 
     236        <?php /*echo $theform->showField("mailchimp_batch_limit");*/?> 
    168237        <p><?php echo $theform->showField("mailchimp_last_sync_date");?></p> 
    169238 
  • trunk/phpbms/modules/mailchimp/manual_list_sync.php

    r682 r685  
    3333        </div> 
    3434        <p id="cancelP"> 
    35                 <button type="button" class="Buttons" id="cancelButton"><span>cancel</span></button> 
     35                <button type="button" class="Buttons" id="cancelButton" accesskey="c" title="access key = 'c'"><span>cancel</span></button> 
    3636        </p> 
    3737</div> 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.