WordPress.org

Make WordPress Themes


Ignore:
Location:
travel-blogger
Files:
1 deleted
60 edited

Legend:

Unmodified
Added
Removed
  • travel-blogger/1.7/footer.php

    r84209 r84209  
    2828                </div> 
    2929                <div id="site-disclaimer"> 
    30                     <?php 
    31                             echo '<p class="theme-links credit-links">TravelBlogger Theme developed by <a href="'.esc_url( __( 'http://www.freetravelwebsitetemplates.com/themes/travel-blogger-theme-for-wordpress/', 'travelblogger' ) ).'" target="_blank">FreeTravelWebsiteTemplates.com</a> | Powered by <a href="http://wordpress.org/" target="_blank">WordPress</a>'; 
    32                              
    33                             if( (is_home() || is_front_page() || is_page() || is_category()) && $footerlinks['add_credit'] !='') { 
    34                                 $themelink = (isset($exp_theme_options['theme_links'])) ? $exp_theme_options['theme_links'] : array('url'=>'http://www.expedia.com','kw'=>'Travel'); ?> 
    35                                 <p class="theme-links add-links">Designed by the Expedia <a href="<?php echo $themelink['url']; ?>"><?php echo $themelink['kw']; ?></a> Team.</p> 
    36                             <?php } ?> 
     30                    <?php  
     31                        if ( $footerlinks['add_credit'] !='' ) { 
     32                            echo '<p class="theme-links credit-links">TravelBlogger Theme developed by <a href="'.esc_url( __( 'http://www.freetravelwebsitetemplates.com/themes/travel-blogger-theme-for-wordpress/', 'travelblogger' ) ).'" target="_blank">http://FreeTravelWebsiteTemplates.com</a> | Powered by <a href="http://wordpress.org/" target="_blank">WordPress</a>';  
     33                        } 
     34                    ?> 
    3735                </div><!-- #site-disclaimer --> 
    3836    </div><!-- #ft --> 
  • travel-blogger/1.7/lib/classes/custom-footer.php

    r84209 r84209  
    347347    </tr> 
    348348    <tr valign="top"> 
    349     <th scope="row">Display Sponsored Links</th> 
     349    <th scope="row">Display Optional Credit Links</th> 
    350350    <td> 
    351351        <p> 
     
    353353        <label><input type="radio" value="0" name="hide_add_links" id="showlinks"<?php checked( ( empty( $this->flinks['add_credit'] ) ) ? true : false ); ?> /> No</label> 
    354354        </p> 
    355         <p>If you like this theme, please consider activating these sponsored links as this will greatly help our ability to continue to support this free theme. These links only appear on a small number of pages, and are placed in an unobtrusive area of the footer. Thank you</p> 
     355        <p>This control turns off or on the credit link in the footer which shows "TravelBlogger Theme developed by FreeTravelWebsiteTemplates.Com | Powered by WordPress"</p> 
    356356    </td> 
    357357    </tr> 
  • travel-blogger/1.7/lib/functions/admin.php

    r84209 r84209  
    127127    global $post; 
    128128    // Verify   
    129     if ( !wp_verify_nonce( isset($_POST['exp_feature_noncename']), plugin_basename(__FILE__) )) {   
     129    if ( isset($_POST['exp_feature_noncename']) && !wp_verify_nonce( $_POST['exp_feature_noncename'], plugin_basename(__FILE__) )) {   
    130130        return $post_id;   
    131131    }   
     
    133133    if ( !current_user_can( 'edit_post', $post_id ))   
    134134        return $post_id; 
    135      
     135 
    136136    $data = isset($_POST['exp_main_feature']) ? $_POST['exp_main_feature'] : ''; 
    137137    $data_widget = isset($_POST['exp_widget_feature']) ? $_POST['exp_widget_feature'] : ''; 
     
    168168        // Look up lat and long for inputted address 
    169169        $url = 'http://maps.googleapis.com/maps/api/geocode/json?address='.urlencode($geo_data_post).'&sensor=false'; 
    170         $json_data = wp_remote_retrieve_body(wp_remote_get($url)); 
     170        $json_data = @wp_remote_retrieve_body(wp_remote_get($url)); 
    171171        $json = json_decode($json_data); 
    172172        if($json_data =='' || $json->status !='OK') 
     
    177177        $geo_data['lat'] = $json->results[0]->geometry->location->lat; 
    178178        $geo_data['lng'] = $json->results[0]->geometry->location->lng; 
     179         
    179180        update_post_meta($post_id, 'exp_post_geo_address', $geo_data); 
    180181    } 
     
    186187// Check for updates 
    187188add_action('admin_init','exp_check_theme_ver'); 
    188 if ( function_exists( 'wp_get_theme' ) ) { 
    189     $theme_data = wp_get_theme(); 
    190 } else { 
    191     $_theme_data = get_theme_data(TEMPLATEPATH . '/style.css'); 
    192     $theme_data = (object) $_theme_data; 
    193 } 
     189$theme_data = wp_get_theme(); 
    194190$local_version = $theme_data->Version; 
    195191$ver_last_check = get_option('exp_last_ver_check'); 
     
    238234?> 
    239235        <div id="message" class="updated fade"> 
    240             <p><?php echo $theme_data->Name; ?> theme has a new version available. Please <a href="<?php echo $theme_data->AuthorURI ?>download/" target="_blank">visit here</a> to download the latest version.</p> 
    241         </div> 
    242 <?php 
    243     } 
    244 } 
    245  
    246 // Reminder to support theme 
    247 add_action('admin_init','exp_support_reminder'); 
    248 function exp_support_reminder() { 
    249     $exp_theme_options = exp_get_theme_options(); 
    250     $footerlinks = $exp_theme_options['footer_links']; 
    251      
    252     if(isset($footerlinks['add_credit']) && $footerlinks['add_credit'] == '' && !get_option('exp_dont_bother')) { 
    253         add_action('admin_notices','exp_support_notice'); 
    254     } 
    255 } 
    256 function exp_support_notice() {  
    257     global $pagenow; 
    258     if ( $pagenow == "themes.php" || $pagenow == 'index.php') { 
    259     $url = admin_url('themes.php?page=exp-theme-settings'); 
    260 ?> 
    261         <div id="message" class="updated fade"> 
    262             <p>If you like this theme, please consider activating our sponsored links under APPEARANCE > FOOTER (or just <a href="<?php echo wp_nonce_url($url.'&activatelink=1','exp_activate_link-optin') ?>">Click Here</a> to activate). While not required, your support for this theme is greatly appreciated. To hide this message and leave the links inactive <a href="<?php echo wp_nonce_url($url.'&dontshow=1','exp_dont_show_again-optout') ?>">click here</a>. Thank you.</p> 
     236            <p><?php echo $theme_data->Name; ?> theme has a new version available. Please update the theme with Wordpress or <a href="<?php echo $theme_data->AuthorURI ?>download/" target="_blank">visit here</a> to download the latest version.</p> 
    263237        </div> 
    264238<?php 
  • travel-blogger/1.7/lib/functions/components.php

    r84209 r84209  
    301301<?php } 
    302302 
    303 function exp_footer_links() { 
    304     global $exp_theme_options; 
    305      
    306     if(!isset($exp_theme_options['theme_links'])) { 
    307         $links = array( 
    308             '1' =>array('url'=>'http://www.expedia.com/Las-Vegas-Hotels.d178276.Travel-Guide-Hotels','kw'=>'Las Vegas Hotels'), 
    309             '2' =>array('url'=>'http://www.expedia.com/New-Orleans-Hotels.d178292.Travel-Guide-Hotels','kw'=>'New Orleans Hotels'), 
    310             '3' =>array('url'=>'http://www.expedia.com/Reno-Hotels.d602688.Travel-Guide-Hotels','kw'=>'Reno Hotels'), 
    311             '4' =>array('url'=>'http://www.expedia.com/South-Beach-Miami-Hotels.0-n6138745-0.Travel-Guide-Filter-Hotels','kw'=>'South Beach Hotels'), 
    312             '5' =>array('url'=>'http://www.expedia.com/Galveston-Hotels.d1341.Travel-Guide-Hotels','kw'=>'Galveston Hotels'), 
    313             '6' =>array('url'=>'http://www.expedia.com/Monterey-Hotels.d180045.Travel-Guide-Hotels','kw'=>'Monterey Hotels'), 
    314             '7' =>array('url'=>'http://www.expedia.com/Maui-Island-Hotels-Kaanapali-Beach-Hotel.h11554.Hotel-InformationKaanapali Beach Hotel'), 
    315             '8' =>array('url'=>'http://www.expedia.com/Virginia-Beach-Norfolk-Virginia-Beach-Hotels.0-n602982-0.Travel-Guide-Filter-Hotels','kw'=>'Virginia Beach Hotels'), 
    316             '9' =>array('url'=>'http://www.expedia.com/Nashville-Hotels.d178291.Travel-Guide-Hotels','kw'=>'Nashville Hotels'), 
    317             '10'=>array('url'=>'http://www.expedia.com/Sedona-Hotels.d6054771.Travel-Guide-Hotels','kw'=>'Sedona Hotels'), 
    318             '11'=>array('url'=>'http://www.expedia.com/Pismo-Beach-San-Luis-Obispo-Hotels.0-n6055642-0.Travel-Guide-Filter-Hotels','kw'=>'Pismo Beach Hotels'), 
    319             '12'=>array('url'=>'http://www.expedia.com/Atlantic-City-Hotels.d602179.Travel-Guide-Hotels','kw'=>'Atlantic City Hotels'), 
    320             '13'=>array('url'=>'http://www.expedia.com/Niagara-Falls-Hotels.d602721.Travel-Guide-Hotels','kw'=>'Niagara Falls Hotels'), 
    321             '14'=>array('url'=>'http://www.expedia.com/Santa-Monica-Hotels.d3220.Travel-Guide-Hotels','kw'=>'Santa Monica Hotels'), 
    322             '15'=>array('url'=>'http://www.expedia.com/Santa-Barbara-Hotels.d602277.Travel-Guide-Hotels','kw'=>'Santa Barbara Hotels'), 
    323             '16'=>array('url'=>'http://www.expedia.com/Philadelphia-Hotels.d178297.Travel-Guide-Hotels','kw'=>'Philadelphia Hotels'), 
    324             '17'=>array('url'=>'http://www.expedia.com/Key-Largo-Florida-Keys-Hotels.0-n6062961-0.Travel-Guide-Filter-Hotels','kw'=>'Key Largo Hotels'), 
    325             '18'=>array('url'=>'http://www.expedia.com/Cape-May-Cape-May-Wildwood-Hotels.0-n6056770-0.Travel-Guide-Filter-Hotels','kw'=>'Cape May Hotels'), 
    326             '19'=>array('url'=>'http://www.expedia.com/Catalina-Island-Hotels.d6192.Travel-Guide-Hotels','kw'=>'Catalina Island Hotels'), 
    327             '20'=>array('url'=>'http://www.expedia.com/Key-West-Florida-Keys-Hotels.0-n6062965-0.Travel-Guide-Filter-Hotels','kw'=>'Key West Hotels') 
    328         ); 
    329         $i = rand(1,20); 
    330         $plinks = get_option('esp_theme_links'); 
    331         if($plinks) { 
    332             $exp_theme_options['theme_links'] = $plinks; 
    333         } else { 
    334             $exp_theme_options['theme_links'] = $links[$i]; 
    335         } 
    336         update_option('travelblogger_theme_options',$exp_theme_options); 
    337     } 
    338 } 
    339  
    340303/** 
    341304 * Checks first for feature image, then scans post for embedded image within content and returns image path 
     
    349312    global $post; 
    350313     
     314    // theme check 
     315    if ( isset($the_post_thumbnail) ) the_post_thumbnail(); 
     316     
    351317    $id = !empty($post_id) ? $post_id : $post->ID; 
    352     // Kind of like using the_post_thumbnail(), but just want image path instead 
     318    // Kind of like using the_post_thumbnail(), but just want image path instead         
    353319    if ( $thumb_id = get_post_thumbnail_id($id) ) { 
    354320        $thumb = wp_get_attachment_image_src($thumb_id, $size); 
  • travel-blogger/1.7/lib/functions/launch.php

    r84209 r84209  
    3232        'footer_links'=> array( 
    3333            'credit'=>'show', 
    34             'add_credit'=>'', 
     34            'add_credit'=>'show', 
    3535            'custom_copy'=>'' 
    3636        ), 
     
    6363 
    6464    // Checks to see if WordPress installation is compatible with theme 
    65     if (WP_VERSION < 3.2): // disable theme front end if wp < 3.2 
     65    if (WP_VERSION < 3.6): // disable theme front end if wp < 3.6 
    6666     
    6767      function exp_unsupported_wp_version(){ ?> 
     
    6969           <p> 
    7070               <?php 
    71                 printf(__('Your site is running on %1$s. Travel Blogger Theme requires at least %2$s. Please consider upgrading WordPress, it\'s safer, faster and carries more features.','travelblogger'), 'Wordpress '.WP_VERSION, '<a href="http://codex.wordpress.org/Upgrading_WordPress">Wordpress 3.2</a>'); 
     71                printf(__('Your site is running on %1$s. Travel Blogger Theme requires at least %2$s. Please consider upgrading WordPress, it\'s safer, faster and carries more features.','travelblogger'), 'Wordpress '.WP_VERSION, '<a href="http://codex.wordpress.org/Upgrading_WordPress">Wordpress 3.6</a>'); 
    7272                if (current_user_can('switch_themes') && !is_admin()) echo '<br /><a href="'.site_url().'/wp-admin/">'.__("(Dashboard)","travelblogger").'</a>'; 
    7373               ?> 
     
    121121        ); 
    122122        add_theme_support( 'custom-header', $custom_header_support ); 
    123  
    124         if ( ! function_exists( 'get_custom_header' ) ) { 
    125             // This is all for compatibility with versions of WordPress prior to 3.4. 
    126             define( 'HEADER_TEXTCOLOR', '' ); 
    127             define( 'HEADER_IMAGE', '' ); 
    128             define( 'NO_HEADER_TEXT', false ); 
    129             define( 'HEADER_IMAGE_WIDTH', apply_filters( 'travelblogger_header_image_width', 975 ) ); 
    130             define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'travelblogger_header_image_height', 130 ) ); 
    131             add_custom_image_header( $custom_header_support['wp-head-callback'], $custom_header_support['admin-head-callback'], $custom_header_support['admin-preview-callback'] ); 
    132              
    133             define( 'BACKGROUND_IMAGE', '%s/images/backgrounds/background-default.jpg' ); 
    134             define( 'BACKGROUND_COLOR', 'BBD9EE'); 
    135             add_custom_background('exp_custom_background_cb','esp_background_div_admin'); 
    136         } 
    137123         
    138124        // This theme uses post thumbnails 
     
    202188        ) ); 
    203189         
    204         exp_footer_links(); 
    205          
    206190        // Writes version of theme 
    207191        if(!get_option('exp_theme_ver')) { 
    208             if ( function_exists( 'wp_get_theme' ) ) { 
    209192                $theme_data = wp_get_theme(); 
    210             } else { 
    211                 $_theme_data = get_theme_data(TEMPLATEPATH . '/style.css'); 
    212                 $theme_data = (object) $_theme_data; 
    213             } 
    214193            add_option('exp_theme_ver',$theme_data->Version); 
    215194        } 
  • travel-blogger/1.7/lib/functions/layout.php

    r84209 r84209  
    1111    wp_enqueue_style( 'exp-reset-fonts-grids', get_stylesheet_directory_uri() . '/css/reset-fonts-grids.css'); 
    1212    wp_enqueue_style( 'exp-main', get_stylesheet_directory_uri() . '/style.css'); 
    13     wp_deregister_script('jquery');  
    14     wp_register_script('jquery', ('http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'), false, '1.4.2');  
    1513    wp_enqueue_script('jquery'); 
    16     wp_enqueue_script('exp-gmaps','http://maps.google.com/maps/api/js?sensor=false'); 
     14    wp_enqueue_script('exp-gmaps-google', 'http://maps.google.com/maps/api/js?sensor=false'); 
     15    wp_enqueue_script('exp-gmap', get_template_directory_uri().'/scripts/gmap.js'); 
    1716} 
    1817if (!is_admin()) { 
     
    134133    <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> 
    135134    <script src="https://apis.google.com/js/plusone.js"></script> 
    136     <script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/scripts/gmap.js"></script> 
    137135<?php } 
    138136add_action('wp_footer','exp_footer_scripts'); 
     
    300298        return; 
    301299    require_once( EXP_CLASSES . '/custom-footer.php' ); 
    302     $GLOBALS['custom_image_footer'] =& new EXP_Custom_Image_Footer(); 
    303     add_action( 'admin_menu', array( &$GLOBALS['custom_image_footer'], 'init' ) ); 
     300    $EXP_Custom_Image_Footer = new EXP_Custom_Image_Footer(); 
     301    if ( $EXP_Custom_Image_Footer ) { 
     302        $GLOBALS['custom_image_footer'] = $EXP_Custom_Image_Footer; 
     303        add_action( 'admin_menu', array( &$GLOBALS['custom_image_footer'], 'init' ) ); 
     304    } 
    304305} 
    305306 
  • travel-blogger/1.7/lib/functions/widgets.php

    r84209 r84209  
    229229// Displays google maps in widget for multiple locations 
    230230function exp_google_maps_widget($title='',$width='',$height='300',$instance='map_canvas', $limit='10') { 
    231     $gmap = '<script type="text/javascript">jQuery(document).ready( function() { load("'.get_template_directory_uri().'/scripts/gmaps_ajax.php?limit='.$limit.'","'.$instance.'"); }); </script>'; 
     231     
     232    $nonce = wp_create_nonce('exp_gmaps_ajax'); 
     233    $ajax_url = admin_url('admin-ajax.php'); 
     234     
     235    $gmap = '<script type="text/javascript">jQuery(document).ready( 
     236        jQuery.ajax({ 
     237             type : "get", 
     238             dataType : "xml", 
     239             url : "'.$ajax_url.'", 
     240             data : {action: "exp_get_map_locations", limit : "'.$limit.'", nonce: "'.$nonce.'"}, 
     241             success: function(response) { 
     242                load_gmap(response, "'.$instance.'"); 
     243             }, 
     244             error: function(response) { 
     245                jQuery("#'.$instance.'").attr("style","padding:20px;"); 
     246                jQuery("#'.$instance.'").html("Sorry, no locations found."); 
     247             } 
     248        }) 
     249    ) </script>'; 
    232250    $gmap .= '<h3>'.$title.'</h3>'; 
    233251    $gmap .= '<div class="map-canvas">'; 
     
    262280        'width' => '' 
    263281    ), $atts ) ); 
    264      
     282 
    265283    return exp_google_maps_post($width,$height,'map_shortcode'); 
    266284} 
    267285add_shortcode( 'tb_google_map', 'geo_address_post_func' ); 
    268286 
     287 
     288function exp_get_map_locations() { 
     289    global $wpdb; 
     290 
     291    // Verify   
     292    if ( !isset($_GET['nonce']) || !wp_verify_nonce( $_GET['nonce'], 'exp_gmaps_ajax' ) ) {   
     293        return 'Nothing to Display'; 
     294    } 
     295     
     296    $limit = $_GET['limit']; 
     297 
     298    function parseToXML($htmlStr)  { 
     299        $xmlStr=str_replace('<','&lt;',$htmlStr);  
     300        $xmlStr=str_replace('>','&gt;',$xmlStr);  
     301        $xmlStr=str_replace('"','&quot;',$xmlStr);  
     302        $xmlStr=str_replace("'",'&#39;',$xmlStr);  
     303        $xmlStr=str_replace("&",'&amp;',$xmlStr);  
     304        return $xmlStr;  
     305    } 
     306 
     307    $query = sprintf(" 
     308        SELECT wposts.*,wpostmeta.* 
     309        FROM %s wposts, %s wpostmeta 
     310        WHERE wposts.ID = wpostmeta.post_id  
     311        AND wpostmeta.meta_key = 'exp_post_geo_address' 
     312        AND wposts.post_status = 'publish'  
     313        AND wposts.post_type = 'post' 
     314        ORDER BY wposts.post_date DESC 
     315        LIMIT %s 
     316     ", 
     317    mysql_real_escape_string($wpdb->posts), 
     318    mysql_real_escape_string($wpdb->postmeta), 
     319    mysql_real_escape_string($limit) 
     320    ); 
     321    $locations = $wpdb->get_results($query, OBJECT); 
     322 
     323    if (!$locations) { 
     324      die('Invalid query: ' . mysql_error()); 
     325    } 
     326 
     327    header("Content-type: text/xml"); 
     328 
     329    // Start XML file, echo parent node 
     330    echo '<markers>'; 
     331 
     332    // Iterate through the rows, printing XML nodes for each 
     333    foreach ($locations as $location){ 
     334        $geo_data = maybe_unserialize($location->meta_value); 
     335        if(!is_array($geo_data)) 
     336            continue; 
     337     
     338        echo '<marker '; 
     339        echo 'lat="' . parseToXML($geo_data['lat']) . '" '; 
     340        echo 'lng="' . parseToXML($geo_data['lng']) . '" '; 
     341        echo 'address="' . parseToXML($geo_data['address']) . '" '; 
     342        echo 'permalink="' . parseToXML(get_permalink($location->ID)) . '" '; 
     343        echo '/>'; 
     344    } 
     345 
     346    // End XML file 
     347    echo '</markers>'; 
     348     
     349    exit(); 
     350} 
     351add_action( 'wp_ajax_exp_get_map_locations', 'exp_get_map_locations' ); 
     352add_action( 'wp_ajax_nopriv_exp_get_map_locations', 'exp_get_map_locations' ); 
     353 
    269354?> 
  • travel-blogger/1.7/scripts/gmap.js

    r84209 r84209  
    66} 
    77 
    8 function load(downloadFile,instance) { 
     8function load_gmap(data, instance) { 
    99    var mapOptions = { 
    1010        mapTypeId: google.maps.MapTypeId.ROADMAP 
     
    1313    var map = new google.maps.Map(document.getElementById(instance), mapOptions); 
    1414    var infoWindow = new google.maps.InfoWindow; 
     15    var xml = data; 
     16     
     17    if(xml == null || xml.getElementsByTagName("marker").length == 0) { 
     18        jQuery('#'+instance).attr('style','padding:20px;'); 
     19        jQuery('#'+instance).html('Sorry, no locations found.'); 
     20    } else { 
     21        var markers = xml.getElementsByTagName("marker"); 
     22        var b = new google.maps.LatLngBounds(); 
    1523 
    16     downloadUrl(downloadFile, function(data) { 
    17         var xml = data.responseXML; 
    18      
    19         if(xml == null || xml.documentElement.getElementsByTagName("marker").length == 0) { 
    20             $('#'+instance).attr('style','padding:20px;'); 
    21             $('#'+instance).html('Sorry, no locations found.'); 
    22         } else { 
    23             var markers = xml.documentElement.getElementsByTagName("marker"); 
    24             var b = new google.maps.LatLngBounds(); 
     24        for (var i = 0; i < markers.length; i++) { 
     25            var address = markers[i].getAttribute("address"); 
     26            var permalink = markers[i].getAttribute("permalink"); 
     27            var point = new google.maps.LatLng( 
     28                parseFloat(markers[i].getAttribute("lat")), 
     29                parseFloat(markers[i].getAttribute("lng")) 
     30            ); 
     31            var html = "<b>" + address + "</b> <br/> " + 
     32                "<a href ='"+ permalink +"'>View related post</a> <br/> "; 
     33            var marker = new google.maps.Marker({ 
     34                map: map, 
     35                position: point, 
     36                icon: template_url + "/images/gmap/map_marker-blue.png" 
     37            }); 
     38            bindInfoWindow(marker, map, infoWindow, html); 
    2539 
    26             for (var i = 0; i < markers.length; i++) { 
    27                 var address = markers[i].getAttribute("address"); 
    28                 var permalink = markers[i].getAttribute("permalink"); 
    29                 var point = new google.maps.LatLng( 
    30                     parseFloat(markers[i].getAttribute("lat")), 
    31                     parseFloat(markers[i].getAttribute("lng")) 
    32                 ); 
    33                 var html = "<b>" + address + "</b> <br/> " + 
    34                     "<a href ='"+ permalink +"'>View related post</a> <br/> "; 
    35                 var marker = new google.maps.Marker({ 
    36                     map: map, 
    37                     position: point, 
    38                     icon: template_url + "/images/gmap/map_marker-blue.png" 
    39                 }); 
    40                 bindInfoWindow(marker, map, infoWindow, html); 
    41  
    42                 if (markers.length > 1) { 
    43                     b.extend(point); 
    44                     if ((i+1) == markers.length) { 
    45                         map.fitBounds(b); 
    46                     } 
    47                 } else { 
    48                     map.setZoom(14); 
    49                     map.setCenter(point); 
     40            if (markers.length > 1) { 
     41                b.extend(point); 
     42                if ((i+1) == markers.length) { 
     43                    map.fitBounds(b); 
    5044                } 
     45            } else { 
     46                map.setZoom(14); 
     47                map.setCenter(point); 
    5148            } 
    5249        } 
    53     }); 
     50    } 
    5451} 
    55  
    56 function downloadUrl(url, callback) { 
    57   var request = window.ActiveXObject ? 
    58       new ActiveXObject('Microsoft.XMLHTTP') : 
    59       new XMLHttpRequest; 
    60  
    61   request.onreadystatechange = function() { 
    62     if (request.readyState == 4) { 
    63       request.onreadystatechange = doNothing; 
    64       callback(request, request.status); 
    65     } 
    66   }; 
    67  
    68   request.open('GET', url, true); 
    69   request.send(null); 
    70 } 
    71 function doNothing() {} 
    7252 
    7353function exp_render_gmap(address,lat,lng,instance) { 
     
    9272        map.setCenter(point); 
    9373    } else { 
    94         $('#'+instance).attr('style','padding:20px;'); 
    95         $('#'+instance).html('Sorry, location not found.'); 
     74        jQuery('#'+instance).attr('style','padding:20px;'); 
     75        jQuery('#'+instance).html('Sorry, location not found.'); 
    9676    } 
    9777} 
  • travel-blogger/1.7/style.css

    r84209 r84209  
    55Author: FreeTravelWebsiteTemplates.com 
    66Author URI: http://www.freetravelwebsitetemplates.com/ 
    7 Version: 1.6 
     7Version: 1.7 
    88Tags: black, blue, brown, green, orange, purple, red, silver, tan, white, yellow, dark, light, one-column, two-columns, three-columns, left-sidebar, right-sidebar, fixed-width, custom-colors, custom-header, custom-background, custom-menu, theme-options, threaded-comments 
    99 
     
    164164    margin-bottom: 18px; 
    165165    padding: 1.5em; 
     166    overflow: auto; 
     167    white-space: pre-wrap; 
    166168} 
    167169abbr, 
     
    11911193#content tr td { 
    11921194    border-top: 1px solid #e7e7e7; 
    1193     padding: 6px 24px; 
     1195    padding: 6px 10px; 
    11941196} 
    11951197#content tr.odd td { 
Note: See TracChangeset for help on using the changeset viewer.