WordPress.org

Plugin Directory

Changeset 595973


Ignore:
Timestamp:
09/07/12 14:56:09 (5 years ago)
Author:
MapGenerator
Message:

opend plugin for other providers

Location:
map-generator/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • map-generator/trunk/map-generator.php

    r577271 r595973  
    44Plugin URI: http://map-generator.net/de 
    55Description: This Plugin adds custom maps from map-generator.net to your blog. You can now add multible marker, change the Marker apperance, size, view the map as StreetView and much more. 
    6 Version: 1.1 
     6Version: 1.2 
    77Author: Map-Generator.net 
    88Author Email: mailus@map-generator.net 
     
    2626   
    2727*/ 
    28  
    2928 
    3029class MapGenerator { 
     
    7776        // extract the url from the link 
    7877        preg_match($reg_exp, $url, $map_gen_id, NULL, 0); 
    79          
     78 
     79        // check if we got an url or just an id 
     80        $pos = strpos($url, "http://"); 
     81 
     82        if ($pos === false) { 
     83            // we got just an id -> fall back to map-generator 
     84            $map_path = "http://map-generator.net/de/maps/".$map_gen_id[0].".js" 
     85        } else { 
     86            // take the given url 
     87            $map_path = $url.".js" 
     88        } 
     89 
    8090        // build include tag 
    81         $tag = "<div id=\"map_canvas_custom_".$map_gen_id[0]."\" style=\"width:".$width."; height:".$height."\" ></div><script type=\"text/javascript\">(function(d, t) {var g = d.createElement(t),s = d.getElementsByTagName(t)[0];g.src = \"http://map-generator.net/de/maps/".$map_gen_id[0].".js\";s.parentNode.insertBefore(g, s);}(document, \"script\"));</script>"; 
     91        $tag = "<div id=\"map_canvas_custom_".$map_gen_id[0]."\" style=\"width:".$width."; height:".$height."\" ></div><script type=\"text/javascript\">(function(d, t) {var g = d.createElement(t),s = d.getElementsByTagName(t)[0];g.src = \"".$map_path."\";s.parentNode.insertBefore(g, s);}(document, \"script\"));</script>"; 
    8292         
    8393        return $tag; 
  • map-generator/trunk/readme.txt

    r577747 r595973  
    3838== Changelog == 
    3939 
     40= 1.2 = 
     41* opend Plugin for other providers 
     42 
    4043= 1.1 = 
    4144* update License to GPLv3  
Note: See TracChangeset for help on using the changeset viewer.