Plugin Directory

Changeset 1375946


Ignore:
Timestamp:
03/21/2016 10:43:36 PM (10 years ago)
Author:
NewMediaOne
Message:

Update readme.txt

Location:
geodigs/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • geodigs/trunk/Router.php

    r1368746 r1375946  
    77class Router {
    88    static $listings_page;
    9    
     9
    1010    static function init() {
    1111        if ( !is_admin() ) {
     
    3030    static function display_page( $posts ) {
    3131        global $wp_query;
    32        
     32
    3333        // Removes link from title and comment section
    3434        $wp_query->found_posts      = 0;
     
    3737        $wp_query->is_home          = null;
    3838        $wp_query->is_singular      = 1;
    39        
     39
    4040        // Get first post and save its details
    4141        $page_data  = '';
    4242        $post_id    = time();
    43        
     43
    4444        // By default always show the footer ( disclaimers )
    4545        $show_footer = true;
    46        
     46
    4747        // Figure out what kind of page to display
    4848        if ( isset( $wp_query->query_vars['gd_action'] ) ) {
     
    5151                    User::require_login( $_SERVER['REQUEST_URI'] );
    5252                    $show_footer = false;
    53                
     53
    5454                    ob_start();
    5555                    include GD_DIR_INCLUDES . 'account-home.php';
     
    6262                    ob_end_clean();
    6363                    break;
    64                
     64
    6565                case 'account-settings':
    6666                    User::require_login( $_SERVER['REQUEST_URI'] );
     
    6868                    $page_data   = self::display_account_settings_page();
    6969                    break;
    70                
     70
    7171                case 'add-favorite':
    7272                    User::require_login( $_SERVER['REQUEST_URI'] );
    7373                    User::add_favorite( $_GET['listing_id'] );
    7474                    break;
    75                
     75
    7676                case 'advanced-search':
    7777                    $show_footer = false;
     
    8282                    );
    8383                    break;
    84                
     84
    8585                case 'delete-favorite':
    8686                    User::require_login( $_SERVER['REQUEST_URI'] );
    8787                    User::delete_favorite( $_GET['listing_id'] );
    8888                    break;
    89                
     89
    9090                case 'details':
    9191                    if ( isset( $wp_query->query_vars['gd_listing_id'] ) ) {
    9292                        $listing_id = $wp_query->query_vars['gd_listing_id'];
    93                        
     93
    9494                        if ( isset( $_SESSION['gd_user'] ) || gd_under_detail_view_limit( $listing_id ) == true ) {
    9595                            $listing = API::call( 'GET', 'listings/' . $listing_id );
     
    110110                        else {
    111111                            $_SESSION['gd_redirect_url'] = $_SERVER['REQUEST_URI'];
    112                            
     112
    113113                            ob_start();
    114114                            include GD_DIR_INCLUDES . 'detail-view-count-reached.php';
    115                            
     115
    116116                            $page_data = array(
    117117                                'content' => ob_get_contents(),
     
    123123                    }
    124124                    break;
    125                
     125
    126126                case 'download-document':
    127127                    global $wpdb;
    128                
     128
    129129                    $id    = $wp_query->query_vars['doc_id'];
    130130                    $query = $wpdb->prepare( "SELECT CONCAT( fileName, '.', extension ) AS fileName, size FROM `gd_ds_files` WHERE id = %s", $id );
    131131                    $file  = $wpdb->get_row( $query );
    132                
     132
    133133                    header( 'Content-Type: application/octet-stream' );
    134134                    header( 'Content-Disposition: attachment; filename="' . $file->fileName . '"' );
     
    139139                    readfile( DocumentStore::$path . $file->fileName );
    140140                    exit;
    141                
     141
    142142                case 'favorites':
    143143                    User::require_login( $_SERVER['REQUEST_URI'] );
    144144                    $page_data = self::display_favorites_page();
    145145                    break;
    146                
     146
    147147                case 'forgot-password':
    148148                    // Logs out the user if they are logged in but doesn't redirect them to the home page
     
    151151                    $page_data   = self::display_forgot_password_page();
    152152                    break;
    153                
     153
    154154                case 'home-worth':
    155155                    $show_footer = false;
    156                
     156
    157157                    ob_start();
    158158                    include GD_DIR_INCLUDES . 'home-worth-form.php';
     
    165165                    ob_end_clean();
    166166                    break;
    167                
     167
    168168                case 'listing-alerts':
    169169                    User::require_login( $_SERVER['REQUEST_URI'] );
    170                
     170
    171171                    ob_start();
    172                
     172
    173173                    include GD_DIR_INCLUDES . 'listing-alerts.php';
    174174
     
    178178                        'title'         => $page_title,
    179179                    );
    180                
     180
    181181                    ob_end_clean();
    182182                    break;
    183                
     183
    184184                case 'login':
    185185                    $show_footer = false;
    186                
     186
    187187                    // Logs out the user if they are logged in but doesn't redirect them to the home page
    188188                    User::log_out( false );
    189189                    $page_data = self::display_login_page();
    190190                    break;
    191                
     191
    192192                case 'log-out':
    193193                    User::log_out();
    194194                    break;
    195                
     195
    196196                case 'more-info':
    197197                    //User::require_login( $_SERVER['REQUEST_URI'] );
    198                
     198
    199199                    ob_start();
    200                
     200
    201201                    include GD_DIR_INCLUDES . 'more-info-form.php';
    202202
     
    207207                        'title'       => 'More Information',
    208208                    );
    209                
     209
    210210                    ob_end_clean();
    211211                    break;
    212                
     212
    213213                case 'more-info-requested':
    214214                    //User::require_login( $_SERVER['REQUEST_URI'] );
    215                
     215
    216216                    ob_start();
    217                
     217
    218218                    include GD_DIR_INCLUDES . 'more-info-requested.php';
    219219
     
    224224                        'title'       => 'Request Sent',
    225225                    );
    226                
     226
    227227                    ob_end_clean();
    228228                    break;
    229                
     229
    230230                case 'our-listings':
    231231                    $page_data = array(
     
    235235                    );
    236236                    break;
    237                
     237
    238238                case 'proxy-api':
    239239                    header( 'Content-Type: application/json' );
    240                
     240
    241241                    switch ( urldecode( $wp_query->query_vars['api_action'] ) ) {
    242242                        case 'get-statuses':
    243243                            echo json_encode( API::call( "GET", "listings/statuses" ) );
    244244                            exit;
    245                        
     245
    246246                        case 'get-styles':
    247247                            echo json_encode( API::call( "GET", "listings/styles" ) );
    248248                            exit;
    249                        
     249
    250250                        case 'get-types':
    251251                            echo json_encode( API::call( "GET", "listings/types" ) );
    252252                            exit;
    253                        
     253
    254254                        case 'get-sort':
    255255                            echo json_encode( API::call( "GET", "listings/sort" ) );
     
    257257                    }
    258258                    break;
    259                
     259
    260260                case 'search':
    261261                    $results = API::call( 'GET', 'listings', $_GET );
    262                
     262
    263263                    $page_data = self::display_search_results( $results );
    264264                    break;
    265                
     265
    266266                case 'signup':
    267267                    // Logs out the user if they are logged in but doesn't redirect them to the home page
     
    282282                    }
    283283                    break;
    284                
     284
    285285                default:
    286286                    // Do nothing
    287287                    break;
    288288            }
    289            
     289
    290290            // Get footer
    291291            if ( $show_footer ) {
     
    321321        return $posts;
    322322    }
    323    
     323
    324324    private static function display_favorites_page() {
    325325        $results          = API::call( 'GET', 'favorites' );
     
    327327        $show_pagination  = false; // "Favorites" doesn't have pages
    328328        $show_count       = false; // "Favorites" doesn't have pages
    329        
     329
    330330        // Begin output of page
    331331        ob_start();
    332    
     332
    333333        include_once GD_DIR_INCLUDES . 'listings-results.php';
    334        
     334
    335335        $page_data = array(
    336336            'content'     => ob_get_contents(),
     
    338338            'title'       => 'Favorites',
    339339        );
    340        
     340
    341341        ob_end_clean();
    342342        return $page_data;
    343343    }
    344    
     344
    345345    private static function display_account_settings_page() {
    346346        ob_start();
     
    348348        $content = ob_get_contents();
    349349        ob_end_clean();
    350        
     350
    351351        $page_data = array(
    352352            'content'       => $content,
     
    357357        return $page_data;
    358358    }
    359    
     359
    360360    private static function display_forgot_password_page() {
    361        
    362        
     361
     362
    363363        $errors = array();
    364        
     364
    365365        // Send API call and figure out what page to display
    366366        if ( $_POST['email'] ) {
    367367            $forgot_pw_request = API::call( 'GET', 'forgot/' . $_POST['email'] );
    368            
     368
    369369            if ( isset( $forgot_pw_request->error ) ) {
    370370                $page_type = 'form';
     
    378378            $page_type = 'form';
    379379        }
    380        
     380
    381381        // Output HTML
    382382        ob_start();
    383        
     383
    384384        include_once GD_DIR_INCLUDES . 'forgot-password.php';
    385        
     385
    386386        $page_data = array(
    387387            'content'       => ob_get_contents(),
     
    393393        return $page_data;
    394394    }
    395    
    396     private static function display_signup_page( $errors = array() ) { 
     395
     396    private static function display_signup_page( $errors = array() ) {
    397397        $title       = 'Sign Up';
    398398        $description = 'GeoDigs User Sign Up Page';
     
    404404            false
    405405        );
    406        
     406
    407407        $page_data = array(
    408408            'content'     => $content,
     
    410410            'title'       => $title,
    411411        );
    412        
    413         return $page_data;
    414     }
    415 
    416     private static function display_signup_success_page() { 
     412
     413        return $page_data;
     414    }
     415
     416    private static function display_signup_success_page() {
    417417        $title       = 'Success';
    418418        $description = 'GeoDigs User Sign Up Success Page';
     
    422422            false
    423423        );
    424        
     424
    425425        $page_data = array(
    426426            'content'     => $content,
     
    428428            'title'       => $title,
    429429        );
    430        
    431         return $page_data;
    432     }
    433    
     430
     431        return $page_data;
     432    }
     433
    434434    private static function display_login_page() {
    435435        if ( isset( $_POST['email'] ) && isset( $_POST['password'] ) ) {
    436436            // Encrypt password
    437437            $_POST['password'] = sha1( $_POST['password'] . 'geodigs' );
    438            
     438
    439439            $login_request = API::call( 'POST', 'users/login', $_POST );
    440440            if ( isset( $login_request->error ) ) {
     
    448448        }
    449449    }
    450    
     450
    451451    private static function create_login_form( $error = null ) {
    452452        $content = Templates::load(
     
    457457            false
    458458        );
    459        
     459
    460460        $page_data = array(
    461461            'content' => $content,
     
    470470        // Save our search link
    471471        $_POST['results_url'] = $_SERVER['REQUEST_URI'];
    472        
     472
    473473        // Begin output of page
    474474        ob_start();
    475    
     475
    476476        include_once GD_DIR_INCLUDES . 'listings-results.php';
    477        
     477
    478478        $page_data = array(
    479479            'content' => ob_get_contents(),
     
    481481            'title' => 'Search Results',
    482482        );
    483        
     483
    484484        ob_end_clean();
    485485        return $page_data;
     
    494494        return $classes;
    495495    }
    496    
     496
    497497    static function remove_comments( $path ){
    498498        global $wp_query;
  • geodigs/trunk/readme.txt

    r1374236 r1375946  
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
    99
    10 GeoDigs allows you to connect with clients and help them find the perfect home through MetroList and IRES IDX MLS solutions.
     10GeoDigs allows you to connect with clients and help them find the perfect home through REcolorado and IRES IDX MLS solutions.
    1111
    1212== Description ==
     
    45453. Enter your Geodigs Agent ID and Geodigs Agent Code
    4646
     47*How to edit templates*
     481. Navigate from the Wordpress install directory to ``/wp-content/plugins/geodigs/templates/``
     492. Choose the template you would like to edit
     503. Copy the file and place it into `/geodigs/templates/` following the same folder structure as in the plugin templates folder
     514. Edit and save!
     52
     53Ex: the listings detail page
     54-- Copy `/wp-content/plugins/geodigs/templates/listings/details.php` to `/geodigs/templates/listings/details.php`
     55
    4756== Frequently Asked Questions ==
    4857
     
    5463
    5564= How can I get help if I run into any problems with GeoDigs? =
    56 As a local support from the Boulder/Erie area, you’ll receive personalized, direct help from the New Media One team at all times. We will recognize you by name, and take the time needed to answer any questions you might have. Call us at 303.828.9882, or visit our main page at http://www.newmediaone.net.
     65As a local support from the Boulder/Erie area, you’ll receive personalized, direct help from the New Media One team at all times. We will recognize you by name, and take the time needed to answer any questions you might have. Call us at (303) 997-320, or visit our main page at http://www.newmediaone.net.
    5766
    5867= What services are included with GeoDigs? =
    59 Geodigs uses MetroList and IRES IDX/MLS that are integrated to provide combined search results that will update every 15 minutes.
     68Geodigs uses REcolorado and IRES IDX/MLS that are integrated to provide combined search results that will update every 15 minutes.
    6069
    6170== Screenshots ==
  • geodigs/trunk/shortcodes/featured-group.php

    r1368746 r1375946  
    2626        $data['orderBy']          = $order[0];
    2727        $data['orderByDirection'] = $order[1];
     28        $data['featured']         = true;
    2829        $data['mlsNumbers']       = serialize( $mlsNumbers );
    2930        unset( $data['properties'] );
Note: See TracChangeset for help on using the changeset viewer.