Changeset 685
- Timestamp:
- 12/17/09 14:36:36 (2 years ago)
- Location:
- trunk/phpbms/modules/mailchimp
- Files:
-
- 2 modified
-
adminsettings.php (modified) (5 diffs)
-
manual_list_sync.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/modules/mailchimp/adminsettings.php
r677 r685 74 74 */ 75 75 $hasUuid = false; 76 $hasCompany = false; 77 $hasType = false; 76 78 $mergeVars = $api->listMergeVars($variables["mailchimp_list_id"]); 77 79 if($api->errorCode){ … … 81 83 }//end if 82 84 85 $req = array(); 83 86 foreach($mergeVars as $mergeVar){ 84 87 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 89 103 90 104 }//end foreach … … 108 122 }//end if 109 123 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 110 160 111 161 /** … … 137 187 $fields[] = $theinput; 138 188 139 $theinput = new inputCheckbox("mailchimp_secure", $therecord["mailchimp_secure"], " secure");189 $theinput = new inputCheckbox("mailchimp_secure", $therecord["mailchimp_secure"], "Use SSL Connection"); 140 190 $fields[] = $theinput; 141 191 … … 160 210 <legend>Main</legend> 161 211 212 162 213 <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 & 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> 164 222 <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> 166 235 <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");*/?> 168 237 <p><?php echo $theform->showField("mailchimp_last_sync_date");?></p> 169 238 -
trunk/phpbms/modules/mailchimp/manual_list_sync.php
r682 r685 33 33 </div> 34 34 <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> 36 36 </p> 37 37 </div>