Plugin Directory

Changeset 1973508


Ignore:
Timestamp:
11/13/2018 11:06:45 AM (7 years ago)
Author:
Ralph Rezende
Message:

Google Map field added to Settings

Location:
company-presentation
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • company-presentation/tags/5.0.0/careerpagesplugin.php

    r1973119 r1973508  
    9696                    'local' => self::$templateini["local"],
    9797                    'subdir' => self::$templateini["subdir"],
    98                     'css' => isset($css) && $css ? $css : ''
     98                    'css' => isset($css) && $css ? $css : '',
     99                    'googlemapkey' => self::$templateini["googlemapkey"]
    99100                );
     101               
     102                //echo '<pre>'.print_r($cp_data, true).'</pre>';
    100103
    101104                $ch = curl_init();
     
    267270                        self::$templateini["errors"][] = 'Ids missing or Ids is misspelled in shortcode';
    268271                    }
     272                   
     273                    // googlemapkey
     274                    self::$templateini["googlemapkey"] = get_option("googlemap_key");
    269275
    270276                    CareerpagesMain::getTemplatedata();
     
    280286                    // plugin specific files from plugin, IE10 viewport hack for Surface/desktop Windows 8 bug
    281287                    wp_register_script('careerpages_viewportbug', plugins_url('js/ie10-viewport-bug-workaround.js' , __FILE__ ));
    282                    
    283                     wp_register_script('careerpages_googlemap_places', 'https://maps.googleapis.com/maps/api/js?libraries=places&amp;language=en', false, '3'); // Removed resently
     288
     289                    wp_register_script('careerpages_googlemap_places', 'https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&amp;language=en'.(isset(self::$templateini["googlemapkey"]) && self::$templateini["googlemapkey"] ? '&key='.self::$templateini["googlemapkey"] : ''), false, '3');
    284290                    wp_register_script('careerpages_script', plugins_url('js/careerpages.js' , __FILE__ ));
    285291                    wp_register_script('careerpages_library', plugins_url('js/library.js' , __FILE__ ));
     
    595601                            <table class="form-table">
    596602                                <tr valign="top">
    597                                     <th scope="row">Key</th>
     603                                    <th scope="row">Prodii Key</th>
    598604                                    <td>
    599                                         <input type="text" name="prodii_key" value="'.get_option("prodii_key").'"/>
     605                                        <input type="text" name="prodii_key" value="'.get_option("prodii_key").'"/><br>
    600606                                    </td>
    601607                                </tr>
    602608                            </table>
    603                         '.get_submit_button().'
     609                            <br>
     610                            <br>
     611                            <p>
     612                                You have to get the Google map key from google, but you only need it if you use a template with maps.<br>Follow thise links in order to get some help:
     613                                <ul style="list-style-type: disc;padding-left: 30px;">
     614                                    <li>
     615                                        <a href="https://developers.google.com/maps/documentation/maps-static/intro" target="_blank">https://developers.google.com/maps/documentation/maps-static/intro</a>
     616                                    </li>
     617                                    <li>
     618                                        <a href="https://churchthemes.com/page-didnt-load-google-maps-correctly/" target="_blank">https://churchthemes.com/page-didnt-load-google-maps-correctly/</a>
     619                                    </li>
     620                                </ul>
     621                            </p>
     622                            <table class="form-table">
     623                                <tr valign="top">
     624                                    <th scope="row">Google-map Key</th>
     625                                    <td>
     626                                        <input type="text" name="googlemap_key" style="width:400px;" value="'.get_option("googlemap_key").'"/>
     627                                    </td>
     628                                </tr>
     629                            </table>
     630                            <br>
     631                            '.get_submit_button().'
    604632                        </form>
    605633                    </div>
     
    676704if (!function_exists("update_prodii_settings")) {
    677705    function update_prodii_settings() {
    678         register_setting('prodii-settings', 'prodii_key');
     706        register_setting('prodii-settings', 'prodii_key', array(
     707            'type' => 'string',
     708            'sanitize_callback' => 'sanitize_text_field',
     709            'default' => NULL
     710        ));
     711        register_setting('prodii-settings', 'googlemap_key', array(
     712            'type' => 'string',
     713            'sanitize_callback' => 'sanitize_text_field',
     714            'default' => NULL
     715        ));
    679716    }
    680717}
  • company-presentation/tags/5.0.0/readme.txt

    r1973200 r1973508  
    201201* Problem resolved - Depricated constructor format problem.
    202202* Modification - 'company' renamed to the more logical name 'network' in order to reflect the purpose of this tool. Company in the shortcode is now depricated, but can still be used.
     203* Modification - Customer 'Google Map key'-field introduced to the 'Settings'-section.
    203204
    204205= 4.3.6 =
  • company-presentation/trunk/careerpagesplugin.php

    r1973119 r1973508  
    9696                    'local' => self::$templateini["local"],
    9797                    'subdir' => self::$templateini["subdir"],
    98                     'css' => isset($css) && $css ? $css : ''
     98                    'css' => isset($css) && $css ? $css : '',
     99                    'googlemapkey' => self::$templateini["googlemapkey"]
    99100                );
     101               
     102                //echo '<pre>'.print_r($cp_data, true).'</pre>';
    100103
    101104                $ch = curl_init();
     
    267270                        self::$templateini["errors"][] = 'Ids missing or Ids is misspelled in shortcode';
    268271                    }
     272                   
     273                    // googlemapkey
     274                    self::$templateini["googlemapkey"] = get_option("googlemap_key");
    269275
    270276                    CareerpagesMain::getTemplatedata();
     
    280286                    // plugin specific files from plugin, IE10 viewport hack for Surface/desktop Windows 8 bug
    281287                    wp_register_script('careerpages_viewportbug', plugins_url('js/ie10-viewport-bug-workaround.js' , __FILE__ ));
    282                    
    283                     wp_register_script('careerpages_googlemap_places', 'https://maps.googleapis.com/maps/api/js?libraries=places&amp;language=en', false, '3'); // Removed resently
     288
     289                    wp_register_script('careerpages_googlemap_places', 'https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&amp;language=en'.(isset(self::$templateini["googlemapkey"]) && self::$templateini["googlemapkey"] ? '&key='.self::$templateini["googlemapkey"] : ''), false, '3');
    284290                    wp_register_script('careerpages_script', plugins_url('js/careerpages.js' , __FILE__ ));
    285291                    wp_register_script('careerpages_library', plugins_url('js/library.js' , __FILE__ ));
     
    595601                            <table class="form-table">
    596602                                <tr valign="top">
    597                                     <th scope="row">Key</th>
     603                                    <th scope="row">Prodii Key</th>
    598604                                    <td>
    599                                         <input type="text" name="prodii_key" value="'.get_option("prodii_key").'"/>
     605                                        <input type="text" name="prodii_key" value="'.get_option("prodii_key").'"/><br>
    600606                                    </td>
    601607                                </tr>
    602608                            </table>
    603                         '.get_submit_button().'
     609                            <br>
     610                            <br>
     611                            <p>
     612                                You have to get the Google map key from google, but you only need it if you use a template with maps.<br>Follow thise links in order to get some help:
     613                                <ul style="list-style-type: disc;padding-left: 30px;">
     614                                    <li>
     615                                        <a href="https://developers.google.com/maps/documentation/maps-static/intro" target="_blank">https://developers.google.com/maps/documentation/maps-static/intro</a>
     616                                    </li>
     617                                    <li>
     618                                        <a href="https://churchthemes.com/page-didnt-load-google-maps-correctly/" target="_blank">https://churchthemes.com/page-didnt-load-google-maps-correctly/</a>
     619                                    </li>
     620                                </ul>
     621                            </p>
     622                            <table class="form-table">
     623                                <tr valign="top">
     624                                    <th scope="row">Google-map Key</th>
     625                                    <td>
     626                                        <input type="text" name="googlemap_key" style="width:400px;" value="'.get_option("googlemap_key").'"/>
     627                                    </td>
     628                                </tr>
     629                            </table>
     630                            <br>
     631                            '.get_submit_button().'
    604632                        </form>
    605633                    </div>
     
    676704if (!function_exists("update_prodii_settings")) {
    677705    function update_prodii_settings() {
    678         register_setting('prodii-settings', 'prodii_key');
     706        register_setting('prodii-settings', 'prodii_key', array(
     707            'type' => 'string',
     708            'sanitize_callback' => 'sanitize_text_field',
     709            'default' => NULL
     710        ));
     711        register_setting('prodii-settings', 'googlemap_key', array(
     712            'type' => 'string',
     713            'sanitize_callback' => 'sanitize_text_field',
     714            'default' => NULL
     715        ));
    679716    }
    680717}
  • company-presentation/trunk/readme.txt

    r1973175 r1973508  
    5757* a team; a 2-level page structure that includes all belonging profiles.
    5858* a network page; an entire organisational 3-level structure that includes all selected teams and belonging profiles.
     59
    5960Put each short code on a page with full width page settings.
     61
    6062The short codes includes the id-numbers of your profile, team and/ or network and the name of the template that defines the layout and design.
    6163
     
    199201* Problem resolved - Depricated constructor format problem.
    200202* Modification - 'company' renamed to the more logical name 'network' in order to reflect the purpose of this tool. Company in the shortcode is now depricated, but can still be used.
     203* Modification - Customer 'Google Map key'-field introduced to the 'Settings'-section.
    201204
    202205= 4.3.6 =
Note: See TracChangeset for help on using the changeset viewer.