Plugin Directory

Changeset 759579


Ignore:
Timestamp:
08/20/2013 10:51:01 PM (13 years ago)
Author:
yathosho
Message:

v0.8.19

Location:
meta-ographr
Files:
16 added
3 edited

Legend:

Unmodified
Added
Removed
  • meta-ographr/trunk/meta-ographr_admin.php

    r739064 r759579  
    523523                               
    524524                                        <label><input name="ographr_options[enable_soundcloud]" type="checkbox" value="1" <?php if (isset($options['enable_soundcloud'])) { checked('1', $options['enable_soundcloud']); } ?> />&nbsp;SoundCloud</label>&nbsp;
     525
     526                                        <label><input name="ographr_options[enable_spotify]" type="checkbox" value="1" <?php if (isset($options['enable_spotify'])) { checked('1', $options['enable_spotify']); } ?> />&nbsp;Spotify</label>&nbsp;
    525527                               
    526528                                        <label><input name="ographr_options[enable_ustream]" type="checkbox" value="1" <?php if (isset($options['enable_ustream'])) { checked('1', $options['enable_ustream']); } ?> />&nbsp;Ustream</label>&nbsp;
     
    15501552    }
    15511553
    1552 }; // end of classa", "EH" => "Western Sahara", "YE" => "Yemen", "ZM" => "Zambia", "ZW" => "Zimbabwe", );
    1553         return $country_codes;
    1554     }
    1555 
    15561554}; // end of class
  • meta-ographr/trunk/meta-ographr_index.php

    r739064 r759579  
    44Plugin URI: http://ographr.whyeye.org
    55Description: This plugin scans posts for embedded video and music players and adds their thumbnails URL as an OpenGraph meta-tag. While at it, the plugin also adds OpenGraph tags for the title, description (excerpt) and permalink. Facebook and other social networks can use these to style shared or "liked" articles.
    6 Version: 0.8.18
     6Version: 0.8.19
    77Author: Jan T. Sott
    88Author URI: http://whyeye.org
     
    2929
    3030// OGRAPHR OPTIONS
    31     define("OGRAPHR_VERSION", "0.8.18");
     31    define("OGRAPHR_VERSION", "0.8.19");
    3232    // enables developer settings on Wordpress interface, can be overwritten from plug-in settings once activated
    3333    define("OGRAPHR_DEVMODE", FALSE);
     
    7979    define("SOUNDCLOUD_IMAGE_SIZE", "t500x500");
    8080   
     81// SPOTIFY
     82    // default artwork size (60, 85, 120, 300, and 640)
     83    define("SPOTIFY_IMAGE_SIZE", "640");
     84
    8185// VIMEO
    8286    // default snapshot size (thumbnail_small=100, thumbnail_medium=200, thumbnail_large=640)
     
    174178                            "enable_socialcam" => NULL,
    175179                            "enable_soundcloud" => "1",
     180                            "enable_spotify" => "1",
    176181                            "enable_ustream" => "1",
    177182                            "enable_viddler" => NULL,
     
    501506                    if (isset($options['enable_socialcam'])) { print "\t Socialcam enabled\n"; }
    502507                    if (isset($options['enable_soundcloud'])) { print "\t SoundCloud enabled\n"; }
     508                    if (isset($options['enable_spotify'])) { print "\t Spotify enabled\n"; }
    503509                    if (isset($options['enable_ustream'])) { print "\t Ustream enabled\n"; }
    504510                    if (isset($options['enable_viddler'])) { print "\t Viddler enabled\n"; }
     
    15271533                                    ),
    15281534                                ),
    1529                    
    15301535                    'soundcloud_playlist' => array(
    15311536                                    'name' => 'SoundCloud playlist',
     
    15361541                                    'queries' => array(
    15371542                                        'img' => 'artwork_url'
     1543                                    ),
     1544                                ),
     1545                    'spotify' => array(
     1546                                    'name' => 'Spotify',
     1547                                    'patterns' => array(
     1548                                        '/embed.spotify.com\/\?uri=spotify:((album|artist|track):([A-Za-z0-9]+))/i' // https://embed.spotify.com/?uri=spotify:track:5e6574xvOP2cKCeLQOVRs3
     1549                                    ),
     1550                                    'url' => 'https://embed.spotify.com/oembed/?url=spotify:%MATCH%', // https://embed.spotify.com/oembed/?url=spotify:artist:7ae4vgLLhir2MCjyhgbGOQ
     1551                                    'queries' => array(
     1552                                        'img' => 'thumbnail_url'
    15381553                                    ),
    15391554                                ),
     
    17071722            if( ($services['name'] == "SoundCloud track") || ($services['name'] == "SoundCloud playlist") ){
    17081723                $json_thumbnail['img'] = str_replace('-large.', '-' . SOUNDCLOUD_IMAGE_SIZE . '.', $json_thumbnail['img']); // replace 100x100 default image
     1724            }
     1725
     1726            // Spotify special treatment
     1727            if($services['name'] == "Spotify") {
     1728                $json_thumbnail['img'] = str_replace('cover', SPOTIFY_IMAGE_SIZE, $json_thumbnail['img']);
    17091729            }
    17101730           
     
    18221842                    }
    18231843                }
    1824             }
    1825 
    1826            
     1844
     1845                if (version_compare($options['last_update'], "0.8.19", '<')) {
     1846                    $options['enable_spotify'] = 1;
     1847                }
     1848            }
    18271849
    18281850            //save current version to db
     
    18311853            update_option('ographr_options', $options);
    18321854        }
    1833 
    1834            
    1835        
    18361855    }
    18371856
     
    20472066
    20482067}; // end of class
    2049 ?>  'href' => 'http://wordpress.org/extend/plugins/meta-ographr/'
    2050                     )
    2051                 );
    2052 
    2053             foreach ($menu_items as $menu_item) {
    2054                 $wp_admin_bar->add_menu($menu_item);
    2055             }
    2056         }   
    2057     }
    2058 
    2059 }; // end of class
    20602068?>
  • meta-ographr/trunk/readme.txt

    r739064 r759579  
    22Contributors: yathosho
    33Donate link: http://whyeye.org/donate
    4 Tags: opengraph,open-graph,open graph,open graph meta,metatags,facebook,google+,google snippets,twitter cards,thumbnails,soundcloud,mixcloud,bandcamp,vimeo,youtube,dailymotion,blip.tv,hulu,internet archive,archive.org,myvideo,official.fm,ustream,viddler,html5,livestream video,jwplayer,nvbplayer,flickr,justin.tv,twitch.tv,8tracks,bambuser,rdio,socialcam
     4Tags: opengraph,open-graph,open graph,open graph meta,metatags,facebook,google+,google snippets,twitter cards,thumbnails,soundcloud,mixcloud,bandcamp,vimeo,youtube,dailymotion,blip.tv,hulu,internet archive,archive.org,myvideo,official.fm,ustream,viddler,html5,livestream video,jwplayer,nvbplayer,flickr,justin.tv,twitch.tv,8tracks,bambuser,rdio,socialcam,spotify
    55Requires at least: 3.0
    6 Tested up to: 3.5.2
    7 Stable tag: 0.8.18
     6Tested up to: 3.6
     7Stable tag: 0.8.19
    88License: GPLv2
    99
     
    3232*  Socialcam
    3333*  SoundCloud
     34*  Spotify
    3435*  Ustream
    3536*  Viddler
     
    103104
    104105== Changelog ==
     106
     107= 0.8.19 =
     108* added support for Spotify (thanks MiniGod - http://stackoverflow.com/a/18294883/1329116)
    105109
    106110= 0.8.18 =
Note: See TracChangeset for help on using the changeset viewer.