Plugin Directory

Changeset 1178956


Ignore:
Timestamp:
06/11/2015 01:12:21 PM (11 years ago)
Author:
mcnardelli
Message:

Add title on local

Location:
where-i-was-where-i-will-be
Files:
306 added
9 edited

Legend:

Unmodified
Added
Removed
  • where-i-was-where-i-will-be/trunk/assets/js/call_ajax.js

    r1060919 r1178956  
    138138        nonce: wiw_vars.wiw_nonce,
    139139        local_city: jQuery("#city").val(),
     140        local_title: jQuery("#title").val(),
    140141        local_country: jQuery("#country").val(),
    141142        local_flag: jQuery("#flag").val(),
     
    162163        local_id: id,
    163164        local_city: jQuery("#city").val(),
     165        local_title: jQuery("#title").val(),
    164166        local_country: jQuery("#country").val(),
    165167        local_flag: jQuery("#flag").val(),
  • where-i-was-where-i-will-be/trunk/readme.txt

    r1177874 r1178956  
    44Requires at least: 4.0
    55Tested up to: 4.2.2
    6 Stable tag: 1.0.6
     6Stable tag: 1.0.7
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3939
    4040== Changelog ==
     41= 1.0.7 =
     42* Included option to include a title on a local
     43
    4144= 1.0.6 =
    4245* Added option to disable wheel scroll on map
  • where-i-was-where-i-will-be/trunk/system/control/control_form.php

    r1060919 r1178956  
    2828    function insert_replaceable_text($name, $button, $class = '', $class_btn = '') {
    2929        $values = array(array('id',__('Id',WIW_TRANSLATE)),
     30                       array('title',__('Title',WIW_TRANSLATE)),
    3031                       array('city',__('City',WIW_TRANSLATE)),
    3132                       array('country',__('Country',WIW_TRANSLATE)),
  • where-i-was-where-i-will-be/trunk/system/model/model_admin.php

    r1060919 r1178956  
    6565        $departure = (is_null($info['local_departure']))?NULL:$this->control_util->change_date_to_db($info['local_departure']); 
    6666   
    67         $query = $this->db->query('INSERT INTO '.WIW_TABLE_PREFIX.'locals (id, city, country, flag, latitude, longitude, url, image, text, type, arrival, departure) VALUES (NULL,"'.$info['local_city'].'","'.$info['local_country'].'","'.$info['local_flag'].'","'.$info['local_latitude'].'","'.$info['local_longitude'].'","'.$info['local_url'].'","'.$info['local_image'].'","'.$info['local_text'].'","'.$info['local_type'].'","'.$arrival.'","'.$departure.'");');
     67        $query = $this->db->query('INSERT INTO '.WIW_TABLE_PREFIX.'locals (id, title, city, country, flag, latitude, longitude, url, image, text, type, arrival, departure) VALUES (NULL,"'.$info['local_title'].'","'.$info['local_city'].'","'.$info['local_country'].'","'.$info['local_flag'].'","'.$info['local_latitude'].'","'.$info['local_longitude'].'","'.$info['local_url'].'","'.$info['local_image'].'","'.$info['local_text'].'","'.$info['local_type'].'","'.$arrival.'","'.$departure.'");');
    6868       
    6969        return $query;
     
    7474        $departure = (is_null($info['local_departure']))?NULL:$this->control_util->change_date_to_db($info['local_departure']); 
    7575        return $this->db->query('UPDATE '.WIW_TABLE_PREFIX.'locals SET city = "'.$info['local_city'].'",
     76                                                                        title = "'.$info['local_title'].'",
    7677                                                                        country = "'.$info['local_country'].'",
    7778                                                                        flag = "'.$info['local_flag'].'",
  • where-i-was-where-i-will-be/trunk/system/model/model_create.php

    r1060919 r1178956  
    1717    function activate_create_locals_table () {     
    1818        $table_name = $this->table_prefix . "locals";
    19         $sql = "CREATE TABLE IF NOT EXISTS {$table_name} (id INT NOT NULL AUTO_INCREMENT,
     19        $charset_collate = $this->db->get_charset_collate();
     20        $sql = "CREATE TABLE {$table_name} (
     21                                        id INT NOT NULL AUTO_INCREMENT,
     22                                        title TEXT NULL,
    2023                                        city VARCHAR(256) NULL,
    2124                                        country VARCHAR(256) NOT NULL,
     
    2932                                        type INT NOT NULL,
    3033                                        text TEXT NULL,
    31                                         PRIMARY KEY(id));";
     34                                        UNIQUE KEY id (id)
     35                ) {$charset_collate};";
    3236        dbDelta($sql);
    3337       
     
    5155    function populate_type() {
    5256        //Insert Undefined
    53         return $this->db->query('INSERT INTO '.$this->table_prefix.'type (id, name, pin) VALUES (1, "'.__('Undefined',WIW_TRANSLATE).'", "'.WIW_DIR_IMAGES.'pin/red-dot.png");');
     57        return $this->db->query('INSERT IGNORE INTO '.$this->table_prefix.'type (id, name, pin) VALUES (1, "'.__('Undefined',WIW_TRANSLATE).'", "'.WIW_DIR_IMAGES.'pin/red-dot.png");');
    5458    }
    5559/******************************************/
  • where-i-was-where-i-will-be/trunk/system/view/admin/edit_local.php

    r1060919 r1178956  
    3030        <HR>
    3131        <table class="wiw_table">
     32            <tr valign="top">
     33                <th scope="row" class="w200 text-left"><span class="wiw_label"><?php _e('Title',WIW_TRANSLATE); ?>:</span></th>
     34                <td colspan="3"><input type="text" id="title" name="title" value=""  class="w100p wiw_input_text"/></td>
     35            </tr>
    3236            <tr valign="top">
    3337                <th scope="row" class="w200 text-left"><span class="wiw_label"><?php _e('City',WIW_TRANSLATE); ?>:</span></th>
  • where-i-was-where-i-will-be/trunk/system/view/admin/locals.php

    r1060919 r1178956  
    99            <tr valign="middle" class="wiw_row_title">
    1010                <th class="w50 text-center"><?php _e('Id',WIW_TRANSLATE); ?></th>
     11                <th class="text-left"><?php _e('Title',WIW_TRANSLATE); ?></th>
    1112                <th class="text-left"><?php _e('City',WIW_TRANSLATE); ?></th>
    1213                <th class="text-left"><?php _e('Country',WIW_TRANSLATE); ?></th>
     
    1617            </tr>
    1718            <?php
    18                 $all_locals = $model_info->get_all_locals('ORDER BY city');
     19                $all_locals = $model_info->get_all_locals('ORDER BY country ASC, city ASC, title ASC ');
    1920                $i = 0;
    2021                foreach ($all_locals as $local) {
     
    2728                <tr valign="middle" class="wiw_row_<?php echo ($i % 2); ?>" id="wiw_main_row_<?php echo $local->id; ?>">
    2829                    <td class="w50 text-center"><?php echo $local->id; ?></td>
     30                    <td class="text-left"><?php echo $local->title; ?></td>
    2931                    <td class="text-left"><?php echo $local->city; ?></td>
    3032                    <td class="text-left"><?php echo $country; ?></td>
  • where-i-was-where-i-will-be/trunk/system/view/admin/new_local.php

    r1060919 r1178956  
    1919        <HR>
    2020        <table class="wiw_table">
     21            <tr valign="top">
     22                <th scope="row" class="w200 text-left"><span class="wiw_label"><?php _e('Title',WIW_TRANSLATE); ?>:</span></th>
     23                <td colspan="3"><input type="text" id="title" name="title" value=""  class="w100p wiw_input_text"/></td>
     24            </tr>
    2125            <tr valign="top">
    2226                <th scope="row" class="w200 text-left"><span class="wiw_label"><?php _e('City',WIW_TRANSLATE); ?>:</span></th>
  • where-i-was-where-i-will-be/trunk/wiwwiwb.php

    r1177874 r1178956  
    55Description: A Plugin that use Google Maps to show where you was and where you will be! Seriously! :)
    66Author: Mauro Baptista
    7 Version: 1.0.6
     7Version: 1.0.7
    88Author URI: http://carnou.com/
    99License: GPL2
     
    9696    $wiwwiwb_user = new WIWWIWB_User();
    9797}
     98
     99
     100//ONLY USED FOR DEBUG
     101/*
     102function save_error() {
     103    update_option('plugin_error',  ob_get_contents());
     104}
     105add_action('activated_plugin','save_error');
     106*/
    98107?>
Note: See TracChangeset for help on using the changeset viewer.