From: <mo...@us...> - 2006-05-05 00:51:19
|
Update of /cvsroot/tikiwiki/tiki/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4551/templates Modified Files: Tag: BRANCH-1-9 tiki-admin.tpl Added Files: Tag: BRANCH-1-9 tiki-admin-include-gmap.tpl Log Message: added a googlemap locator settings (not finished, more to come) --- NEW FILE: tiki-admin-include-gmap.tpl --- <div class="cbox"> <div class="cbox-title">{tr}Google Map setup{/tr}</div> <div class="cbox-data"> <form action="tiki-admin.php?page=gmap" method="post"> <table class="admin"><tr> <td class="form"><label for="feature_gmap">{tr}Enabled{/tr}:</label></td> <td><input type="checkbox" name="feature_gmap" id="feature_gmap" {if $feature_gmap eq 'y'}checked="checked"{/if}/></td> </tr><tr> <td class="form"><label for="gmap_key">{tr}Google Map Key{/tr}:</label></td> <td><input type="text" name="gmap_key" id="gmap_key" value="{$gmap_key}" /></td> </tr><tr> <td class="form"><label for="gmap_defaultx">{tr}Default x for map center{/tr}:</label></td> <td><input type="text" name="gmap_defaultx" id="gmap_defaultx" value="{$gmap_defaultx}" /></td> </tr><tr> <td class="form"><label for="gmap_defaulty">{tr}Default y from map center{/tr}:</label></td> <td><input type="text" name="gmap_defaulty" id="gmap_defaulty" value="{$gmap_defaulty}" /></td> </tr><tr> <td class="form"><label for="gmap_defaultz">{tr}Default zoom level{/tr}:</label></td> <td><select name="gmap_defaultz" id="gmap_defaultz"> <option value="1" {if $gmap_defaultz eq '1'}selected="selected"{/if}>1 - {tr}whole earth{/tr}</option> <option value="2" {if $gmap_defaultz eq '2'}selected="selected"{/if}>2</option> <option value="3" {if $gmap_defaultz eq '3'}selected="selected"{/if}>3</option> <option value="4" {if $gmap_defaultz eq '4'}selected="selected"{/if}>4</option> <option value="5" {if $gmap_defaultz eq '5'}selected="selected"{/if}>5 - {tr}country size{/tr}</option> <option value="6" {if $gmap_defaultz eq '6'}selected="selected"{/if}>6</option> <option value="7" {if $gmap_defaultz eq '7'}selected="selected"{/if}>7</option> <option value="8" {if $gmap_defaultz eq '8'}selected="selected"{/if}>8</option> <option value="9" {if $gmap_defaultz eq '9'}selected="selected"{/if}>9</option> <option value="10" {if $gmap_defaultz eq '10'}selected="selected"{/if}>10</option> <option value="11" {if $gmap_defaultz eq '11'}selected="selected"{/if}>11 - {tr}city size{/tr}</option> <option value="12" {if $gmap_defaultz eq '12'}selected="selected"{/if}>12</option> <option value="13" {if $gmap_defaultz eq '13'}selected="selected"{/if}>13</option> <option value="14" {if $gmap_defaultz eq '14'}selected="selected"{/if}>14</option> <option value="15" {if $gmap_defaultz eq '15'}selected="selected"{/if}>15</option> <option value="16" {if $gmap_defaultz eq '16'}selected="selected"{/if}>16</option> <option value="17" {if $gmap_defaultz eq '17'}selected="selected"{/if}>17 - {tr}max zoom{/tr}</option> </select></td> </tr><tr> <td colspan="2" class="button"><input type="submit" name="gmapsetup" value="{tr}Save{/tr}" /></td> </tr></table> </form> </div> </div> {if $feature_gmap eq 'y'} <script src="http://maps.google.com/maps?file=api&v=2&key={$gmap_key}"></script> <div id="map" style="width: 400px; height: 300px;border: 1px solid #000;"></div> <script type="text/javascript"> //<![CDATA[ function load() {literal}{{/literal} var map = new GMap2(document.getElementById("map")); map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng({$gmap_defaulty}, {$gmap_defaultx}), {$gmap_defaultz}); GEvent.addListener(map, "zoomend", function(gold, gnew) {literal}{{/literal} document.getElementById('gmap_defaultz').selectedIndex = gnew; {literal}});{/literal} GEvent.addListener(map, "moveend", function() {literal}{{/literal} document.getElementById('gmap_defaultx').value = map.getCenter().x; document.getElementById('gmap_defaulty').value = map.getCenter().y; {literal}});{/literal} {literal}}{/literal} load(); //]]> </script> {/if} Index: tiki-admin.tpl =================================================================== RCS file: /cvsroot/tikiwiki/tiki/templates/tiki-admin.tpl,v retrieving revision 1.77.2.20 retrieving revision 1.77.2.21 diff -u -d -r1.77.2.20 -r1.77.2.21 --- tiki-admin.tpl 30 Apr 2006 06:09:35 -0000 1.77.2.20 +++ tiki-admin.tpl 5 May 2006 00:51:15 -0000 1.77.2.21 @@ -5,7 +5,7 @@ </div> {* The rest determines which page to include using "page" GET parameter. Default : list-sections Add a value in first check when you create a new admin page. *} -{if in_array($smarty.get.page, array("features", "general", "login", "wiki", "gal", "fgal", "cms", "polls", "search", "blogs", "forums", "faqs", "trackers", "webmail", "rss", "directory", "userfiles", "maps", "metatags", "wikiatt","score", "community", "siteid", "calendar","intertiki"))} +{if in_array($smarty.get.page, array("features", "general", "login", "wiki", "gal", "fgal", "cms", "polls", "search", "blogs", "forums", "faqs", "trackers", "webmail", "rss", "directory", "userfiles", "maps", "metatags", "wikiatt","score", "community", "siteid", "calendar","intertiki","gmap"))} {assign var="include" value=$smarty.get.page} {else} {assign var="include" value="list-sections"} |