Plugin Directory

Changeset 974151


Ignore:
Timestamp:
08/27/2014 06:15:42 PM (12 years ago)
Author:
impression11
Message:

Added Debug Mode

Location:
minimalist-instagram-widget
Files:
13 added
3 edited

Legend:

Unmodified
Added
Removed
  • minimalist-instagram-widget/trunk/index.php

    r969924 r974151  
    22/* Plugin Name: Minimalist Instagram Widget
    33Plugin URI: http://impression11.co.uk/
    4 Version: 1.5
     4Version: 1.6
    55Description: A minimalist Instagram widget to display your photos and videos.
    66Author: Ethan Gibson
     
    115115                $result = fetchData($url);
    116116                $result = json_decode($result);
     117                if(isset($result->data)){
    117118                foreach($result->data as $test11){
    118119                    $username = strtolower($username);
    119120                    if ($username == $test11->username){$newid = $test11->id;}
    120121                }
     122                }else {
     123                echo 'Please check the instagram widget has been set up correctly';
     124                if($options['debug']==1){
     125                echo '<h3>Debug Info</h3>';
     126                print_r($result);
     127                echo '<br>';}}
     128                if ($newid ==''){echo 'Please check that the username you entered exists.<br><br>';}
    121129                $userid = $newid;
    122130            }
     
    150158if($socket =@ fsockopen($host, 80, $errno, $errstr, 30)) {
    151159echo 'Please check your Account Details and ensure your Instagram Account has photos';
     160if($options['debug']==1){echo'<h3>Debug Info</h3>';print_r($result); if($userid==''){echo 'Please check that the username you entered exists.';}}
    152161fclose($socket);
    153162} else {
  • minimalist-instagram-widget/trunk/options.php

    r917535 r974151  
    5353      </tr>
    5454    </table>
     55     <h3>Debug Mode</h3>
     56        <p>If Debug mode is active it will give a read out of technical infomation along with the friendly error message, use this to figure out exactly what is wrong</p>
     57    <table class="form-table">
     58 <tr valign="top">
     59        <th scope="row"><?php _e( 'Enable Debug Mode', 'sampletheme' ); ?></th>
     60        <td><input id="debug" name="instagram_plugin_options[debug]" type="checkbox" value="1" <?php checked( '1', $options['debug'] ); ?> /></td>
     61      </tr>
     62    </table>
    5563        <p class="submit">
    5664      <input type="submit" class="button-primary" value="<?php _e( 'Save Options', 'sampletheme' ); ?>" />
     
    6775        $input['caching'] = null;
    6876        $input['caching'] = ( $input['caching'] == 1 ? 1 : 0 );
     77if ( ! isset( $input['debug'] ) )
     78        $input['debug'] = null;
     79        $input['debug'] = ( $input['debug'] == 1 ? 1 : 0 );
     80
    6981    return $input;
    7082}
  • minimalist-instagram-widget/trunk/readme.txt

    r970144 r974151  
    44Requires at least: 3.6
    55Tested up to: 3.9.2
    6 Stable tag: 1.5
     6Stable tag: 1.6
    77
    88A quick and efficient Instagram widget to display recent Instagram Photos & Videos.
     
    1313
    1414To avoid API limits there is an optional cache feature which can be set to expire after a user defined amount of hours.
    15 
    16 = Features =
    17 * Custom Widget Title
    18 * Load User Instagram Photos & Videos
    19 * The option to not display Videos
    20 * Smart caching retrieves the newer Photo only meaning less API calls (and less waiting!)
    21 * Fits in perfectly with (just about) all themes!
    22 
    23 Something not working? [Contact Me](http://impression11.co.uk/contact/)
    24 
    25 [View our other plugins](http://profiles.wordpress.org/impression11/)
    2615
    2716== Installation ==
     
    3726== Changelog ==
    3827
    39 = 1.5 =
     28= 1.6 =
     29* Added a quick Debug Mode, when enabled errors in retrieving images will display raw feed data to help in diagnosing issues.
     30
     31= 1.4 =
    4032* Fixed issue where the wrong user’s images are shown (I think the API username search on the Instagram side has stopped putting exact matches at the top).
    4133
Note: See TracChangeset for help on using the changeset viewer.