WordPress.org

Plugin Directory

Changeset 715760


Ignore:
Timestamp:
05/20/13 20:48:03 (5 years ago)
Author:
xeagle
Message:

added vbsso 1.2.6

Location:
vbsso
Files:
17 added
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • vbsso/trunk/config.custom.default.php

    r678683 r715760  
    1111 * License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
    1212 * ----------------------------------------------------------------------- 
    13  * $Revision: 998 $: 
    14  * $Date: 2013-02-06 19:43:36 +0200 (Ср, 06 фев 2013) $: 
     13 * $Revision: 1100 $: 
     14 * $Date: 2013-05-10 15:01:11 +0300 (Пт, 10 май 2013) $: 
    1515 */ 
    1616 
    1717function vbsso_get_wordpress_custom_config() { 
    1818    return array( 
     19    'log' => true, 
     20        'override-links' => true, 
    1921    ); 
    2022} 
  • vbsso/trunk/config.php

    r678683 r715760  
    1111 * License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
    1212 * ----------------------------------------------------------------------- 
    13  * $Revision: 998 $: 
    14  * $Date: 2013-02-06 19:43:36 +0200 (Ср, 06 фев 2013) $: 
     13 * $Revision: 1100 $: 
     14 * $Date: 2013-05-10 15:01:11 +0300 (Пт, 10 май 2013) $: 
    1515 */ 
    1616 
     
    2727 
    2828    require_once(dirname(__FILE__) . '/../../../wp-config.php'); 
    29     require_once(dirname(__FILE__) . '/includes/api.1.0.php'); 
     29    require_once(dirname(__FILE__) . '/includes/api.php'); 
    3030} 
    3131 
  • vbsso/trunk/includes/sharedapi.php

    r678683 r715760  
    1111 * License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
    1212 * ----------------------------------------------------------------------- 
    13  * $Revision: 1001 $: 
    14  * $Date: 2013-02-06 22:54:17 +0200 (Ср, 06 фев 2013) $: 
     13 * $Revision: 1102 $: 
     14 * $Date: 2013-05-10 15:09:35 +0300 (Пт, 10 май 2013) $: 
    1515 */ 
    1616 
    1717if (!defined('SHAREDAPI')) { 
     18    define ('SHAREDAPI_PRODUCT_VERSION_1_7', '1.7'); 
     19    define ('SHAREDAPI_PRODUCT_VERSION_1_6', '1.6'); 
     20    define ('SHAREDAPI_PRODUCT_VERSION_1_5', '1.5'); 
    1821    define ('SHAREDAPI_PRODUCT_VERSION_1_4', '1.4'); 
    1922    define ('SHAREDAPI_PRODUCT_VERSION_1_3', '1.3'); 
     
    2225    define ('SHAREDAPI_PRODUCT_VERSION_1_0', '1.0'); 
    2326 
    24     define ('SHAREDAPI', SHAREDAPI_PRODUCT_VERSION_1_4); 
     27    define ('SHAREDAPI', SHAREDAPI_PRODUCT_VERSION_1_7); 
    2528 
    2629    define ('SHAREDAPI_PRODUCT_ID', 'sharedapi'); 
     
    2932 
    3033    define ('SHAREDAPI_DEFAULT_API_KEY', 'simplekey'); 
     34    define ('SHAREDAPI_WRONG_API_KEY_MESSAGE', 'Wrong Shared Password'); 
     35 
    3136 
    3237    define ('SHAREDAPI_EVENT_FIELD_EVENT', 'e'); 
     
    4045    define ('SHAREDAPI_EVENT_FIELD_LID', 'lid'); 
    4146    define ('SHAREDAPI_EVENT_FIELD_LISTENER_URL', 'listener_url'); 
     47    define ('SHAREDAPI_EVENT_FIELD_BAA_USERNAME', 'baa_username'); 
     48    define ('SHAREDAPI_EVENT_FIELD_BAA_PASSWORD', 'baa_password'); 
    4249 
    4350    define ('SHAREDAPI_EVENT_FIELD_LOGIN_VBULLETIN_URL', 'login_vbulletin_url'); 
     
    4855    define ('SHAREDAPI_EVENT_FIELD_AVATAR_URL', 'avatar_url'); 
    4956    define ('SHAREDAPI_EVENT_FIELD_PROFILE_URL', 'profile_url'); 
     57    define ('SHAREDAPI_EVENT_FIELD_USERGROUPS_URL', 'usergroups_url'); 
    5058 
    5159    define ('SHAREDAPI_EVENT_FIELD_DESTINATION', 'd'); 
    5260    define ('SHAREDAPI_EVENT_FIELD_TIMEOUT', 'timeout'); 
     61    define ('SHAREDAPI_EVENT_FIELD_MUID', 'muid'); 
    5362    define ('SHAREDAPI_EVENT_FIELD_REMEMBERME', 'remember-me'); 
    5463 
     
    5968    define ('SHAREDAPI_EVENT_FIELD_ERROR_DATA', 'data'); 
    6069 
     70    define ('SHAREDAPI_EVENT_FIELD_USERLIST', 'userlist'); 
    6171    define ('SHAREDAPI_EVENT_FIELD_USERID', 'userid'); 
     72    define ('SHAREDAPI_EVENT_FIELD_USERGROUPS', 'usergroup'); 
     73    define ('SHAREDAPI_EVENT_FIELD_USERGROUPS2', 'usergroup2'); 
    6274    define ('SHAREDAPI_EVENT_FIELD_USERNAME', 'username'); 
    6375    define ('SHAREDAPI_EVENT_FIELD_USERNAME2', 'username2'); 
     
    7183    define ('SHAREDAPI_EVENT_FIELD_PROFILE_COUNTRY', 'profile_country'); 
    7284    define ('SHAREDAPI_EVENT_FIELD_PROFILE_CITY', 'profile_city'); 
     85    define ('SHAREDAPI_EVENT_FIELD_PROFILE_PHONE', 'profile_phone'); 
     86    define ('SHAREDAPI_EVENT_FIELD_PROFILE_BIRTH', 'profile_birth'); 
    7387 
    7488    define ('SHAREDAPI_EVENT_UNKNOWN', 0); 
     
    8296    define ('SHAREDAPI_EVENT_CREDENTIALS', 7); 
    8397    define ('SHAREDAPI_EVENT_PROFILE_FIELDS', 8); 
     98    define ('SHAREDAPI_EVENT_CONFLICT_USERS', 9); 
    8499 
    85100    define ('SHAREDAPI_EVENT_LAST', 50); 
     
    99114                SHAREDAPI_EVENT_CREDENTIALS => 'credentials', 
    100115                SHAREDAPI_EVENT_PROFILE_FIELDS => 'profile-fields', 
     116                SHAREDAPI_EVENT_CONFLICT_USERS => 'conflict_users' 
    101117            ); 
    102118        } 
     
    116132    define ('SHAREDAPI_PLATFORM_DRUPAL', 6); 
    117133    define ('SHAREDAPI_PLATFORM_PRESTASHOP', 7); 
    118     define ('SHAREDAPI_PLATFORM_MAGENTOO', 8); 
     134    define ('SHAREDAPI_PLATFORM_MAGENTO', 8); 
    119135    define ('SHAREDAPI_PLATFORM_MEDIAWIKI', 9); 
    120136 
     
    132148                SHAREDAPI_PLATFORM_DRUPAL => 'Drupal', 
    133149                SHAREDAPI_PLATFORM_PRESTASHOP => 'Prestashop', 
    134                 SHAREDAPI_PLATFORM_MAGENTOO => 'Magentoo', 
     150                SHAREDAPI_PLATFORM_MAGENTO => 'Magento', 
    135151                SHAREDAPI_PLATFORM_MEDIAWIKI => 'Mediawiki' 
    136152            ); 
     
    153169                SHAREDAPI_PLATFORM_DRUPAL => 'drupal', 
    154170                SHAREDAPI_PLATFORM_PRESTASHOP => 'prestashop', 
    155                 SHAREDAPI_PLATFORM_MAGENTOO => 'magentoo', 
     171                SHAREDAPI_PLATFORM_MAGENTO => 'magento', 
    156172                SHAREDAPI_PLATFORM_MEDIAWIKI => 'mediawiki' 
    157173            ); 
     
    326342 
    327343        $json = sharedapi_accept_data($shared_key); 
    328         if (array_key_exists($json[SHAREDAPI_EVENT_FIELD_EVENT], $callback) && function_exists($callback[$json[SHAREDAPI_EVENT_FIELD_EVENT]])) { 
    329             $ret = call_user_func($callback[$json[SHAREDAPI_EVENT_FIELD_EVENT]], $json); 
     344        if (is_array($json)) { 
     345            if (array_key_exists($json[SHAREDAPI_EVENT_FIELD_EVENT], $callback) && function_exists($callback[$json[SHAREDAPI_EVENT_FIELD_EVENT]])) { 
     346                $ret = call_user_func($callback[$json[SHAREDAPI_EVENT_FIELD_EVENT]], $json); 
     347            } 
     348        } else { 
     349            $ret[SHAREDAPI_EVENT_FIELD_ERROR] = $json; 
    330350        } 
    331351 
    332352        $ret = $ret && is_array($ret) ? $ret : null; 
     353 
    333354        echo sharedapi_build_response($product, $version, $vbsso_version, 
    334             $ret && isset($ret[SHAREDAPI_EVENT_FIELD_DATA]) ? $ret[SHAREDAPI_EVENT_FIELD_DATA] 
    335                 : null, 
    336             $ret && isset($ret[SHAREDAPI_EVENT_FIELD_ERROR]) 
    337                 ? $ret[SHAREDAPI_EVENT_FIELD_ERROR] : null, 
     355            $ret && isset($ret[SHAREDAPI_EVENT_FIELD_DATA]) ? $ret[SHAREDAPI_EVENT_FIELD_DATA] : null, 
     356            $ret && isset($ret[SHAREDAPI_EVENT_FIELD_ERROR]) ? $ret[SHAREDAPI_EVENT_FIELD_ERROR] : null, 
    338357            $shared_key); 
    339358        exit; 
     
    353372        if (!empty($data)) { 
    354373            $json = $is_response ? json_decode($data, true) : sharedapi_decode_data($key, $data); 
     374            $json = ($json) ? $json : SHAREDAPI_WRONG_API_KEY_MESSAGE; 
    355375        } 
    356376 
     
    359379        } 
    360380 
    361         return is_array($json) && (isset($json[SHAREDAPI_EVENT_FIELD_EVENT]) || isset($json[SHAREDAPI_EVENT_FIELD_PRODUCT])) 
    362             ? $json : false; 
     381//        return is_array($json) && (isset($json[SHAREDAPI_EVENT_FIELD_EVENT]) || isset($json[SHAREDAPI_EVENT_FIELD_PRODUCT])) 
     382//            ? $json : false; 
     383        return $json; 
    363384    } 
    364385 
     
    402423        curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); 
    403424        curl_setopt($ch, CURLOPT_HTTPHEADER, array('User-Agent: vBSSO')); 
     425        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); 
    404426        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
    405427        curl_setopt($ch, CURLOPT_HEADER, 0); 
     
    410432 
    411433        $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); 
    412         $error_string = ( $code != 200 ) ? curl_error($ch) : ''; 
     434        $error_string = ($code != 200) ? curl_error($ch) : ''; 
    413435        curl_close($ch); 
    414436 
  • vbsso/trunk/includes/vbsso_shared.php

    r678683 r715760  
    1111 * License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
    1212 * ----------------------------------------------------------------------- 
    13  * $Revision: 1001 $: 
    14  * $Date: 2013-02-06 22:54:17 +0200 (Ср, 06 фев 2013) $: 
     13 * $Revision: 1102 $: 
     14 * $Date: 2013-05-10 15:09:35 +0300 (Пт, 10 май 2013) $: 
    1515 */ 
    1616 
     
    1818 
    1919if (!defined('VBSSO_SHARED')) { 
     20    define ('VBSSO_PRODUCT_VERSION_1_4_10', '1.4.10'); 
     21    define ('VBSSO_PRODUCT_VERSION_1_4_9', '1.4.9'); 
     22    define ('VBSSO_PRODUCT_VERSION_1_4_8', '1.4.8'); 
    2023    define ('VBSSO_PRODUCT_VERSION_1_4_7', '1.4.7'); 
    2124    define ('VBSSO_PRODUCT_VERSION_1_4_6', '1.4.6'); 
     
    3134    define ('VBSSO_PRODUCT_VERSION_1_0', '1.0'); 
    3235 
    33     define ('VBSSO_SHARED', VBSSO_PRODUCT_VERSION_1_4_7); 
     36    define ('VBSSO_SHARED', VBSSO_PRODUCT_VERSION_1_4_10); 
    3437 
    3538    define ('VBSSO_PRODUCT_ID', 'vbsso'); 
     
    4750    define ('VBSSO_OPTIONS_PROFILE_FIELD_COUNTRY', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, 'profile_field_country')); 
    4851    define ('VBSSO_OPTIONS_PROFILE_FIELD_CITY', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, 'profile_field_city')); 
     52    define ('VBSSO_OPTIONS_PROFILE_FIELD_PHONE', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, 'profile_field_phone')); 
     53    define ('VBSSO_OPTIONS_PROFILE_FIELD_BIRTH', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, 'profile_field_birth')); 
    4954 
    5055    define ('VBSSO_OPTIONS_ALLOWED_USERGROUPS', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, 'allowed_usergroups')); 
     
    5257    define ('VBSSO_OPTIONS_LOGIN_ACCESS_SETTINGS', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, 'login_access_settings')); 
    5358 
     59    define ('VBSSO_OPTIONS_LOGGING_MODE', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, 'logging_mode')); 
    5460    define ('VBSSO_OPTIONS_LOGGING_LEVEL', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, 'logging_level')); 
    5561    define ('VBSSO_OPTIONS_LOGGING_EMAIL_NOTIFICATIONS', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, 'logging_email_notifications')); 
     
    5763 
    5864    /** 
     65     * Platform Config. 
     66     */ 
     67    define ('VBSSO_CONFIG_PROPERTY_LOG', 'log'); 
     68    define ('VBSSO_CONFIG_PROPERTY_SIMPLE_LOGGING', 'simple-logging'); 
     69    define ('VBSSO_CONFIG_PROPERTY_OVERRIDE_LINKS', 'override-links'); 
     70    define ('VBSSO_CONFIG_PROPERTY_VB_REGISTER_REDIRECT', 'vbulletin-registration-redirect'); 
     71 
     72    /** 
    5973     * Footer Link Options. 
    6074     */ 
     
    6680 
    6781 
    68     define ('VBSSO_PLATFORM_FOOTER_GA_HTML', "<script type=\"text/javascript\"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-25094208-2']); /*_gaq.push(['_trackPageview']);*/ _gaq.push(['_trackEvent', '{platform}', window.location.host, window.location.href]); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script>"); 
    69     function VBSSO_PLATFORM_FOOTER_GA_HTML($platform) { 
    70         return str_replace("{platform}", $platform, VBSSO_PLATFORM_FOOTER_GA_HTML); 
     82    define ('VBSSO_PLATFORM_FOOTER_GA_HTML', "<script type=\"text/javascript\"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-25094208-2']); /*_gaq.push(['_trackPageview']);*/ /*track_event_marker*/ (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script>"); 
     83    function VBSSO_PLATFORM_FOOTER_GA_HTML($platforms, $action = '') { 
     84        $platforms = (is_array($platforms)) ? $platforms : array($platforms); 
     85        if (!empty($action)) { 
     86            switch ($action) { 
     87                case ('login'): 
     88                    $action = 'A/'; 
     89                    break; 
     90                case ('register'): 
     91                    $action = 'R/'; 
     92            } 
     93        } 
     94 
     95        $ga_code = VBSSO_PLATFORM_FOOTER_GA_HTML; 
     96        $marker = '/*track_event_marker*/'; 
     97 
     98        foreach ($platforms as $platform) { 
     99            $ga_code = str_replace($marker, '_gaq.push([\'_trackEvent\', \'' . $action . $platform . '\', window.location.host, window.location.href]); ' . $marker, $ga_code); 
     100        } 
     101 
     102        return str_replace($marker, '', $ga_code); 
    71103    } 
    72104 
     
    88120    define ('VBSSO_NAMED_EVENT_FIELD_API_KEY', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, SHAREDAPI_EVENT_FIELD_API_KEY)); 
    89121    define ('VBSSO_NAMED_EVENT_FIELD_API_KEY_TITLE', 'Platform Shared Key'); 
     122    define ('VBSSO_NAMED_EVENT_FIELD_API_KEY_WARNING', 'Please unconnect this platform to change shared key'); 
    90123 
    91124    define ('VBSSO_NAMED_EVENT_FIELD_LID', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, SHAREDAPI_EVENT_FIELD_LID)); 
     
    96129 
    97130    define ('VBSSO_NAMED_EVENT_FIELD_TIMEOUT', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, SHAREDAPI_EVENT_FIELD_TIMEOUT)); 
     131    define ('VBSSO_NAMED_EVENT_FIELD_MUID', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, SHAREDAPI_EVENT_FIELD_MUID)); 
    98132 
    99133    define ('VBSSO_NAMED_EVENT_FIELD_SHOW_VBULLETIN_AUTHOR_PROFILE', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, 'vb_author_profile_url')); 
     
    111145    define ('VBSSO_NAMED_EVENT_FIELD_ADMINISTRATOR_ROLE_NAME', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, 'admin_role_name')); 
    112146    define ('VBSSO_NAMED_EVENT_FIELD_ADMINISTRATOR_ROLE_NAME_TITLE', 'Name of Administrator Role'); 
     147 
     148    define ('VBSSO_NAMED_EVENT_FIELD_USERGROUPS_ASSOC', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, 'usergroups_assoc')); 
     149    define ('VBSSO_NAMED_EVENT_FIELD_USERGROUPS_ASSOC_TITLE', 'Usergroups Associations'); 
    113150 
    114151    define ('VBSSO_NAMED_EVENT_FIELD_PROFILE_FIELDS', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, SHAREDAPI_EVENT_FIELD_PROFILE_FIELDS)); 
     
    117154    define ('VBSSO_NAMED_EVENT_FIELD_PROFILE_COUNTRY', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, SHAREDAPI_EVENT_FIELD_PROFILE_COUNTRY)); 
    118155    define ('VBSSO_NAMED_EVENT_FIELD_PROFILE_CITY', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, SHAREDAPI_EVENT_FIELD_PROFILE_CITY)); 
     156    define ('VBSSO_NAMED_EVENT_FIELD_PROFILE_PHONE', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, SHAREDAPI_EVENT_FIELD_PROFILE_PHONE)); 
     157    define ('VBSSO_NAMED_EVENT_FIELD_PROFILE_BIRTH', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, SHAREDAPI_EVENT_FIELD_PROFILE_BIRTH)); 
    119158 
    120159    define ('VBSSO_NAMED_EVENT_FIELD_LOGIN_VBULLETIN_URL', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, SHAREDAPI_EVENT_FIELD_LOGIN_VBULLETIN_URL)); 
     
    139178    define ('VBSSO_NAMED_EVENT_FIELD_PROFILE_URL_TITLE', 'Profile Url'); 
    140179 
     180    define ('VBSSO_NAMED_EVENT_FIELD_USERGROUPS_URL', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, SHAREDAPI_EVENT_FIELD_USERGROUPS_URL)); 
     181    define ('VBSSO_NAMED_EVENT_FIELD_USERGROUPS_URL_TITLE', 'Get User Groups Url'); 
     182 
     183    define ('VBSSO_NAMED_EVENT_FIELD_BAA_USERNAME', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, SHAREDAPI_EVENT_FIELD_BAA_USERNAME)); 
     184    define ('VBSSO_NAMED_EVENT_FIELD_BAA_USERNAME_TITLE', 'Basic access authentication username'); 
     185 
     186    define ('VBSSO_NAMED_EVENT_FIELD_BAA_PASSWORD', SHAREDAPI_NAME_DEFINITION(VBSSO_PRODUCT_ID, SHAREDAPI_EVENT_FIELD_BAA_PASSWORD)); 
     187    define ('VBSSO_NAMED_EVENT_FIELD_BAA_PASSWORD_TITLE', 'Basic access authentication password'); 
     188 
    141189    /* 
    142190     * Platform Configuration methods. 
     
    145193        static $config = array(); 
    146194 
    147         if (!isset($config[$platform]) || $config[$platform] === null) { 
     195        if (!isset($config[$platform]) || $config[$platform] === NULL) { 
    148196            $platforms_ids = sharedapi_get_platforms_ids(); 
    149197 
    150198            $config[$platform] = array( 
    151                 'log' => true, 
    152                 'override-links' => true, 
    153                 'vbulletin-registration-redirect' => false 
     199                VBSSO_CONFIG_PROPERTY_LOG => TRUE, 
     200                VBSSO_CONFIG_PROPERTY_OVERRIDE_LINKS => TRUE, 
     201                VBSSO_CONFIG_PROPERTY_SIMPLE_LOGGING => FALSE, 
     202                VBSSO_CONFIG_PROPERTY_VB_REGISTER_REDIRECT => FALSE 
    154203            ); 
    155204 
    156205            $cfg = array(); 
    157             $platform_id = isset($platforms_ids[$platform]) ? $platforms_ids[$platform] : null; 
     206            $platform_id = isset($platforms_ids[$platform]) ? $platforms_ids[$platform] : NULL; 
    158207 
    159208            if (count($cfg)) { 
     
    194243                VBSSO_NAMED_EVENT_FIELD_AVATAR_URL => array('field' => SHAREDAPI_EVENT_FIELD_AVATAR_URL, 'title' => VBSSO_NAMED_EVENT_FIELD_AVATAR_URL_TITLE), 
    195244                VBSSO_NAMED_EVENT_FIELD_PROFILE_URL => array('field' => SHAREDAPI_EVENT_FIELD_PROFILE_URL, 'title' => VBSSO_NAMED_EVENT_FIELD_PROFILE_URL_TITLE), 
     245                VBSSO_NAMED_EVENT_FIELD_USERGROUPS_URL => array('field' => SHAREDAPI_EVENT_FIELD_USERGROUPS_URL, 'title' => VBSSO_NAMED_EVENT_FIELD_USERGROUPS_URL_TITLE), 
     246                VBSSO_NAMED_EVENT_FIELD_BAA_USERNAME => array('field' => SHAREDAPI_EVENT_FIELD_BAA_USERNAME, 'title' => VBSSO_NAMED_EVENT_FIELD_BAA_USERNAME_TITLE), 
     247                VBSSO_NAMED_EVENT_FIELD_BAA_PASSWORD => array('field' => SHAREDAPI_EVENT_FIELD_BAA_PASSWORD, 'title' => VBSSO_NAMED_EVENT_FIELD_BAA_PASSWORD_TITLE), 
    196248            ); 
    197249        } 
     
    209261            SHAREDAPI_EVENT_FIELD_PROFILE_COUNTRY => VBSSO_OPTIONS_PROFILE_FIELD_COUNTRY, 
    210262            SHAREDAPI_EVENT_FIELD_PROFILE_CITY => VBSSO_OPTIONS_PROFILE_FIELD_CITY, 
     263            SHAREDAPI_EVENT_FIELD_PROFILE_PHONE => VBSSO_OPTIONS_PROFILE_FIELD_PHONE, 
     264            SHAREDAPI_EVENT_FIELD_PROFILE_BIRTH => VBSSO_OPTIONS_PROFILE_FIELD_BIRTH, 
    211265        ); 
    212266    } 
     
    216270     */ 
    217271    function vbsso_verify_loaded_extensions() { 
    218         $extensions = array('curl', 'mcrypt'); 
     272        $extensions = array('curl', 'mcrypt', 'zip'); 
    219273 
    220274        $nloaded = array(); 
     
    232286    } 
    233287 
    234     function vbsso_get_destination($event, $r = 'r', $reset = false) { 
     288    function vbsso_get_destination($event, $r = 'r', $reset = FALSE) { 
    235289        return sharedapi_get_destination(VBSSO_PRODUCT_ID, $event, $r, $reset); 
    236290    } 
     
    240294    } 
    241295 
    242     function vbsso_get_lid($event, $r = 'r', $reset = false) { 
     296    function vbsso_get_lid($event, $r = 'r', $reset = FALSE) { 
    243297        return sharedapi_get_lid(VBSSO_PRODUCT_ID, $event, $r, $reset); 
    244298    } 
    245299 
    246300    function vbsso_capture_destination($event) { 
    247         return sharedapi_capture_destination(VBSSO_PRODUCT_ID, $event, VBSSO_PRODUCT_API_PATH); 
    248     } 
    249  
    250     function vbsso_log($data, $file = 'default', $path = null) { 
    251         if (vbsso_get_platform_config_property(SHAREDAPI_PLATFORM_VBULLETIN, 'log', true)) { 
    252             sharedapi_log($data, $file == 'default' ? 'vbsso.log' : $file, $path); 
     301        sharedapi_capture_destination(VBSSO_PRODUCT_ID, $event, VBSSO_PRODUCT_API_PATH); 
     302    } 
     303 
     304    function vbsso_log($data, $file = 'default', $path = NULL) { 
     305        if (vbsso_get_platform_config_property(SHAREDAPI_PLATFORM_VBULLETIN, VBSSO_CONFIG_PROPERTY_LOG, TRUE)) { 
     306            sharedapi_log($data, $file == 'default' ? 'vbsso_' . date('Y-m-d', time()) . '.log' : $file, $path); 
    253307        } 
    254308    } 
  • vbsso/trunk/readme.txt

    r678683 r715760  
    55Requires at least: 3.0 
    66Tested up to: 3.0 - 3.5 
    7 Stable tag: 1.2.5 
     7Stable tag: 1.2.6 
    88 
    99Provides universal Secure Single Sign-On between vBulletin and different popular platforms like WordPress. 
     
    3333= Installation = 
    34341. Download WordPress vBSSO. 
    35 2. Unzip and upload everything to `/wp-content/plugins/` directory of your WordPress installation. 
     352. Unzip and upload folder "vbsso" to `/wp-content/plugins/` directory of your WordPress installation 
    36363. Log in to WordPress as administrator. 
    37374. Navigate to `Plugins` or `Network -> Plugins` (in case of enabled network) section and activate vBSSO plugin. 
     
    40401. Log in to your vBulletin control panel as administrator. 
    41412. Navigate to `vBSSO` section. 
    42 3. Expand section and click on the `Platforms` link. 
    43 4. Copy `Platform Url` and `Shared Key` fields from WordPress installation to vBulletin. 
    44 5. Click on `Connect` button to connect your new platform. 
    45 6. Back to WordPress vBSSO Settings page and verify that API Connections fields are actually filled out. 
     423. Modify your default Platform Shared Key by setting it to more secure unreadable phrase to encrypt exchanged data. 
     434. Save Changes. 
     44 
     455. Log in to your vBulletin control panel as administrator. 
     466. Navigate to `vBSSO` section. 
     477. Expand section and click on the `Platforms` link. 
     488. Copy `Platform Url` link and `Shared Key` field from WordPress installation to vBulletin. 
     499. Click on `Connect` button to connect your new platform. 
     5010. Back to WordPress vBSSO Settings page and verify that API Connections fields are filled out. 
     51 
     52= SSL Configuration = 
     531. Modify wp-config.php 
     542. Add the following code "define('FORCE_SSL_ADMIN', true);" without quotes to top of the configuration file. 
     553. Add the following code "define('FORCE_SSL_LOGIN', true);" without quotes to top of the configuration file. 
     56It's important to have SSL settings at the beginning of configuration file. For more details, please take a look at http://codex.wordpress.org/Administration_Over_SSL. 
    4657 
    4758More details are available at http://www.vbsso.com/ 
     
    6475 
    6576= Support is available at http://www.vbsso.com only = 
     77 
     78= 1.2.6 = 
     79* Improved vBSSO Login widget. 
     80* Improved support of vBSSO WordPress SSL mode. 
     81* Implemented vBSSO vBulletin usergroups API. 
     82* [Updated May 20, 2013] 
    6683 
    6784= 1.2.5 = 
  • vbsso/trunk/vbsso.php

    r678683 r715760  
    55Description: Provides universal Secure Single Sign-On between vBulletin and different popular platforms like WordPress. 
    66Author: www.vbsso.com 
    7 Version: 1.2.5 
     7Version: 1.2.6 
    88Author URI: http://www.vbsso.com 
    99License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     
    2323 * License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
    2424 * ----------------------------------------------------------------------- 
    25  * $Revision: 998 $: 
    26  * $Date: 2013-02-06 19:43:36 +0200 (Ср, 06 фев 2013) $: 
     25 * $Revision: 1109 $: 
     26 * $Date: 2013-05-16 12:13:21 +0300 (Чт, 16 май 2013) $: 
    2727 */ 
    2828 
    2929require_once(dirname(__FILE__) . '/config.php'); 
     30 
     31//add_action( 'plugins_loaded', 'vbsso_update_db' ); 
     32//function vbsso_update_db() { 
     33//    global $wpdb; 
     34// 
     35//    $vbsso_db_version = '1.0'; //upgradeable variable 
     36// 
     37//    $table_name = $wpdb->prefix . "verified_users"; 
     38// 
     39//    if( get_site_option('vbsso_db_version') != $vbsso_db_version  AND $wpdb->get_var("show tables like '$table_name'") != $table_name) { 
     40//        $sql = "CREATE TABLE `$table_name` ( 
     41//                `id` BIGINT NOT NULL AUTO_INCREMENT , 
     42//                `userid` BIGINT NOT NULL , 
     43//                `localusername` VARCHAR(60) NOT NULL , 
     44//                `localemail` VARCHAR(100) NOT NULL , 
     45//                `vbusername` VARCHAR(60) NOT NULL , 
     46//                `vbemail` VARCHAR(100) NOT NULL , 
     47//                PRIMARY KEY ( `id` ) 
     48//                );"; 
     49// 
     50//        require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); 
     51//        dbDelta( $sql ); 
     52// 
     53//        update_option('vbsso_db_version', $vbsso_db_version); 
     54//    } 
     55//} 
     56 
    3057 
    3158/** 
     
    3966        wp_die('Please install these PHP extensions `' . join(', ', $nloaded_extensions) . '` before installing or upgrading this product!'); 
    4067    } 
     68} 
     69 
     70/** 
     71 * Register Uninstall Hook 
     72 */ 
     73register_uninstall_hook(__FILE__, 'vbsso_register_uninstall_hook'); 
     74function vbsso_register_uninstall_hook(){ 
     75    global $wpdb; 
     76    $table_name = $wpdb->prefix . "verified_users"; 
     77    $wpdb->query("DROP TABLE IF EXISTS $table_name"); 
    4178} 
    4279 
     
    67104 * Register Url Filter 
    68105 */ 
    69 if (vbsso_get_platform_config_property(SHAREDAPI_PLATFORM_WORDPRESS, 'override-links', true) && get_site_option(VBSSO_NAMED_EVENT_FIELD_REGISTER_URL, '') != '') { 
     106if (vbsso_get_platform_config_property(SHAREDAPI_PLATFORM_WORDPRESS, VBSSO_CONFIG_PROPERTY_OVERRIDE_LINKS, true) && get_site_option(VBSSO_NAMED_EVENT_FIELD_REGISTER_URL, '') != '') { 
    70107    add_filter('register', 'vbsso_register_url_hook'); 
    71108} 
     
    73110    if ( ! is_user_logged_in() ) { 
    74111        if ( get_option('users_can_register') ) 
    75             $link = '<li><a href="'. sharedapi_url_add_destination(get_site_option(VBSSO_NAMED_EVENT_FIELD_REGISTER_URL, ''), 'server', '', get_site_option(VBSSO_NAMED_EVENT_FIELD_LID, '')) .'" rel="nofollow">' . __('Register') . '</a></li>'; 
     112            $link = '<li><a href="'. sharedapi_url_add_destination(get_site_option(VBSSO_NAMED_EVENT_FIELD_REGISTER_URL, ''), 'server', '', get_site_option(VBSSO_NAMED_EVENT_FIELD_LID, '')) .'" rel="nofollow">' . __('Create your account') . '</a></li>'; 
    76113        else 
    77114            $link = ''; 
     
    86123 * Login Url Filter 
    87124 */ 
    88 if (vbsso_get_platform_config_property(SHAREDAPI_PLATFORM_WORDPRESS, 'override-links', true) && get_site_option(VBSSO_NAMED_EVENT_FIELD_LOGIN_URL, '') != '') { 
     125if (vbsso_get_platform_config_property(SHAREDAPI_PLATFORM_WORDPRESS, VBSSO_CONFIG_PROPERTY_OVERRIDE_LINKS, true) && get_site_option(VBSSO_NAMED_EVENT_FIELD_LOGIN_URL, '') != '') { 
    89126    add_filter('login_url', 'vbsso_login_url_hook'); 
    90127} 
     
    96133 * Logout Url Filter 
    97134 */ 
    98 if (vbsso_get_platform_config_property(SHAREDAPI_PLATFORM_WORDPRESS, 'override-links', true) && get_site_option(VBSSO_NAMED_EVENT_FIELD_LOGOUT_URL, '') != '') { 
     135if (vbsso_get_platform_config_property(SHAREDAPI_PLATFORM_WORDPRESS, VBSSO_CONFIG_PROPERTY_OVERRIDE_LINKS, true) && get_site_option(VBSSO_NAMED_EVENT_FIELD_LOGOUT_URL, '') != '') { 
    99136    add_filter('logout_url', 'vbsso_logout_url_hook'); 
    100137} 
     
    106143 * Lost Password Url Filter 
    107144 */ 
    108 if (vbsso_get_platform_config_property(SHAREDAPI_PLATFORM_WORDPRESS, 'override-links', true) && get_site_option(VBSSO_NAMED_EVENT_FIELD_LOSTPASSWORD_URL, '') != '') { 
     145if (vbsso_get_platform_config_property(SHAREDAPI_PLATFORM_WORDPRESS, VBSSO_CONFIG_PROPERTY_OVERRIDE_LINKS, true) && get_site_option(VBSSO_NAMED_EVENT_FIELD_LOSTPASSWORD_URL, '') != '') { 
    109146    add_filter('lostpassword_url', 'vbsso_lostpassword_url_hook'); 
    110147} 
     
    125162    } 
    126163} 
     164 
     165///** 
     166// * Edit User Profile Update Filter 
     167// */ 
     168//add_action('profile_update', 'vbsso_profile_update_hook'); 
     169//function vbsso_profile_update_hook($user_id) { 
     170//    global $userdata, $user_ID; 
     171// 
     172//    if ($user_id) { 
     173//        $uid = $user_ID; 
     174//        wp_set_current_user($user_id); 
     175//        vbsso_insert_verification_info($userdata); 
     176//        wp_set_current_user($uid); 
     177//    } 
     178//} 
     179// 
     180//add_action( 'delete_user', 'vbsso_delete_user_hook' ); 
     181//function vbsso_delete_user_hook($user_id) { 
     182//    global $wpdb; 
     183// 
     184//    if ($user_id) { 
     185//        $wpdb->query('DELETE FROM `' . $wpdb->prefix . 'verified_users` WHERE `userid` = ' . $user_id); 
     186//    } 
     187//} 
     188// 
     189//function vbsso_insert_verification_info ($userdata, $json = array()) { 
     190//    global $wpdb; 
     191// 
     192//    if (!empty($json)) $vbsso_username = html_entity_decode($json[SHAREDAPI_EVENT_FIELD_USERNAME], NULL, get_option('blog_charset')); 
     193//    $table_name = $wpdb->prefix . "verified_users"; 
     194// 
     195//    if ($u = $wpdb->get_row("SELECT * FROM `$table_name` WHERE `userid` = " . $userdata->ID)) { 
     196//        $updateinfo = array(); 
     197//        $updateinfo['localusername'] = $userdata->user_login; 
     198//        $updateinfo['localemail'] = $userdata->user_email; 
     199//        if (!empty($json)) $updateinfo['vbusername'] = $vbsso_username; 
     200//        if (!empty($json)) $updateinfo['vbemail'] = $json[SHAREDAPI_EVENT_FIELD_EMAIL]; 
     201// 
     202//        $wpdb->update( 
     203//            $table_name, $updateinfo, array( 'userid' => $userdata->ID ) 
     204//        ); 
     205//    } else { 
     206//        $wpdb->insert( 
     207//            $table_name, 
     208//            array( 
     209//                'userid' => $userdata->ID, 
     210//                'localusername' =>$userdata->user_login, 
     211//                'localemail' =>$userdata->user_email, 
     212//                'vbusername' =>$vbsso_username, 
     213//                'vbemail' =>$json[SHAREDAPI_EVENT_FIELD_EMAIL] 
     214//            ) 
     215//        ); 
     216//    } 
     217//} 
    127218 
    128219/** 
     
    236327 
    237328    $out = $avatar_url . $email_hash; 
     329 
    238330    $avatar = "<img alt='{$safe_alt}' src='{$out}' class='avatar avatar-{$size} photo' height='{$size}' width='{$size}' />"; 
    239331 
     
    272364} 
    273365 
     366function vbsso_get_vb_usergroups() { 
     367    $context = stream_context_create(array( 
     368        'http' => array( 
     369            'header'  => "Authorization: Basic " . base64_encode( 
     370                sharedapi_decode_data( 
     371                    get_site_option(VBSSO_NAMED_EVENT_FIELD_API_KEY, SHAREDAPI_DEFAULT_API_KEY), get_site_option(VBSSO_NAMED_EVENT_FIELD_BAA_USERNAME, null) 
     372                ) . ':' . sharedapi_decode_data( 
     373                    get_site_option(VBSSO_NAMED_EVENT_FIELD_API_KEY, SHAREDAPI_DEFAULT_API_KEY), get_site_option(VBSSO_NAMED_EVENT_FIELD_BAA_PASSWORD, null) 
     374                ) 
     375            ) 
     376        ) 
     377    )); 
     378 
     379    return json_decode(file_get_contents(get_site_option(VBSSO_NAMED_EVENT_FIELD_USERGROUPS_URL), false, $context)); 
     380} 
     381 
    274382function vbsso_options() { 
    275383    if (!current_user_can('manage_options')) { 
     
    278386 
    279387    if (isset($_POST['submit_options']) && $_POST['submit_options'] == 1) { 
    280         update_site_option(VBSSO_NAMED_EVENT_FIELD_API_KEY, $_POST[VBSSO_NAMED_EVENT_FIELD_API_KEY]); 
     388        if (isset($_POST[VBSSO_NAMED_EVENT_FIELD_API_KEY])) update_site_option(VBSSO_NAMED_EVENT_FIELD_API_KEY, $_POST[VBSSO_NAMED_EVENT_FIELD_API_KEY]); 
    281389        update_site_option(VBSSO_NAMED_EVENT_FIELD_FETCH_AVATARS, $_POST[VBSSO_NAMED_EVENT_FIELD_FETCH_AVATARS]); 
    282390        update_site_option(VBSSO_NAMED_EVENT_FIELD_SHOW_VBULLETIN_PROFILE, $_POST[VBSSO_NAMED_EVENT_FIELD_SHOW_VBULLETIN_PROFILE]); 
    283391        update_site_option(VBSSO_NAMED_EVENT_FIELD_SHOW_VBULLETIN_AUTHOR_PROFILE, $_POST[VBSSO_NAMED_EVENT_FIELD_SHOW_VBULLETIN_AUTHOR_PROFILE]); 
    284392        update_site_option(VBSSO_PLATFORM_FOOTER_LINK_PROPERTY, $_POST[VBSSO_PLATFORM_FOOTER_LINK_PROPERTY]); 
     393 
     394        if (get_site_option(VBSSO_NAMED_EVENT_FIELD_USERGROUPS_URL, null)) { 
     395            $vb_usergroups = vbsso_get_vb_usergroups(); 
     396            $vbsso_usergroups_assoc = array(); 
     397 
     398            foreach ($vb_usergroups as $vb_usergroup) { 
     399                $vbsso_usergroups_assoc[$vb_usergroup->usergroupid] = $_POST[VBSSO_NAMED_EVENT_FIELD_USERGROUPS_ASSOC . '_' . $vb_usergroup->usergroupid]; 
     400            } 
     401 
     402            update_site_option(VBSSO_NAMED_EVENT_FIELD_USERGROUPS_ASSOC, json_encode($vbsso_usergroups_assoc)); 
     403        } 
    285404    } 
    286405 
     
    309428    $show_vb_profile_name = VBSSO_NAMED_EVENT_FIELD_SHOW_VBULLETIN_PROFILE; 
    310429    $show_vb_profile_title = VBSSO_NAMED_EVENT_FIELD_SHOW_VBULLETIN_PROFILE_TITLE; 
     430 
     431    $disabled_field = (get_site_option(VBSSO_NAMED_EVENT_FIELD_LOGIN_URL, '')) ? 'disabled' : ''; 
    311432 
    312433    echo <<<EOD 
     
    335456    <h4>Platform</h4> 
    336457    <p> 
    337         <input size="80" name="{$sharedkey_name}" value="{$sharedkey_value}"> 
    338         <br/><span class="description">{$sharedkey_title}</span><br/><br/> 
    339  
    340         <input size="80" value="{$url}" readonly> 
     458        <input size="80" name="{$sharedkey_name}" value="{$sharedkey_value}" {$disabled_field} /> 
     459        <br/><span class="description">{$sharedkey_title}</span> 
     460        <br/><span class="description"> 
     461EOD; 
     462        echo VBSSO_NAMED_EVENT_FIELD_API_KEY_WARNING; 
     463        echo <<<EOD 
     464        </span><br/><br/> 
     465 
     466        <input size="80" value="{$url}" readonly /> 
    341467        <br/><span class="description">{$url_title}</span><br> 
    342468    </p> 
     
    344470    <h4>Settings</h4> 
    345471    <p> 
    346         <input type="checkbox" id="{$fetch_avatars_name}" name="{$fetch_avatars_name}" value="1" {$fetch_avatars}> 
     472        <input type="checkbox" id="{$fetch_avatars_name}" name="{$fetch_avatars_name}" value="1" {$fetch_avatars} /> 
    347473        <label for="{$fetch_avatars_name}">{$fetch_avatars_title}</label> <br/> 
    348474    </p> 
    349475 
    350476    <p> 
    351         <input type="checkbox" id="{$show_vb_authors_profiles_name}" name="{$show_vb_authors_profiles_name}" value="1" {$show_vb_authors_profiles}> 
     477        <input type="checkbox" id="{$show_vb_authors_profiles_name}" name="{$show_vb_authors_profiles_name}" value="1" {$show_vb_authors_profiles} /> 
    352478        <label for="{$show_vb_authors_profiles_name}">{$show_vb_authors_profiles_title}</label> <br/> 
    353479    </p> 
    354480 
    355481    <p> 
    356         <input type="checkbox" id="{$show_vb_profile_name}" name="{$show_vb_profile_name}" value="1" {$show_vb_profile}> 
     482        <input type="checkbox" id="{$show_vb_profile_name}" name="{$show_vb_profile_name}" value="1" {$show_vb_profile} /> 
    357483        <label for="{$show_vb_profile_name}">{$show_vb_profile_title}</label> <br/> 
    358484    </p> 
    359485 
     486    <h4>User Groups Association (Default role is subscriber)</h4> 
     487    <p> 
     488EOD; 
     489    if (get_site_option(VBSSO_NAMED_EVENT_FIELD_USERGROUPS_URL, null)) { 
     490        $context = stream_context_create(array( 
     491            'http' => array( 
     492                'header'  => "Authorization: Basic " . base64_encode( 
     493                    sharedapi_decode_data( 
     494                        get_site_option(VBSSO_NAMED_EVENT_FIELD_API_KEY, SHAREDAPI_DEFAULT_API_KEY), get_site_option(VBSSO_NAMED_EVENT_FIELD_BAA_USERNAME, null) 
     495                    ) 
     496                        . ':' . 
     497                        sharedapi_decode_data( 
     498                            get_site_option(VBSSO_NAMED_EVENT_FIELD_API_KEY, SHAREDAPI_DEFAULT_API_KEY), get_site_option(VBSSO_NAMED_EVENT_FIELD_BAA_PASSWORD, null)) 
     499                ) 
     500            ) 
     501        )); 
     502 
     503        $vb_usergroups = vbsso_get_vb_usergroups(); 
     504        $vbsso_usergroups_assoc = json_decode(get_site_option(VBSSO_NAMED_EVENT_FIELD_USERGROUPS_ASSOC, null)); 
     505 
     506        echo '<table id="vbsso_usergroups">'; 
     507        echo '<tr style="text-align: center"><td>vBulletin Usergroups</td><td>Wordpress Roles</td></tr>'; 
     508        foreach ($vb_usergroups as $vb_usergroup) { 
     509            $ugid = $vb_usergroup->usergroupid; 
     510            echo '<tr><td>' . $vb_usergroup->title . '</td><td><select name="' . VBSSO_NAMED_EVENT_FIELD_USERGROUPS_ASSOC . '_' . $vb_usergroup->usergroupid .'">'; 
     511            wp_dropdown_roles(($vbsso_usergroups_assoc AND $vbsso_usergroups_assoc->$ugid) ? $vbsso_usergroups_assoc->$ugid : 'subscriber'); 
     512            echo '</select></td></tr>'; 
     513        } 
     514        echo '</table>'; 
     515    } else { 
     516        echo "This platform is not connected."; 
     517    } 
     518    echo <<<EOD 
     519</p> 
     520 
    360521    <p class="submit"> 
    361         <input type="submit" name="Submit" class="button-primary" value="Save Changes"/> 
     522        <input type="submit" name="Submit" class="button-primary" value="Save Changes" /> 
    362523    </p> 
    363524</form> 
     
    384545        $title = apply_filters( 'widget_title', $instance['title'] ); 
    385546 
    386         if (vbsso_get_platform_config_property(SHAREDAPI_PLATFORM_WORDPRESS, 'override-links', true) && get_site_option(VBSSO_NAMED_EVENT_FIELD_LOGIN_VBULLETIN_URL, '') != '') { 
     547        if (vbsso_get_platform_config_property(SHAREDAPI_PLATFORM_WORDPRESS, VBSSO_CONFIG_PROPERTY_OVERRIDE_LINKS, true) && get_site_option(VBSSO_NAMED_EVENT_FIELD_LOGIN_VBULLETIN_URL, '') != '') { 
    387548            echo $before_widget; 
    388549            if ( ! empty( $title ) ) echo $before_title . $title . $after_title; 
     
    409570                        </form>'; 
    410571 
    411                 if ( get_option('users_can_register') ) { 
    412                     if ( ! is_multisite() ) { 
    413                         $metalinks .= wp_register(null, null, false); 
    414                     } else { 
    415                         $metalinks .= '<li><a href="' . site_url('wp-signup.php', 'login') . '" rel="nofollow">' . __('Register') . '</a></li>'; 
    416                     } 
    417                 } 
    418                 $metalinks .= '<li><a href="' . wp_lostpassword_url() . '" rel="nofollow">' . __('Lost password') . '</a></li>'; 
     572                $metalinks .= wp_register(null, null, false); 
     573                $metalinks .= '<li><a href="' . wp_lostpassword_url() . '" rel="nofollow">' . __('Forgot your password?') . '</a></li>'; 
    419574            } else { 
     575                echo '<ul><li style="list-style-type: none;">' . sprintf( __('Howdy, %1$s'), wp_get_current_user()->display_name ) . '!</li></ul>'; 
    420576                echo '<div id="vbsso_avatar" style="float:left; padding: 3px; border: 1px solid #ddd; border-radius:4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; margin-right: 22px; margin-top: 5px; width:38px; height:38px;">'.get_avatar($user_ID, $size = '38').'</div>'; 
    421577                $metalinks .= '<li><a href="' . admin_url() . '" rel="nofollow">' . __('Site Admin') . '</a></li>'; 
Note: See TracChangeset for help on using the changeset viewer.