Changeset 715799
- Timestamp:
- 05/20/2013 11:25:29 PM (13 years ago)
- Location:
- soldpress/branches/0.9.5A
- Files:
-
- 3 added
- 6 edited
-
adapter.php (modified) (6 diffs)
-
custom_field_types.php (modified) (2 diffs)
-
lib/jquery.cookie (added)
-
lib/jquery.cookie/jquery.cookie.js (added)
-
license.php (added)
-
settings.php (modified) (11 diffs)
-
single-sp_property.php (modified) (4 diffs)
-
soldpress.php (modified) (3 diffs)
-
theme.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
soldpress/branches/0.9.5A/adapter.php
r715144 r715799 6 6 class soldpress_adapter{ 7 7 8 private $loginURL ='http://sample.data.crea.ca/Login.svc/Login';9 private $userId ='CXLHfDVrziCfvwgCuL8nUahC';10 private $pass ='mFqMsCSPdnb5WO1gpEEtDCHH';8 private $loginURL;//'http://sample.data.crea.ca/Login.svc/Login'; 9 private $userId;//'CXLHfDVrziCfvwgCuL8nUahC'; 10 private $pass;//'mFqMsCSPdnb5WO1gpEEtDCHH'; 11 11 private $templateLocation = "wp-content/plugins/soldpress/template/"; 12 12 private $service; … … 34 34 $this->service->AddHeader('Accept', '/'); 35 35 36 $this->loginURL = get_option("sc-url" ,"http://sample.data.crea.ca/Login.svc/Login");37 $this->userId = get_option("sc-username" ,"CXLHfDVrziCfvwgCuL8nUahC");38 $this->pass= get_option("sc-password" ,"mFqMsCSPdnb5WO1gpEEtDCHH");36 $this->loginURL = get_option("sc-url"); 37 $this->userId = get_option("sc-username"); 38 $this->pass= get_option("sc-password"); 39 39 $this->templateLocation = get_option("sc-template","wp-content/plugins/soldpress/template/"); 40 40 } … … 293 293 // $this->WriteLog('Begin CoAgent Picture Sync' . $post_id . 'CoAgentKey' . $coagentKey); 294 294 $this->sync_agentobject($coagentKey, 'ThumbnailPhoto',$post_id,'coagent'); 295 update_post_meta($post_id,'sc-sync-picture-agent', true,'coagent');295 296 296 } 297 //We Have Complete The Agent and CoAgent Sunc Process 298 update_post_meta($post_id,'sc-sync-picture-agent', true); 297 299 298 300 } … … 307 309 // $this->WriteLog('Begin Office Picture Sync' . $post_id . 'AgentKey' . $officeKey); 308 310 $this->sync_listingobject($officeKey, 'ThumbnailPhoto',$post_id); 311 //We Have Complete The Listing Process 312 update_post_meta($post_id,'sc-sync-picture-office', true); 309 313 310 314 } … … 371 375 $filename = $id .'-agent-' . $type . '.jpg'; 372 376 $wp_upload_dir = wp_upload_dir(); 373 $filePath = $wp_upload_dir['basedir']. '/soldpress/'.$filename; 374 file_put_contents($filePath,$image["Data"]); //We Change This In Settings 375 update_post_meta($post_id,'sc-sync-picture-'.$metatype.'-file', $filename); 377 $filePath = $wp_upload_dir['basedir']. '/soldpress/'.$filename; 378 if($image["Data"] == ""){ 379 file_put_contents($filePath,$image["Data"]); 380 update_post_meta($post_id,'sc-sync-picture-'.$metatype.'-file', $filename); 381 } 382 else{ 383 update_post_meta($post_id,'sc-sync-picture-'.$metatype.'-file', ''); 384 } 376 385 } 377 386 … … 386 395 $filename = $id .'-listing-' . $type . '.jpg'; 387 396 $wp_upload_dir = wp_upload_dir(); 388 $filePath = $wp_upload_dir['basedir']. '/soldpress/'.$filename; 389 file_put_contents($filePath,$image["Data"]); //We Change This In Settings 390 update_post_meta($post_id,'sc-sync-picture-office-file', $filename); 397 $filePath = $wp_upload_dir['basedir']. '/soldpress/'.$filename; 398 if($image["Data"] == ""){ 399 file_put_contents($filePath,$image["Data"]); 400 update_post_meta($post_id,'sc-sync-picture-office-file', $filename); 401 } 402 else{ 403 update_post_meta($post_id,'sc-sync-picture-office-file', ''); 404 } 391 405 } 392 406 -
soldpress/branches/0.9.5A/custom_field_types.php
r711125 r715799 1 1 <?php 2 2 3 4 3 5 function custom_post_type() { 4 6 $slug = get_option('sc-slug','listing'); 7 5 8 $labels = array( 6 9 'name' => _x( 'Listings', 'Post Type General Name', 'text_domain' ), … … 20 23 21 24 $rewrite = array( 22 'slug' => 'listing',25 'slug' => $slug, 23 26 'with_front' => true, 24 27 'pages' => true, -
soldpress/branches/0.9.5A/settings.php
r715428 r715799 1 1 <?php 2 3 2 4 3 5 add_action( 'admin_menu', 'soldpress_admin_menu' ); … … 9 11 10 12 function register_mysettings() { 13 11 14 register_setting( 'sc-settings-credentials', 'sc-username' ); 12 15 register_setting( 'sc-settings-credentials', 'sc-password' ); 13 16 register_setting( 'sc-settings-credentials', 'sc-url' ); 14 register_setting( 'sc-settings-credential', 'sc-template' ); 15 register_setting( 'sc-settings-credential', 'sc-language' ); 17 register_setting( 'sc-settings-credentials', 'sc-template' ); 18 register_setting( 'sc-settings-credentials', 'sc-language' ); 19 20 16 21 register_setting( 'sc-settings-sync', 'sc-sync-enabled' ); 22 register_setting( 'sc-settings-sync', 'sc-sync-days' ); 23 17 24 register_setting( 'sc-settings-layout', 'sc-layout-agentlisting' ); 18 25 register_setting( 'sc-settings-layout', 'sc-layout-ariealmap' ); … … 23 30 register_setting( 'sc-settings-layout', 'sc-layout-analyticsview' ); 24 31 register_setting( 'sc-settings-layout', 'sc-layout-soldpresslogo' ); 25 32 register_setting( 'sc-settings-layout', 'sc-slug' ); 33 34 register_setting( 'sc-settings-about', 'sc-license' ); 26 35 } 27 36 28 37 function soldpress_account_options() { 29 38 39 include_once(dirname(__FILE__).'/license.php'); 40 30 41 if ( !current_user_can( 'manage_options' ) ) { 31 42 wp_die( __( 'You do not have sufficient permissions to access this page.' ) ); … … 72 83 <h3 class="title">General</h3> 73 84 <table class="form-table"> 74 <!-- <tr valign="top"> 75 <th scope="row">Template Location</th> 76 <td><input type="text" class="regular-text" name="sc-template" value="<?php //echo get_option('sc-template','wp-content/plugins/soldpress/template/'); ?>" /></td> 77 </tr>--> 85 78 86 <tr valign="top"> 79 87 <th scope="row">Language</th> … … 148 156 if($job == 'soldpress_photo_sync' || $job == 'soldpress_listing_sync'){ 149 157 echo '<tr>'; 150 //echo '<th scope="row" class="check-column"><input type="checkbox" name="schedules[]" class="entries" value="1"></th>';151 158 echo '<td><strong>'.$job.'</strong><div class="row-actions" style="margin:0; padding:0;"><a href="options-general.php?page=soldpress&tab=sync_options&spa=runevt&job='.$job.'">Run Now</a></div></td>'; 152 159 echo '<td>'.date("r", $key).'</td>'; … … 178 185 <h3 class="title">Agent</h3> 179 186 <table class="form-table"> 187 <tr> 180 188 <th scope="row">Display Listing Agent</th> 181 189 <td> … … 183 191 </td> 184 192 </tr> 193 <tr valign="top"> 194 <th scope="row">Slug</th> 195 <td><input type="text" disabled class="regular-text" id ="sc-slug" name="sc-slug" value="<?php echo get_option('sc-slug','listing'); ?>" /> *(Avalible in Premium)</td> 196 </tr> 185 197 </table> 186 198 <h3 class="title">Map</h3> 187 199 <table class="form-table"> 200 <tr> 188 201 <th scope="row">Display Arieal Map</th> 189 202 <td> 190 <input name="sc-layout-ariealmap" id ="sc-layout-ariealmap" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-layout-ariealmap',1 ) ); ?> /> 191 </td> 192 </tr> 203 <input name="sc-layout-ariealmap" id ="sc-layout-ariealmap" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-layout-ariealmap',0 ) ); ?> *(Avalible in Premium) /> 204 </td> 205 </tr> 206 <tr> 193 207 <th scope="row">Display StreetView Map</th> 194 208 <td> 195 <input name="sc-layout-streetviewmap" id ="sc-layout-streetviewmap" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-layout-streetviewmap',0 ) ); ?> /> 196 </td> 197 </tr> 209 <input name="sc-layout-streetviewmap" id ="sc-layout-streetviewmap" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-layout-streetviewmap',0 ) ); ?> *(Avalible in Premium)/> 210 </td> 211 </tr> 212 198 213 </table> 199 214 <h3 class="title">Color</h3> 200 215 <table class="form-table"> 216 <tr> 201 217 <th scope="row">Primary Color</th> 202 218 <td> 203 <input name="sc-layout-primarycolor" id ="sc-layout-primarycolor" value="" /> 204 </td> 205 </tr> 219 <input name="sc-layout-primarycolor" id ="sc-layout-primarycolor" value="" /> *(Avalible in Premium) 220 </td> 221 </tr> 222 <tr> 206 223 <th scope="row">Secondary Color</th> 207 224 <td> 208 <input name="sc-layout-secondarycolor" id ="sc-layout-secondarycolor" value="" /> 225 <input name="sc-layout-secondarycolor" id ="sc-layout-secondarycolor" value="" /> *(Avalible in Premium) 209 226 </td> 210 227 </tr> … … 212 229 <h3 class="title">Relator(tm) Analytics</h3> 213 230 <table class="form-table"> 231 <tr> 214 232 <th scope="row">Click Analytics</th> 215 233 <td> 216 <input name="sc-layout-analyticsclick" id ="sc-layout-analyticsclick" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-layout-analyticsclick',0) ); ?> /> 217 </td> 218 </tr> 234 <input name="sc-layout-analyticsclick" id ="sc-layout-analyticsclick" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-layout-analyticsclick',0) ); ?> /> *(Avalible in Premium) 235 </td> 236 </tr> 237 <tr> 219 238 <th scope="row">View Analytics</th> 220 239 <td> 221 <input name="sc-layout-analyticsview" id ="sc-layout-analyticsview" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-layout-analyticsview',0 ) ); ?> /> 240 <input name="sc-layout-analyticsview" id ="sc-layout-analyticsview" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-layout-analyticsview',0 ) ); ?> /> *(Avalible in Premium) 222 241 </td> 223 242 </tr> … … 227 246 <?php } ?> 228 247 <?php if( $active_tab == 'about_options' ) { ?> 229 A product of Sanskript Solution, Inc. 230 231 Licsense Key: "Premium Beta" 232 233 248 249 <form method="post" action="options.php"> 250 <?php settings_fields( 'sc-settings-about' ); ?> 251 <h3 class="title">License</h3> 252 <table class="form-table"> 253 <tr> 254 <th scope="row">License Key</th> 255 <td> 256 <input type="text" class="regular-text" id ="sc-license" name="sc-license" value="<?php echo get_option('sc-license',''); ?>" /> 257 258 </td> 259 </tr> 260 </table> 261 </form> 262 Licsense Key: <?php echo get_option('sc-license',''); ?> . "Premium Beta" 234 263 <?php } ?> 235 264 <?php if( $active_tab == 'debug_options' ) { ?> … … 270 299 <?php submit_button('Clear Listings', 'secondary', 'delete', false); ?> 271 300 <?php submit_button('Delete Log', 'secondary', 'deletelog', false); ?> 301 <?php submit_button('Delete Photo Meta', 'secondary', 'removephotometadata', false); ?> 302 272 303 </form> 273 304 <?php if (get_option('sc-status' ) == true) { ?> … … 348 379 } 349 380 } 381 382 if (isset($_POST["removephotometadata"])) { 383 global $wpdb; 384 $deleteQuery = $wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE meta_key = 'sc-sync-picture--file'"); 385 $wpdb->query($deleteQuery); 386 } 350 387 } 351 388 -
soldpress/branches/0.9.5A/single-sp_property.php
r715428 r715799 21 21 } 22 22 23 add_action( 'wp_enqueue_scripts', ' my_scripts_method' ); // wp_enqueue_scripts action hook to link only on the front-end23 add_action( 'wp_enqueue_scripts', 'soldpress_analytics' ); // wp_enqueue_scripts action hook to link only on the front-end 24 24 25 25 … … 28 28 <?php get_header(); ?> 29 29 <h2><?php the_title(); ?></h2> 30 <div id="sp_disclaimer" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="sp_disclaimer" aria-hidden="true"> 31 <div class="modal-header"> 32 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> 33 <h3 id="myModalLabel">Terms of Use Agreement</h3> 34 </div> 35 <div class="modal-body"> 36 <p>Terms of Use Agreement 37 BY ACCESSING ANY OF THE WEB SITES OPERATED BY THE CANADIAN REAL ESTATE ASSOCIATION, INCLUDING REALTOR.ca, THE USER AGREES TO BE BOUND BY ALL OF THE TERMS FOR USE AND AGREES THAT THESE TERMS CONSTITUTE A BINDING CONTRACT BETWEEN THE USER AND THE CANADIAN REAL ESTATE ASSOCIATION (CREA) 38 39 These Terms of Use apply to all users, except to the extent that CREA has developed specific policies for member real estate Boards, Associations and brokers/salespersons who are members of CREA. Those organizations and entities should also refer to the Policies of the MLS® and Technology Council. 40 41 Copyright 42 This database and all materials on this site are protected by copyright laws and are owned by The Canadian Real Estate Association (CREA) or by the member who has supplied the data. Property listings and other data available on this site are intended for the private, non-commercial use by individuals. Any commercial use of the listings or data in whole or in part, directly or indirectly, is specifically forbidden except with the prior written authority of the owner of the copyright. 43 44 Users may, subject to these Terms and Conditions, print or otherwise save individual pages for private use. However, property listings and/or data may not be modified or altered in any respect, merged with other data or published in any form, in whole or in part. The prohibited uses include “screen scraping”, “database scraping” and any other activity intended to collect, store, reorganize or manipulate or publish data on the pages produced by, or displayed on the CREA web sites. 45 46 Trade Marks 47 REALTOR®, REALTORS® and the REALTOR® logo are certification marks owned by REALTOR® Canada Inc., a corporation jointly owned by the National Association of REALTORS® and The Canadian Real Estate Association. The REALTOR® trade marks are used to identify real estate services provided by brokers and salespersons who are members of CREA and who accept and respect a strict Code of Ethics, and are required to meet consistent professional standards of business practice which is the consumer's assurance of integrity. 48 49 MLS®, Multiple Listing Service®, and the associated logos are all registered certification marks owned by CREA and are used to identify real estate services provided by brokers and salespersons who are members of CREA. 50 51 Other trade marks used on the CREA web sites may be owned by real estate boards and other third parties. Nothing contained on this site gives any user the right or license to use any trade mark displayed on this site without the express permission of the owner. 52 53 Links 54 All links to any CREA website must be accompanied by a prominent notice which makes it clear to a browser that the link leads to a website of The Canadian Real Estate Association. 55 56 This notice may make reference to the domain name itself (e.g. REALTOR.ca or ICX.CA) or may refer to CREA. 57 No materials, names or marks may be used with the link to give the erroneous impression to a user that the individual, entity or website is somehow affiliated with CREA or any of CREA’s web sites; 58 Unless CREA expressly agrees otherwise, all links to any CREA website must connect to the home page of the website; 59 All links must be displayed in text or by using the graphic buttons used by CREA;The link must result in a new, fully functional, full screen browser window occupied solely by the pages created by the CREA® website. 60 Framing 61 Consumers and third parties may not under any circumstances use technology to display the content of CREA's web sites in a frame or in any other manner that is different from how it would appear if a user typed the URL into the browser line. 62 63 Liability and Warranty Disclaimer 64 CREA makes no representations about the suitability of the data or graphics published on this site. Everything on this site is provided "As Is" without warranty of any kind including all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement. Neither CREA nor any of its suppliers shall be liable for any direct, incidental, consequential, indirect or punitive damages arising out of your access to or use of this site. 65 66 Revisions 67 CREA may at any time revise these Terms of Use by updating this posting. All users of this site are bound by these conditions and should therefore periodically visit this page to review any changes to these requirements.</p> 68 </div> 69 <div class="modal-footer"> 70 <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button> 71 <button class="btn btn-primary">Accept</button> 72 </div> 73 </div> 30 74 <div class="well2"> 31 75 <div class="cycle-slideshow" data-cycle-fx="carousel" data-cycle-timeout="2000"> … … 41 85 ?> 42 86 </div> 43 <div id="disclaimer1">Test</div>44 87 <script> 45 88 46 var j = jQuery.noConflict() 47 if (j('#disclaimer').length > 0) { 48 alert('g'); 49 if (j.cookie('disclaimer_accepted') != 'yes') { 50 j('#disclaimer').modal({backdrop:'static',keyboard:false}) 51 52 j('#disclaimer').on('hide',function(){ 53 j.cookie('disclaimer_accepted','yes',{expires:30}); 54 }) 55 } 89 90 var j = jQuery.noConflict(); 91 92 j( document ).ready(function() { 93 if (j('#sp_disclaimer').length > 0) { 94 if (j.cookie('disclaimer_accepted') != 'yes') { 95 j('#sp_disclaimer').modal({backdrop:'static',keyboard:false}) 96 j('#sp_disclaimer').on('hide',function(){ 97 j.cookie('disclaimer_accepted','yes',{expires:30}); 98 }) 99 } 100 } 101 }); 56 102 57 }58 103 </script> 59 60 104 <div class="well3"> 61 105 <div class="row"> … … 266 310 </table> 267 311 </div> 268 <script src="http://maps.google.com/maps/api/js?sensor=false&.js"></script>269 312 <script> 270 313 // Enable the visual refresh -
soldpress/branches/0.9.5A/soldpress.php
r714737 r715799 4 4 Plugin URI: http://www.sanskript.com/products/soldpress 5 5 Description: SoldPress is a WordPress plugin to enable CREA’s members to easily disseminate MLS® listing content on WordPress Sites. 6 Version: 0.9.5. 2Beta6 Version: 0.9.5.3 Beta 7 7 Author: Amer Gill 8 8 Author URI: http://www.sanskript.com … … 10 10 */ 11 11 12 define('SOLDPRESS_VERSION', '0953'); 13 define('SOLDPRESS_PLUGIN_URL', plugin_dir_url( __FILE__ )); 14 12 15 ini_set('max_execution_time', 600); 13 16 ini_set('mysql.connect_timeout', 600); … … 42 45 43 46 function soldpress_activation() { 44 47 48 //Perform Version Upgrades 49 $currentVerison = get_option( 'sc-version', '0922'); 50 51 if(currentVerison == 0922) 52 { 53 //We need to delete the username and password and get the user to reenter because fundlement changes have occurent to the application 54 update_option( 'sc-version', SOLDPRESS_VERSION); 55 update_option( 'sc-username','' ); 56 update_option( 'sc-password', SOLDPRESS_VERSION); 57 } 58 45 59 update_option( 'sc-status', ''); 46 60 update_option( 'sc-sync-start','' ); -
soldpress/branches/0.9.5A/theme.php
r715428 r715799 29 29 '2', 30 30 true); 31 32 wp_enqueue_script( 33 'jquery.cookie.js', 34 plugins_url( 'lib/jquery.cookie/jquery.cookie.js' , __FILE__ ), 35 array('jquery'), 36 '1.3.1', 37 false); 38 39 wp_enqueue_script( 40 'google.maps', 41 '//maps.google.com/maps/api/js?sensor=false&.js', 42 array('jquery'), 43 '3.0.0', 44 false); 31 45 } 32 46
Note: See TracChangeset
for help on using the changeset viewer.