Plugin Directory

Changeset 713013


Ignore:
Timestamp:
05/14/2013 04:01:44 PM (13 years ago)
Author:
SantaBarbaraSurfer
Message:

XPandable Author Tab V2.0 Release

Location:
xpandable-author-tab/trunk
Files:
19 added
5 edited

Legend:

Unmodified
Added
Removed
  • xpandable-author-tab/trunk/readme.txt

    r305328 r713013  
    33Tags: expanding author, author bio, social media, user info
    44Requires at least: 2.9
    5 Tested up to: 3.0.1
     5Tested up to: 3.5.1
    66Stable tag: 1.9.20.10
    77
    8 Simply adds an expanding author bio after every post automatically.
     8Add an expanding author panel to posts, pages, themes and comes with a widget for sidebar display.  WordPress administrator can display multiple authors on one page.
    99
    1010== Description ==
    1111
    12 XPandable Author Tab is a WordPress plugin (2.9 + only, backports not supported) that shows the reader a small tabbed box.  When expanded by clicking + sign over the gravatar image, a hidden window expands showing all the author's attributes, including Facebook, Twitter, Personal Website URL, gravatar image, number and list of articles with links.  This codeline is based largely on Arif Nezami's Better Author Bio Plugin for WordPress at http://wp-adm.in .  Additional features have been added.  Support is provided on the plugin homepage.  Feel free to comment or make suggestions.
     12BuildAutomate’s XPandable Author Tab allows developers to display more biographical information about a WordPress author.
     13In its expanded state, this plugin holds an image, social media icons and any other information a developer or author deems
     14appropriate.  The latest 2.0 release takes these already-popular features and supercharges them to create a richer experience
     15for developer, author and reader. The widget now has configurable page placement via shortcuts and enhanced graphical social icons.
     16Developers also can use our inline CSS editor and a rollout speed setting to customize the user experience. 
     17
     18Building on the great user interface XPandable Author Tab developers and users have come to expect, they now have access to
     19video-based help and can receive free technical support via a built-in ticketing interface.
     20
     21The Xpandable Author Tab not only gives developers flexibility to display custom author information, our newest release sports 
     22the following features:
     23
     24•   Author Image Placement in Badge & in Expanded State
     25•   Upon Engagement, Badge Shows an Expandable Area Containing Additional Author/Text Information
     26•   Brand New Administrative Management User Interface
     27•   Configurable Placement of XPandable Author Tab Via Shortcodes
     28•   Configurable Widgets to Display Current Post or Page Author or Designated Author
     29•   Video-Based Help
     30•   Free Technical Support Feature Allowing Developer to Submit Trouble Tickets Within Plugin
     31•   Inline Stylesheet Editor With Rollback Feature
     32•   Easily Configurable Speed Settings for Author Description
     33•   Enhanced Graphical Social Media Icons
     34•   Multiple Author Tabs on Posts, Pages, Widgets or Themes
     35
    1336
    1437== Installation ==
     
    1841Step 2. Upload it in you wp-content/plugins directory.
    1942
    20 Step 3. Activate from Admin panel.
     43Step 3. Activate from Admin panel.  Additionally, you may choose to activate the XPandable Author Tab Widget.
    2144
    2245Step 4. Fill out full contact information for authors.
     46
     47Step 5: Refer to built-in help and video for further questions regarding configuration, installation and help.
     48
    2349== Frequently Asked Questions ==
    2450
    25 
     51There is built-in help in the XPandable Author Tab plugin.
    2652
    2753== Screenshots ==
    2854
    29 1. Activated Plugin
     551. User Display
    3056
    31 2. Expanded Author Information
     572. CSS/Stylesheet Settings
     58
     593. Effects Settings for Drop Down
     60
     614. Built-in Help Support
     62
     635. Widget Configuration
     64
     656. Collapsed Widget State
     66
     677. Expanded Widget State
    3268
    3369
    3470== Changelog ==
     71
     72Version 2.0 is a complete rewrite of the toolkit.  If you are using the old version of XPandable Author Tab,
     73it will not operate in the same manner.  The XPandable Author Tab requires implied placement via a
     74shortcode or widget configuration.
  • xpandable-author-tab/trunk/xpandable-author-tab.css

    r305328 r713013  
    1 /* @override http://www.vaughnbullard.com/wp-content/plugins/xpandable-author-tab/xpandable-author-tab.css?ver=3.0.1 */
    2 
    31#xpandable-author-tab-div
    42{
    53    background:#F7F7F7;
    6     margin:20px 0px 0px 0px;
     4    margin:0px 0px 0px 0px;
    75    padding:10px 0;
    86    border:1px solid #E6E6E6;
     
    2220{
    2321    text-align: justify;
    24     margin:10px 30px 10px 90px;
    25     padding-top: 10px;
    26     padding-right: 10px;
    27     padding-left: 10px;
    28     padding-bottom: 10px;   
     22    margin:10px 0px 0px 0px;
     23    padding-top: 0px;
     24    padding-right: 0px;
     25    padding-left: 0px;
     26    padding-bottom: 0px;   
    2927
    3028}
    3129
    32 #xpandable-author-tab-div p
     30
     31#xpandable-author-tab-div .avatar
    3332{
    34     margin:0 0 0 50px;
    35     padding:0;
    36     padding-right: 50px;
    37     padding-left: 50px;
    38     padding-bottom: 5px;
     33    float:left;
     34    margin:0px 3px 3px 3px;
     35    padding:3px;
     36    padding-right: 3px;
     37    padding-left: 3px;
     38    padding-bottom: 3px;
    3939}
    4040
    41 #xpandable-author-tab-div-meta
     41#xpandable-author-tab-div .xpandable-author-tab-div-meta
    4242{
     43        margin-top: -3px;
    4344    padding-top: 10px;
    44     padding-right: 10px;
    45     padding-left: 10px;
    46     padding-bottom: 10px;   
     45    padding-right: 5px;
     46    padding-left: 5px;
     47    padding-bottom: 5px;   
     48
    4749}
    48 #xpandable-author-tab-div img
     50#xpandable-author-tab-div .socialbuttons
    4951{
    5052    background: #FFF;
    5153    float:left;
    52     margin:0 10px 0 10px;
     54    margin:0 0px 0 5px;
    5355    padding:3px;
    5456    -moz-box-shadow: 3px 3px 4px #AAA;
     
    6062    filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#AAAAAA');
    6163}
    62 
    6364#xpandable-author-tab-div ul
    6465{
     66       padding: 15px 0 0 0;
    6567    overflow:hidden;
    66     margin:0 0 0 90px;
    67     padding:0;
     68    margin:-1px;
     69    padding:10px;
     70        font-size: 70%;
     71}
     72#xpandable-author-tab-div ul h6
     73{
     74    overflow:hidden;
     75    margin:-1px;
     76    padding:5px;
     77        font-size: 70%;
     78
    6879}
    6980
     
    7283    list-style-type: disc;
    7384    float:left;
    74     margin:8px 6px 0 0;
     85    margin:0px 0px 0 0;
    7586    padding:0 0 0 6px;
    7687    line-height:120%;
     
    8697    padding:0;
    8798}
     99#xpandable-author-tab-div .xpandable-author-tab-div-buttons
     100{
     101    margin:10px 0px 0px 0px;
     102    padding-top: 0px;
     103    padding-right: 0px;
     104    padding-left: 0px;
     105    padding-bottom: 0px;   
     106}
     107#xpandable-author-tab-div .morebutton
     108{
     109        font-size: 70%;
     110    background:#F7F7F7;
     111        margin-left:-3px;
     112    -moz-box-shadow: 3px 3px 4px #AAA;
     113    -webkit-box-shadow: 3px 3px 4px #AAA;
     114    box-shadow: 3px 3px 4px #AAA;
     115    /* For IE 8 */
     116    -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#AAAAAA')";
     117    /* For IE 5.5 - 7 */
     118    filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#AAAAAA');   
     119}
    88120
     121
     122#xpandable-author-tab-div .xpandable-author-tab-div-info-footer, .balogo
     123{
     124    overflow:hidden;
     125    margin:-1px;
     126        margin-top: 10px;
     127    padding:5px;
     128        font-size: 30%;
     129        float: right;
     130}
     131xpandable-author-tab-div .balogo
     132{
     133    overflow:hidden;
     134}
  • xpandable-author-tab/trunk/xpandable-author-tab.php

    r305328 r713013  
    22/*
    33Plugin Name: Xpandable Author Tab
    4 Version: 1.9.20.10
    5 Description: XPandable Author Tab is a WordPress plugin (2.9 + only, backports not supported) that shows the reader a small tabbed box.  When expanded by clicking + sign over the gravatar image, a hidden window expands showing all the author's attributes, including Facebook, Twitter, Personal Website URL, gravatar image, number and list of articles with links.  This codeline is based largely on Arif Nezami's Better Author Bio Plugin for WordPress at http://wp-adm.in .  Additional features have been added.  Support is provided on the plugin homepage.  Feel free to comment or make suggestions.
    6 Author: Vaughn Bullard
    7 Author URI: http://www.vaughnbullard.com/
    8 Plugin URI: http://www.vaughnbullard.com/apps-plugins/xpandable-author-tab/
     4Version: 2.0
     5Description: BuildAutomate’s XPandable Author Tab allows developers to display more biographical information about a WordPress author. In its expanded state, this plugin holds an image, social media icons and any other information a developer or author deems appropriate.  The latest 2.0 release takes these already-popular features and supercharges them to create a richer experience for developer, author and reader. The widget now has configurable page placement via shortcuts and enhanced graphical social icons. Developers also can use our inline CSS editor and a rollout speed setting to customize the experience.  Building on the great user interface XPandable Author Tab developers and users have come to expect, they now have access to video-based help and can receive free technical support via a built-in ticketing interface.
     6
     7Author: Vaughn Bullard, Build.Automate, Inc.
     8Author URI: http://www.buildautomate.com/en
     9Plugin URI: http://www.buildautomate.com/en/products/xpandable-author-tab/
    910License: GNU GPL v3 or later
    1011
     
    2324
    2425*/
     26include_once dirname( __FILE__ ) . '/pages.php';
     27include_once dirname( __FILE__ ) . '/functions.php';
    2528
    2629Class xpandable_author_tab {
     
    2831    public static function init() {
    2932        global $wp_version;
     33
    3034        // Requires Wordpress 2.9 or greater
    3135        if (version_compare($wp_version, "2.9", "<")) {
    3236            return false;
    3337        }
    34         self::addFilters();
     38       
     39        self::addFilters();     
    3540        self::addActions();
     41
    3642        load_plugin_textdomain('xpandable_author_tab', false, dirname(plugin_basename(__FILE__ )));
     43        add_action('admin_menu', 'xpandable_author_tab_create_menu');   
     44        add_shortcode('xpandableauthortab','retrieveAuthorPanel');             
     45
    3746        return true;
    3847    }
     
    4150        $soc_contact['twitter'] = 'Twitter';
    4251        $soc_contact['facebook'] = 'Facebook';
     52        $soc_contact['aim'] = 'AIM';
     53        $soc_contact['yim'] = 'Yahoo IM';
     54        $soc_contact['jabber'] = 'Jabber/Google Talk';                     
    4355
    4456        return $soc_contact;
    4557    }
    4658
    47     public static function filterContent($content = '') {
    48         if( is_single() ) {
     59    public static function pluginCss() {
     60   
     61        if(file_exists(self::getPluginDir() . '/xpandable-author-tab.css')) {
     62            wp_register_style('xpandable-author-tab-div', self::getPluginUrl().'/xpandable-author-tab.css');
     63            wp_enqueue_style('xpandable-author-tab-div');
     64        }
     65    }
     66
     67    private static function getPluginDir() {
     68        return WP_PLUGIN_DIR .'/'. dirname(plugin_basename(__FILE__));
     69    }
     70
     71    private static function getPluginUrl() {
     72        return WP_PLUGIN_URL .'/'. dirname(plugin_basename(__FILE__));
     73    }
     74
     75    private static function addFilters() {
     76        add_filter('user_contactmethods', array('xpandable_author_tab', 'filterSocialContactMethods'));
     77        //add_filter('the_content', array('xpandable_author_tab', 'filterContent'));
     78    }
     79
     80    public static function addActions() {
     81        add_action('wp_print_styles', array('xpandable_author_tab', 'pluginCss'));
     82    }
     83   
     84}
     85
     86
     87    function retrieveAuthorPanel($atts)
     88    {
     89            global $wp_query;
     90            extract(shortcode_atts(array('authorid' => ''), $atts));
     91               
     92            if($authorid == "thisauthor")
     93            {
     94                $thePostID = $wp_query->post->ID;
     95                $postdata = get_post($thePostID, ARRAY_A);
     96                $authorid = $postdata['post_author'];
     97            }
     98
    4999            $author = array();
    50             $author['name'] = get_the_author();
    51             $author['twitter'] = get_the_author_meta('twitter');
    52             $author['facebook'] = get_the_author_meta('facebook');
    53             $author['posts'] = (int)get_the_author_posts();
     100            $author['name'] = get_the_author_meta('first_name',$authorid) ." ".get_the_author_meta('last_name',$authorid); ;
     101            $author['twitter'] = get_the_author_meta('twitter',$authorid);
     102            $author['facebook'] = get_the_author_meta('facebook',$authorid);
     103            $author['aim'] = get_the_author_meta('aim',$authorid);         
     104            $author['yim'] = get_the_author_meta('yim',$authorid);         
     105            $author['jabber'] = get_the_author_meta('jabber',$authorid);           
     106            $author['posts'] = (int)get_the_author_posts($authorid);
     107            $piurl = getPublicPluginUrl();
     108            $uuid = gen_uuid();
     109
     110            $speed      = "slow";
     111            if(!get_option('xpandable_author_tab_speed'))
     112            {   $speed  = "slow"; }else
     113            {   $speed  = get_option('xpandable_author_tab_speed'); }
     114
    54115            ob_start();
    55116            ?>
     
    58119                <div class="xpandable-author-tab-div-info">
    59120
    60                     <?php echo get_avatar( get_the_author_email(), '60' ); ?>
     121                    <?php echo get_avatar( get_the_author_meta( 'user_email', $authorid ), '60' ); ?>
    61122
    62123                       <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
    63                         <?php echo esc_attr(sprintf(__ngettext('%s has written one article on this blog', '%s has written %d articles on this blog', $author['posts'], 'xpandable_author_tab-div'), get_the_author_firstname().' '.get_the_author_lastname(), $author['posts'])); ?>.
     124                        <?php echo esc_attr(get_the_author_meta('first_name',$authorid).' '.get_the_author_meta('last_name',$authorid)); ?>
    64125                       </a>
     126                    <div class="xpandable-author-tab-div-buttons">
     127                        <a href="<?php echo get_the_author_meta('url');?>" target="newWin" title="<?php echo esc_attr(sprintf(__('Read %s&#8217;s blog', 'xpandable-author-tab-div'), $author['name'])); ?>"><img src="<?php echo $piurl ?>/images/blogs.png" class="socialbuttons"/></a>
     128                        <!-- TWITTER -->
     129                        <?php if(!empty($author['twitter'])): ?>
     130                        <a href="<?php echo $author['twitter']; ?>" target="newWin" title="<?php echo esc_attr(sprintf(__('Follow %s on Twitter', 'xpandable-author-tab-div'), $author['name'])); ?>" rel="external"><img src="<?php echo $piurl ?>/images/twitter.png" class="socialbuttons"/></a>
     131                        <?php endif; ?>
     132                        <!-- FACEBOOK -->                       
     133                        <?php if(!empty($author['facebook'])): ?>
     134                        <a href="<?php echo $author['facebook']; ?>" target="newWin" title="<?php echo esc_attr(sprintf(__('Be %s&#8217;s friend on Facebook', 'xpandable-author-tab-div'), $author['name'])); ?>" rel="external"><img src="<?php echo $piurl ?>/images/facebook.png" class="socialbuttons"/></a>
     135                        <?php endif; ?>
     136                        <!-- AIM -->                       
     137                        <?php if(!empty($author['aim'])): ?>
     138                        <a href="<?php echo $author['aim']; ?>" target="newWin" title="<?php echo esc_attr(sprintf(__('Be %s&#8217;s friend on AIM', 'xpandable-author-tab-div'), $author['name'])); ?>" rel="external"><img src="<?php echo $piurl ?>/images/aim.jpg" class="socialbuttons"/></a>
     139                        <?php endif; ?>
     140                        <!-- YIM -->                       
     141                        <?php if(!empty($author['yim'])): ?>
     142                        <a href="<?php echo $author['yim']; ?>" target="newWin" title="<?php echo esc_attr(sprintf(__('Be %s&#8217;s friend on Yahoo', 'xpandable-author-tab-div'), $author['name'])); ?>" rel="external"><img src="<?php echo $piurl ?>/images/yahoo.png" class="socialbuttons"/></a>
     143                        <?php endif; ?>
     144                        <!-- JABBER/Google Talk -->                     
     145                        <?php if(!empty($author['jabber'])): ?>
     146                        <a href="<?php echo $author['jabber']; ?>" target="newWin" title="<?php echo esc_attr(sprintf(__('Be %s&#8217;s friend on Jabber/Google', 'xpandable-author-tab-div'), $author['name'])); ?>" rel="external"><img src="<?php echo $piurl ?>/images/google.png" class="socialbuttons"/></a>
     147                        <?php endif; ?>                                                                     
     148                    </div>
     149                    <br/>
    65150                    <ul>
    66                         <li><a href="<?php echo get_the_author_meta('url'); ?>" title="<?php echo esc_attr(sprintf(__('Read %s&#8217;s blog', 'xpandable-author-tab-div'), $author['name'])); ?>"><?php echo __("Blog"); ?></a></li>
    67                         <?php if(!empty($author['twitter'])): ?>
    68                         <li><a href="<?php echo $author['twitter']; ?>" title="<?php echo esc_attr(sprintf(__('Follow %s on Twitter', 'xpandable-author-tab-div'), $author['name'])); ?>" rel="external">Twitter</a></li>
    69                         <?php endif; ?>
    70                         <?php if(!empty($author['facebook'])): ?>
    71                         <li><a href="<?php echo $author['facebook']; ?>" title="<?php echo esc_attr(sprintf(__('Be %s&#8217;s friend on Facebook', 'xpandable-author-tab-div'), $author['name'])); ?>" rel="external">Facebook</a></li>
    72                         <?php endif; ?>
    73                     </ul>   
    74                     <button>+ <?php printf( esc_attr__( 'Click for more info about %s'), get_the_author() ); ?></button>
     151                    <button class="morebutton"><?php printf( esc_attr__( '+ About %s'), get_the_author_meta('first_name',$authorid) ); ?></button>
    75152                    <script>
    76153                        $("button").click(function () {
    77                             $("h6").slideToggle("fast");
     154                            $(".xpandable-author-tab-div-meta-<?php echo $authorid.$uuid ?>").slideToggle("<?php echo $speed ?>");
    78155                        });
    79156                       
    80157                    </script>
    81158                    <br/>
    82                     <h6 class="xpandable-author-tab-div-meta" style="display: none"><?php echo get_the_author_meta('description'); ?></h6>
     159                    <h6 class="xpandable-author-tab-div-meta-<?php echo $authorid.$uuid ?>" style="display: none"><?php echo get_the_author_meta('description',$authorid); ?><br/><br/><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID',$authorid ) ); ?>">
     160                        <?php echo esc_attr(sprintf(__ngettext('%s has written 1 article', '%s has written %d articles', $author['posts'], 'xpandable_author_tab-div'), get_the_author_meta('first_name',$authorid).' '.get_the_author_meta('last_name',$authorid), $author['posts'])); ?>.
     161                       </a></h6>
     162                    <div class="xpandable-author-tab-div-info-footer"><a href="http://www.buildautomate.com/en/products/xpandable-author-tab/" target="newWin"><img src="<?php echo $piurl ?>/images/ba16x16.png" id="balogo" style="padding-right:5px;" title="Build.Automate, Inc. XPandable Author Tab"/></a></div>
     163                    <?php checkXPATAPIKeyShort(); ?>
     164                    </ul>
    83165                </div>
    84166            </div>
    85167            <?php
    86168            $content .= ob_get_clean();
    87         }
     169
    88170        return $content;
    89     }
    90 
    91     public static function pluginCss() {
    92         if(file_exists(self::getPluginDir() . '/xpandable-author-tab.css')) {
    93             wp_register_style('xpandable-author-tab-div', self::getPluginUrl().'/xpandable-author-tab.css');
    94             wp_enqueue_style('xpandable-author-tab-div');
    95         }
    96     }
    97 
    98     private static function getPluginDir() {
    99         return WP_PLUGIN_DIR .'/'. dirname(plugin_basename(__FILE__));
    100     }
    101 
    102     private static function getPluginUrl() {
    103         return WP_PLUGIN_URL .'/'. dirname(plugin_basename(__FILE__));
    104     }
    105 
    106     private static function addFilters() {
    107         add_filter('user_contactmethods', array('xpandable_author_tab', 'filterSocialContactMethods'));
    108         add_filter('the_content', array('xpandable_author_tab', 'filterContent'));
    109     }
    110 
    111     private static function addActions() {
    112         add_action('wp_print_styles', array('xpandable_author_tab', 'pluginCss'));
    113     }
    114 }
    115 
     171   
     172    }   
    116173if(!xpandable_author_tab::init()) {
    117174    echo 'XPandable Author Tab plugin requires WordPress 2.9 or higher. Please upgrade!';
     
    119176
    120177
    121 
     178function xpandable_author_tab_create_menu()
     179{
     180    //create new top-level menu
     181    add_menu_page('XP Overview',   'XP Author Tab',         'administrator', 'XPandableAuthorTabSettings', 'XPATOverview', 'http://buildautomate.com/favicon.ico',3 );
     182    add_submenu_page('XPandableAuthorTabSettings', 'Stylesheet',        'Stylesheet',       'administrator', 'XPATStylesheet',      'XPATStylesheet'); 
     183    add_submenu_page('XPandableAuthorTabSettings', 'Effects Settings',      'Effects Settings',         'administrator', 'XPATEffectsSettings',     'XPATEffectsSettings');
     184    add_submenu_page('XPandableAuthorTabSettings', 'Shortcode',         'Shortcode',        'administrator', 'XPATShortcodes',      'XPATShortcodes'); 
     185    add_submenu_page('XPandableAuthorTabSettings', 'Registration',      'Registration',         'administrator', 'XPATRegistration',        'XPATRegistration');           
     186    add_submenu_page('XPandableAuthorTabSettings', 'Tech Support',      'Tech Support',         'administrator', 'XPATTechSupport',         'XPATTechSupport');
     187    add_submenu_page('XPandableAuthorTabSettings', 'Help',      'Help',         'administrator', 'XPATHelp',        'XPATHelp');               
     188           
     189    //call register settings function
     190    add_action( 'admin_init', 'XPATregister_mysettings' );
     191}   
     192function XPATregister_mysettings() {
     193    //register XPandable Author Tab settings
     194    register_setting( 'xpandable-author-tab-settings-group', 'xpandable_author_tab_css' );
     195}
     196function XPATregisterProductRemote($xfn,$xln,$xem,$xct,$xsp,$xcy,$siteurl,$xprod,$xat_version)
     197{
     198    $url        = "http://buildautomate.com/topaz/receive-registration";
     199    $response   = wp_remote_post( $url, array(
     200        'method' => 'POST',
     201        'timeout' => 45,
     202        'redirection' => 5,
     203        'httpversion' => '1.0',
     204        'blocking' => true,
     205        'headers' => array(),
     206        'body' => array(    'xtools_firstname'          => $xfn,
     207                            'xtools_lastname'           => $xln,
     208                            'xtools_emailaddress'       => $xem,
     209                            'xtools_city'               => $xct,                                                       
     210                            'xtools_stateprovince'      => $xsp,   
     211                            'xtools_country'            => $xcy,                                                   
     212                            'xtools_siteurl'            => $siteurl,                           
     213                            'xtools_product'            => $xprod,                         
     214                            'xtools_version'            => $xat_version                         
     215                             ),
     216        'cookies' => array()
     217        )
     218    );
     219    $body = $response['body'];
     220    $apikey = "";
     221   
     222    if( is_wp_error( $response ) ) {
     223        //$error_message = $response->get_error_message();
     224          // echo "Something went wrong: $error_message";
     225    } else {
     226        $startpos = strpos($body, "<apikey>");
     227        $endpos   = strpos($body, "</apikey>");
     228        $chars      = $endpos - $startpos;
     229        $apikey = substr($body, $startpos+8, $chars-8);
     230    }
     231    return $apikey;
     232}
Note: See TracChangeset for help on using the changeset viewer.