Plugin Directory

Changeset 495067


Ignore:
Timestamp:
01/25/2012 08:03:40 AM (14 years ago)
Author:
bnielsen
Message:

Added default location and auto search options to settings.

Location:
indeed-api/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • indeed-api/trunk/indeed-api.php

    r303362 r495067  
    7777    $fieldtype = get_option('indeed_api_field_type');
    7878    $fieldvalue = get_option('indeed_api_field_value');
     79    $defaultlocation = get_option('indeed_api_default_location');
     80    $autosearch = get_option('indeed_api_auto_search');
    7981    $apiversion = get_option('indeed_api_version');
    8082    if( $apiversion === FALSE ) $apiversion = '2';
     
    9092    $apiview .= 'var wpajaxurl = "'.admin_url('admin-ajax.php').'"'."\r\n";
    9193    $apiview .= 'var wpsiteurl = "'.get_option('siteurl').'"'."\r\n";
     94    if( $autosearch ) $apiview .= 'var autosearch = true;'."\r\n";
    9295    $apiview .= "</script>\r\n";
    9396
     
    124127
    125128    $trendform .= ''.
    126       '<span class="indeedinput"><input style="margin:0;" type="text" name="l" /></span>'.
     129      '<span class="indeedinput"><input style="margin:0;" type="text" name="l" value="'.$defaultlocation.'" /></span>'.
    127130      '<span class="indeedinput2"><input style="margin:0;" type="button" name="indeedsearchbutton" value="Search"></span></div>'.
    128131      '<span class="indeedlabel2">Job title, keywords or company name</span>'.
  • indeed-api/trunk/indeed_api_options.php

    r303362 r495067  
    2525    $fieldvalue = $_POST['indeed_api_field_value'];
    2626    update_option('indeed_api_field_value', $fieldvalue);
     27    $defaultlocation = $_POST['indeed_api_default_location'];
     28    update_option('indeed_api_default_location', $defaultlocation);
     29    if( isset($_POST['indeed_api_auto_search']) ) $autosearch = $_POST['indeed_api_auto_search'];
     30    else $autosearch = 0;
     31    update_option('indeed_api_auto_search', $autosearch);
    2732    $apiversion = $_POST['indeed_api_version'];
    2833    update_option('indeed_api_version', $apiversion);
     
    4853    $fieldtype = get_option('indeed_api_field_type');
    4954    $fieldvalue = get_option('indeed_api_field_value');
     55    $defaultlocation = get_option('indeed_api_default_location');
     56    $autosearch = get_option('indeed_api_auto_search');
    5057    $apiversion = get_option('indeed_api_version');
    5158    if( $apiversion === FALSE ) $apiversion = '2';
     
    142149
    143150  <tr valign="top">
     151   <th scope="row"><?php _e("Default Location"); ?></th>
     152   <td>
     153    <input type="text" name="indeed_api_default_location" value="<?php echo $defaultlocation; ?>" >(optional)Specify a default search location when the page is loaded.
     154   </td>
     155  </tr>
     156
     157  <tr valign="top">
     158   <th scope="row"><?php _e("Auto Search"); ?></th>
     159   <td>
     160    <input type="checkbox" name="indeed_api_auto_search" value="1" <?php echo ($autosearch ? 'checked' : ''); ?>>(optional)Specify that an auto search should be started when the page loads.
     161   </td>
     162  </tr>
     163
     164  <tr valign="top">
    144165   <th scope="row"><?php _e("API Version"); ?></th>
    145166   <td>
  • indeed-api/trunk/indeedsearchjs.html

    r303362 r495067  
    2020    jQuery("input[name='start']").val(1)
    2121  })
     22
     23  if( autosearch ) {
     24    indeedsearchbusy()
     25    indeedsearchcall()
     26  }
    2227})
    2328
  • indeed-api/trunk/readme.txt

    r303362 r495067  
    55Requires at least: 3.0
    66Tested up to: 3.0
    7 Stable tag: 0.1
     7Stable tag: 0.2
    88
    99Provides simple integration of a WordPress site with the indeed.com API for
     
    104104
    105105== Changelog ==
    106 No changes. 
     106 
     107= 0.2 = 
     108Added a default location option in settings and the option to auto search on
     109page load. 
    107110
    108111
Note: See TracChangeset for help on using the changeset viewer.