Changeset 499372
- Timestamp:
- 02/02/2012 09:11:57 PM (14 years ago)
- Location:
- pulsemaps/trunk
- Files:
-
- 4 edited
-
pm-proxy.php (modified) (1 diff)
-
pm-settings-page.php (modified) (4 diffs)
-
pulsemaps.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pulsemaps/trunk/pm-proxy.php
r496995 r499372 18 18 19 19 require_once('pm-config.php'); 20 $c = curl_init($pulsemaps_url . '/mapInfo/wp/');20 $c = curl_init($pulsemaps_url . $_POST['path']); 21 21 curl_setopt($c, CURLOPT_POSTFIELDS, $_POST); 22 curl_exec($c); 23 $code = curl_getinfo($c, CURLINFO_HTTP_CODE); 22 curl_setopt($c, CURLOPT_HEADER, true); 23 curl_setopt($c, CURLOPT_RETURNTRANSFER, true); 24 $data = curl_exec($c); 25 $info = curl_getinfo($c); 24 26 curl_close($c); 25 if ($code != "200") { 26 echo "Could not retrieve info from PulseMaps server. Please try again later."; 27 die; 27 $header_size = $info["header_size"]; 28 $headers = substr($data, 0, $header_size); 29 foreach (explode("\n", $headers) as $header) { 30 $header = rtrim($header); 31 if ($header) { 32 header($header); 33 } 28 34 } 35 echo substr($data, $header_size); -
pulsemaps/trunk/pm-settings-page.php
r497453 r499372 40 40 $id = $options['id']; 41 41 $widget_url = "$pulsemaps_url/widget.js?id=123456789¬rack=1&target=widget-preview"; 42 $url_load = plugins_url('pm-proxy.php', __FILE__); 42 $proxy_url = plugins_url('pm-proxy.php', __FILE__); 43 $siteurl = get_option('siteurl'); 43 44 ?> 44 45 <script type='text/javascript'> … … 46 47 pulsemaps.updatePreview('<?php echo $widget_url; ?>'); 47 48 } 48 jQuery(document).ready(function() { 49 pulsemaps.setHooks('<?php echo $widget_url; ?>'); 50 jQuery("#pulsemaps_plan_load").load("<?php echo $url_load; ?>", 51 {key: "<?php echo $options['key']; ?>", 49 function showMessage(msg) { 50 jQuery("#pulsemaps_message").html("<p><strong>" + msg + "</strong></p>").show(); 51 } 52 function updateInfo() { 53 jQuery("#pulsemaps_plan_load").html('<img src="<?php echo $siteurl; ?>/wp-admin/images/loading.gif" alt="loading...">'); 54 jQuery("#pulsemaps_plan_load").load("<?php echo $proxy_url; ?>", 55 {path: "/maps/<?php echo $options['id']; ?>/wp-info.html", 56 url: "<?php echo $proxy_url; ?>", 57 site_url: "<?php echo $siteurl; ?>", 58 id: "<?php echo $options['id']; ?>", 59 key: "<?php echo $options['key']; ?>", 52 60 version: "<?php echo pulsemaps_plugin_version(); ?>", 61 return_to: "<?php echo pulsemaps_settings_url(); ?>", 53 62 svn_id: "$Id: $", 54 63 wp_version: "<?php global $wp_version; echo $wp_version; ?>", 55 64 php_version: "<?php echo phpversion(); ?>"}); 65 } 66 jQuery(document).ready(function() { 67 pulsemaps.setHooks('<?php echo $widget_url; ?>'); 68 updateInfo(); 56 69 }); 57 70 </script> … … 77 90 $opts = get_option('pulsemaps_options', array()); 78 91 $id = $opts['id']; 79 $siteurl = get_option('siteurl'); 80 ?>92 ?> 93 <div id="pulsemaps_message" style="display: none;" class="updated"></div> 81 94 <div class="wrap"> 82 95 <div id="icon-options-general" class="icon32"><br></div> 83 96 <h2>PulseMaps Visitor Map</h2> 84 97 <div id="pulsemaps_descr"> 85 <div id="pulsemaps_plan_load" <?php if (!$opts['activated']) { echo 'style="display: none;"'; } ?>> 86 <img src="<?php echo $siteurl; ?>/wp-admin/images/loading.gif" alt="loading..."> 98 <div id="pulsemaps_plan_load"> 87 99 </div> 88 100 </div> … … 92 104 </form> 93 105 <script> 94 function pulsemaps_ handler(height, active, reload)106 function pulsemaps_activate(data) 95 107 { 96 document.getElementById('pulsemaps_iframe').height = parseInt(height); 97 if (active != 0) { 98 jQuery('#pulsemaps_settings').show(); 99 jQuery.post('options.php', jQuery('#pulsemaps_activate').serialize(), 100 function() { if (reload) { top.location.reload(true); } }); 101 } 108 jQuery('#pulsemaps_settings').show(); 109 <?php if (!$opts['activated']) { ?> 110 jQuery.post('options.php', jQuery('#pulsemaps_activate').serialize()); 111 jQuery('#pulsemaps_widget_msg').show(); 112 <?php } ?> 113 if (data.reload) { 114 updateInfo(); 115 } 116 if (data.message) { 117 showMessage(data.message); 118 } 102 119 } 103 120 </script> 104 <?php if (!$opts['activated']) { ?> 105 <iframe src="<?php echo "$pulsemaps_url/maps/$id/wp-info.html?settings_url="; 106 echo urlencode(pulsemaps_settings_url()); 107 echo "&plugin_url=" . urlencode(plugins_url('', __FILE__)); 108 echo "&admin_url=" . urlencode(pulsemaps_admin_url()); ?>" 109 id="pulsemaps_iframe" 110 frameborder="0" 111 style="width: 100%; overflow-y: hidden;" scrolling="no"></iframe> 112 <?php 113 } 114 $style = get_option('pulsemaps_widget', 'default'); 115 ?> 116 <div id="pulsemaps_settings" <?php if (!$opts['activated']) { echo 'style="display: none;"'; } ?>> 121 <div id="pulsemaps_settings" <?php if (!$opts['activated']) { echo 'style="display: none;"'; } ?>> 117 122 <form action="options.php" method="post"> 118 123 <?php settings_fields('pulsemaps_options'); ?> -
pulsemaps/trunk/pulsemaps.php
r496995 r499372 4 4 Plugin URI: http://pulsemaps.com/wordpress/ 5 5 Description: Show off your visitors on the world map. When people around the world visit your blog, the corresponding areas on the heat map widget light up! 6 Version: 1.5 6 Version: 1.5.1 7 7 Author: Aito Software Inc. 8 8 License: GPLv2 or later … … 217 217 echo '">PulseMaps settings page</a> to customize your widget.</strong></p></div>'; 218 218 } 219 } else if (!pulsemaps_tracking_active() && pulsemaps_activated()) { 220 echo '<div class="error"><p><strong>Enable the PulseMaps widget on the <a href="'; 219 } else { 220 $hide = pulsemaps_tracking_active() || !pulsemaps_activated(); 221 echo '<div id="pulsemaps_widget_msg" class="error"'; 222 if ($hide) { 223 echo ' style="display: none;"'; 224 } 225 echo '><p><strong>Enable the PulseMaps widget on the <a href="'; 221 226 echo get_option('siteurl') . '/wp-admin/widgets.php'; 222 227 echo '">widget admin page</a> to start mapping visitors.</strong></p></div>'; -
pulsemaps/trunk/readme.txt
r496995 r499372 8 8 Requires at least: 2.9 9 9 Tested up to: 3.3.1 10 Stable tag: 1.5 10 Stable tag: 1.5.1 11 11 12 12 Show off your visitors on the world map. When people around the world visit your blog, the corresponding areas on the heat map widget light up! … … 68 68 69 69 == Changelog == 70 71 = 1.5.1 = 72 73 * Cross-browser fixes to signup process. 70 74 71 75 = 1.5 =
Note: See TracChangeset
for help on using the changeset viewer.