Index: trunk/extensions/SemanticMaps/SM_Settings.php |
— | — | @@ -50,12 +50,26 @@ |
51 | 51 | include_once $smgIP . '/YahooMaps/SM_YahooMaps.php'; // Yahoo! Maps |
52 | 52 | include_once $smgIP . '/OpenStreetMap/SM_OSM.php'; // OpenLayers optimized for OSM |
53 | 53 | |
54 | | - |
55 | | - |
56 | | - |
57 | | - |
58 | 54 | # Array of String. The default mapping service for each feature, which will be used when no valid service is provided by the user. |
59 | 55 | # Each service needs to be enabled, if not, the first one from the available services will be taken. |
60 | 56 | # Note: The default service needs to be available for the feature you set it for, since it's used as a fallback mechanism. |
61 | 57 | $egMapsDefaultServices['qp'] = 'googlemaps2'; |
62 | 58 | $egMapsDefaultServices['fi'] = 'googlemaps2'; |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | +# Query Printers |
| 65 | + |
| 66 | +# Boolean. The default value for the forceshow parameter. Will force a map to be shown even when there are no query results |
| 67 | +# when set to true. This value will only be used when the user does not provide one. |
| 68 | +$smgQPForceShow = false; |
| 69 | + |
| 70 | +# Boolean. The default value for the showtitle parameter. Will hide the title in the marker pop-ups when set to true. |
| 71 | +# This value will only be used when the user does not provide one. |
| 72 | +$smgQPShowTitle = true; |
| 73 | + |
| 74 | +# String or false. Allows you to define the content and it's layout of marker pop-ups via a template. |
| 75 | +# This value will only be used when the user does not provide one. |
| 76 | +$smgQPTemplate = false; |
Index: trunk/extensions/SemanticMaps/SemanticMaps.php |
— | — | @@ -35,27 +35,27 @@ |
36 | 36 | |
37 | 37 | // Only initialize the extension when all dependencies are present. |
38 | 38 | if (defined( 'Maps_VERSION' ) && defined( 'SMW_VERSION' )) { |
39 | | - define('SM_VERSION', '0.5.3'); |
40 | | - |
| 39 | + define('SM_VERSION', '0.5.4 a2'); |
| 40 | + |
41 | 41 | $smgScriptPath = $wgScriptPath . '/extensions/SemanticMaps'; |
42 | 42 | $smgIP = $IP . '/extensions/SemanticMaps'; |
43 | | - |
| 43 | + |
44 | 44 | $smgStyleVersion = $wgStyleVersion . '-' . SM_VERSION; |
45 | | - |
| 45 | + |
46 | 46 | // Include the settings file. |
47 | 47 | require_once($smgIP . '/SM_Settings.php'); |
48 | | - |
| 48 | + |
49 | 49 | $wgExtensionFunctions[] = 'smfSetup'; |
50 | | - |
| 50 | + |
51 | 51 | $wgHooks['AdminLinks'][] = 'smfAddToAdminLinks'; |
52 | | - |
| 52 | + |
53 | 53 | $wgExtensionMessagesFiles['SemanticMaps'] = $smgIP . '/SemanticMaps.i18n.php'; |
54 | | - |
| 54 | + |
55 | 55 | // Registration of the Geographical Coordinate type. |
56 | 56 | $wgAutoloadClasses['SMGeoCoordsValue'] = $smgIP . '/SM_GeoCoordsValue.php'; |
57 | 57 | $wgHooks['smwInitDatatypes'][] = 'smfInitGeoCoordsType'; |
58 | 58 | } |
59 | | - |
| 59 | + |
60 | 60 | /** |
61 | 61 | * 'Initialization' function for the Semantic Maps extension. |
62 | 62 | * The only work done here is creating the extension credits for |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | */ |
65 | 65 | function smfSetup() { |
66 | 66 | global $wgExtensionCredits, $wgLang, $wgOut, $egMapsServices, $smgScriptPath; |
67 | | - |
| 67 | + |
68 | 68 | // Creation of a list of internationalized service names. |
69 | 69 | $services = array(); |
70 | 70 | foreach (array_keys($egMapsServices) as $name) $services[] = wfMsg('maps_'.$name); |
Index: trunk/extensions/SemanticMaps/QueryPrinters/SM_QueryPrinters.php |
— | — | @@ -48,6 +48,7 @@ |
49 | 49 | |
50 | 50 | private static function initializeParams() { |
51 | 51 | global $egMapsDefaultServices, $egMapsDefaultCentre, $egMapsAvailableGeoServices, $egMapsDefaultGeoService; |
| 52 | + global $smgQPForceShow, $smgQPShowTitle, $smgQPTemplate; |
52 | 53 | |
53 | 54 | self::$parameters = array( |
54 | 55 | 'geoservice' => array( |
— | — | @@ -67,19 +68,19 @@ |
68 | 69 | 'forceshow' => array( |
69 | 70 | 'type' => 'boolean', |
70 | 71 | 'aliases' => array('force show'), |
71 | | - 'default' => false, |
| 72 | + 'default' => $smgQPForceShow, |
72 | 73 | 'output-type' => 'boolean' |
73 | 74 | ), |
74 | 75 | 'template' => array( |
75 | 76 | 'criteria' => array( |
76 | 77 | 'not_empty' => array() |
77 | 78 | ), |
78 | | - 'default' => false, |
| 79 | + 'default' => $smgQPTemplate, |
79 | 80 | ), |
80 | 81 | 'showtitle' => array( |
81 | 82 | 'type' => 'boolean', |
82 | 83 | 'aliases' => array('show title'), |
83 | | - 'default' => true, |
| 84 | + 'default' => $smgQPShowTitle, |
84 | 85 | 'output-type' => 'boolean' |
85 | 86 | ), |
86 | 87 | 'icon' => array( |