This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Mapstraction Examples - google v2</title> | |
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAY70wuSo0zF3ZtJVp5bDm1BS1Y2ErAqCHV5rDhHSzgjy23KqwdRRaoSBuZk72oDzzAYxVBjtsLqSmTw"></script> | |
<script src="../source/mxn.js?(google)" type="text/javascript"></script> | |
<script src="mxn.google.extras.js" type="text/javascript"></script> | |
<style type="text/css"> | |
#mapdiv { | |
height: 400px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
LEN=${1-12} | |
head /dev/urandom | uuencode -m - | sed -n 2p | cut -c1-${1:-$LEN}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Exclude expired events from Geo Mashup queries | |
*/ | |
function calant_filter_geo_mashup_locations_fields( $fields ) { | |
global $spEvents; | |
if ( isset( $spEvents ) ) | |
$fields .= ', eventEnd.meta_value as EventEndDate '; | |
return $fields; | |
} | |
add_filter('geo_mashup_locations_fields', 'calant_filter_geo_mashup_locations_fields'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
GeoMashup.addAction( 'colorIcon', function( properties, icon, color_name ) { | |
// For single category icons use the Geo Mashup color icon names, | |
// but the 24x24 ones in the custom image directory | |
icon.image = properties.custom_url_path + '/images/mm_20_' + color_name + '.png'; | |
icon.iconShadow = ''; | |
icon.iconSize = [ 24, 24 ]; | |
icon.iconAnchor = [ 12, 24 ]; | |
icon.iconInfoWindowAnchor = [ 12, 1 ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE o | |
/* SELECT p.post_title, o.*, pmi.* */ | |
FROM wp_postmeta AS o | |
INNER JOIN wp_posts AS p ON p.ID = o.post_id | |
INNER JOIN wp_postmeta AS pmi ON pmi.post_id = o.post_id AND pmi.meta_key = o.meta_key AND pmi.meta_value = o.meta_value | |
WHERE p.post_type = 'post' | |
AND pmi.meta_id < o.meta_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# one argument: the directory of a wp-config.php file | |
wpconfig=$1/wp-config.php | |
if [ ! -f "$wpconfig" ]; then | |
echo "$wpconfig not found." | |
exit | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function( $ ) { | |
GeoMashup.addAction( 'loadedMap', function( properties, mxn_map ) { | |
$.each( mxn_map.markers, function( i, marker ) { | |
var objects = GeoMashup.getMarkerObjects( marker ); | |
$.each( objects, function( j, object ) { | |
$.each( object.categories, function( k, category_id ) { | |
if ( 9 == category_id ) { | |
marker.proprietary_marker.setZIndex( 100 ); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GeoMashup.addAction( 'selectedMarker', function( properties, marker, map ) { | |
var objects = GeoMashup.getMarkerObjects( marker ); | |
if ( objects.length > 0 && GeoMashup.have_parent_access ) { | |
parent.location.href = properties.home_url + '?p=' + objects[0].object_id; | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# exit on error | |
set -e | |
archive=$1 | |
# one argument: the archive file | |
if [ ! -r "$archive" ]; then | |
echo "Usage: import-wpe-archive <zip-archive>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set_error_handler( function( $no, $str, $file, $line ) { | |
echo "<pre>$str\n"; | |
var_dump( debug_backtrace() ); | |
echo "</pre>"; | |
} ); |
OlderNewer