Skip to content
Permalink
Browse files

styled minimap for new caches; made minimap url configurable; fixed l…

…ine-breaking in new caches list
  • Loading branch information...
flopp committed May 16, 2013
1 parent ea3e30d commit d8803d0d6bd7b21fae7c70e42f6f38eba98694da
@@ -305,7 +305,14 @@
*/
$opt['logic']['cachemaps']['url'] = 'http://maps.google.com/maps/api/staticmap?center={latitude},{longitude}&zoom={userzoom}&size=200x200&maptype=hybrid&markers=color:blue|label:|{latitude},{longitude}&sensor=false&key={gmkey}';
$opt['logic']['cachemaps']['iframe'] = false;
/* Minimap for the new-caches list on the front page.
* If the url string is empty, no minimap is displayed on the front page.
*
* Coordinates of new caches are appended to the url.
*/
$opt['logic']['minimapurl'] = 'http://maps.googleapis.com/maps/api/staticmap?sensor=false&size=220x220&maptype=roadmap&markers=color:blue|size:small';
/* target vars
* all _REQUEST-vars that identifiy the current page for target redirection after login
*/
@@ -554,4 +561,4 @@
// explanation of nature protection areas
$opt['cms']['npa'] = 'http://wiki.opencaching.de/index.php/Schutzgebiete';
?>
?>
@@ -100,7 +100,17 @@
// get newest caches
$tpl->assign_rs('newcaches', $getNew->rsForSmarty('cache'));
// enable minimap for new caches if url is set
if ($opt['logic']['minimapurl'] != '')
{
$tpl->assign('minimap_url', $opt['logic']['minimapurl']);
$tpl->assign('minimap_enabled', true);
}
else
{
$tpl->assign('minimap_enabled', false);
}
// last 30 days' top ratings
$tpl->assign_rs('topratings', $getNew->rsForSmarty('rating'));
@@ -784,6 +784,14 @@ p.main-totalstats {
-webkit-box-shadow: 1px 2px 2px #555;
}

.img-minimap {
border: 1px solid #a9a9a9;
padding: 2px;
box-shadow: 1px 2px 2px #555;
-moz-box-shadow: 1px 2px 2px #555;
-webkit-box-shadow: 1px 2px 2px #555;
}

form#register label {
text-align: right;
width: 14em;
@@ -3,12 +3,15 @@
*
* Unicode Reminder メモ
***************************************************************************}
<div style="overflow: hidden;">
<div style="float: left; width: 535px">
{if $minimap_enabled}
<div>
<img class="img-minimap" style="margin-top: 11px; margin-right: 20px; width: 220px; height: 220px; float: right;" src="{$minimap_url|escape}{foreach name=newcaches from=$newcaches item=cacheitem}|{$cacheitem.latitude},{$cacheitem.longitude}{/foreach}">
{/if}
<ul class="nodot">
{foreach name=newcaches from=$newcaches item=cacheitem}
<li class="newcache_list_multi" style="margin-bottom: 8px;">
{include file="res_cacheicon_22.tpl" cachetype=$cacheitem.type}
<div style="margin-left: 29px;">
{$cacheitem.date_created|date_format:$opt.format.date}&nbsp;
<b><a class="links" href="viewcache.php?cacheid={$cacheitem.cache_id}">{$cacheitem.name|escape}</a></b>
{t}by{/t}
@@ -20,14 +23,10 @@
{$cacheitem.adm4|escape}
</p>
</strong>
</div>
</li>
{/foreach}
</ul>
{if $minimap_enabled}
</div>
<div style="margin-left: 535px; margin-top: 11px; width: 220px; text-align: right">
<a href="map2.php">
<img src="http://maps.googleapis.com/maps/api/staticmap?sensor=false&size=220x220&maptype=roadmap&markers=color:blue|size:small{foreach name=newcaches from=$newcaches item=cacheitem}|{$cacheitem.latitude},{$cacheitem.longitude}{/foreach}"><br />
{t}Large map{/t}
</a>
</div>
</div>
{/if}

0 comments on commit d8803d0

Please sign in to comment.
You can’t perform that action at this time.