diff --git a/duoshuo/WordPress.php b/duoshuo/WordPress.php index ba523bc..c9e310e 100644 --- a/duoshuo/WordPress.php +++ b/duoshuo/WordPress.php @@ -605,17 +605,7 @@ public function appendScripts(){ duoshuoQuery.sso.login += '&redirect_to=' + encodeURIComponent(window.location.href); duoshuoQuery.sso.logout += '&redirect_to=' + encodeURIComponent(window.location.href); -isSSL()){ -?> - - - - + 1, ); ?> - + diff --git a/duoshuo/duoshuo.php b/duoshuo/duoshuo.php index 2f89126..a9ac721 100644 --- a/duoshuo/duoshuo.php +++ b/duoshuo/duoshuo.php @@ -9,6 +9,7 @@ */ define('DUOSHUO_PLUGIN_PATH', dirname(__FILE__)); +define('DUOSHUO_RES_PERFIX',(@$_SERVER['HTTPS'] == "on")?'https://':'http://'); if (version_compare(PHP_VERSION, '5.0.0', '<')){ if(is_admin()){ diff --git a/duoshuo/manage.php b/duoshuo/manage.php index 9500d5b..fdb7e0b 100644 --- a/duoshuo/manage.php +++ b/duoshuo/manage.php @@ -3,7 +3,7 @@ $params = array( 'jwt' => $this->jwt(), ); -$adminUrl = 'http://' . $this->shortName . '.' . self::DOMAIN.'/admin/?' . http_build_query($params, null, '&'); +$adminUrl = DUOSHUO_RES_PERFIX . $this->shortName . '.' . self::DOMAIN.'/admin/?' . http_build_query($params, null, '&'); ?>
diff --git a/duoshuo/preferences.php b/duoshuo/preferences.php index 071c0c7..634bc7e 100644 --- a/duoshuo/preferences.php +++ b/duoshuo/preferences.php @@ -3,7 +3,7 @@ $params = array( 'jwt' => $this->jwt(), ); -$adminUrl = 'http://' . $this->shortName . '.' . self::DOMAIN . '/admin/settings/?' . http_build_query($params, null, '&'); +$adminUrl = DUOSHUO_RES_PERFIX . $this->shortName . '.' . self::DOMAIN . '/admin/settings/?' . http_build_query($params, null, '&'); ?>
diff --git a/duoshuo/profile.php b/duoshuo/profile.php index bdcb10e..5a0e76e 100644 --- a/duoshuo/profile.php +++ b/duoshuo/profile.php @@ -2,7 +2,7 @@ $params = array( 'jwt' => $this->jwt(), ); -$settingsUrl = 'http://' . self::DOMAIN . '/settings/?' . http_build_query($params, null, '&'); +$settingsUrl = DUOSHUO_RES_PERFIX . self::DOMAIN . '/settings/?' . http_build_query($params, null, '&'); ?> diff --git a/duoshuo/settings.php b/duoshuo/settings.php index c153d2a..0680b9e 100644 --- a/duoshuo/settings.php +++ b/duoshuo/settings.php @@ -194,9 +194,9 @@ handler = function(e){ var service = this.className.match(/ds\-(\w+)/)[1], message = + duoshuoName[service] + ' 评论插件,用微博、QQ、人人帐号就能登录评论了,很给力。来试试吧!', - image = 'http://static.duoshuo.com/images/top.jpg', + image = .'static.duoshuo.com/images/top.jpg', title = '多说评论插件', - url = 'http://duoshuo.com'; + url = 'duoshuo.com'; window.open('http://shortName . '.' . self::DOMAIN;?>/share-proxy/?service=' + service + '&url=' + encodeURIComponent(url) + '&message=' + encodeURIComponent(message) + '&title=' + encodeURIComponent(title) + '&images=' + image, '_blank', 'height=550,width=600,top=0,left=0,toolbar=no,menubar=no,resizable=yes,location=yes,status=no'); diff --git a/duoshuo/statistics.php b/duoshuo/statistics.php index 7c40ac1..674f5ba 100644 --- a/duoshuo/statistics.php +++ b/duoshuo/statistics.php @@ -3,7 +3,7 @@ $params = array( 'jwt' => $this->jwt(), ); -$adminUrl = 'http://' . $this->shortName . '.' . self::DOMAIN . '/admin/statistics/?' . http_build_query($params, null, '&'); +$adminUrl = DUOSHUO_RES_PERFIX . $this->shortName . '.' . self::DOMAIN . '/admin/statistics/?' . http_build_query($params, null, '&'); ?>
diff --git a/duoshuo/themes.php b/duoshuo/themes.php index 5f50108..3cec272 100644 --- a/duoshuo/themes.php +++ b/duoshuo/themes.php @@ -43,6 +43,6 @@ function loadDuoshuoThemes(json){ } - +