From: Jiang Date: Wed, 19 Nov 2014 08:24:30 +0000 (+0800) Subject: embr X-Git-Url: http://git.osdn.net/view?p=embrj%2Fmaster.git;a=commitdiff_plain;h=a983a08d1d19667bdd84d8a3cd2bdf08707ece51 embr --- diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..bf2a7a6 --- /dev/null +++ b/.htaccess @@ -0,0 +1,10 @@ +RewriteEngine On +RewriteRule ^([a-zA-Z0-9_]+)$ user.php?id=$1 [L,QSA] +RewriteRule ^(\d+)$ status.php?id=$1 [L,QSA] + +ExpiresActive On +ExpiresByType image/gif A2592000 +ExpiresByType image/png A2592000 +ExpiresByType text/css A2592000 +ExpiresByType application/x-javascript A2592000 + \ No newline at end of file diff --git a/ajax/addfavor.php b/ajax/addfavor.php index f4a4375..5358414 100644 --- a/ajax/addfavor.php +++ b/ajax/addfavor.php @@ -1,11 +1,11 @@ -makeFavorite($_POST['status_id']); - if ($result) echo 'success'; - else echo 'error'; -?> - +makeFavorite($_POST['status_id']); + if ($result) echo 'success'; + else echo 'error'; +?> + diff --git a/ajax/apiQuota.php b/ajax/apiQuota.php index 5dc966d..0b9a962 100644 --- a/ajax/apiQuota.php +++ b/ajax/apiQuota.php @@ -1,12 +1,14 @@ -ratelimit(); - $reset = intval((strtotime($limit->reset_time) - time())/60); - $remaining = $limit->remaining_hits < 0 ? 0 : $limit->remaining_hits; - header('Content-Type: text/plain'); - echo "{ limit: $remaining, reset: $reset }"; -?> +ratelimit(); + $reset = intval((format_time($limit->reset_time) - time())/60); + $remaining = $limit->remaining_hits < 0 ? 0 : $limit->remaining_hits; + $hourly = $limit->hourly_limit; + header('Content-Type: text/html'); + echo "
  • API: $remaining/$hourly
  • +
  • Reset in $reset min(s)
  • "; +?> diff --git a/ajax/delete.php b/ajax/delete.php index ba4bab4..f9e21ae 100644 --- a/ajax/delete.php +++ b/ajax/delete.php @@ -1,34 +1,34 @@ -deleteStatus($_POST['status_id']); - if ($result) echo 'success'; - else echo 'error'; - } - if ( isset($_POST['message_id']) ) { - $result = $t->deleteDirectMessage($_POST['message_id']); - if ($result) echo 'success'; - else echo 'error'; - } - if ( isset($_POST['favor_id']) ) { - $result = $t->removeFavorite($_POST['favor_id']); - if ($result) echo 'success'; - else echo 'error'; - } - if ( isset($_POST['list_id']) ) { - $result = $t->deleteList($_POST['list_id']); - if ($result) echo 'success'; - else echo 'error'; - } - if ( isset($_POST['list_member']) ) { - //$user = $t->showUser($_POST['list_member']); - $result = $t->deleteListMember($_POST['id'], $_POST['list_member']); - if ($result) echo 'success'; - else echo 'error'; - } -?> - +deleteStatus($_POST['status_id']); + if ($result) echo 'success'; + else echo 'error'; + } + elseif ( isset($_POST['message_id']) ) { + $result = $t->deleteDirectMessage($_POST['message_id']); + if ($result) echo 'success'; + else echo 'error'; + } + elseif ( isset($_POST['favor_id']) ) { + $result = $t->removeFavorite($_POST['favor_id']); + if ($result) echo 'success'; + else echo 'error'; + } + elseif ( isset($_POST['list_id']) ) { + $result = $t->deleteList($_POST['list_id']); + if ($result) echo 'success'; + else echo 'error'; + } + elseif ( isset($_POST['list_member']) ) { + //$user = $t->showUser($_POST['list_member']); + $result = $t->deleteListMember($_POST['id'], $_POST['list_member']); + if ($result) echo 'success'; + else echo 'error'; + } +?> + diff --git a/ajax/list.php b/ajax/list.php index 2ce015b..b75abe3 100644 --- a/ajax/list.php +++ b/ajax/list.php @@ -1,21 +1,21 @@ -debug = true; - if ( isset($_POST['action']) && isset($_POST['id']) ) { - if ($_POST['action'] == 'create') { - $result = $t->followList($_POST['id']); - if ($result) echo 'success'; - else echo 'error'; - } else if ($_POST['action'] == 'destory') { - $result = $t->unfollowList($_POST['id']); - if ($result) echo 'success'; - else echo 'error'; - } - } - -?> - +debug = true; + if ( isset($_POST['action']) && isset($_POST['id']) ) { + if ($_POST['action'] == 'create') { + $result = $t->followList($_POST['id']); + if ($result) echo 'success'; + else echo 'error'; + } else if ($_POST['action'] == 'destory') { + $result = $t->unfollowList($_POST['id']); + if ($result) echo 'success'; + else echo 'error'; + } + } + +?> + diff --git a/ajax/relation.php b/ajax/relation.php index acfefb9..fa25476 100644 --- a/ajax/relation.php +++ b/ajax/relation.php @@ -1,32 +1,42 @@ -followUser($_POST['id']); - break; - case 'destory': - $result = $t->destroyUser($_POST['id']); - break; - case 'block': - $result = $t->blockUser($_POST['id']); - break; - case 'unblock': - $result = $t->unblockUser($_POST['id']); - break; - } - if ($result){ - refreshProfile($t); - echo 'success'; - }else{ - echo 'error'; - } - } - -?> - +followUser($_POST['id']); + break; + case 'destory': + $result = $t->destroyUser($_POST['id']); + break; + case 'block': + $result = $t->blockUser($_POST['id']); + break; + case 'unblock': + $result = $t->unblockUser($_POST['id']); + break; + case 'report': + $result = $t->reportSpam($_POST['id']); + break; + case 'show': + $result = getRelationship($_POST['id']); + if ($result) { + echo $result; + return; + } + break; + } + if ($result){ + refreshProfile($t); + echo 'success'; + }else{ + echo 'error'; + } + } + +?> + diff --git a/ajax/reportSpam.php b/ajax/reportSpam.php index c9f80b0..e12ac35 100644 --- a/ajax/reportSpam.php +++ b/ajax/reportSpam.php @@ -1,19 +1,19 @@ -reportSpam($spammer); - if(isset($result->screen_name)){ - echo 'success'; - }else{ - echo 'error'; - } -?> +reportSpam($spammer); + if(isset($result->screen_name)){ + echo 'success'; + }else{ + echo 'error'; + } +?> diff --git a/ajax/retweet.php b/ajax/retweet.php index 79f53a7..6099d33 100644 --- a/ajax/retweet.php +++ b/ajax/retweet.php @@ -1,24 +1,24 @@ -retweet($id); - if($result){ - if($result->errors){ - echo 'duplicated'; - }else{ - echo $result->id; - } - }else{ - echo "error"; - } - } -?> +retweet($id); + if($result){ + if($result->errors){ + echo 'duplicated'; + }else{ + echo $result->id_str; + } + }else{ + echo "error"; + } + } +?> diff --git a/ajax/setTip.php b/ajax/setTip.php new file mode 100644 index 0000000..2ea497f --- /dev/null +++ b/ajax/setTip.php @@ -0,0 +1,26 @@ + \ No newline at end of file diff --git a/ajax/shortenTweet.php b/ajax/shortenTweet.php index 9579adf..541673b 100644 --- a/ajax/shortenTweet.php +++ b/ajax/shortenTweet.php @@ -1,24 +1,24 @@ -text)){ - echo $obj->text; - }else{ - echo 'error'; - } - }catch(Exception $e){ - echo 'error'; - } -?> +text)){ + echo $obj->text; + }else{ + echo 'error'; + } + }catch(Exception $e){ + echo 'error'; + } +?> diff --git a/ajax/shorturl.php b/ajax/shorturl.php index 33c9d33..1f35b3a 100644 --- a/ajax/shorturl.php +++ b/ajax/shorturl.php @@ -1,32 +1,13 @@ - + diff --git a/ajax/status.php b/ajax/status.php index c4fa5ed..5b8a1d0 100644 --- a/ajax/status.php +++ b/ajax/status.php @@ -1,58 +1,58 @@ -'; - $html .= ""; - $html .= '
      '; - $html .= formatConversation($_GET['id']); - $html .= '
    '; - echo $html; - }else{ - echo 'error'; - } - - function formatConversation($status_id){ - GLOBAL $t; - GLOBAL $user_id; - GLOBAL $reply_to_id; - $status = $t->showStatus($status_id); - if(!isset($status->user)){ - return ""; - } - $user = $status->user; - if($reply_to_id == ""){ - $reply_to_id = $user->id; - } - $date = formatDate($status->created_at); - $text = formatText($status->text); - $end = (!isset($status->in_reply_to_user_id) || ($user_id != $status->in_reply_to_user_id && $reply_to_id != $status->in_reply_to_user_id)); - $html = '
  • - - - - - '.$status_id.' - '.$user->screen_name.' '.$text.' - '; - if($end && isset($status->in_reply_to_user_id)){ - $html .= ' in reply to '.$status->in_reply_to_screen_name.''; - } - $html .= 'from '.$status->source.' - '.$date.' - - -
  • '; - if(!$end){ - $html .= formatConversation($status->in_reply_to_status_id); - } - return $html; - } -?> +'; + $html .= ""; + $html .= '
      '; + $html .= formatConversation($_GET['id']); + $html .= '
    '; + echo $html; + }else{ + echo 'error'; + } + + function formatConversation($status_id){ + GLOBAL $t; + GLOBAL $user_id; + GLOBAL $reply_to_id; + $status = $t->showStatus($status_id); + if(!isset($status->user)){ + return ""; + } + $user = $status->user; + if($reply_to_id == ""){ + $reply_to_id = $user->id; + } + $date = format_time($status->created_at); + $text = formatEntities($status->entities,$status->text); + $end = (!isset($status->in_reply_to_user_id) || ($user_id != $status->in_reply_to_user_id && $reply_to_id != $status->in_reply_to_user_id)); + $html = '
  • + + + + + '.$status_id.' + '.$user->screen_name.' '.$text.' + '; + if($end && isset($status->in_reply_to_user_id)){ + $html .= ' in reply to '.$status->in_reply_to_screen_name.''; + } + $html .= 'via '.$status->source.' + '.date('Y-m-d H:i:s', $date).' + + +
  • '; + if(!$end){ + $html .= formatConversation($status->in_reply_to_status_id_str); + } + return $html; + } +?> diff --git a/ajax/update.php b/ajax/update.php index 5e4a079..e9a8308 100644 --- a/ajax/update.php +++ b/ajax/update.php @@ -1,35 +1,41 @@ -update($_POST['status'], $_POST['in_reply_to']); - if(isset($result->error)){ - if(strpos($result->error, 'duplicate') > 0){ - $tmp = $t->userTimeline(); - $result = $tmp[0]; - } - } - if(isset($result->user)){ - $user = $result->user; - $time = time()+3600*24*365; - if ($user) { - setcookie('friends_count', $user->friends_count, $time, '/'); - setcookie('statuses_count', $user->statuses_count, $time, '/'); - setcookie('followers_count', $user->followers_count, $time, '/'); - setcookie('imgurl', getAvatar($user->profile_image_url), $time, '/'); - setcookie('name', $user->name, $time, '/'); - } - echo format_timeline($result, $t->username, true); - }else{ - echo 'error'; - } - } -?> +update(stripslashes($_POST['status']), $_POST['in_reply_to']); + } else { + $result = $t->update($_POST['status'], $_POST['in_reply_to']); + } + if(isset($result->error)){ + if(strpos($result->error, 'duplicate') > 0){ + $tmp = $t->userTimeline(); + $result = $tmp[0]; + echo 'error'; + } + } + if(isset($result->user)){ + $user = $result->user; + $time = $_SERVER['REQUEST_TIME']+3600*24*365; + if ($user) { + setcookie('friends_count', $user->friends_count, $time, '/'); + setcookie('statuses_count', $user->statuses_count, $time, '/'); + setcookie('followers_count', $user->followers_count, $time, '/'); + setcookie('imgurl', getAvatar($user->profile_image_url), $time, '/'); + setcookie('name', $user->screen_name, $time, '/'); + setcookie('listed_count', $user->listed_count, $time, '/'); + } + echo format_timeline($result, $t->username, true); + }else{ + echo 'error'; + } + } +?> diff --git a/ajax/updateFollowing.php b/ajax/updateFollowing.php index 8465342..4c2eb74 100644 --- a/ajax/updateFollowing.php +++ b/ajax/updateFollowing.php @@ -1,19 +1,19 @@ -friends(false, false, $MAX_COUNT)->users; - $html = ''; - foreach($friends as $friend){ - $html .= ' - - '.$friend->name.' - - '; - } - echo $html; -?> +friends(false, false, $MAX_COUNT)->users; + $html = ''; + foreach($friends as $friend){ + $html .= ' + + '.$friend->name.' + + '; + } + echo $html; +?> diff --git a/ajax/updateList.php b/ajax/updateList.php index 63677c7..bfa7941 100644 --- a/ajax/updateList.php +++ b/ajax/updateList.php @@ -1,59 +1,59 @@ -listStatus($_GET['id'], false, $_GET['since_id']); - - $empty = count($statuses) == 0? true: false; - - if ($empty) { - echo "empty"; - } else { - $count = 0; - foreach ($statuses as $status) { - $user = $status->user; - $date = formatDate($status->created_at); - $text = formatText($status->text); - - if(strpos("@$t->username", $text) > -1) { - if (++$count == count($statuses)) - $output = "
  • "; - else - $output = "
  • "; - - } else { - $output = "
  • "; - } - $output .= " - screen_name\" target=\"_blank\">profile_image_url)."\" title=\"$user->screen_name\" /> - - - $status->id - screen_name\">$user->screen_name $text "; - if ($shorturl = unshortUrl($text)) $output .= "

    URL

    $shorturl
    "; - $output .= " - id\">回复 - id\">回推 - id\">收藏"; - if ($user->screen_name == $t->username) $output .= "id&t=s\">删除"; - $output .= ""; - if ($status->in_reply_to_status_id) $output .= " in_reply_to_status_id&uid=$user->id \">in reply to $status->in_reply_to_screen_name"; - $output .= "from $status->source - id\" target=\"_blank\">$date - -
    -
  • "; - $html .= '
    '; - echo $output; - } - } - - } else { - echo 'error'; - } - -?> +listStatus($_GET['id'], false, $_GET['since_id']); + + $empty = count($statuses) == 0? true: false; + + if ($empty) { + echo "empty"; + } else { + $count = 0; + foreach ($statuses as $status) { + + $user = $status->user; + $date = $status->created_at; + $text = formatEntities($status->entities,$status->text); + + if(strpos("@$t->username", $text) > -1) { + if (++$count == count($statuses)) + $output = "
  • "; + else + $output = "
  • "; + } else { + $output = "
  • "; + } + $output .= " + screen_name\" target=\"_blank\">profile_image_url)."\" title=\"$user->screen_name\" /> + + + $status->id_str + screen_name\">$user->screen_name $text + + id_str\">Reply + id_str\">RT + id_str\">Favor"; + if ($user->screen_name == $t->username) $output .= "id_str&t=s\">删除"; + $output .= ""; + if ($status->in_reply_to_status_id_str) $output .= " in_reply_to_status_id_str&uid=$user->id \">in reply to $status->in_reply_to_screen_name"; + $output .= "via $status->source + id_str\" target=\"_blank\">$date + + +
  • "; + $html .= '
    '; + echo $output; + */ + } + } + + } else { + echo 'error'; + } + +?> diff --git a/ajax/updateMessage.php b/ajax/updateMessage.php index c3b4f0e..632720d 100644 --- a/ajax/updateMessage.php +++ b/ajax/updateMessage.php @@ -1,44 +1,27 @@ -directMessages(false, $_GET['since_id']); - - $empty = count($messages) == 0? true: false; - - if ($empty) { - echo "empty"; - } else { - foreach ($messages as $message) { - $name = $message->sender_screen_name; - $imgurl = getAvatar($message->sender->profile_image_url); - $date = formatDate($message->created_at); - $text = formatText($message->text); - $output = "
  • "; - $output .= "".initShortcutMenu($message->sender)." - - - - $message->id - $name $text "; - if ($shorturl = unshortUrl($text)) $output .= "

    URL

    $shorturl
    "; - $output .= "Replyid&t=m\">Delete - - $date - -
    -
  • "; - } - $output .= "
    "; - echo $output; - } - } else { - echo 'error'; - } - -?> +directMessages(false, $_GET['since_id']); + $count = count($messages); + if ($count == 0) { + echo "empty"; + } else { + $output = ''; + foreach ($messages as $message) { + $output .= format_message($message); + } + $tweetCounter = "$count unread message(s)"; + $output .= '
    '.$tweetCounter.'
    '; + echo $output; + } + } else { + echo 'error'; + } + +?> diff --git a/ajax/updateProfile.php b/ajax/updateProfile.php new file mode 100644 index 0000000..5138dc1 --- /dev/null +++ b/ajax/updateProfile.php @@ -0,0 +1,29 @@ +updateProfile($_POST); + } else { + $user = $t->veverify(); + } + if ($t->http_code == 200) { + $time = $_SERVER['REQUEST_TIME']+3600*24*365; + setcookie('friends_count', $user->friends_count, $time, '/'); + setcookie('statuses_count', $user->statuses_count, $time, '/'); + setcookie('followers_count', $user->followers_count, $time, '/'); + setcookie('imgurl', getAvatar($user->profile_image_url), $time, '/'); + setcookie('name', $user->screen_name, $time, '/'); + setcookie('listed_count', $user->listed_count, $time, '/'); + if($_GET['extra'] == 'bg') { + setcookie('Bgcolor', '#'.$user->profile_background_color,$time,'/'); + setcookie('Bgimage', $user->profile_background_image_url,$time,'/'); + setcookie('Bgrepeat',$user->profile_background_tile ? "repeat" : "no-repeat",$time,'/'); + } + echo '{"result": "success"}'; + } else { + echo '{"result": "error"}'; + } +?> \ No newline at end of file diff --git a/ajax/updateReplies.php b/ajax/updateReplies.php index 034d054..9083748 100644 --- a/ajax/updateReplies.php +++ b/ajax/updateReplies.php @@ -1,29 +1,28 @@ -replies(false, $_GET['since_id']); - - $empty = count($statuses) == 0? true: false; - - if ($empty) { - echo "empty"; - } else { - $output = ""; - foreach($statuses as $status) { - $output .= format_timeline($status, $t->username); - } - $output .= '
    '; - echo $output; - } - - } else { - echo 'error'; - } - -?> +replies(false, $_GET['since_id']); + $count = count($statuses); + if ($count == 0) { + echo "empty"; + } else { + $output = ""; + foreach($statuses as $status) { + $output .= format_timeline($status, $t->username); + } + $tweetCounter = "$count unread mention(s)"; + $output .= '
    '.$tweetCounter.'
    '; + echo $output; + } + + } else { + echo 'error'; + } + +?> diff --git a/ajax/updateTimeline.php b/ajax/updateTimeline.php index 94a81ab..397a200 100644 --- a/ajax/updateTimeline.php +++ b/ajax/updateTimeline.php @@ -1,64 +1,49 @@ -friendsTimeline(false, $_GET['since_id']); - $retweetes = $t->retweeted_to_me(false, false, $_GET['since_id']); - if(count($retweetes) > 0){ - $statuses = sort_timeline($statuses, $retweetes); - } - - $count = count($statuses); - $html = ""; - if ($count <= 0) { - echo "empty"; - }else{ - foreach ($statuses as $status) { - if($status->id < $_GET['since_id']){ - break; - } - if(($status->user->screen_name == $t->username || $t->username == $status->retweeted_status->user->screen_name) && (strpos($status->source, "api") !== false || strpos($status->source, "rabr") !== false)){ - $count -= 1; - continue; - } - if(isset($status->retweeted_status)){ - $html .= format_retweet($status); - }else{ - $html .= format_timeline($status, $t->username); - } - } - if($count == 1){ - $tweetCounter = "$count unread tweet"; - }else{ - $tweetCounter = "$count unread tweets"; - } - $html .= '
    '.$tweetCounter.'
    '; - echo $html; - } - } else { - echo 'error'; - } - } - - // force exit timeout script - //$deadline = time() + MAX_EXECUTION_TIME; - /* - function checkTimeout(){ - if(time() < $GLOBALS['timeline']){ - return; - } - echo "error"; - exit; - } - register_tick_function("checkTimeout"); - declare(ticks = 1){ - */ - getTimeline(); - //} -?> +homeTimeline(false, $_GET['since_id']); + $count = count($statuses); + $html = ""; + if ($count <= 0) { + echo "empty"; + } + else + { + foreach ($statuses as $status) + { + if($status->id_str < $_GET['since_id']) + { + break; + } + + if(($status->user->screen_name == $t->username ) && (strpos($status->source, "api") !== false || strpos($status->source, "embr") !== false)){ + $count -= 1; + continue; + } + elseif ( isset($status->retweeted_status) ) + { + if ( ($t->username == $status->retweeted_status->user->screen_name) && (strpos($status->source, "api") != false || strpos($status->source, "embr") !== false) ) + { + $count -= 1; + continue; + } + } + if(isset($status->retweeted_status)){ + $html .= format_retweet($status); + }else{ + $html .= format_timeline($status, $t->username); + } + } + $tweetCounter = "$count unread tweet(s)"; + $html .= '
    '.$tweetCounter.'
    '; + echo $html; + } + } else { + echo 'error'; + } +?> diff --git a/ajax/updateTrends.php b/ajax/updateTrends.php index 083133d..f3d991c 100644 --- a/ajax/updateTrends.php +++ b/ajax/updateTrends.php @@ -1,23 +1,35 @@ -trends(); - - if (count($trends) == 0) { - echo "empty"; - }else{ - $html = ''; - foreach ($trends->trends as $trend) { - $li = ' -
  • - '.$trend->name.' -
  • - '; - $html .= $li; - } - echo $html; - } -?> +trends_closest($_GET['lat'], $_GET['long']); + if (isset($tr->woeid)) { + $woeid = $tr[0]->woeid; + } else { + $woeid = 1; + } + setEncryptCookie('woeid', $woeid, $_SERVER['REQUEST_TIME'] + 3600*24); + } + $tr = $t->trends_place($woeid); + $trends = $tr[0]->trends; + + if (count($trends) == 0) { + echo "empty"; + }else{ + $html = ''; + foreach ($trends as $trend) { + $li = ' +
  • + '.$trend->name.' +
  • + '; + $html .= $li; + } + echo $html; + } +?> diff --git a/ajax/uploadImage.php b/ajax/uploadImage.php new file mode 100644 index 0000000..002b4a2 --- /dev/null +++ b/ajax/uploadImage.php @@ -0,0 +1,29 @@ +url)) { + echo '{"result": "success" , "url" : "' . $result->url . '"}'; + } else { + echo '{"result": "error"}'; + } + break; + case 'profile': + $t = getTwitter(); + $skip_status = $_POST['skip_status']; + $result = $t->updateProfileImage($image,$skip_status); + if ($t->http_code == 200) { + echo '{"result": "success"}'; + } else { + echo '{"result": "error"}'; + } + break; + } + } +?> diff --git a/all.php b/all.php index 4119075..ce21752 100644 --- a/all.php +++ b/all.php @@ -1,212 +1,33 @@ - - - -
    - -

    What's happening?

    - 140 - -
    - Upload Image -

    Powered by Img.ly

    - - - -
    - -
    -Filter Timeline -

    Seperate keywords with comma. [eg: twitter,hello] Also usernames without @

    - - - - - -
    - -
    -
    - -
    - -
    - -
    -Translation Settings -

    Translate tweets into - -

    -

    Translate my tweets into - -

    - -
    - -
    - Restore - - - -
    - - Shorten URL - - Shorten Tweet - - Translate - -Image'; - } -?> - Filter - - Sogou - - Symbols - - Restore - - Pause - - Sweep - - Refresh -
    - -veverify(); - if ($current_user === false) { - header('location: error.php'); - } - $empty = count($current_user) == 0? true: false; - if ($empty) { - echo "
    - Latest: - - - What's shaking? - What's shaking? - - - - -
    "; - } else { - $status = $current_user->status; - refreshProfile($t, $current_user); - $date = formatDate($status->created_at); - $text = formatText($status->text); - $output = " -
    - Latest: - - - " . $text . " - " . $text . " - id\" target=\"_blank\">" . $date . " - id\" target=\"_blank\">" . $date . " - - -
    - "; - echo $output; - } + -
    - Tweet -
    - -
    - Updates - Replies - Messages + + + - - - - -
    friendsTimeline(); - $retweetes = $t->retweeted_to_me(); + $statuses = $t->homeTimeline(); if ($statuses === false) { - header('location: error.php'); + header('location: error.php');exit(); } $empty = count($statuses) == 0? true: false; if ($empty) { echo "
    No tweet to display
    "; } else { $output = '
      '; - if(count($retweetes) > 0){ - $statuses = sort_timeline($statuses, $retweetes); - } - $MAX_STATUSES = 20; - $status_count = 0; foreach ($statuses as $status) { - if($count++ >= $MAX_STATUSES){ - break; - } - if($status->retweeted_status){ + if(isset($status->retweeted_status)){ $output .= format_retweet($status); }else{ $output .= format_timeline($status, $t->username); @@ -220,7 +41,7 @@ $statuses = $t->replies(); if ($statuses === false) { - header('location: error.php'); + header('location: error.php');exit(); } $empty = count($statuses) == 0? true: false; if ($empty) { @@ -240,34 +61,16 @@ $messages = $t->directMessages(); if ($messages === false) { - header('location: error.php'); + header('location: error.php');exit(); } $empty = count($messages) == 0? true: false; if ($empty) { - echo ""; + echo "
      No tweet to display
      "; } else { $output = '
        '; foreach ($messages as $message) { - $name = $message->sender_screen_name; - $imgurl = getAvatar($message->sender->profile_image_url); - $date = formatDate($message->created_at); - $text = formatText($message->text); - - $output .= "
      1. - ".initShortcutMenu($message->sender)." - - - - $message->id - $name $text "; - if ($shorturl = unshortUrl($text)) $output .= "

        URL

        $shorturl
        "; - $output .= "Replyid&t=m\">Delete - - $date - -
        -
      2. "; + $output .= format_message($message); } $output .= "
      "; @@ -278,8 +81,5 @@ - - diff --git a/authorize.php b/authorize.php new file mode 100644 index 0000000..65dbcdf --- /dev/null +++ b/authorize.php @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/basic_auth.php b/basic_auth.php new file mode 100644 index 0000000..822bfd9 --- /dev/null +++ b/basic_auth.php @@ -0,0 +1,43 @@ +1, 'nc'=>1, 'cnonce'=>1, 'qop'=>1, 'username'=>1, 'uri'=>1, 'response'=>1); + $data = array(); + preg_match_all('@(\w+)=(?:(?:")([^"]+)"|([^\s,$]+))@', $digest, $matches, PREG_SET_ORDER); + foreach ($matches as $m) { + $data[$m[1]] = $m[2] ? $m[2] : $m[3]; + unset($needed_parts[$m[1]]); + } + return $needed_parts ? false : $data; +} +?> \ No newline at end of file diff --git a/browse.php b/browse.php index 51e2b41..d91bbbf 100644 --- a/browse.php +++ b/browse.php @@ -1,77 +1,58 @@ - - - - -
      - -

      See what people are saying about…

      -
      - - browse($p); - if ($statuses === false) { - header('location: error.php'); - } - $empty = count($statuses) == 0? true: false; - if ($empty) { - echo "
      No tweet to display.
      "; - } else { - $output = '
        '; - - foreach ($statuses as $status) { - $date = formatDate($status->created_at); - $text = formatText($status->text); - - $output .= " -
      1. - - screen_name\" target=\"_blank\">profile_img_url\" title=\"$status->screen_name\" /> - - - $status->id - screen_name\">$status->screen_name $text - - id\">Replyid\">Retweetid\">Favorite - - from $status->source - id\" target=\"_blank\">$date - - -
      2. - "; - } - - $output .= "
      "; - - if ($p >1) $output .= "Back"; - if (!$empty) $output .= "Next"; - - $output .= "
      "; - - echo $output; - } - - - - ?> -
      - - - - + + + + +
      +

      See what people are saying about…

      +
      + + search($browse_seed, $p, 50); + $resultCount = count($statuses->results); + if ($resultCount <= 0) { + echo "
      No tweet to display.
      "; + } else { + include_once('lib/timeline_format.php'); + $output = '
        '; + foreach ($statuses->results as $status) { + if(!preg_match('/[\p{Hiragana}\p{Katakana}\p{Hangul}]+/u', $status->text) ) { // filter the Japanese and Korean tweets since some of Han Character included. + $output .= format_search($status); + } + } + $output .= "
      "; + + if ($p >1) $output .= "Back"; + if (!$empty) $output .= "Next"; + + $output .= "
      "; + echo $output; + } + ?> +
      + + diff --git a/css/main.css b/css/main.css index 8e14b9b..5d2d3c8 100644 --- a/css/main.css +++ b/css/main.css @@ -1,1120 +1,466 @@ -/*---------------------------------------- -Rabr main.css -Author: disinfeqt -Platform: open source -Version: 0082 -Date: 2010-04-18 -Synced: yes -----------------------------------------*/ - -/* =elements -----------------------------------------*/ -body{background:#C0DEED url(../img/bg-clouds.png) repeat-x scroll 0 0;font-family:"Lucida Grande",Tahoma,Arial,sans-serif;font-size:13px;margin:0} -*{margin:0;padding:0} -a{color:#2276BB;text-decoration:none} -li{list-style-image:none;list-style-position:outside;list-style-type:none} -img{border:medium none} -h2 { -clear:both; -display:block; -float:left; -font-family:'Helvetica Neue','Helvetica','Arial',sans-serif; -font-size:20px; -font-weight:normal; -line-height:1.1; -margin:8px 0 0 10px; -cursor:default; -} -.wrapper{margin:1em auto;position:relative;width:763px} -.warpper{margin:1em auto;position:relative;width:763px} -.content-bubble-arrow{background-image:url(../img/arr2.gif);background-position:25px 0;background-repeat:no-repeat;margin-top:1em;padding-top:11px} -.columns{margin-bottom:15px;width:100%} -.round{-moz-border-radius:5px;-webkit-border-radius:5px} -.round-top-right{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px} -.round-right{-moz-border-radius-bottomright:5px;-moz-border-radius-topright:5px;-webkit-border-bottom-right-radius:5px;-webkit-border-top-right-radius:5px} -.round-bottom-right{-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px} -.round-bottom{-moz-border-radius-bottomleft:5px;-moz-border-radius-bottomright:5px;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-webkit-border-bottom-left-radius:5px;-webkit-border-bottom-right-radius:5px;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0} -.round-bottom-left{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px} -.round-left{-moz-border-radius-bottomleft:5px;-moz-border-radius-topleft:5px;-webkit-border-bottom-left-radius:5px;-webkit-border-top-left-radius:5px} -.round-top-left{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px} -.round-top{-moz-border-radius-bottomleft:0;-moz-border-radius-bottomright:0;-moz-border-radius-topleft:5px;-moz-border-radius-topright:5px;-webkit-border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-top-left-radius:5px;-webkit-border-top-right-radius:5px} -.clear{clear:both} -#error{padding:40px;text-align:center} -#sidename,ul.sidebar-menu li a span.stat_count,#side #local_trend_locations li,#home #rssfeed,#search #rssfeed,#profile #rssfeed,#profile_favorites #rssfeed,#favorites #rssfeed,#home #rssfeed .timeline-rss,#search #rssfeed .search-rss,#profile #rssfeed .profile-rss,#favorites #rssfeed .favorites-rss,#profile_favorites #rssfeed .favorites-rss,#side .stats .stats_count,fieldset.vertical-form label,fieldset.vertical-form input{display:block} -.timeline li:hover a,.rank_list li:hover a,#user_stats a:hover,#info_block_btn:hover,#side .promotion a:hover,#side .stats a:hover{text-decoration:none} -a:hover,.timeline li:hover a:hover,.rank_list li:hover a:hover,#side .user_icon a:hover #me_tweets,#side .stats a:hover .label{text-decoration:underline} -#left,#sidenav a:hover,.allHighLight{background-color:#FFF} -#user_info li span,#user_info_profile li span,#side .about .label{font-weight:700} - -/* =login -----------------------------------------*/ -#login_left{background:#FFF url(../img/press-bird.gif) no-repeat scroll 100% 60%} -#login{display:block;margin:0 auto;width:240px} -#username,#password{border:1px solid #C7C5B8;display:inline;padding:4px;width:150px} -#login div{display:block;margin:10px} -#login_btn{margin-right:50px} -#login_area{background-color:#FFF;float:left;padding:10px 0;width:766px} -#remember{font-size:12px;margin-left:20px;padding:5px 0 0 50px} -#remember_input{margin:0 5px} - -/* header -----------------------------------------*/ -#header {margin:1em auto;text-align:right;width:766px} -#content {margin:1em auto;width:766px} -#logo img{left:0;margin-top:-2px;position:absolute} -#nav{background-color:#FFF;display:inline-block;padding:0 .7em;white-space:nowrap} -#nav li{float:left;padding:6px 8px} - -/* =status form -----------------------------------------*/ -#tweeting_controls { -float:right; -padding:5px 12px 0 5px; -} -#tweeting_controls a { -line-height:13px; -} -a.a-btn, a.a-btn:visited { -color:#333333 !important; -} -a.a-btn { --moz-border-radius:4px; --webkit-border-radius:4px; -border-radius:4px; -background:url("../img/bg-btn.gif") repeat-x scroll 0 0 #DDDDDD; -border-color:#DDDDDD #DDDDDD #CCCCCC !important; -border-style:solid; -border-width:1px !important; -cursor:pointer; -display:inline-block; -font-family:"lucida grande",helvetica,tahoma,arial; -font-size:11px; -line-height:14px; -padding:4px 8px 5px; -text-decoration:none; -text-shadow:1px 1px 0 #FFFFFF !important; -} -a.btn-disabled { -background-image:none; -opacity:0.6; -} -a.a-btn-m { --moz-border-radius:5px; --webkit-border-radius:5px; -border-radius:5px; -background-position:0 -200px; -font-family:"helvetica neue",arial,sans-serif; -font-size:15px; -line-height:20px; -padding:5px 15px 6px; -} -a.a-btn:hover, a.a-btn:focus { -border-color:#999999 #999999 #888888 !important; -color:#000000; -outline:medium none; -text-decoration:none; -} -a.a-btn:active { -background-image:none; -outline:medium none; -} -/*legacy below*/ -#statuses,#ajax_statuses{background-color:#FFF;float:left;padding:10px;width:544px} -#statuses form{margin-bottom:10px} -#update_form{margin-bottom:10px} -#tip{color:#CCC;float:right;font-size:24px;margin:5px 10px 0 0;font-family:'Helvetica Neue','Helvetica','Arial',sans-serif;} -#tip.loading { -background:url("../img/spinner.gif") no-repeat scroll center center transparent !important; -color:transparent !important; -} -#textbox{-moz-border-radius:3px 3px 3px 3px;-webkit-border-radius:3px;border:1px solid #A7A6AA;font-size:14px;height:80px;margin:2px 0 5px 10px;overflow-x:hidden;overflow-y:auto;padding:5px;width:510px} -textarea#textbox:focus{outline:none;border:1px solid rgba(82,168,236,.75)!important;-moz-box-shadow:0 0 5px rgba(82,168,236,.5);-webkit-box-shadow:0 0 5px rgba(82,168,236,.5);} -#submit_btn,#login_btn,#rank_addtag_btn,.submit_btn{background:transparent url(../img/round-btn.gif) repeat scroll 0 0;border:medium none;color:#666;float:right;font-size:14px;height:32px;margin:5px 13px 0 0;width:115px} -#submit_btn:hover,#login_btn:hover,#rank_addtag_btn:hover,.submit_btn:hover{background:transparent url(../img/round-btn.gif) repeat scroll 0 32px;color:#444;cursor:pointer} -#submit_btn:active{color:#000;cursor:pointer} -#func_set { -clear:left; -display:block; -float:left; -left:190px; -position:absolute; -top:33px; -} -.func_btn { -background-image:url("../img/ui_icons.png"); -background-color:#ffffff; --moz-border-radius:3px; --webkit-border-radius:3px; -border:1px solid #ADADAD; -color:#75715E; -display:block; -float:left; -font-size:11px; -margin:0 -5px 0 10px; -text-align:center; -text-decoration:none; -text-indent:-9999em; -height: 16px; -width: 20px; -cursor:pointer; -} -.func_btn:hover{background-color:#F2F2F2;text-decoration:none} -#transRecover { --moz-border-radius-bottomleft:3px; --webkit-border-bottom-left-radius:3px; -display:none; -background-color:#FFFFFF; -background-image:url("../img/ui_icons.png"); -border:1px solid #ADADAD; -color:#75715E; -cursor:pointer; -float:left; -font-size:11px; -height:16px; -margin:0 -5px 0 10px; -text-align:center; -text-decoration:none; -text-indent:-9999em; -background-position:-32px -64px; -bottom:58px; -left:515px; -position:absolute; -top:58px; -width:15px; -} -#transRecover:hover { -background-color:#F2F2F2; -text-decoration:none; -} -#photoArea { --moz-border-radius:3px;-webkit-border-radius:3px; -background:#F5F5F5 none repeat scroll 0 0; -border:1px solid #A7A6AA; -clear:both; -display:none; -height:20px; -left:20px; -padding:10px 10px 60px; -position:absolute; -top:58px; -width:500px; -} -#transArea { --moz-border-radius:3px;-webkit-border-radius:3px; -background:#F5F5F5 none repeat scroll 0 0; -border:1px solid #A7A6AA; -clear:both; -display:none; -height:20px; -left:20px; -padding:10px 10px 60px; -position:absolute; -top:58px; -width:500px; -} -#filterArea { --moz-border-radius:3px;-webkit-border-radius:3px; -background:#F5F5F5 none repeat scroll 0 0; -border:1px solid #A7A6AA; -clear:both; -display:none; -height:20px; -left:20px; -padding:10px 10px 60px; -position:absolute; -top:58px; -width:500px; -} -#symArea { --moz-border-radius:3px;-webkit-border-radius:3px; -background:#F5F5F5 none repeat scroll 0 0; -border:1px solid #A7A6AA; -clear:both; -display:none; -height:20px; -left:20px; -padding:10px 10px 60px; -position:absolute; -top:58px; -width:500px; -overflow-x:hidden; -overflow-y:auto; -} -#symArea span { --moz-border-radius:3px; --webkit-border-radius:3px; -background-color:#EEEEEE; -border:1px solid transparent; -color:#000000; -display:block; -float:left; -font-size:12px; -line-height:18px; -margin:0 10px 5px 0; -min-width:60px; -padding:1px 2px; -text-align:center; -white-space:nowrap; -} -#symArea span:hover { -border:1px solid #666; -cursor:pointer; -} -#filterArea .filter_input { -border:1px solid #A7A6AA; -font-size:13px; -height:17px; -margin:10px 0 5px; -padding:3px 2px; -width:300px; -} -.close{background: transparent url(../img/sprite-icons.png) no-repeat scroll -272px -16px;text-decoration: none; position: absolute; top: 10px; right: 10px; height: 10px; width: 9px;} -#sent_function{float:left;margin:4px 0 0 10px;} -#imageFile { -margin:10px 0; -padding:2px; -} -#autoBtn.pause {background-position:-15px -160px;} -#autoBtn.start {background-position: 1px -160px;} -#currently { -color:#666666; -float:left; -font-size:11px !important; -margin:3px 8px 0 10px; -overflow:hidden; -padding:2px 4px 2px 0; -text-align:left; -width:385px; -word-wrap:break-word; -cursor:pointer; -} -.status-text a{color:#666666} -#latest_meta a{color:#999999;} - -/* =tips -----------------------------------------*/ -#shortcutTip { -border-radius:5px; --moz-border-radius:5px; --webkit-border-radius:5px; -border:2px solid; -color:#FFFFFF; -cursor:default; -display:block; -font-size:20px; -font-weight:bold; -left:20px; -opacity:0.8; -padding:8px 16px; -position:fixed; -top:20px; -} -#sentTip{background:#FFFFFF;-moz-border-radius-bottomleft:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-left-radius:10px;-webkit-border-bottom-right-radius:10px;font-size:11px !important;font-weight:700;left:auto;right:auto;padding:4px 0 6px;margin:-1px 0 0 233px;position:fixed;text-align:center;top:0;width:300px;min-height:13px;z-index:1000;opacity:0.8;filter:alpha(opacity=80);} -.ing{color:#2276BB} -.success{color:green} -.failure{color:red} -#otherTip{-moz-border-radius:5px;-webkit-border-radius:5px;background:#F5F5F5 none repeat scroll 0 0;border:1px solid #EEE;clear:both;color:red;font-size:12px;margin:10px 20px;padding:5px 10px;text-align:center;width:483px} - -/* =timeline -----------------------------------------*/ -#allTimeline,#allReplies,#allMessage {margin:10px;padding:0;clear:both;} -.timeline embed{margin: 10px 0px 0px 10px} -.new { -background-color:#E3F1FA; -color:#858585; -display:block; -float:left; -font-size:11px; -text-align:center; -width:522px; -} -.mine{display:none;background-color:#E8FFED} -.reply{background-color:#E8FECD} -.filter{background-color:#FFFFCC} -.retweet{background-color:#FFFFE5} -.faved{background:transparent url(../img/faved.png) no-repeat scroll 500px 10px} -.user_name{font-weight:bold} -.timeline{margin:0 10px} -.timeline li { -border-top:1px solid #EFEFEF; -cursor:default; -display:block; -float:left; -margin:0; -overflow:visible; -padding:10px 25px 5px 2px; -position:relative; -width:497px; -} -.timeline li:hover .actions {visibility:visible} -.ajax_timeline li { -cursor:default; -display:block; -float:left; -margin:0; -overflow:visible; -padding:5px 0; -width:520px; -position:relative; -} -.ajax_timeline li .status_body { -margin-left:50px !important; -margin-right:5px !important; -} -.xmas_tweet{background:transparent url(../img/jingle_bell.png) no-repeat scroll 510px 5px;} -.status_body { -display:block; -line-height:22px; -margin-left:60px; -overflow:hidden; -position:relative; -} -.status_info{color:#999;display:block;font-size:11px;height:22px;margin:5px 0;overflow:hidden;text-align:left;width:100%} -.status_info a{color:#999;font-size:11px;text-decoration:none} -.status_info span{display:inline-block;margin:0 0 3px;padding:0 1px} -.timeline li:hover,.rank_list li:hover{background-color:#F7F7F7} -.status_author { -height:48px; -left:5px; -padding:1px; -position:absolute; -width:48px; -} -.timeline li.loading .status_author { -background:url("../img/spinner.gif") no-repeat scroll center center transparent !important; -outline:4px solid #BBBBBB; -} -.timeline li.loading .status_author a { -opacity:0.2; -} -.rank_img{top:15px;left:10px;position:absolute;width:48px;height:48px} -.status_author img,.rank_img img{height:48px;width:48px} -.unshorturl { -border-radius:5px; --moz-border-radius:5px; --webkit-border-radius:5px; -border:1px solid #DDDDDD; -display:block; -font-family:tahoma; -font-size:11px; -margin:5px 5px 5px 0; -overflow:hidden; -padding:0 10px; -white-space:nowrap; -word-wrap:break-word; -} -.unshorturl:hover{border:1px solid #999999} -.unshorturl p{float:left;color:#DDD;font-weight:700;margin:0 10px 0 0} -.unshorturl:hover p{color:#999} -.unshorturl a {color:#999;word-wrap:break-word;word-break:break-all;white-space:nowrap;display:block;} -.unshorturl:hover a{text-decoration:none !important} -#empty{font-size:16px;font-weight:700;margin:50px;text-align:center} -#description{font-size:14px;padding:10px} -#description p{line-height:22px;margin:15px} -.big-retweet-icon {background-image:url(../img/sprite-icons.png);background-position:-128px -64px;background-repeat:no-repeat;display:inline-block;height:14px;position:relative;top:2px;width:18px;} -/*new below*/ -.ajax_form { -background-color:#FFFFFF; -border:1px solid #A7A6AA; -float:left; -margin:5px 0 5px -1px; -padding:0; -width:520px; -} -.ajax_form li { -border-top:1px solid #EFEFEF; -cursor:default; -display:block; -float:left; -margin:0; -overflow:visible; -padding:5px 25px 5px 0; -position:relative; -width:495px; -} -.ajax_form li .status_author { -height:30px; -left:5px; -margin-left:5px; -margin-top:6px; -padding:1px; -position:absolute; -width:30px; -} -.ajax_form li .status_body { -display:block; -line-height:22px; -margin-left:50px; -margin-right:5px; -overflow:hidden; -position:relative; -} -/* =pagination -----------------------------------------*/ -#pagination{margin:5px} -#pagination p.no-more-tweets{font-size:1.1em;text-align:center} -.more{background-color:#FFF;background-image:url(../img/more.gif);background-position:left top;background-repeat:repeat-x;border-color:#DDD #AAA #AAA #DDD;border-style:solid;border-width:1px;display:block;font-size:14px;font-weight:700;height:22px;line-height:1.5em;margin-bottom:6px;outline-color:0;outline-style:none;outline-width:medium;padding:6px 0;text-align:center;text-shadow:1px 1px 1px #FFF;width:45%} -.more:hover{background-position:left -78px;border:1px solid #bbb;text-decoration:none} -.more:active{background-position:left -38px;color:#666} -.more.loading{background-color:#fff;background-image:url(../img/ajax.gif);background-position:50% 50%;background-repeat:no-repeat;border:1px solid #eee;cursor:default!important} -.more::-moz-focus-inner{border:0} -#pagination.pagination{height:1.5em} -#pagination.pagination a,#pagination.pagination .link-like{border:1px solid #cecece;float:right;margin:0 0 0 10px;padding:.25em 1em} - -/* =sidebar -----------------------------------------*/ -#side_base{-moz-border-radius-bottomright:5px;-moz-border-radius-topright:5px;-webkit-border-bottom-right-radius:5px;-webkit-border-top-right-radius:5px;background-color:#DDEEF6;border-left:1px solid #C0DEED;line-height:1.2;vertical-align:top;width:198px} -#side{-moz-border-radius-bottomright:5px;-moz-border-radius-topright:5px;float:left;font-size:12px;margin:0 -2px;overflow:hidden;padding-top:.5em;width:198px} -#sideimg{float:left;height:31px;margin:10px 10px 10px 15px;width:31px} -#sideid{display:block;font:bold 1.2em/1.2em Helvetica Neue,Helvetica,sans-serif;padding:10px 0 0 18px} -#me_tweets {font-family:Helvetica,Arial,sans-serif;font-size:11px;margin-top:17px;} -#user_stats{clear:both;padding:0 0 0 10px} -#user_stats li{display:inline-block;float:left;overflow:hidden;padding:0 5px;width:48px} -.count{display:block;font:bold 13px Helvetica Neue,Helvetica,Arial,sans-serif;} -.label{display:block;font-size:11px} -#sidenav{border-top:1px solid #CCC;margin:0} -#sidenav a{background-color:#F4F4F4;border-bottom:1px solid #CCC;color:#000;display:block;font-size:13px;font-weight:700;padding:10px;text-decoration:none} -h3{font-size:14px;margin:14px 0 0 14px} -#sidepost{margin:0;padding-bottom:0} -#sidepost li{font-size:12px;line-height:18px;margin:12px 10px} -#side .promotion{background-color:#EDFEFF;font-size:12px;margin:.5em auto;padding:6px 10px;text-align:left;width:152px} -#side .promotion a{color:#333;font-size:11px;outline-style:none;outline-width:medium} -#side .promotion a.definition:hover strong{font-size:11px;outline-style:none;outline-width:medium;text-decoration:underline} -#side .promotion .definition strong{color:#2276BB;display:block;font-size:11px} -#side span.sponsored{color:#777;display:block;font-size:.9em;padding-bottom:.2em;padding-top:.2em} -#side .notice{background-color:#FFF;margin:.5em auto 1em;padding:10px;text-align:center} -#side div.section{padding:13px} -#side div#profile.section{margin-bottom:0;padding:.2em} -#side div.last{border-top:1px solid #C0DEED} -#side h1{color:#333;font-size:1.1em;margin-bottom:.5em;padding:0 0 2px} -#side div.section-header h3{border-bottom:1px solid #C0DEED;color:#333;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px;font-size-adjust:none;font-stretch:normal;font-style:normal;font-variant:normal;font-weight:400;line-height:18px} -#side .section-links{float:right;font-size:.9em;text-align:right} -#side div.msg strong{display:block;font-size:1.4em} -#side div.msg h3{font-size:1.25em} -#side ul{margin:0px} -#side .faq-index ul{list-style-type:square;margin-left:15px} -#side .faq-index li{margin:10px 0} -#side p{padding:.5em 10px} -#side div#profile.profile-side{margin-bottom:1em!important} -#side .profile-side .about{margin-bottom:.6em} -#side div.user_icon a,#side div.user_icon a:hover{color:#333;text-decoration:none} -#side div.user_icon a:hover{color:#0084B5} -#side .user_icon{clear:both;display:block;height:31px;padding:0 0 .8em} -#side .user_icon img{padding-right:.8em;vertical-align:middle} -#me_name{font-size:1.35em;vertical-align:middle} -#side p.promotion{cursor:default;margin-bottom:.5em} -.in-page-link{outline-style:none;outline-width:medium} -#side #gadgets,#side #saved_searches{overflow:hidden;width:198px} -ul.sidebar-menu li .side-tab-ajax{display:none;float:right;margin-right:1em;vertical-align:top} -ul.sidebar-menu span.stat_count{-moz-border-radius-bottomleft:3px;-moz-border-radius-bottomright:3px;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;background-color:transparent;float:right;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;font-size-adjust:none;font-stretch:normal;font-style:normal;font-variant:normal;font-weight:700;line-height:normal;margin-right:14px;margin-top:0;padding:0 .1em} -span.link-title{float:left} -.ie6 ul.sidebar-menu li a{margin-top:-2px} -ul.sidebar-menu li{padding-top:1px} -ul.sidebar-menu li a{background-image:none;clear:both;cursor:pointer!important;display:block;margin-right:-1px;outline-style:none;outline-width:medium;padding:8px 0 8px 14px} -.safari ul.sidebar-menu li a{padding:6px 0 6px 14px} -.ie8 ul.sidebar-menu li a{margin-right:0} -ul.sidebar-menu li a span{display:inline-block;width:150px} -ul#primary_nav.sidebar-menu li a span{display:inline-block;width:auto} -ul.sidebar-menu li.loading a{background:#EDFEFF url(https://s3.amazonaws.com/twitter_production/a/1256928834/images/spinner.gif) no-repeat scroll 171px .5em} -ul.sidebar-menu li.loading a span.stat_count{display:none!important} -ul.sidebar-menu li a:hover{background-color:#EDFEFF;text-decoration:none} -ul.sidebar-menu li.active a,a.active{background-color:#EDFEFF;color:#333;font-weight:700} -#side ul.sidebar-actions{margin:.2em 14px 1em} -#side p.no-lists{padding:.5em 14px} -#side span.xref{display:block;padding:4px 14px} -#side p.sidebar-menu-actions{clear:both;display:block;padding:.5em 14px} -#side span.new-list,#side span.view-all{font-size:11px;line-height:11px;margin:0 3px 0 0;padding:0} -#side span.view-all{display:inline;margin:0} -#side span.pipe{border-left:1px solid #C0DEED;padding-left:4px;padding-right:4px} -#side #following span.xref{display:block;margin-top:-5px;padding:0 14px 5px} -h2.sidebar-title{font-size:1.05em;font-weight:400;padding:.2em 14px} -h2.sidebar-subtitle{font-size:1.3em;font-weight:400;padding:.2em 14px} -#side .collapsible h2.sidebar-title{background:transparent url(../img/toggle_up_dark.png) no-repeat scroll right center;width:157px} -#side .collapsible.collapsed h2.sidebar-title{background:transparent url(../img/toggle_down_dark.png) no-repeat scroll right center} -#side div.collapsible.loading h2.sidebar-title{-moz-background-clip:border!important;-moz-background-inline-policy:continuous!important;-moz-background-origin:padding!important;background:transparent url(../img/spinner.gif) no-repeat scroll right center!important} -#side .actions{border:1px solid #87BC44;margin:10px -3px} -#side .actions small{font-size:.9em} -#side .actions a{padding-left:7px} -#side .user_icon > *{padding:0;vertical-align:middle} -#side .stats{clear:both;float:none;margin:0;padding:0;position:relative} -#side .stats td + td{padding:0 5px} -#profile #side .stats td + td{padding:0 8px} -#side .stats td + td + td{padding:0!important} -#side .stats a span.stats_count{color:#333} -#side .smaller span.stats_count{font-size:1.1em!important} -#profile #side .smaller span.stats_count{font-size:1.3em!important} -#side .stats a:hover span.stats_count{color:#2276BB} -#side .stats td .numeric{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:13px;font-size-adjust:none;font-stretch:normal;font-style:normal;font-variant:normal;font-weight:700;line-height:normal;text-decoration:none} -#side .stats td .label{font-size:.9em;text-transform:lowercase} -#side .about li{padding-bottom:3px} -#side .about li#bio{overflow:hidden;width:170px;word-wrap:break-word} -ul#tabMenu li{border-top:1px solid #BDDCAD} -ul#tabMenu a,#side .section h1{color:#4C4C4C;display:block;font-size:110%;font-weight:700;padding:13px;text-decoration:none} -#side .section h1{padding:0 0 .25em} -ul,.ie6 ul.sidebar-menu li{overflow:hidden} -td.column,#side .stats td{padding:0;vertical-align:top} -.status_id,#side #gadgets em,#side .collapsible a.fetch-contents,#side .collapsed .xref,#side .collapsed .sidebar-menu,#rssfeed,#rssfeed .timeline-rss,#rssfeed .search-rss,#rssfeed .favorites-rss,#rssfeed .profile-rss{display:none} -#side .collapsible h2.sidebar-title:hover,#side .user_icon a{cursor:pointer} -#side hr{float:left;width:177px;display:block;border:0;height:1px;margin:7px 0 6px 11px;opacity:.7;background:#C0DEED;color:#C0DEED;} -.ie7 #side hr{width:170px;margin:0 14px;} -.ie#side hr{filter:alpha(opacity=70);} -.notify{text-align:center;line-height:1;padding:5px 0;background-repeat:no-repeat;background-position:left center;margin-bottom:8px;} -.notify div{background-color:#edffe5;font-size:.9em;margin:0 12px 0 24px;padding:10px 5px;-moz-border-radius:5px;-webkit-border-radius:5px;} -#trend_entries, #tools_list{display:none;width: 198px; float: left;margin-top:5px !important;} -#trends, #following, #toolbox{margin-left: -2px;} -#trends_title, #following_title, #toolbox_title{background: transparent url(../img/toggle_down_dark.png) no-repeat scroll right center; font-weight: normal; font-size: 13px; padding-left: 3px; margin-bottom: 0px; margin-top: 0px;width: 177px;cursor:pointer} -#trends_title.loading, #following_title.loading, #toolbox_title.loading{background: transparent url(../img/spinner.gif) no-repeat scroll right center !important;} -#trends_title.open, #following_title.open, #toolbox_title.open{background: transparent url(../img/toggle_up_dark.png) no-repeat scroll right center ! important;} -#following_list {display:none;float:left;padding:10px 10px 0 10px;} -#following_list span {float:left;padding:0 3px 2px 2px;} -#following_list img {padding:0;} -#friends_view_all {font-size:0.9em;padding:0 14px;} -#plz_dont_block_us {background: transparent url(../img/dont_block_us.png) no-repeat scroll center center;display:block;float: left; margin: 10px 0 0 5px;width:180px;height:150px} -#follow_us {float: left; display: block; margin-left: -3px; line-height: 22px;} -#follow_us span { -background-color:#FFFFFF; -color:#666666; -cursor:pointer; -float:left; -font-family:georgia; -font-size:11px; -height:24px; -line-height:24px; -margin:5px; -min-width:78px; -padding:0 5px; -text-align:left; -text-transform:uppercase; -} -#follow_us span:hover {background-color:#eee !important;} - -/* =buttons -----------------------------------------*/ -.btn::-moz-focus-inner { -border:0 none; -} -.btn,input.btn[type=submit],input.btn[type=button]{-moz-border-radius:4px;-webkit-border-radius:4px;-x-system-font:none;background:#DDD url(../img/bg-btn.gif) repeat-x scroll 0 0;border-color:#DDD #DDD #CCC;border-style:solid;border-width:1px;color:#333;font-size-adjust:none;font-stretch:normal;font-style:normal;font-variant:normal;margin:0;overflow:visible;padding:4px 8px 5px;text-shadow:1px 1px 0 #FFF;width:auto;font: 400 11px/14px "tahoma";cursor:pointer;} -#btn{-moz-border-radius:4px;-webkit-border-radius:4px;-x-system-font:none;background:#DDD url(../img/bg-btn.gif) repeat-x scroll 0 0;border-color:#DDD #DDD #CCC;border-style:solid;border-width:1px;color:#333;font-size-adjust:none;font-stretch:normal;font-style:normal;font-variant:normal;margin:0;overflow:visible;padding:4px 8px 5px;text-shadow:1px 1px 0 #FFF;width:auto;font: 400 11px/14px "tahoma"} -.btn:hover,.btn:focus,input.btn[type=submit]:hover,input.btn[type=submit]:focus,input.btn[type=button]:hover,input.btn[type=button]:focus,button.btn:hover,button.btn:focus{background-position:0 -6px;border-color:#999 #999 #888;color:#000} -.btn:active,.btn:active,input.btn[type=submit]:active,input.btn[type=button]:active,button.btn:active { -background-image:none !important; -outline:medium none !important; -text-shadow:none !important; -} -#btn:hover,#btn:focus{background-position:0 -6px;border-color:#999 #999 #888;color:#000} - -/* =footer -----------------------------------------*/ -#footer ul, #footer li {overflow:visible} -#footer{background:#FFF none repeat scroll 0 0;font-size:12px;line-height:1;margin-top:.7em;padding:8px 0;text-align:center;white-space:nowrap} -#footer li{display:inline;padding:0 4px} -#footer li.first:before{content:'';padding-right:0} -#footer li .share{text-decoration:none;border: 1px dashed #DADADA; padding: 0px 3px; overflow: hidden; cursor: move;} -#footer li .share:hover{text-decoration:none;border: 1px dashed #666;} -#footer li img {border:0 none;margin:-3px;padding:0} - -/* =ranking -----------------------------------------*/ -.rank_list{font-size:12px;margin:0 5px 5px 0} -.rank_list li{border-bottom:1px solid #CCC;margin:0 10px;overflow:visible;padding:10px;position:relative} -.rank_content{display:block;line-height:20px;margin-left:63px;min-height:50px;overflow:hidden;position:relative} -.rank_content span{margin:0;color:#666666;} -.rank_count { -color:#333333 !important; -display:block; -font-size:12px; -font-weight:bold; -margin:4px 0; -width:400px; -} -.rank_count b { -color:#666666; -font-size:12px; -font-weight:normal; -} -.rank_description{font-size:12px} -.rank_description b {font-weight:normal;} -.rank_tag{width:400px} -.rank_name{font-size:14px;font-weight:700} -.rank_name em{font-style:normal;font-weight:400} -#rank_tag_list{display:block;font-size:12px;padding:5px 10px;width:200px} -#rank_tag_list li{float:left;margin:4px;white-space:nowrap} -#tag_area{margin:0 auto;width:300px} -#tag_area h2{display:block;margin:15px 30px 0} -#addtag{margin:10px auto;width:250px} -#addtag span{display:inline-block;vertical-align:middle} -.tag_text{margin:5px;padding:3px;width:150px} -#addtag #submit_btn{float:none;margin:10px 40px} -#tag_msg{background:#FFFCAA none repeat scroll 0 0;border:1px solid #FFED00;clear:both;margin:5px auto;padding:5px 10px;width:485px} - -/* =user -----------------------------------------*/ -#user_info{clear:both;font-size:12px;padding:5px} -#user_info li{line-height:18px;margin:5px 3px;word-break:break-all;word-wrap:break-word} -#user_info_profile{clear:both;font-size:12px;padding:0 0 5px 5px} -#user_info_profile li{line-height:19px;margin:5px 15px 5px 5px} -#info_head { -background-color:#F6F6F6; -border:1px solid #EEEEEE; -height:70px; -margin:9px; -padding:0; -} -#info_name { -float:left; -font-size:20px; -margin:6px 0 2px 10px; -text-transform:uppercase; -} -#info_relation a { -float:left; -margin:2px 10px 5px 0; -text-decoration:none; -} -#info_headimg { -background-color:#EFEFEF; -border:1px solid #ADADAD; -float:left; -height:48px; -margin:8px 8px 8px 15px; -padding:2px; -width:48px; -} -#info_relation { -display:inline-block; -font-size:12px; -margin:2px 0 0 10px; -width:400px; -} -#subnav { -border-bottom:1px solid #CECECE; -clear:both; -display:block; -font-size:12px; -margin:20px 10px 0; -padding:0 0 5px; -} -#subnav a, #subnav a:hover { -text-decoration:none} -.info_status_body{display:block;line-height:20px;margin-left:5px;overflow:hidden;position:relative} -.info_status_body .status_info{margin:2px 0;text-align:left} -.info_btn, .info_btn_hover { --moz-border-radius:3px;-webkit-border-radius:3px; -background:#EEEEEE none repeat scroll 0 0; -border:1px solid #ADADAD; -color:#75715E; -font-size:12px; -overflow:hidden; -padding:2px 3px; -text-align:center; -text-decoration:none; -vertical-align:middle; -min-width:60px; -text-decoration:none -} -.info_btn_hover{background:#FFF none repeat scroll 0 0;text-decoration:none} -.info_btn:hover{background:#FFF none repeat scroll 0 0;text-decoration:none} -.subnavNormal{-moz-border-radius-topleft:2px;-moz-border-radius-topright:2px;-webkit-border-top-left-radius:2px;-webkit-border-top-right-radius:2px;background:#FFF none repeat scroll 0 0;border-color:#C4C4C4 #C4C4C4 #FFF;border-style:solid;border-width:1px;padding:5px 12px;margin:0 5px 0 0} -.subnavLink{background-color:#F0F0F0;cursor:pointer;font-size:12px;margin:0 5px 0 0;padding:6px 12px 5px} -.subnavLink a, .subnavNormal a, .subnavLink a:hover, .subnavNormal a:hover{text-decoration:none} -.subnavLink:hover{background-color:#E6E6E6;text-decoration:none} - -/* =actions button -----------------------------------------*/ -.actions{border-width:0;bottom:10px;line-height:1.25em;position:absolute;right:0px;visibility:hidden;z-index:9;} -.rt_btn,.replie_btn,.favor_btn,.delete_btn,.msg_replie_btn,.msg_delete_btn,.retw_btn,.trans_btn {display:inline-block;height:16px;width:21px;margin:-7px 0;overflow:hidden;text-indent:-9999em;} -.replie_btn,.msg_replie_btn{background:url("../img/sprite_icons.png") no-repeat scroll 4px 1px transparent} -.replie_btn:hover,.msg_replie_btn:hover{background:url("../img/sprite_icons.png") no-repeat scroll -17px 1px transparent} -.retw_btn{background:url("../img/sprite_icons.png") no-repeat scroll 0 -15px transparent} -.retw_btn:hover{background:url("../img/sprite_icons.png") no-repeat scroll -21px -15px transparent} -.favor_btn{background:url("../img/sprite_icons.png") no-repeat scroll 2px -32px transparent} -.favor_btn:hover{background:url("../img/sprite_icons.png") no-repeat scroll -19px -32px transparent} -.delete_btn,.msg_delete_btn{background:url("../img/sprite_icons.png") no-repeat scroll 0 -47px transparent} -.delete_btn:hover,.msg_delete_btn:hover{background:transparent url(../img/sprite_icons.png) no-repeat scroll -21px -47px} -.rt_btn{background:url("../img/sprite_icons.png") no-repeat scroll 0 -63px transparent} -.rt_btn:hover{background:url("../img/sprite_icons.png") no-repeat scroll -21px -63px transparent} -.trans_btn {background:url("../img/sprite_icons.png") no-repeat scroll -2px -79px transparent} -.trans_btn:hover {background:url("../img/sprite_icons.png") no-repeat scroll -23px -79px transparent} -.trans_header { -border-top:1px solid #AAAAAA; -color:#AAAAAA; -display:block; -margin-top:5px; -padding-top:5px; -} -.trans_body { -display: block; -} -.trans_close { -color:#AAAAAA; -display:block; -float:right; -font-size:12px; -margin-top:7px; -text-decoration:none; -} -/* =search -----------------------------------------*/ -#block{font-size:12px;margin:20px} -#search_form { -font-size:12px; -margin:15px; -padding:0 0 10px; -text-align:center; -} -#query { -border:1px solid #999999; -display:block; -float:left; -font-family:Helvetica,Arial,Sans-serif; -font-size:18px; -height:24px; -margin-bottom:25px; -margin-left:45px; -padding:4px 0; -text-indent:10px; -width:300px; -} -#header_search form { -height:26px; -width:175px; -} -#header_search_query { -border-color:#999999; -border-style:solid none solid solid; -border-width:1px medium 1px 1px; -float:left; -font-size:12px; -height:14px; -line-height:18px; -padding:5px 0; -text-indent:5px; -width:144px; -} -#header_search_submit { -background:url("../img/nav_search_submit.png") repeat scroll -2px 0 transparent !important; -border:1px solid #999999; -color:#555555; -cursor:pointer; -float:left; -font-size:14px; -height:26px; -line-height:26px; -text-align:center; -width:28px; -} -#header_search_submit:hover { -background:transparent url(../img/nav_search_submit.png) repeat scroll -2px -25px!important; -outline:none -} -#header_search_submit:focus, #header_search_submit:active { -background:transparent url(../img/nav_search_submit.png) repeat scroll -2px -50px!important; -outline:none -} - -/* =setting -----------------------------------------*/ -.desc{padding:5px !important;background-color:#F2F2F2} -#setting_table{font-size:12px;margin:10px 0 0 20px} -#setting_table tr td { -line-height:20px; -padding:5px 0; -text-align:left; -} -#style_table{font-size:12px;margin:10px 0 0 20px} -#style_table tr td{padding:5px 0;text-align:center} -#setting_nav{border-bottom:1px solid #CECECE;clear:both;display:block;font-size:12px;margin:20px 15px 0;padding:0 0 5px} -.setting_title { -display:block; -margin:0 10px 0 0; -width:50px; -} -.setting_input, .style_input { -border:1px solid #A7A6AA; -padding:3px; -width:280px; -} -#setting_text { -border:1px solid #A7A6AA; -font-size:12px; -height:80px; -overflow:auto; -padding:3px; -width:280px; -} -.style_title{display:block;width:100px} -.style_input{width:180px} -#style_form{margin-bottom:10px;margin-top:10px} -/*new styles below*/ -fieldset.settings {border: 1px solid #CECECE; margin: 15px; padding: 10px} -fieldset.settings legend{padding:0 5px} -fieldset.settings select{border: 1px solid #CECECE;padding: 2px; vertical-align: middle; font-size: 12px; margin-left: 5px;} -fieldset.settings input{border: 1px solid #CECECE;padding: 2px; font-size: 12px;} -fieldset.settings textarea{border:1px solid #CECECE;font-size:12px;height:100px;margin-top:10px;width:489px} -fieldset.settings label, fieldset.settings small, fieldset.settings input{vertical-align:middle;margin-right:2px;margin-top:1px} -fieldset.settings small {font-size:11px} -#save_button{padding: 5px 20px; float: left; cursor: pointer; margin-left: 15px;font-size:13px;} -#reset_link{float: right; margin-top: 10px; margin-left: 10px; position: absolute; left: 440px;text-decoration:underline} -#reset_link:hover{color:red} - -/* =all.php -----------------------------------------*/ -#allNav{margin-left:10px;float:left} -.allBtn{-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;background-color:#E0E0E0;border-left:1px solid #ADADAD;border-right:1px solid #ADADAD;border-top:1px solid #ADADAD;color:#75715E;display:inline-block;float:left;font-size:12px;margin:10px 10px -10px 0;padding:2px 20px;text-align:center} -.allBtn:hover{background-color:#F2F2F2;text-decoration:none} -.allHighLight{background-color:#FFF} - -/* =lists -----------------------------------------*/ -#list_action{display:block;margin:7px 0} -#list_action a{margin:0 5px 0 0;text-decoration:none} -#list_form span{display:block;margin:10px 0;vertical-align:top} -#list_form span label{display:inline-block;margin:0 2px 0 5px;text-align:left;vertical-align:top;width:70px} -#list_description,#list_name{border:1px solid #CCC;font-size:12px;padding:3px;width:290px} -#list_form span textarea{border:1px solid #CCC;font-size:12px;height:100px;width:290px} -#list_protect{width:16px} -#list_submit{margin-left:220px;width:60px} -#list_form{-moz-border-radius:8px;-webkit-border-radius:8px;background-color:#F5F5F5;border:3px solid #CCC;display:none;margin:0 auto;padding:10px 10px 0;width:390px} -#list_create_btn{display:block;margin-bottom:10px;text-align:center} -#member_form{-moz-border-radius:8px;-webkit-border-radius:8px;background-color:#F5F5F5;border:4px solid #CCC;font-size:12px;padding:5px;position:absolute} -#member_form span{display:block;font-size:12px;margin:5px;text-align:center} -#list_members{font-size:12px;height:70px;padding:3px;width:266px} -#member_submit,#list_submit,#member_cancel{padding:2px 4px} -.list_delete_btn{margin-top:5px} - -/* =feedback -----------------------------------------*/ -#feedbackLabel{-moz-border-radius-bottomleft:5px;-moz-border-radius-topleft:5px;-webkit-border-bottom-left-radius:5px;-webkit-border-top-left-radius:5px;background:#C0DEED url(../img/beta.png) no-repeat scroll 5px center;border-color:#FFF;border-style:solid;border-width:2px 0 2px 2px;display:block;height:53px;outline-color:0;outline-style:none;outline-width:medium;position:fixed!important;right:0;text-indent:-9999px;top:310px;width:24px} -#feedbackLabel:hover{width:26px} - -/* =fieldsets -----------------------------------------*/ -fieldset.common-form{border:0 none;margin:0} -fieldset.common-form p{margin:0 0 5px} -fieldset.common-form th,fieldset.common-form td{padding:9px 7px 3px 3px} -fieldset.common-form th{font-weight:400;padding-top:10px;text-align:right;width:11em} -fieldset.common-form small{color:#777;font-size:.97em} -fieldset.common-form input[type=text],fieldset.common-form input[type=password],fieldset.common-form textarea,fieldset.common-form select,fieldset.common-form checkbox{border:1px solid #AAA;padding:4px 2px} -fieldset.common-form input[type=text],fieldset.common-form input[type=password]{width:12em} -fieldset.common-form input.medium[type=text],fieldset.common-form textarea.medium{width:50%} -fieldset.common-form input.wider[type=text],fieldset.common-form textarea.wider{width:75%} -fieldset.common-form input.widest[type=text],fieldset.common-form textarea.widest{width:100%} -fieldset.common-form label{font-weight:400;white-space:nowrap} -fieldset.common-form ul li{padding:5px 0} -fieldset.common-form ul li label{display:block;font-weight:700} -fieldset.common-form ul li label sup{color:#888} -fieldset.common-form table.input-form th{vertical-align:top} -fieldset.common-form .instruction,fieldset.common-form .example,fieldset.common-form .required{color:#666;font-size:x-small;font-weight:400} -fieldset.common-form .instruction,fieldset.common-form .example{margin-top:.5em} -fieldset.common-form .example{font-style:oblique} -fieldset.common-form .suggestion{color:red} -fieldset.vertical-form input[type=text]{width:165px} -div.direct-message-box fieldset.standard-form{padding:10px 90px;width:548px} -.ie6 .standard-form .info{background:transparent none repeat scroll 0 0;border:0 none} -fieldset.common-form td[colspan=2]{text-align:right} - -/* =Tipsy -----------------------------------------*/ -.tipsy { -background-image:url("../img/tipsy.gif"); -background-repeat:no-repeat; -opacity:0.8; -padding:5px; -font-size:12px; -} -.tipsy-inner { -background-color:#000000; -color:white; -font:11px; -max-width:200px; -padding:8px; -text-align:left; -} -.tipsy-inner { -moz-border-radius:4px; -webkit-border-radius:4px; } -.tipsy-north { -background-position:center top; -} -.tipsy-south { -background-position:center bottom; -} -.tipsy-east { -background-position:right center; -} -.tipsy-west { -background-position:left center; -} - -/* =New Feature Tip -----------------------------------------*/ -#newtip { -color:#333333; -cursor:default; -font-size:11px; -line-height:18px; -position:absolute; -background-image:url("../img/tipsy.gif"); -background-repeat:no-repeat; -opacity:0.8; -padding:5px; -display:none; -} -#newtip_inner { --moz-border-radius:4px; --webkit-border-radius:4px; -border-radius:4px; --moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.5); --webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.5); -box-shadow:0 1px 2px rgba(0, 0, 0, 0.5); -background-color:#000000; -color:#DDDDDD; -max-width:200px; -padding:8px; -text-align:left; -} -#newtip_inner span { --moz-border-radius:3px 3px 3px 3px; -background-color:#333333; -font-size:12px; -padding:2px 4px; -} -#newtip_inner strong { -font-size:12px; -} -.a_close { -color:#666666; -font:bold 16px/12px tahoma,sans-serif; -margin-left:10px; -position:absolute; -right:7px; -text-decoration:none; -top:10px; -width:15px; -} -.a_close:hover { -color:#FFFFFF; -text-decoration:none; -} -/* =Avatar Menu -----------------------------------------*/ -.right_menu .menu button.clicked { -background-image:none; -} -.right_menu { -background-color:#FFFFFF; -border:1px solid #666666; -display:none; -margin-left:24px; -margin-top:24px; -padding:4px 0; -position:absolute; -text-align:left; -width:200px; -z-index:9999; -} -.right_menu li { -margin:0 !important; -padding:0 !important; -text-align:left; -position:static; -} -.right_menu li a, .right_menu li label, .right_menu li input[type="checkbox"] { -color:#666666; -display:inline-block; -font:11px 'Lucida Grande',Arial,sans-serif; -padding:4px 5px; -position:relative; -vertical-align:top; -} -.right_menu li .loading-spinner { -display:inline-block; -left:1px; -margin-left:4px; -position:relative; -top:4px; -} -.right_menu li a { -padding:4px 5px 4px 27px; -text-decoration:none; -color:#666666; -display:block; -} -.right_menu li a:hover { -text-decoration:none !important; -} -.right_menu li:hover { -background-color:#666666; -color:#FFFFFF; -} -.right_menu li:hover * { -color:#FFFFFF; -} -.right_menu li.divider { -border-top:1px solid #DDDDDD; -} -.right_menu i { -background-image:url("../img/sprite-icons.png"); -background-repeat:no-repeat; -display:inline-block; -height:13px; -outline:medium none; -overflow:hidden; -width:13px; -} -.right_menu a i { -left:7px; -position:absolute; -top:4px; -width:15px; -} -.right_menu .rm_mention i, .right_menu .ul_mention i { -background-position:-16px -32px; -} -.right_menu .rm_mention:hover i, .right_menu .ul_mention:hover i { -background-position:0 -32px; -} -.right_menu .rm_dm i, .right_menu .ul_dm i { -background-position:-48px -32px; -} -.right_menu .rm_dm:hover i, .right_menu .ul_dm:hover i { -background-position:-32px -32px; -} -.right_menu .rm_follow i, .right_menu .ul_follow i { -background-position:-176px -32px; -} -.right_menu .rm_follow:hover i, .right_menu .ul_follow:hover i { -background-position:-160px -32px; -} -.right_menu .rm_remove i, .right_menu .ul_remove i { -background-position:-208px -32px; -} -.right_menu .rm_remove:hover i, .right_menu .ul_remove:hover i { -background-position:-192px -32px; -} -.right_menu .rm_unfollow i, .right_menu .ul_unfollow i { -background-position:-112px -32px; -} -.right_menu .rm_unfollow:hover i, .right_menu .ul_unfollow:hover i { -background-position:-96px -32px; -} -.right_menu .rm_block i, .right_menu .ul_block i { -background-position:-144px -32px; -} -.right_menu .rm_spam i, .right_menu .ul_spam i { -background-position:-272px -32px; -} -.right_menu .rm_spam:hover i, .right_menu .ul_spam:hover i { -background-position:-256px -32px; -} -.right_menu .rm_block:hover i, .right_menu .ul_block:hover i { -background-position:-128px -32px; -} -.right_menu .rm_unblock i, .right_menu .ul_unblock i { -background-position:-144px -32px; -} -.right_menu .rm_unblock:hover i, .right_menu .ul_unblock:hover i { -background-position:-128px -32px; -} - -/* =Twitter Buttons -----------------------------------------*/ -.btn-m,input[type=submit].btn-m,input[type=button].btn-m{background-position:0 -200px;font-size:15px;line-height:20px;padding:5px 15px 6px;-moz-border-radius:5px;-khtml-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;}.btn-l,input[type=submit].btn-l,input[type=button].btn-l{background-position:0 -400px;font-size:20px;line-height:26px;padding:7px 20px 9px;-moz-border-radius:6px;-khtml-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;}.btn-light{background-color:#add!important;background-image:url("https://s3.amazonaws.com/twitter_production/a/1261078355/images/buttons/bg-btn-light.gif")!important;border-color:#add #add #9cc!important;text-shadow:1px 1px 0 #dff!important;}.btn-dark{background-color:#59a!important;background-image:url("https://s3.amazonaws.com/twitter_production/a/1261078355/images/buttons/bg-btn-dark.gif")!important;border-color:#59a #59a #489!important;color:#fff!important;text-shadow:-1px -1px 0 #59a!important;}.btn-blue{background-color:#39d!important;background-image:url("https://s3.amazonaws.com/twitter_production/a/1261078355/images/buttons/bg-btn-blue.gif")!important;border-color:#39d #39d #28c!important;color:#fff!important;text-shadow:-1px -1px 0 #39d!important;}.btn-chart{background-color:#9c2!important;background-image:url("https://s3.amazonaws.com/twitter_production/a/1261078355/images/buttons/bg-btn-chart.gif")!important;border-color:#9c2 #9c2 #8b1!important;text-shadow:1px 1px 0 #df6!important;}.btn-mint{background-color:#bdb!important;background-image:url("https://s3.amazonaws.com/twitter_production/a/1261078355/images/buttons/bg-btn-mint.gif")!important;border-color:#bdb #bdb #aca!important;text-shadow:1px 1px 0 #efe!important;}.btn-green{background-color:#272!important;background-image:url("../img/bg-btn-green.gif")!important;border-color:#272 #272 #161!important;color:#fff!important;text-shadow:-1px -1px 0 #272!important;}.btn-pink{background-color:#daa!important;background-image:url("https://s3.amazonaws.com/twitter_production/a/1261078355/images/buttons/bg-btn-pink.gif")!important;border-color:#daa #daa #c99!important;text-shadow:1px 1px 0 #fdd!important;}.btn-red{background-color:#a22!important;background-image:url("../img/bg-btn-red.gif")!important;background-position:0 0;border-color:#a22 #a22 #911!important;text-shadow:-1px -1px 0 #a22!important;color:#fff!important;}.btn:hover,.btn:focus,input[type=submit].btn:hover,input[type=submit].btn:focus,button.btn:hover,button.btn:focus{border-color:#999 #999 #888;background-position:0 -6px;color:#000;}.btn-light:hover,.btn-light:focus{border-color:#7aa #7aa #699;}.btn-dark:hover,.btn-dark:focus{border-color:#267 #267 #156;color:#fff;}.btn-blue:hover,.btn-blue:focus{border-color:#17b #17b #06a;color:#fff;}.btn-chart:hover,.btn-chart:focus{border-color:#7a1 #7a1 #690;}.btn-mint:hover,.btn-mint:focus,input[type=submit].btn-mint:hover,input[type=submit].btn-mint:focus,button.btn-mint:hover,button.btn-mint:focus{border-color:#8a8 #8a8 #797!important;}.btn-green:hover,.btn-green:focus,input[type=submit].btn-green:hover,input[type=submit].btn-green:focus,button.btn-green:hover,button.btn-green:focus{background-color:#272!important;border-color:#050 #050 #040!important;color:#fff;}.btn-pink:hover,.btn-pink:focus,input[type=submit].btn-pink:hover,input[type=submit].btn-pink:focus,button.btn-pink:hover,button.btn-pink:focus{border-color:#a88 #a88 #977!important;}.btn-red:hover,.btn-red:focus,input[type=submit].btn-red:hover,input[type=submit].btn-red:focus,button.btn-red:hover,button.btn-red:focus{background-color:#a22!important;border-color:#611 #611 #500!important;color:#fff;}.btn-m:hover,.btn-m:focus,input[type=submit].btn-m:hover,input[type=submit].btn-m:focus,button.btn-m:hover,button.btn-m:focus{background-position:0 -206px;}.btn-l:hover,.btn-l:focus,input[type=submit].btn-l:hover,input[type=submit].btn-l:focus,button.btn-l:hover,button.btn-l:focus{background-position:0 -406px;}.dbtn,.dbtn:hover,.dbtn:focus,.dbtn:active,button.dbtn:hover,button.dbtn:focus{background:#eee;border-color:#ddd;color:#aaa;text-shadow:none;}.btn-light.dbtn,.btn-light.dbtn:hover,.btn-light.dbtn:focus,.btn-light.dbtn:active{background:#dee;border-color:#cdd;color:#9aa;}.btn-dark.dbtn,.btn-dark.dbtn:hover,.btn-dark.dbtn:focus,.btn-dark.dbtn:active{background:#aad5dd;border-color:#99c5cc;color:#ddf6f6;}.btn-blue.dbtn,.btn-blue.dbtn:hover,.btn-blue.dbtn:focus,.btn-blue.dbtn:active{background:#bde;border-color:#acd;color:#def;}.btn-chart.dbtn,.btn-chart.dbtn:hover,.btn-chart.dbtn:focus,.btn-chart.dbtn:active{background:#deb;border-color:#cda;color:#ab9;}.btn-mint.dbtn,.btn-mint.dbtn:hover,.btn-mint.dbtn:focus,.btn-mint.dbtn:active{background:#ded;border-color:#cdc;color:#9a9;}.btn-green.dbtn,.btn-green.dbtn:hover,.btn-green.dbtn:focus,.btn-green.dbtn:active{background:#aca;border-color:#9b9;color:#ded;}.btn-pink.dbtn,.btn-pink.dbtn:hover,.btn-pink.dbtn:focus,.btn-pink.dbtn:active{background:#edd;border-color:#dcc;color:#a99;}.btn-red.dbtn,.btn-red.dbtn:hover,.btn-red.dbtn:focus,.btn-red.dbtn:active{background:#caa;border-color:#b99;color:#edd;} +/*---------------------------------------- +Embr main.css +Author:disinfeqt +Platform:open source +Version:0084 +----------------------------------------*/ + +/*elements*/ +body{background:#C0DEED url(../img/bg-clouds.png) repeat-x scroll 0 0;font-family:"Lucida Grande",Tahoma,Arial,sans-serif;font-size:13px;margin:0;background-attachment:fixed} +*{margin:0;padding:0} +a{color:#2276BB;text-decoration:none} +li{list-style-image:none;list-style-position:outside;list-style-type:none;-moz-transition:all .5s ease-out;-webkit-transition:all .5s ease-out} +img{border:medium none} +h2{clear:both;display:block;float:left;font-family:'Helvetica Neue','Helvetica','Arial',sans-serif;font-size:20px;font-weight:400;line-height:1.1;margin:8px 0 0 10px;cursor:default} +.wrapper{margin:1em auto;position:relative;width:763px} +.content-bubble-arrow{background-image:url(../img/arr2.gif);background-position:25px 0;background-repeat:no-repeat;margin-top:1em;padding-top:11px} +.columns{margin-bottom:15px;width:100%} +.round{border-radius:5px} +.round-right{border-radius:0 5px 5px 0} +.round-left{border-radius:5px 0 0 5px} +.clear{clear:both} +::selection{background:rgba(82,168,236,.25);color:#333} +#error{padding:40px;text-align:center} +#sidename,ul.sidebar-menu li a span.stat_count,#side #local_trend_locations li,#home #rssfeed,#search #rssfeed,#profile #rssfeed,#profile_favorites #rssfeed,#favorites #rssfeed,#home #rssfeed .timeline-rss,#search #rssfeed .search-rss,#profile #rssfeed .profile-rss,#favorites #rssfeed .favorites-rss,#profile_favorites #rssfeed .favorites-rss,#side .stats .stats_count,fieldset.vertical-form label,fieldset.vertical-form input{display:block} +.timeline li:hover a,.rank_list li:hover a,#user_stats a:hover,#info_block_btn:hover,#side .promotion a:hover,#side .stats a:hover{text-decoration:none} +a:hover,.timeline li:hover a:hover,.rank_list li:hover a:hover,#side .user_icon a:hover #me_tweets,#side .stats a:hover .label{text-decoration:underline} +#left,#sidenav a:hover,.allHighLight{background-color:#FFF} +#user_info li span,#user_info_profile li span,#side .about .label{font-weight:700} + +/* header*/ +header{margin:1em auto;text-align:right;width:766px} +#content{margin:1em auto;width:766px} +#logo img{left:0;margin-top:-2px;position:absolute} +nav{background-color:#FFF;display:inline-block;padding:0 .8em;white-space:nowrap;-webkit-transition:all .5s ease-out;-moz-transition:all .5s ease-out;-ms-transition:all .5s ease-out} +nav li{float:left;padding:4px 8px;line-height:18px} +nav:hover{box-shadow:0 0 10px #2276BB;-webkit-box-shadow:0 0 10px #2276BB} +nav a{border-radius:3px;padding:0 2px} +nav a:hover{background-color:#DDEEF6;text-decoration:none} +nav li .share{text-decoration:none;padding:0 3px;overflow:hidden;cursor:move} + +/*status form*/ +#tweeting_controls{float:right;padding:5px 12px 0 5px} +#tweeting_controls a{line-height:13px} +a.a-btn, a.a-btn:visited{color:#333!important} +a.a-btn{border-radius:4px;background:url("../img/bg-btn.gif") repeat-x scroll 0 0 #DDD;border-color:#DDD #DDD #CCC!important;border-style:solid;border-width:1px!important;cursor:pointer;display:inline-block;font-family:"lucida grande",helvetica,tahoma,arial;font-size:11px;line-height:14px;padding:4px 8px 5px;text-decoration:none;text-shadow:1px 1px 0 #FFF!important;-moz-transition:all .5s ease-out;-webkit-transition:all .5s ease-out;-ms-transition:all .5s ease-out} +a.btn-disabled{background-image:none;opacity:0.6} +a.a-btn-m{border-radius:5px;background-position:0 -200px;font-family:"helvetica neue",arial,sans-serif;font-size:15px;line-height:20px;padding:5px 15px 6px} +a.a-btn:hover, a.a-btn:focus{border-color:#999 #999 #888!important;color:#000;outline:medium none;text-decoration:none} +a.a-btn:active{background-image:none;outline:medium none} + +/*legacy below*/ +#statuses,#ajax_statuses{background-color:#FFF;float:left;padding:10px;width:544px} +#statuses form{margin-bottom:10px} +#tip{color:#CCC;float:right;font-size:24px;margin:5px 10px 0 0;font-family:'Helvetica Neue','Helvetica','Arial',sans-serif} +#tip.loading{background:url("../img/spinner.gif") no-repeat scroll center center transparent!important;color:transparent!important} +#textbox{border-radius:3px;border:1px solid #A7A6AA;font-size:14px;height:80px;margin:2px 0 5px 10px;overflow-x:hidden;overflow-y:auto;padding:5px;width:510px;-webkit-transition:all .5s ease-out;-moz-transition:all .5s ease-out;-ms-transition:all .5s ease-out} +textarea#textbox:focus{outline:none;border:1px solid rgba(82,168,236,.75)!important;box-shadow:0 0 8px rgba(82,168,236,.5)!important;-webkit-box-shadow:0 0 8px rgba(82,168,236,.5)!important} +textarea#textbox:hover{outline:none;border:1px solid rgba(167,166,170,.75);box-shadow:0 0 5px rgba(167,166,170,.5);-webkit-box-shadow:0 0 8px rgba(167,166,170,.5)} +#submit_btn,.submit_btn{background:transparent url(../img/round-btn.gif) repeat scroll 0 0;border:medium none;color:#666;float:right;font-size:14px;height:32px;margin:5px 13px 0 0;width:115px} +#submit_btn:hover,#login_btn:hover,#rank_addtag_btn:hover,.submit_btn:hover{background:transparent url(../img/round-btn.gif) repeat scroll 0 32px;color:#444;cursor:pointer} +#submit_btn:active{color:#000;cursor:pointer} +#func_set{clear:left;display:block;float:left;left:190px;position:absolute;top:33px} +.func_btn{background-image:url("../img/ui_icons.png");background-color:#FFF;border-radius:3px;border:1px solid #ADADAD;color:#75715E;display:block;float:left;font-size:11px;margin:0 -5px 0 10px;text-align:center;text-decoration:none;text-indent:-9999em;height:16px;width:20px;cursor:pointer} +.func_btn:hover{background-color:#F2F2F2;text-decoration:none} +#transRecover{border-radius:0 0 0 3px;display:none;background-color:#FFF;background-image:url("../img/ui_icons.png");border:1px solid #ADADAD;color:#75715E;cursor:pointer;float:left;font-size:11px;height:16px;margin:0 -5px 0 10px;text-align:center;text-decoration:none;text-indent:-9999em;background-position:-32px -64px;bottom:58px;left:515px;position:absolute;top:58px;width:15px} +#transRecover:hover{background-color:#F2F2F2;text-decoration:none} +#photoArea,#transArea,#filterArea,#symArea{border-radius:3px;background:#F5F5F5 none repeat scroll 0 0;border:1px solid #A7A6AA;clear:both;display:none;height:20px;left:20px;padding:10px 10px 60px;position:absolute;top:58px;width:500px} +#symArea{overflow-x:hidden;overflow-y:auto} +#symArea span{border-radius:3px;background-color:#EEE;border:1px solid transparent;color:#000;display:block;float:left;font-size:12px;line-height:18px;margin:0 10px 5px 0;min-width:60px;padding:1px 2px;text-align:center;white-space:nowrap} +#symArea span:hover{border:1px solid #666;cursor:pointer} +#filterArea .filter_input{border:1px solid #A7A6AA;font-size:13px;height:17px;margin:10px 0 5px;padding:3px 2px;width:300px} +.close{background:transparent url(../img/sprite-icons.png) no-repeat scroll -272px -16px;text-decoration:none;position:absolute;top:10px;right:10px;height:10px;width:9px} +#sent_function{float:left;margin:4px 0 0 10px} +#imageFile{margin:10px 0;padding:2px} +#autoBtn.pause{background-position:-15px -160px} +#autoBtn.start{background-position:1px -160px} +#currently{color:#666;float:left;font-size:11px!important;margin:3px 8px 0 10px;overflow:hidden;padding:2px 4px 2px 0;text-align:left;width:385px;word-wrap:break-word;cursor:pointer} +.status-text a{color:#666} +#latest_meta a{color:#999} + +/*tips*/ +#shortcutTip{border-radius:5px;border:2px solid #FFF;color:#FFF;cursor:default;display:block;font-size:20px;font-weight:700;left:20px;opacity:0.8;padding:8px 16px;position:fixed;top:20px} +#sentTip{background:#FFF;border-radius:0 0 5px 5px;font-size:11px!important;font-weight:700;left:auto;right:auto;padding:4px 0 6px;margin:-1px 0 0 233px;position:fixed;text-align:center;top:0;width:300px;min-height:13px;z-index:1000;opacity:0.8} +.ing{color:#2276BB} +.success{color:green} +.failure{color:red} + +/*timeline*/ +#allTimeline,#allReplies,#allMessage{margin:10px;padding:0;clear:both} +.timeline embed{margin:10px 0 0 10px} +.tweetcount{display:inline} +.new{background-color:#E3F1FA;color:#858585;display:none;float:left;font-size:11px;text-align:center;width:522px} +.mine{display:none;background-color:#E8FFED} +.reply{background-color:#E8FECD} +.filter{background-color:#FFC} +.retweet{background-color:#FFFFE5} +.faved{background:transparent url(../img/sprite-icons.png) no-repeat scroll -64px 0;height:15px;width:15px!important;display:inline-block;outline:medium none;overflow:hidden;position:absolute;top:10px;margin-left:500px} +.user_name{font-weight:700} +.timeline{margin:0 10px} +.timeline li{border-top:1px solid #EFEFEF;cursor:default;display:block;float:left;margin:0;overflow:visible;padding:10px 25px 5px 2px;position:relative;width:497px;-moz-transition:all .5s ease-out;-webkit-transition:all .5s ease-out} +.timeline li:hover .actions{display:inline} +.ajax_timeline li{cursor:default;display:block;float:left;margin:0;overflow:visible;padding:5px 0;width:520px;position:relative} +.ajax_timeline li .status_body{margin-left:50px!important;margin-right:5px!important} +.status_body{display:block;line-height:22px;margin-left:60px;overflow:hidden;position:relative} +.status_info{color:#999;display:block;font-size:11px;height:22px;margin:5px 0 0;overflow:hidden;text-align:left;width:100%} +.status_info a{color:#999;font-size:11px;text-decoration:none} +.status_info span{display:inline-block;margin:0 0 3px;padding:0 1px} +.status_info span.source{display:inline;max-width:180px;overflow:hidden;padding-right:3px;white-space:nowrap} +.embr{color:#3CF!important} +.timeline li:hover,.rank_list li:hover{background-color:#F2F2F2} +.status_author{height:48px;left:5px;padding:1px;position:absolute;width:48px} +li.loading .status_author,li.loading .rank_img{background:url("../img/spinner.gif") no-repeat scroll center center transparent!important;outline:4px solid #BBB} +li.loading #avatar{opacity:0.2} +.rank_img{top:15px;left:10px;position:absolute;width:48px;height:48px} +.status_author img,.rank_img img,#avatar{height:48px;width:48px;border-radius:5px} + +#thumb_pic{display:block;margin:5px 0} +#thumb_pic img{padding:3px;border:1px solid #ccc;max-width:420px;max-height:420px;box-shadow:0 1px 2px rgba(0,0,0,.25);-webkit-box-shadow:0 1px 2px rgba(0,0,0,.25)} +.hashtag{font-weight:700} +#empty{font-size:16px;font-weight:700;margin:50px;text-align:center} +#description{font-size:14px;padding:10px} +#description p{line-height:22px;margin:15px} +.big-retweet-icon{background-image:url(../img/sprite-icons.png);background-position:-128px -64px;background-repeat:no-repeat;display:inline-block;height:14px;position:relative;top:2px;width:18px} +/*new below*/ +.ajax_form{background-color:#FFF;border:1px solid #A7A6AA;float:left;margin:5px 0 5px -1px;padding:0;width:520px} +.ajax_form li{border-top:1px solid #EFEFEF;cursor:default;display:block;float:left;margin:0;overflow:visible;padding:5px 25px 5px 0;position:relative;width:495px} +.ajax_form li .status_author{height:30px;left:5px;margin-left:5px;margin-top:6px;padding:1px;position:absolute;width:30px} +.ajax_form li .status_body{display:block;line-height:22px;margin-left:50px;margin-right:5px;overflow:hidden;position:relative} +/*pagination*/ +#pagination{margin:5px} +#pagination p.no-more-tweets{font-size:1.1em;text-align:center} +.more{background-color:#FFF;background-image:url(../img/more.gif);background-position:left top;background-repeat:repeat-x;border-color:#DDD #AAA #AAA #DDD;border-style:solid;border-width:1px;display:block;font-size:14px;font-weight:700;height:22px;line-height:1.5em;margin-bottom:6px;outline-color:0;outline-style:none;outline-width:medium;padding:6px 0;text-align:center;text-shadow:1px 1px 1px #FFF;width:45%} +.more:hover{background-position:left -78px;border:1px solid #bbb;text-decoration:none} +.more:active{background-position:left -38px;color:#666} +.more.loading{background-color:#fff;background-image:url(../img/ajax.gif);background-position:50% 50%;background-repeat:no-repeat;border:1px solid #eee;cursor:default!important} +.more::-moz-focus-inner{border:0} +#pagination.pagination{height:1.5em} +#pagination.pagination a,#pagination.pagination .link-like{border:1px solid #cecece;float:right;margin:0 0 0 10px;padding:.25em 1em} + +/*sidebar*/ +#side_base{border-radius:0 5px 5px 0;background-color:#DDEEF6;border-left:1px solid #C0DEED;line-height:1.2;vertical-align:top;width:198px} +#side{border-radius:0 5px 5px 0;float:left;font-size:90%;margin:0 -2px;overflow:hidden;padding-top:.5em;width:198px} +#sideimg{float:left;margin:10px 10px 10px 15px;height:40px;width:40px;border-radius:5px;box-shadow:0 1px 2px rgba(0,0,0,.25);-webkit-box-shadow:0 1px 2px rgba(0,0,0,.25)} +#sideid{display:block;padding:10px 0 0 18px;margin-bottom:5px} +#side_name{font:bold 1.3em/1.3em Helvetica Neue,Helvetica,sans-serif;color:#2276BB;margin-right:1px} +#profileRefresh i{background:url(../img/refresh.png) no-repeat;width:16px;height:16px;display:inline-block} +.refreshing i{background:url(../img/ajax.gif)!important} +#me_tweets{font-family:Helvetica,Arial,sans-serif;font-size:90%} +#update_count{font-weight:700} +#user_stats{clear:both;padding:0 0 0 10px} +#user_stats li{display:inline-block;float:left;overflow:hidden;padding:0 5px;width:48px} +.count{display:block;font:bold 13px Helvetica Neue,Helvetica,Arial,sans-serif} +.label{display:block;font-size:11px} +#sidenav{border-top:1px solid #CCC;margin:0} +#sidenav a{background-color:#F4F4F4;border-bottom:1px solid #CCC;color:#000;display:block;font-size:13px;font-weight:700;padding:10px;text-decoration:none} +h3{font-size:14px;margin:14px 0 0 14px} +#sidepost{margin:0;padding-bottom:0} +#sidepost li{font-size:12px;line-height:18px;margin:12px 10px} +#side .promotion{background-color:#EDFEFF;font-size:12px;margin:.5em auto;padding:6px 10px;text-align:left;width:152px} +#side .promotion a{color:#333;font-size:11px;outline-style:none;outline-width:medium} +#side .promotion a.definition:hover strong{font-size:11px;outline-style:none;outline-width:medium;text-decoration:underline} +#side .promotion .definition strong{color:#2276BB;display:block;font-size:11px} +#indicator{cursor:pointer} +#tip_reset{text-decoration:underline;cursor:pointer} +#tip_reset:hover{color:red} +#sidebarTip_more{display:none} +#side .notice{background-color:#FFF;margin:.5em auto 1em;padding:10px;text-align:center} +#side div.section{padding:13px} +#side div#profile.section{margin-bottom:0;padding:.2em} +#side div.last{border-top:1px solid #C0DEED} +#side h1{color:#333;font-size:1.1em;margin-bottom:.5em;padding:0 0 2px} +#side div.section-header h3{border-bottom:1px solid #C0DEED;color:#333;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px;font-size-adjust:none;font-stretch:normal;font-style:normal;font-variant:normal;font-weight:400;line-height:18px} +#side .section-links{float:right;font-size:.9em;text-align:right} +#side div.msg strong{display:block;font-size:1.4em} +#side div.msg h3{font-size:1.25em} +#side ul{margin:0} +#side .faq-index ul{list-style-type:square;margin-left:15px} +#side .faq-index li{margin:10px 0} +#side p{padding:.5em 10px} +#side div#profile.profile-side{margin-bottom:1em!important} +#side .profile-side .about{margin-bottom:.6em} +#side div.user_icon a,#side div.user_icon a:hover{color:#333;text-decoration:none} +#side div.user_icon a:hover{color:#0084B5} +#side .user_icon{clear:both;display:block;height:31px;padding:0 0 .8em} +#side .user_icon img{padding-right:.8em;vertical-align:middle} +#me_name{font-size:1.35em;vertical-align:middle} +#side p.promotion{cursor:text;margin-bottom:1em} +.in-page-link{outline-style:none;outline-width:medium} +#side #gadgets,#side #saved_searches{overflow:hidden;width:198px} +ul.sidebar-menu li .side-tab-ajax{display:none;float:right;margin-right:1em;vertical-align:top} +ul.sidebar-menu span.stat_count{border-radius:3px;background-color:transparent;float:right;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;font-size-adjust:none;font-stretch:normal;font-style:normal;font-variant:normal;font-weight:700;line-height:normal;margin-right:14px;margin-top:0;padding:0 .1em} +span.link-title{float:left} +#ul.sidebar-menu li{padding-top:1px} +ul.sidebar-menu li a,#apiquota_list li span{background-image:none;clear:both;display:block;margin-right:-1px;outline-style:none;outline-width:medium;padding:8px 0 8px 14px} +ul.sidebar-menu li a{cursor:pointer!important;-webkit-transition:background-color .5s ease-out;-moz-transition:background-color .5s ease-out} +.safari ul.sidebar-menu li a{padding:6px 0 6px 14px} +ul.sidebar-menu li a span{display:inline-block;width:150px} +ul#primary_nav.sidebar-menu li a span{display:inline-block;width:auto} +ul.sidebar-menu li.loading a{background:#EDFEFF url(../img/spinner.gif) no-repeat scroll 171px .5em} +ul.sidebar-menu li.loading a span.stat_count{display:none!important} +ul.sidebar-menu li a:hover{background-color:#EDFEFF;text-decoration:none} +ul.sidebar-menu li.active a,a.active{background-color:#EDFEFF;color:#333;font-weight:700} +#side ul.sidebar-actions{margin:.2em 14px 1em} +#side p.no-lists{padding:.5em 14px} +#side span.xref{display:block;padding:4px 14px} +#side p.sidebar-menu-actions{clear:both;display:block;padding:.5em 14px} +#side span.new-list,#side span.view-all{font-size:11px;line-height:11px;margin:0 3px 0 0;padding:0} +#side span.view-all{display:inline;margin:0} +#side span.pipe{border-left:1px solid #C0DEED;padding-left:4px;padding-right:4px} +#side #following span.xref{display:block;margin-top:-5px;padding:0 14px 5px} +h2.sidebar-title{font-size:1.05em;font-weight:400;padding:.2em 14px} +h2.sidebar-subtitle{font-size:1.3em;font-weight:400;padding:.2em 14px} +#side .collapsible h2.sidebar-title{background:transparent url(../img/toggle_up_dark.png) no-repeat scroll right center;width:157px} +#side .collapsible.collapsed h2.sidebar-title{background:transparent url(../img/toggle_down_dark.png) no-repeat scroll right center} +#side div.collapsible.loading h2.sidebar-title{background-clip:border!important;-moz-background-inline-policy:continuous!important;background-origin:padding!important;background:transparent url(../img/spinner.gif) no-repeat scroll right center!important} +#side .actions{border:1px solid #87BC44;margin:10px -3px} +#side .actions small{font-size:.9em} +#side .actions a{padding-left:7px} +#side .user_icon > *{padding:0;vertical-align:middle} +#side .stats{clear:both;float:none;margin:0;padding:0;position:relative} +#side .stats td + td{padding:0 5px} +#profile #side .stats td + td{padding:0 8px} +#side .stats td + td + td{padding:0!important} +#side .stats a span.stats_count{color:#333} +#side .smaller span.stats_count{font-size:1.1em!important} +#profile #side .smaller span.stats_count{font-size:1.3em!important} +#side .stats a:hover span.stats_count{color:#2276BB} +#side .stats td .numeric{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:13px;font-size-adjust:none;font-stretch:normal;font-style:normal;font-variant:normal;font-weight:700;line-height:normal;text-decoration:none} +#side .stats td .label{font-size:.9em;text-transform:lowercase} +#side .about li{padding-bottom:3px} +#side .about li#bio{overflow:hidden;width:170px;word-wrap:break-word} +ul#tabMenu li{border-top:1px solid #BDDCAD} +ul#tabMenu a,#side .section h1{color:#4C4C4C;display:block;font-size:110%;font-weight:700;padding:13px;text-decoration:none} +#side .section h1{padding:0 0 .25em} +ul{overflow:hidden} +td.column,#side .stats td{padding:0;vertical-align:top} +.status_id,#side #gadgets em,#side .collapsible a.fetch-contents,#side .collapsed .xref,#side .collapsed .sidebar-menu,#rssfeed,#rssfeed .timeline-rss,#rssfeed .search-rss,#rssfeed .favorites-rss,#rssfeed .profile-rss{display:none} +#side .collapsible h2.sidebar-title:hover,#side .user_icon a{cursor:pointer} +#side hr{float:left;width:177px;display:block;border:0;height:1px;margin:7px 0 6px 11px;opacity:.7;background:#C0DEED;color:#C0DEED} +.notify{text-align:center;line-height:1;padding:5px 0;background-repeat:no-repeat;background-position:left center;margin-bottom:8px} +.notify div{background-color:#edffe5;font-size:.9em;margin:0 12px 0 24px;padding:10px 5px;border-radius:5px} +#trend_entries, #apiquota_list{display:none;width:198px;float:left;margin-top:5px!important} +#trends, #following, #apiquota, #version{margin-left:-2px} +#trends_title, #following_title, #apiquota_title,#version_title{background:transparent url(../img/toggle_down_dark.png) no-repeat scroll right center;font-weight:400;font-size:110%;padding-left:3px;margin-bottom:0;margin-top:0;width:177px;cursor:pointer} +#version_title{background:none!important} +#trends_title.loading, #following_title.loading, #apiquota_title.loading{background:transparent url(../img/spinner.gif) no-repeat scroll right center!important} +#trends_title.open, #following_title.open, #apiquota_title.open{background:transparent url(../img/toggle_up_dark.png) no-repeat scroll right center!important} +#following_list{display:none;float:left;padding:10px 10px 0} +#following_list span{float:left;padding:0 3px 2px 2px} +#following_list img{padding:0} + +/* =buttons +----------------------------------------*/ +.btn::-moz-focus-inner{border:0 none} +.btn,input.btn[type=submit],input.btn[type=button]{border-radius:4px;background:#DDD url(../img/bg-btn.gif) repeat-x scroll 0 0;border-color:#DDD #DDD #CCC;border-style:solid;border-width:1px;color:#333;font-size-adjust:none;font-stretch:normal;font-style:normal;font-variant:normal;margin:0;overflow:visible;padding:4px 8px 5px;text-shadow:1px 1px 0 #FFF;width:auto;font:400 11px/14px "tahoma";cursor:pointer} +#btn{border-radius:4px;background:#DDD url(../img/bg-btn.gif) repeat-x scroll 0 0;border-color:#DDD #DDD #CCC;border-style:solid;border-width:1px;color:#333;font-size-adjust:none;font-stretch:normal;font-style:normal;font-variant:normal;margin:0;overflow:visible;padding:4px 5px 5px;text-shadow:1px 1px 0 #FFF;width:auto;font:400 11px/14px "tahoma"} +.btn:hover,.btn:focus,input.btn[type=submit]:hover,input.btn[type=submit]:focus,input.btn[type=button]:hover,input.btn[type=button]:focus,button.btn:hover,button.btn:focus{background-position:0 -6px;border-color:#999 #999 #888;color:#000} +.btn:active,.btn:active,input.btn[type=submit]:active,input.btn[type=button]:active,button.btn:active{background-image:none!important;outline:medium none!important;text-shadow:none!important} +#btn:hover,#btn:focus{background-position:0 -6px;border-color:#999 #999 #888;color:#000} + +/*footer*/ +footer ul,footer li{overflow:visible} +footer{background:#FFF none repeat scroll 0 0;font-size:12px;line-height:1;margin-top:.7em;padding:8px 0;text-align:center;white-space:nowrap} +footer li{display:inline;padding:0 4px} +footer li.first:before{content:'';padding-right:0} +footer li img{border:0 none;margin:-3px;padding:0} + +/*ranking*/ +.rank_list{font-size:12px;margin:0 5px 5px 0} +.rank_list li{border-bottom:1px solid #CCC;margin:0 10px;overflow:visible;padding:10px;position:relative} +.rank_content{display:block;line-height:20px;margin-left:63px;min-height:50px;overflow:hidden;position:relative} +.rank_content span{margin:0;color:#666} +.rank_count{color:#333!important;display:block;font-size:12px;font-weight:700;margin:4px 0;width:400px} +.rank_count b{color:#666;font-size:12px;font-weight:400} +.rank_description{font-size:12px} +.rank_description b{font-weight:400} +.rank_tag{width:400px} +.rank_name{font-size:14px;font-weight:700} +.rank_name em{font-style:normal;font-weight:400} +#rank_tag_list{display:block;font-size:12px;padding:5px 10px;width:200px} +#rank_tag_list li{float:left;margin:4px;white-space:nowrap} +#tag_area{margin:0 auto;width:300px} +#tag_area h2{display:block;margin:15px 30px 0} +#addtag{margin:10px auto;width:250px} +#addtag span{display:inline-block;vertical-align:middle} +.tag_text{margin:5px;padding:3px;width:150px} +#addtag #submit_btn{float:none;margin:10px 40px} +#tag_msg{background:#FFFCAA none repeat scroll 0 0;border:1px solid #FFED00;clear:both;margin:5px auto;padding:5px 10px;width:485px} + +/*user*/ +#user_info{clear:both;font-size:12px;padding:5px} +#user_info li{line-height:18px;margin:5px 3px;word-break:break-all;word-wrap:break-word} +#user_info_profile{clear:both;font-size:12px;padding:0 0 5px 5px} +#user_info_profile li{line-height:19px;margin:5px 15px 5px 5px} +#info_head{background-color:#F6F6F6;border:1px solid #EEE;height:70px;margin:9px;padding:0} +#info_name{float:left;font-size:20px;margin:6px 0 2px 10px;text-transform:uppercase} +#info_relation a{float:left;margin:2px 10px 5px 0;text-decoration:none} +#info_headimg{background-color:#EFEFEF;border:1px solid #ADADAD;float:left;height:48px;margin:8px 8px 8px 15px;padding:2px;width:48px} +#info_relation{display:inline-block;font-size:12px;margin:2px 0 0 6px;width:435px} +#following_me{display:inline-block;top:8px;position:relative;margin:10px 0 0 8px;font-size:11px} +#following_me img{margin: 0pt 5px 3px 0pt;vertical-align:middle} + +#subnav{border-bottom:1px solid #CECECE;clear:both;display:block;font-size:12px;margin:20px 10px 0;padding:0 0 5px} +#subnav a,#subnav a:hover{text-decoration:none} +.info_status_body{display:block;line-height:20px;margin-left:5px;overflow:hidden;position:relative} +.info_status_body .status_info{margin:2px 0;text-align:left} +.info_btn,.info_btn_hover{border-radius:3px;background:#EEE none repeat scroll 0 0;border:1px solid #ADADAD;color:#75715E;font-size:12px;overflow:hidden;padding:2px 3px;text-align:center;text-decoration:none;vertical-align:middle;min-width:60px;text-decoration:none +} +.info_btn_hover,.info_btn:hover{background:#FFF none repeat scroll 0 0;text-decoration:none} +.subnavNormal{border-radius:2px 0 0 2px;background:#FFF none repeat scroll 0 0;border-color:#C4C4C4 #C4C4C4 #FFF;border-style:solid;border-width:1px;padding:5px 12px;margin:0 5px 0 0} +.subnavLink,.ac_over{background-color:#F0F0F0;cursor:pointer;font-size:12px;margin:0 5px 0 0;padding:6px 12px 5px} +.subnavLink a,.subnavNormal a, .subnavLink a:hover, .subnavNormal a:hover{text-decoration:none} +.subnavLink:hover,.ac_over:hover{background-color:#E6E6E6;text-decoration:none} + +/*actions button*/ +.actions{border-width:0;bottom:8px;line-height:1.25em;position:absolute;right:0;display:none;z-index:9} +.rt_btn,.replie_btn,.favor_btn,.delete_btn,.msg_replie_btn,.msg_delete_btn,.retw_btn,.trans_btn,.unfav_btn,.unrt_btn{display:inline-block;height:16px;width:21px;margin:-7px 0;overflow:hidden;text-indent:-9999em} +.replie_btn,.msg_replie_btn{background:url("../img/sprite_icons.png") no-repeat scroll 4px 1px transparent} +.replie_btn:hover,.msg_replie_btn:hover{background:url("../img/sprite_icons.png") no-repeat scroll -17px 1px transparent} +.retw_btn,.unrt_btn:hover{background:url("../img/sprite_icons.png") no-repeat scroll 0 -15px transparent} +.retw_btn:hover,.unrt_btn{background:url("../img/sprite_icons.png") no-repeat scroll -21px -15px transparent} +.favor_btn,.unfav_btn:hover{background:url("../img/sprite_icons.png") no-repeat scroll 2px -32px transparent} +.favor_btn:hover,.unfav_btn{background:url("../img/sprite_icons.png") no-repeat scroll -19px -32px transparent} +.delete_btn,.msg_delete_btn{background:url("../img/sprite_icons.png") no-repeat scroll 0 -47px transparent} +.delete_btn:hover,.msg_delete_btn:hover{background:transparent url(../img/sprite_icons.png) no-repeat scroll -21px -47px} +.rt_btn{background:url("../img/sprite_icons.png") no-repeat scroll 0 -63px transparent} +.rt_btn:hover{background:url("../img/sprite_icons.png") no-repeat scroll -21px -63px transparent} +.trans_btn{background:url("../img/sprite_icons.png") no-repeat scroll -2px -79px transparent} +.trans_btn:hover{background:url("../img/sprite_icons.png") no-repeat scroll -23px -79px transparent} +.trans_header{border-top:1px solid #AAA;color:#AAA;display:block;margin-top:5px;padding-top:5px} +.trans_body{display:block} +.trans_close{color:#AAA;display:block;float:right;font-size:12px;margin-top:7px;text-decoration:none} +/*search*/ +#block{font-size:12px;margin:20px} +#search_form{font-size:12px;margin:15px;padding:0 0 10px;text-align:center} +#query{border:1px solid #999;display:block;float:left;font-family:Helvetica,Arial,Sans-serif;font-size:18px;height:24px;margin:0 0 25px 45px;padding:4px 0;text-indent:10px;width:300px;border-radius:5px} +#header_search form {height:26px;width:175px} +#header_search_query{border-color:#999;border-style:solid none solid solid;border-width:1px medium 1px 1px;float:left;font-size:12px;height:14px;line-height:18px;padding:5px 0;text-indent:5px;width:144px} +#header_search_submit{ +background:url("../img/nav_search_submit.png") repeat scroll -2px 0 transparent!important;border:1px solid #999;color:#555;cursor:pointer;float:left;font-size:14px;height:26px;line-height:26px;text-align:center;width:28px} +#header_search_submit:hover{ +background:transparent url(../img/nav_search_submit.png) repeat scroll -2px -25px!important;outline:none} +#header_search_submit:focus, #header_search_submit:active{ +background:transparent url(../img/nav_search_submit.png) repeat scroll -2px -50px!important;outline:none} + +/* =setting +----------------------------------------*/ +.desc{padding:5px!important;background-color:#F2F2F2} +#setting_table{font-size:12px} +#setting_table tr td{line-height:20px;padding:5px 0;text-align:left} +#style_table{font-size:12px} +#style_table tr td{padding:5px 0;text-align:center} +#setting_nav{border-bottom:1px solid #CECECE;clear:both;display:block;font-size:12px;margin:20px 15px 0;padding:0 0 5px} +.setting_title{display:block;margin:0;width:80px;font-size:12px} +.setting_input, .style_input{border-radius:3px;border:1px solid #A7A6AA;padding:3px;width:320px} +#setting_text{border-radius:3px;border:1px solid #A7A6AA;font-size:12px;height:80px;overflow:auto;padding:3px;width:320px;margin-top:-5px} + +.style_title{display:block;width:100px} +.style_input{width:180px} +#style_form{margin-bottom:10px;margin-top:10px} +/*new styles below*/ +fieldset.settings{border-radius:3px;border:1px solid #CECECE;margin:15px;padding:15px 20px} +fieldset.settings legend{padding:0 5px} +fieldset.settings select{border:1px solid #CECECE;padding:2px;vertical-align:middle;font-size:12px;margin:0 20px 0 5px} +fieldset.settings select::-moz-focus-inner{border:0} +fieldset.settings input{border-radius:3px;border:1px solid #CECECE;padding:2px;font-size:12px;margin-top:-8px} +fieldset.settings textarea{border-radius:3px;border:1px solid #CECECE;font-size:12px;height:100px;margin-top:10px;width:455px} +fieldset.settings label, fieldset.settings small{vertical-align:middle;margin-right:2px;margin-top:1px} +fieldset.settings ol{display:inline-block} +fieldset.settings small{font-size:11px} +fieldset.settings .btn{padding: 4px 8px} + +#save_button{padding:5px 20px;float:left;cursor:pointer;margin-left:15px;font-size:13px} +#reset_link{float:right;color:position:absolute;left:440px;text-decoration:underline} +#reset_link:hover{color:red} + +/*all.php*/ +#allNav{margin-left:10px;float:left} +.allBtn{border-radius:3px 3px 0 0;background-color:#E0E0E0;border-left:1px solid #ADADAD;border-right:1px solid #ADADAD;border-top:1px solid #ADADAD;color:#75715E;display:inline-block;float:left;font-size:12px;margin:10px 5px 0 0;padding:2px 20px;text-align:center} +.allBtn:hover{background-color:#F2F2F2;text-decoration:none} +.allHighLight{background-color:#FFF} + +/*lists*/ +#list_action{display:block;margin:7px 0} +#list_action a{margin:0 5px 0 0;text-decoration:none} +#list_form span{display:block;margin:10px 0;vertical-align:top} +#list_form span label{display:inline-block;margin:0 2px 0 5px;text-align:left;vertical-align:top;width:70px} +#list_description,#list_name{border:1px solid #CCC;font-size:12px;padding:3px;width:290px} +#list_form span textarea{border:1px solid #CCC;font-size:12px;height:100px;width:290px} +#list_protect{width:16px} +#list_submit{margin-left:220px;width:60px} +#list_form{border-radius:8px;background-color:#F5F5F5;border:3px solid #CCC;display:none;margin:0 auto;padding:10px 10px 0;width:390px} +#list_create_btn{display:block;margin-bottom:10px;text-align:center} +#member_form{border-radius:8px;background-color:#F5F5F5;border:4px solid #CCC;font-size:12px;padding:5px;position:absolute} +#member_form span{display:block;font-size:12px;margin:5px;text-align:center} +#list_members{font-size:12px;height:70px;padding:3px;width:266px} +#member_submit,#list_submit,#member_cancel{padding:2px 4px} +.list_delete_btn{margin-top:5px} + +/*fieldsets*/ +fieldset.common-form{border:0 none;margin:0} +fieldset.common-form p{margin:0 0 5px} +fieldset.common-form th,fieldset.common-form td{padding:9px 7px 3px 3px} +fieldset.common-form th{font-weight:400;padding-top:10px;text-align:right;width:11em} +fieldset.common-form small{color:#777;font-size:.97em} +fieldset.common-form input[type=text],fieldset.common-form input[type=password],fieldset.common-form textarea,fieldset.common-form select,fieldset.common-form checkbox{border:1px solid #AAA;padding:4px 2px} +fieldset.common-form input[type=text],fieldset.common-form input[type=password]{width:12em} +fieldset.common-form input.medium[type=text],fieldset.common-form textarea.medium{width:50%} +fieldset.common-form input.wider[type=text],fieldset.common-form textarea.wider{width:75%} +fieldset.common-form input.widest[type=text],fieldset.common-form textarea.widest{width:100%} +fieldset.common-form label{font-weight:400;white-space:nowrap} +fieldset.common-form ul li{padding:5px 0} +fieldset.common-form ul li label{display:block;font-weight:700} +fieldset.common-form ul li label sup{color:#888} +fieldset.common-form table.input-form th{vertical-align:top} +fieldset.common-form .instruction,fieldset.common-form .example,fieldset.common-form .required{color:#666;font-size:x-small;font-weight:400} +fieldset.common-form .instruction,fieldset.common-form .example{margin-top:.5em} +fieldset.common-form .example{font-style:oblique} +fieldset.common-form .suggestion{color:red} +fieldset.vertical-form input[type=text]{width:165px} +div.direct-message-box fieldset.standard-form{padding:10px 90px;width:548px} +fieldset.common-form td[colspan=2]{text-align:right} +.ac_results ul{width:100%;list-style-position:outside;list-style:none;margin:0;padding:0} +.ac_results li{cursor:default;display:block;font:menu;font-size:12px;line-height:16px;overflow:hidden;margin:0;padding:2px 5px} +.ac_loading{background:#FFF url(img/ajax.gif) right center no-repeat} +.ac_odd{background-color:#eee} + +/*Tipsy*/ +.tipsy{color:#333;cursor:default;font-size:11px;line-height:18px;position:absolute;background:url("../img/tipsy.gif") no-repeat;opacity:0.8;padding:5px;display:none} +.tipsy-inner{border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.5);-webkit-box-shadow:0 1px 2px rgba(0,0,0,.5);background-color:#000;color:#DDD;max-width:200px;padding:8px;text-align:left} +.tipsy-inner span{border-radius:3px;background-color:#333;font-size:12px;padding:2px 4px} +.tipsy-inner strong{font-size:12px} +.tipsy-north{background-position:center top} +.tipsy-south{background-position:center bottom} +.tipsy-east{background-position:right center} +.tipsy-west{background-position:left center} + +/*Avatar Menu*/ +.right_menu .menu button.clicked{background-image:none} +.right_menu{background-color:#FFF;border:1px solid #666;margin:24px 0 0 24px;padding:4px 0;position:absolute;text-align:left;width:150px;z-index:9999;opacity:.9;box-shadow:0 1px 2px rgba(0,0,0,.3);-webkit-box-shadow:0 1px 2px rgba(0,0,0,.3)} +.right_menu li{margin:0!important;padding:0!important;text-align:left;position:static;border:none;-moz-transition:all .5s ease-out;-webkit-transition:all .5s ease-out} +.right_menu li a,.right_menu li label, .right_menu li input[type="checkbox"]{color:#666;display:inline-block;font:11px 'Lucida Grande',Arial,sans-serif;padding:4px 5px;position:relative;vertical-align:top} +.right_menu li a{padding:4px 5px 4px 27px;text-decoration:none;color:#666;display:block} +.right_menu li a:hover{text-decoration:none!important} +.right_menu li:hover{background-color:#666;color:#FFF} +.right_menu li:hover *{color:#FFF} +.right_menu li.divider{border:none/*border-top:1px solid #DDD*/} +.right_menu i{background:url("../img/sprite-icons.png") no-repeat;display:inline-block;height:13px;outline:medium none;overflow:hidden;width:13px} +.right_menu a i{left:7px;position:absolute;top:4px;width:15px} +.right_menu .rm_mention i, .right_menu .ul_mention i{background-position:-16px -32px} +.right_menu .rm_mention:hover i, .right_menu .ul_mention:hover i{background-position:0 -32px} +.right_menu .rm_dm i,.right_menu .ul_dm i{background-position:-48px -32px} +.right_menu .rm_dm:hover i,.right_menu .ul_dm:hover i{background-position:-32px -32px} +.right_menu .rm_follow i,.right_menu .ul_follow i{background-position:-176px -32px} +.right_menu .rm_follow:hover i,.right_menu .ul_follow:hover i{background-position:-160px -32px} +.right_menu .rm_remove i,.right_menu .ul_remove i{background-position:-208px -32px} +.right_menu .rm_remove:hover i,.right_menu .ul_remove:hover i{background-position:-192px -32px} +.right_menu .rm_unfollow i,.right_menu .ul_unfollow i{background-position:-112px -32px} +.right_menu .rm_unfollow:hover i,.right_menu .ul_unfollow:hover i{background-position:-96px -32px} +.right_menu .rm_block i,.right_menu .ul_block i,.right_menu .rm_unblock:hover i, .right_menu .ul_unblock:hover i{background-position:-144px -32px} +.right_menu .rm_block:hover i,.right_menu .ul_block:hover i,.right_menu .rm_unblock i, .right_menu .ul_unblock i{background-position:-128px -32px} +.right_menu .rm_spam i,.right_menu .ul_spam i{background-position:-272px -32px} +.right_menu .rm_spam:hover i, .right_menu .ul_spam:hover i{background-position:-256px -32px} + +/*Twitter Buttons*/ +.btn-m,input[type=submit].btn-m,input[type=button].btn-m{background-position:0 -200px;font-size:15px;line-height:20px;padding:5px 15px 6px;border-radius:5px}.btn-l,input[type=submit].btn-l,input[type=button].btn-l{background-position:0 -400px;font-size:20px;line-height:26px;padding:7px 20px 9px;border-radius:6px}.btn-light{background-color:#add!important;background-image:url("https://s3.amazonaws.com/twitter_production/a/1261078355/images/buttons/bg-btn-light.gif")!important;border-color:#add #add #9cc!important;text-shadow:1px 1px 0 #dff!important}.btn-dark{background-color:#59a!important;background-image:url("https://s3.amazonaws.com/twitter_production/a/1261078355/images/buttons/bg-btn-dark.gif")!important;border-color:#59a #59a #489!important;color:#fff!important;text-shadow:-1px -1px 0 #59a!important}.btn-blue{background-color:#39d!important;background-image:url("https://s3.amazonaws.com/twitter_production/a/1261078355/images/buttons/bg-btn-blue.gif")!important;border-color:#39d #39d #28c!important;color:#fff!important;text-shadow:-1px -1px 0 #39d!important}.btn-chart{background-color:#9c2!important;background-image:url("https://s3.amazonaws.com/twitter_production/a/1261078355/images/buttons/bg-btn-chart.gif")!important;border-color:#9c2 #9c2 #8b1!important;text-shadow:1px 1px 0 #df6!important}.btn-mint{background-color:#a22!important;background-image:url("https://s3.amazonaws.com/twitter_production/a/1261078355/images/buttons/bg-btn-mint.gif")!important;border-color:#bdb #bdb #aca!important;text-shadow:1px 1px 0 #efe!important}.btn-green{background-color:#272!important;background-image:url("../img/bg-btn-green.gif")!important;border-color:#272 #272 #161!important;color:#fff!important;text-shadow:-1px -1px 0 #272!important}.btn-pink{background-color:#daa!important;background-image:url("https://s3.amazonaws.com/twitter_production/a/1261078355/images/buttons/bg-btn-pink.gif")!important;border-color:#daa #daa #c99!important;text-shadow:1px 1px 0 #fdd!important}.btn-red{background-color:#a22!important;background-image:url("../img/bg-btn-red.gif")!important;background-position:0 0;border-color:#a22 #a22 #911!important;text-shadow:-1px -1px 0 #a22!important;color:#fff!important}.btn:hover,.btn:focus,input[type=submit].btn:hover,input[type=submit].btn:focus,button.btn:hover,button.btn:focus{border-color:#999 #999 #888;background-position:0 -6px;color:#000}.btn-light:hover,.btn-light:focus{border-color:#7aa #7aa #699}.btn-dark:hover,.btn-dark:focus{border-color:#267 #267 #156;color:#fff}.btn-blue:hover,.btn-blue:focus{border-color:#17b #17b #06a;color:#fff}.btn-chart:hover,.btn-chart:focus{border-color:#7a1 #7a1 #690}.btn-mint:hover,.btn-mint:focus,input[type=submit].btn-mint:hover,input[type=submit].btn-mint:focus,button.btn-mint:hover,button.btn-mint:focus{border-color:#8a8 #8a8 #797!important}.btn-green:hover,.btn-green:focus,input[type=submit].btn-green:hover,input[type=submit].btn-green:focus,button.btn-green:hover,button.btn-green:focus{background-color:#272!important;border-color:#050 #050 #040!important;color:#fff}.btn-pink:hover,.btn-pink:focus,input[type=submit].btn-pink:hover,input[type=submit].btn-pink:focus,button.btn-pink:hover,button.btn-pink:focus{border-color:#a88 #a88 #977!important}.btn-red:hover,.btn-red:focus,input[type=submit].btn-red:hover,input[type=submit].btn-red:focus,button.btn-red:hover,button.btn-red:focus{background-color:#a22!important;border-color:#611 #611 #500!important;color:#fff}.btn-m:hover,.btn-m:focus,input[type=submit].btn-m:hover,input[type=submit].btn-m:focus,button.btn-m:hover,button.btn-m:focus{background-position:0 -206px}.btn-l:hover,.btn-l:focus,input[type=submit].btn-l:hover,input[type=submit].btn-l:focus,button.btn-l:hover,button.btn-l:focus{background-position:0 -406px}.dbtn,.dbtn:hover,.dbtn:focus,.dbtn:active,button.dbtn:hover,button.dbtn:focus{background:#eee;border-color:#ddd;color:#aaa;text-shadow:none}.btn-light.dbtn,.btn-light.dbtn:hover,.btn-light.dbtn:focus,.btn-light.dbtn:active{background:#dee;border-color:#cdd;color:#9aa}.btn-dark.dbtn,.btn-dark.dbtn:hover,.btn-dark.dbtn:focus,.btn-dark.dbtn:active{background:#aad5dd;border-color:#99c5cc;color:#ddf6f6}.btn-blue.dbtn,.btn-blue.dbtn:hover,.btn-blue.dbtn:focus,.btn-blue.dbtn:active{background:#bde;border-color:#acd;color:#def}.btn-chart.dbtn,.btn-chart.dbtn:hover,.btn-chart.dbtn:focus,.btn-chart.dbtn:active{background:#deb;border-color:#cda;color:#ab9}.btn-mint.dbtn,.btn-mint.dbtn:hover,.btn-mint.dbtn:focus,.btn-mint.dbtn:active{background:#ded;border-color:#cdc;color:#9a9}.btn-green.dbtn,.btn-green.dbtn:hover,.btn-green.dbtn:focus,.btn-green.dbtn:active{background:#aca;border-color:#9b9;color:#ded}.btn-pink.dbtn,.btn-pink.dbtn:hover,.btn-pink.dbtn:focus,.btn-pink.dbtn:active{background:#edd;border-color:#dcc;color:#a99}.btn-red.dbtn,.btn-red.dbtn:hover,.btn-red.dbtn:focus,.btn-red.dbtn:active{background:#caa;border-color:#b99;color:#edd} \ No newline at end of file diff --git a/css/ui.colorpicker.css b/css/ui.colorpicker.css index e7dcb4a..704da6f 100644 --- a/css/ui.colorpicker.css +++ b/css/ui.colorpicker.css @@ -1,171 +1,171 @@ -/*colorpicker*/ -.ui-colorpicker { - width: 356px; - height: 176px; - overflow: hidden; - position: absolute; - background: url(../img/color/colorpicker_background.png); - font-family: Arial, Helvetica, sans-serif; - display: none; -} -.ui-colorpicker-color { - width: 150px; - height: 150px; - left: 14px; - top: 13px; - position: absolute; - background: #f00; - overflow: hidden; - cursor: crosshair; -} -.ui-colorpicker-color div { - position: absolute; - top: 0; - left: 0; - width: 150px; - height: 150px; - background: url(../img/color/colorpicker_overlay.png); -} -.ui-colorpicker-color div div { - position: absolute; - top: 0; - left: 0; - width: 11px; - height: 11px; - overflow: hidden; - background: url(../img/color/colorpicker_select.gif); - margin: -5px 0 0 -5px; -} -.ui-colorpicker-hue { - position: absolute; - top: 13px; - left: 171px; - width: 35px; - height: 150px; - cursor: n-resize; -} -.ui-colorpicker-hue div { - position: absolute; - width: 35px; - height: 9px; - overflow: hidden; - background: url(../img/color/colorpicker_indic.gif) left top; - margin: -4px 0 0 0; - left: 0px; -} -.ui-colorpicker-new-color { - position: absolute; - width: 60px; - height: 30px; - left: 213px; - top: 13px; - background: #f00; -} -.ui-colorpicker-current-color { - position: absolute; - width: 60px; - height: 30px; - left: 283px; - top: 13px; - background: #f00; -} -.colorpicker input { - background-color: transparent; - border: 1px solid transparent; - position: absolute; - font-size: 10px; - font-family: Arial, Helvetica, sans-serif; - color: #898989; - top: 4px; - right: 11px; - text-align: right; - margin: 0; - padding: 0; - height: 11px; -} -.ui-colorpicker-hex { - position: absolute; - width: 72px; - height: 22px; - background: url(../img/color/colorpicker_hex.png) top; - left: 212px; - top: 142px; -} -.ui-colorpicker input { - height: 15px; -} -.ui-colorpicker-hex input { - margin-left: 18px; - right: 6px; - width: 47px; -} -.ui-colorpicker-field { - height: 22px; - width: 62px; - background-position: top; - position: absolute; -} -.ui-colorpicker-field label { - padding-left: 17px; - font-size: 10px; -} -.ui-colorpicker-field input { - width: 25px; -} -.ui-colorpicker-field span { - position: absolute; - width: 12px; - height: 22px; - overflow: hidden; - top: 0; - right: 0; - cursor: n-resize; -} -.ui-colorpicker-rgb-r { - background-image: url(../img/color/colorpicker_rgb_r.png); - top: 52px; - left: 212px; -} -.ui-colorpicker-rgb-g { - background-image: url(../img/color/colorpicker_rgb_g.png); - top: 82px; - left: 212px; -} -.ui-colorpicker-rgb-b { - background-image: url(../img/color/colorpicker_rgb_b.png); - top: 112px; - left: 212px; -} -.ui-colorpicker-hsb-h { - background-image: url(../img/color/colorpicker_hsb_h.png); - top: 52px; - left: 282px; -} -.ui-colorpicker-hsb-s { - background-image: url(../img/color/colorpicker_hsb_s.png); - top: 82px; - left: 282px; -} -.ui-colorpicker-hsb-b { - background-image: url(../img/color/colorpicker_hsb_b.png); - top: 112px; - left: 282px; -} -.ui-colorpicker-submit { - position: absolute; - left: 296px; - top: 144px; - overflow: hidden; -} -.ui-colorpicker-focus { - background-position: center; -} -.ui-colorpicker-hex.ui-colorpicker-focus { - background-position: bottom; -} -.ui-colorpicker-submit.ui-colorpicker-focus { - background-position: bottom; -} -.ui-colorpicker-slider { - background-position: bottom; -} +/*colorpicker*/ +.ui-colorpicker { + width: 356px; + height: 176px; + overflow: hidden; + position: absolute; + background: url(../img/color/colorpicker_background.png); + font-family: Arial, Helvetica, sans-serif; + display: none; +} +.ui-colorpicker-color { + width: 150px; + height: 150px; + left: 14px; + top: 13px; + position: absolute; + background: #f00; + overflow: hidden; + cursor: crosshair; +} +.ui-colorpicker-color div { + position: absolute; + top: 0; + left: 0; + width: 150px; + height: 150px; + background: url(../img/color/colorpicker_overlay.png); +} +.ui-colorpicker-color div div { + position: absolute; + top: 0; + left: 0; + width: 11px; + height: 11px; + overflow: hidden; + background: url(../img/color/colorpicker_select.gif); + margin: -5px 0 0 -5px; +} +.ui-colorpicker-hue { + position: absolute; + top: 13px; + left: 171px; + width: 35px; + height: 150px; + cursor: n-resize; +} +.ui-colorpicker-hue div { + position: absolute; + width: 35px; + height: 9px; + overflow: hidden; + background: url(../img/color/colorpicker_indic.gif) left top; + margin: -4px 0 0 0; + left: 0px; +} +.ui-colorpicker-new-color { + position: absolute; + width: 60px; + height: 30px; + left: 213px; + top: 13px; + background: #f00; +} +.ui-colorpicker-current-color { + position: absolute; + width: 60px; + height: 30px; + left: 283px; + top: 13px; + background: #f00; +} +.colorpicker input { + background-color: transparent; + border: 1px solid transparent; + position: absolute; + font-size: 10px; + font-family: Arial, Helvetica, sans-serif; + color: #898989; + top: 4px; + right: 11px; + text-align: right; + margin: 0; + padding: 0; + height: 11px; +} +.ui-colorpicker-hex { + position: absolute; + width: 72px; + height: 22px; + background: url(../img/color/colorpicker_hex.png) top; + left: 212px; + top: 142px; +} +.ui-colorpicker input { + height: 15px; +} +.ui-colorpicker-hex input { + margin-left: 18px; + right: 6px; + width: 47px; +} +.ui-colorpicker-field { + height: 22px; + width: 62px; + background-position: top; + position: absolute; +} +.ui-colorpicker-field label { + padding-left: 17px; + font-size: 10px; +} +.ui-colorpicker-field input { + width: 25px; +} +.ui-colorpicker-field span { + position: absolute; + width: 12px; + height: 22px; + overflow: hidden; + top: 0; + right: 0; + cursor: n-resize; +} +.ui-colorpicker-rgb-r { + background-image: url(../img/color/colorpicker_rgb_r.png); + top: 52px; + left: 212px; +} +.ui-colorpicker-rgb-g { + background-image: url(../img/color/colorpicker_rgb_g.png); + top: 82px; + left: 212px; +} +.ui-colorpicker-rgb-b { + background-image: url(../img/color/colorpicker_rgb_b.png); + top: 112px; + left: 212px; +} +.ui-colorpicker-hsb-h { + background-image: url(../img/color/colorpicker_hsb_h.png); + top: 52px; + left: 282px; +} +.ui-colorpicker-hsb-s { + background-image: url(../img/color/colorpicker_hsb_s.png); + top: 82px; + left: 282px; +} +.ui-colorpicker-hsb-b { + background-image: url(../img/color/colorpicker_hsb_b.png); + top: 112px; + left: 282px; +} +.ui-colorpicker-submit { + position: absolute; + left: 296px; + top: 144px; + overflow: hidden; +} +.ui-colorpicker-focus { + background-position: center; +} +.ui-colorpicker-hex.ui-colorpicker-focus { + background-position: bottom; +} +.ui-colorpicker-submit.ui-colorpicker-focus { + background-position: bottom; +} +.ui-colorpicker-slider { + background-position: bottom; +} diff --git a/error.php b/error.php index dddce85..c4f9779 100644 --- a/error.php +++ b/error.php @@ -1,10 +1,28 @@ - - - +
      -

      Ooops, an unknown error occured. Please go back or sign in again.

      + Fail to connect Twitter right now. Please go back or sign in minutes later.

      '; + if(loginStatus()) + { + echo '

      The API will reset in '.intval((format_time(getTwitter()->ratelimit()->reset_time) - time())/60).' min(s).'; + break; + } + default: + echo '

      Ooops, an unknown error occured. Please go back or sign in again.

      '; + } + } else{ + echo '

      Ooops, an unknown error occured. Please go back or sign in again.

      '; + } + ?>
      diff --git a/favor.php b/favor.php index 50ea4e7..a0d16ed 100644 --- a/favor.php +++ b/favor.php @@ -5,7 +5,7 @@ if (!loginStatus()) header('location: login.php'); ?> - +
      @@ -21,42 +21,20 @@ $statuses = $t->getFavorites($p); if ($statuses === false) { - header('location: error.php'); + header('location: error.php');exit(); } $empty = count($statuses) == 0? true: false; if ($empty) { echo "
      No tweet to display.
      "; } else { $output = '
        '; - + include('lib/timeline_format.php'); foreach ($statuses as $status) { - $user = $status->user; - $date = formatDate($status->created_at); - $text = formatText($status->text); - - $output .= " -
      1. - - screen_name\" target=\"_blank\">profile_image_url)."\" title=\"$user->screen_name\" /> - - - $status->id - screen_name\">$user->screen_name $text "; - if ($shorturl = unshortUrl($text)) $output .= "

        URL

        $shorturl
        "; - $output .=" - id\">回复 - id\">回推 - New Retweet - id&t=f\">删除 - "; - if ($status->in_reply_to_status_id) $output .= " in_reply_to_status_id \">in reply to $status->in_reply_to_screen_name"; - $output .= " - from $status->source - id\" target=\"_blank\">$date - -
        -
      2. - "; + if (isset($status->retweeted_status)) { + $output .= format_retweet($status); + } else { + $output .= format_timeline($status,$t->username); + } } $output .= "
      "; @@ -68,16 +46,10 @@ echo $output; } - - - ?>
      - - diff --git a/followers.php b/followers.php index 4552e9d..a4a866a 100644 --- a/followers.php +++ b/followers.php @@ -6,7 +6,6 @@ $type = 'followers'; include ('inc/userlist.php'); - include ('inc/sidebar.php'); include ('inc/footer.php'); ?> diff --git a/friends.php b/friends.php index 91e7960..1e5094c 100644 --- a/friends.php +++ b/friends.php @@ -3,10 +3,8 @@ $title = "Following"; include ('inc/header.php'); if (!loginStatus()) header('location: login.php'); - $type = 'friends'; include ('inc/userlist.php'); - include ('inc/sidebar.php'); include ('inc/footer.php'); ?> diff --git a/img.php b/img.php new file mode 100644 index 0000000..873cb19 --- /dev/null +++ b/img.php @@ -0,0 +1,54 @@ + \ No newline at end of file diff --git a/img/bg-btn.gif b/img/bg-btn.gif index 5d1e164..1926158 100644 Binary files a/img/bg-btn.gif and b/img/bg-btn.gif differ diff --git a/img/bg-clouds.png b/img/bg-clouds.png index 1481768..da9330d 100644 Binary files a/img/bg-clouds.png and b/img/bg-clouds.png differ diff --git a/img/big_logo.png b/img/big_logo.png index 7efad07..110a736 100644 Binary files a/img/big_logo.png and b/img/big_logo.png differ diff --git a/img/blank.gif b/img/blank.gif new file mode 100644 index 0000000..2799b45 Binary files /dev/null and b/img/blank.gif differ diff --git a/img/logo.png b/img/logo.png index 32e8d38..56f983d 100644 Binary files a/img/logo.png and b/img/logo.png differ diff --git a/img/refresh.png b/img/refresh.png new file mode 100644 index 0000000..230340c Binary files /dev/null and b/img/refresh.png differ diff --git a/img/sprite-icons.png b/img/sprite-icons.png index 7336e51..bc63447 100644 Binary files a/img/sprite-icons.png and b/img/sprite-icons.png differ diff --git a/img/sprite_icons.png b/img/sprite_icons.png index 0fc30b8..bfd9622 100644 Binary files a/img/sprite_icons.png and b/img/sprite_icons.png differ diff --git a/img/toggle_down_dark.png b/img/toggle_down_dark.png index f3fd0f4..6c6eeb8 100644 Binary files a/img/toggle_down_dark.png and b/img/toggle_down_dark.png differ diff --git a/img/toggle_up_dark.png b/img/toggle_up_dark.png index 951d903..89c6664 100644 Binary files a/img/toggle_up_dark.png and b/img/toggle_up_dark.png differ diff --git a/img/ui_icons.png b/img/ui_icons.png index 2e5180e..16e4b1d 100644 Binary files a/img/ui_icons.png and b/img/ui_icons.png differ diff --git a/inc/followingWall.php b/inc/followingWall.php index 6e3af94..67b8730 100644 --- a/inc/followingWall.php +++ b/inc/followingWall.php @@ -7,17 +7,12 @@ $t = getTwitter(); $friends = $t->friends()->users; $html = '
      '; - $count = 0; - $MAX_COUNT = 30; foreach($friends as $friend){ $html .= ' '.$friend->name.' '; - if(++$count == $MAX_COUNT){ - break; - } } echo $html.'
      '; ?> diff --git a/inc/footer.php b/inc/footer.php index f1f7d12..7958d65 100644 --- a/inc/footer.php +++ b/inc/footer.php @@ -2,19 +2,18 @@
      - +
    - + \ No newline at end of file diff --git a/inc/header.php b/inc/header.php index 6107795..1be5161 100644 --- a/inc/header.php +++ b/inc/header.php @@ -4,49 +4,65 @@ session_start(); } ?> - - + + - - - - - -Rabr / <?php echo $title ?> + + + + + + +Embr / <?php echo $title ?> - - - - + + + + - +
    diff --git a/inc/sentForm.php b/inc/sentForm.php index 9628062..9b7f0e3 100644 --- a/inc/sentForm.php +++ b/inc/sentForm.php @@ -1,168 +1,178 @@ - - - -

    What's happening?

    -140 - - -
    -Upload Image -

    Powered by Img.ly

    - - - -
    - -
    -Filter Timeline -

    Seperate keywords with comma. [eg: twitter,hello] Also usernames without @

    - - - - - -
    - -
    -
    - -
    - -
    - -
    -Translation Settings -

    Translate tweets into - -

    -

    Translate my tweets into - -

    - -
    - -
    -Restore - - -veverify(); - if ($current_user === false) { - header('location: error.php'); - } - $empty = count($current_user) == 0? true: false; - if ($empty) { - echo "
    - Latest: - - - What's shaking? - What's shaking? - - - - -
    "; - } else { - $status = $current_user->status; - $date = formatDate($status->created_at); - $text = formatText($status->text); - $output = " -
    - Latest: - - - " . $text . " - " . $text . " - id\" target=\"_blank\">" . $date . " - id\" target=\"_blank\">" . $date . " - - -
    - "; - echo $output; - } -?> -
    - Tweet -
    - -
    - - Shorten URL - - Shorten Tweet - - Translate - -Image'; - } -?> - - Filter - - Sogou - - Symbols - - Restore - - Pause - - Sweep - - Refresh -
    -
    -
    \ No newline at end of file + +What's happening?" ; + } ?> +140 + +
    +Upload Image +

    Powered by Img.ly

    + + + +
    + +
    +Filter Timeline +

    Seperate keywords with comma. [eg: twitter,hello] Also usernames without @

    + + + + + +
    + +
    +
    + +
    + +
    + +
    +Translation Settings +

    Translate tweets into + +

    +

    Translate my tweets into + +

    + +
    + +
    +Restore + + +veverify(); + if ($user === false) { + header('location: error.php');exit(); + } + $empty = count($user) == 0 || !isset($user->status) || $user->status->text == ''; + if ($empty) { + echo "
    + Latest: + + + What's happening? + What's happening? + + + + +
    "; + } else { + $status = $user->status; + $date = format_time($status->created_at); + $text = formatText($status->text); + $output = " + + "; + echo $output; + } + } +?> +
    + + + +
    + +
    + + Shorten URL + + Shorten Tweet + + Translate + + Image + + Filter + + Sogou + + Symbols + + Restore + + Pause + + Sweep + + Refresh +
    +
    +
    \ No newline at end of file diff --git a/inc/sidebar.php b/inc/sidebar.php index 6b05fd4..7f8b2c9 100644 --- a/inc/sidebar.php +++ b/inc/sidebar.php @@ -1,80 +1,107 @@ - - - - - - -
    -
    - - showUser(); -?> -
      -
    • Name name ?>
    • - location) echo "
    • Location $user->location
    • "; ?> - url) and (strlen($user->url)>20)) echo '
    • Web ' .substr($user->url, 0, 20). '...
    • '; else if (($user->url) and (strlen($user->url)<=20)) echo '
    • Web ' .$user->url. '
    • ';?> - description) echo "
    • Bio $user->description
    • "; ?> -
    - - - -
  • - -
  • - -
    - - -
    -
    \ No newline at end of file + + + + + +
    +
    +
    + " /> + + tweets +
    + showUser(); +?> +
      +
    • Name name ?>
    • + location) echo "
    • Location $user->location
    • "; ?> + url) and (strlen($user->url)>20)) echo '
    • Web ' .substr($user->url, 0, 20). '...
    • '; else if (($user->url) and (strlen($user->url)<=20)) echo '
    • Web ' .$user->url. '
    • ';?> + description) echo "
    • Bio ".formatText($user->description)."
    • "; ?> +
    + + + +
  • +
    +

    + 'Short·cuts', + 'def' => 'n. Use shortcuts in Embr.', + 'more' => 'Shortcuts available now:
    + C / U - Update
    + T - Go to top
    + B - Go to bottom
    + R - Refresh
    + S - Search' + ), + array( + 'term' => 'User Di·rect View', + 'def' => 'n. Now you can view the user page of your interested more incentively.', + 'more' => 'take @'.SITE_OWNER.' for example, you can visit his/her page via '.BASE_URL.'/'.SITE_OWNER, + ), + array( + 'term' => 'Realtime Refresh', + 'def' => 'v. Now you can refresh your profile whenever you like!', + 'more' => 'See the circle behind your username? Try to click it!' + ), + array( + 'term' => 'Custom·Tips', + 'def' => 'n. Hate embr tips so much? Now you can edit me into your own tips!', + 'more' => 'Your tips will be encrypted in your cookies all for your privacy!' + ), + ); + if(isset($_COOKIE['Tip_Title']) || isset($_COOKIE['Tip_Content']) || isset($_COOKIE['Tip_More'])){ + $raw = array( + 'term' => getEncryptCookie('Tip_Title'), + 'def' => getEncryptCookie('Tip_Content'), + 'more' => getEncryptCookie('Tip_More'), + ); + initSidebarTip($raw); + } else { + initSidebarTip($preset[3]); + } + ?> +

    +
    +
  • + +
    + + +
    +
    +'.$entity['term'].''.$entity['def'].'

    Click for more details.[+]'.$entity['more'].'

    Reset to default
    '; + } +?> \ No newline at end of file diff --git a/inc/sidepost.php b/inc/sidepost.php index afc52dd..6604a96 100644 --- a/inc/sidepost.php +++ b/inc/sidepost.php @@ -1,49 +1,49 @@ - - - - -
    -
      - -
    -
    - -
    -
    -

    -Following -

    -
    -
    -
    -
    -
    -

    -Toolbox -

    - -
    -
    - -
    - - - - -
    - -
    + + + + +
    +
      + +
    +
    + +
    +
    +

    +Following +

    +
    +
    +
    +
    + + +
    + + + + +
    + +
    \ No newline at end of file diff --git a/inc/symbols.inc b/inc/symbols.inc new file mode 100644 index 0000000..5776966 --- /dev/null +++ b/inc/symbols.inc @@ -0,0 +1,490 @@ +╮(╯_╰)╭ +┗|`O′|┛ +o(°▽、°o)....+(( ̄﹏ ̄m ) +槑槑槑槑呆槑槑槑槑槑槑槑槑…… +~o(▽` o) =3 =3 =3 +<铃铃铃~ヾ( ̄  ̄*)==3=3=3 +ヽ( ̄︿ ̄ )—C<(/;◇;)/ +ヾ( ┬o┬)┌θθθθ(;;_ _).o○ +o((>ω< ))o +o(≧口≦)o +╮( ̄▽ ̄")╭ +m(_ _)m +ヾ( ̄▽ ̄)Bye~Bye~ +▄︻┻┳═一…… ☆(>○<) +o(*≧▽≦)ツ +ヾ(≧▽≦*)o +o(≧口≦)o +(o゜▽゜)o☆ +( ̄ ‘i  ̄;) +( ̄ ii  ̄;) ( ̄" ̄;) +(⊙x⊙;) +(*^ ^*)(^ *) +(◎_x) +o( ̄┰ ̄*)ゞ +°.°·(((p(≧□≦)q)))·°.°。 +X﹏X 惨了! +q(≧▽≦q) +( ̄ c ̄)y▂ξ。。。 +<(  ̄^ ̄)(θ(θ☆( >_< +( ̄△ ̄;) +( ̄旦 ̄;) +━┳━ ━┳━ +Σ(`д′*ノ)ノ +Σ(っ °Д °;)っ +~( ̄▽ ̄~)(~ ̄▽ ̄)~ +<( ̄ˇ ̄)/ +┬┴┤_·) +("▔□▔) +(⊙﹏⊙) +-________-'' +o(` · ~ · ′。)o +______λ......_____ +λ…λλ…λ…λλλ… +○| ̄|_ =3 +(╯′□`)╯ ┫:·'∵:.┻┻:·'.:┣∵·:. ┳┳☆ +(╯‵□′)╯""┻━┻☆))>○<) +┻━┻︵╰(‵□′)╯︵┻━┻ +︿( ̄︶ ̄)︿ +ヾ(≧奋≦)〃 +French (* ̄( ̄ *) Kiss! +( ̄ˇ ̄)v +fufu~ ^u^ +( σ'ω')σ +o(>O<;; )σ +┳G┻┳F┳┻W┫ +(┘ ̄︶ ̄)┘└( ̄︶ ̄└) +<( ̄︶ ̄)↗ +<( ̄OO, ̄)/ +Good! o( ̄▽ ̄)d +______λ......_____ +( ̄┰ ̄*) +(#°Д°) +O口O! +Σ(⊙▽⊙"a... +o(*≧▽≦)ツ +( ̄_ ̄|||) +( ̄▽ ̄") +(寒 ̄ii ̄)彡…彡…彡 +o(* ̄▽ ̄*)o +【】\(·ω·`)o +o(* ̄▽ ̄*)ゞ +( -з) +(;′⌒`) +(ε- ) +o( ̄ヘ ̄o#) +( ̄▽ ̄") +o(* ̄▽ ̄*)o +^-^ +^O^ +Hi~ o(* ̄▽ ̄*)ブ +( ·_·)ノ_·)ノ_·)ノ_·)ノ_·)ノ +○( ^皿^)っHiahiahia.... +( ̄y▽ ̄)╭ Ohohoho..... +hoho ^O^ +(_ _)。゜zzZ +Σ( ° △ °|||)︴ +Σ(`д′*ノ)ノ +Σ(っ °Д °;)っ +┗|*`0′*|┛ +( -'`-; ) +o(′益`)o +(  ̄ー ̄)人(^▽^ ) +n(*≧▽≦*)n +(°°)~ (°°)~ (°°)~ (°°)~ + (* ̄( ̄ *) +ˋ( ° ▽、° ) 口水ing... + ...φ(0 ̄*)啦啦啦_φ(* ̄0 ̄)> +m( =∩王∩= )m +(┳_┳)... +/(ㄒoㄒ)/~~ +卐~%?…,# *'☆&℃$︿★? +o(* ̄︶ ̄*)o +o( ̄ˇ ̄)o +o( =·ω·= )m +o(=·ェ·=)m +MIN■■■■■□□MAX +(/ ̄ˇ ̄)/ +(。人。) +mmm...f('︶︿︶)o +mmm..... +Capricorn +mua! (*╯3╰) +--\(˙<>˙)/-- +~( ̄▽ ̄)~* +(#‵′) +(o#゜ 曲゜)o +MIN■■■■■□□MAX(╯‵□′)╯︵┻━┻ +ε=怒ε=怒ε=怒ε=怒ε=( o`ω′)ノ +(⊙o⊙)? +Oh~ no!!!! +Oh yeah!\(^&^)/ +OK +λ…λλ…λ…入λλ… +ε = = (づ′▽`)づ +ε=ε=ε=(~ ̄▽ ̄)~ +ヾ(*′▽`*)ノ彡☆ノヽノヽノヽ +ヾ(′▽`* )ノ~ +( ̄ε(# ̄)☆╰╮o( ̄▽ ̄///) +Pia!(o ‵-′)ノ”(ノ﹏<。) +(~ ̄▽ ̄)~ +(~o ̄3 ̄)~ +.....((/- -)/ +▄︻┻┳═一…… +(ˉ▽ ̄~) 切~~ +( ^ ^) _U~~ +(╬ ̄皿 ̄)=○#( ̄#)3 ̄) +(Д゜(○=(゜ 皿゜)=○)゜Д゜) +<(-︿-)> +shy~ o(*////▽////*)q +( ′ 3`) sigh~ +三三三三三三三三三4(o|o ) + (o ‵-′)ノ”(ノ_<。) +<(  ̄^ ̄)(θ(θ☆( >_< +╮( ╯ 3 ╰ )╭ +╮( ̄▽ ̄")╭ +╮(╯-╰)╭ +ㄟ( ▔, ▔ )ㄏ +ε=ε=┏( >_<)┛ +ε=ε=ε=┏(゜ロ゜;)┛ +ε=ε=ε=ε=ヽ(* ̄o ̄)ノ +o(≧∩≦)o +o(TヘTo) +☆⌒(*^-゜)v THX!! +|壁|_☆) +┬┴┤_·) +n(→_←)┛ +o( >﹏<。)┛ +0^)吞! +( ̄┰ ̄*) +(PД`q。)·。'゜ +<( ̄▽ ̄)/ +∥wc∥ o(- -o) =з =з =з +(﹁"﹁) +╥﹏╥... +σ(⌒ー⌒) +@/" +wow~⊙o⊙ +ㄟ( ▔, ▔ )ㄏ +( ﹁ ﹁ ) ~→ +( ̄. ̄)+ +(﹁"﹁) +...ψ(。。 ) +o(* ̄▽ ̄*)o +(* ̄(エ) ̄) +(+(工)+╬) +o(*////▽////*)q +p(# ̄▽ ̄#)o +卐~%?…,# *'☆&℃$︿★?…… +╳╳○○ +(* ̄︶ ̄)y +(* ̄▽ ̄)y +^_^)y +━┳━ ━┳━ +ag108lau +Yes,sir! <( ̄O ̄)/ +╭(′▽`)╭(′▽`)╯ +ヽ( ̄ω ̄( ̄ω ̄〃)ゝ +(^U^)ノ~YO +>°)))>彡 +(((φ(◎ロ◎;)φ))) +Σ[ ◎ ]} +<( ̄ ﹌  ̄)@m +^(* ̄(oo) ̄)^ +W( ̄_ ̄)W +┳G┻F┳W┫☆(ノ﹏<。) +--==≡≡〈〈《( / ̄皿 ̄)=O));>o<)/ +ZZzz…(。-ω-)..ooO((【·:*:~夢~:*:·】)) +( ̄y▽, ̄)╭ + o(* ̄▽ ̄*)ブ +(o|o) +ヾ(≧O≦)〃 +(o|o) +(-人-) +(^人^) +ヾ(′▽`*)ゝ +ヾ(′▽`*)ゝ +━((*′ ▽`)爻(′▽`*))━!!! +━((*′д`)爻(′д`*))━!!!! +\( ̄︶ ̄)/ +\( ̄︶ ̄*\)) +(′゜c_,゜` ) +╭∩╮(︶︿︶)╭∩╮ +(  ̄  ̄)σ…( _ _)ノ| +(  ̄  ̄)σ…( _ _)ノ| +ノ ̄ー ̄)ノ ⌒ >┼○"☆|| +o(′益`)o +§(* ̄▽ ̄*)§ +<( ̄3 ̄)> +______λ......___丬 +(* ̄︿ ̄) +(PД`q。)·。'゜ +(*  ̄3)(ε ̄ *) +( *^-^)ρ(*╯^╰) +(@_@;)? +(* ̄︿ ̄) +ㄟ( ▔, ▔ )ㄏ +( ̄_, ̄ ) +(ノへ ̄、) +(o′┏▽┓`o) +( ·ェ·)(·ェ· ) +(*≧︶≦))( ̄▽ ̄* )ゞ +( * ̄▽ ̄)((≧︶≦*) +<)。(> +ε~( ~( ~ ( 卍 )\( ̄▽ ̄ \) +(# ̄□ ̄)o―∈‥oo━━━━━━━☆ +●┻┓⌒ Σ┌┘車└┐=3 =3 =3 +.....(((((ヾ( o=^·ェ·)o ┏━┓ +( `0‘)ノ~~~~~~~~~ν +(。>︿<)_θ +___*\(  ̄皿 ̄)/#____ +( ̄ε(# ̄)☆╰╮( ̄▽ ̄///) +(ノへ ̄、) +(ノへ ̄、) +Pia!(o ‵-′)ノ” +ε=ε┣G┻F┳ε=ヽ(* ̄▽ ̄)ノ┻W┫ +→)╥﹏╥) +( * ̄▽ ̄)o ─═≡※:☆▆▅▄▃▂_ +(_ _)( - . - )(~O~) ……( - . - ) +(′台` ) + ━┳━ ━┳━ +━━( ̄ー ̄*|||━━ +<(ˉ^ˉ)> +(-_-メ) +...(* ̄0 ̄)ノ + (#`-_ゝ-) +(。﹏。) +(。_。) +( ̄ー ̄(_ _( ̄ー ̄(_ _ +(┬_┬)↘ +d=====( ̄▽ ̄*)b +!!!(  ̄O ̄)ノノ……∞∞OOO))) +!!!(  ̄O ̄)ノノ……∞∞OOO))) +o((⊙﹏⊙))o. +o( ̄ε ̄*) +(○` 3′○) + <(_ _)> +(ˉ▽ˉ;) +σ(-_-メ) +(╯‵□′)╯︵┻━┻ +(((\( ̄一 ̄)/))) + ||Φ|(|T|Д|T|)|Φ|| + (* ̄3 ̄)╭ +>( ̄▽ ̄ =  ̄︿ ̄)< + (/-_-)/ξ ξ ξ ξ ξ ξ (+_+ /)/~~~ +乀ˉεˉ乀... +(-@y@) +(-@y@) +...:.;::..;::: .:.;::….;: ̄)…:.;:□ ̄)( ̄□ ̄*) +.<{=.... +( ̄▽ ̄)~■□~( ̄▽ ̄) +~( ̄▽ ̄)~* +o(*≧▽≦*)m +(* ̄▽)u┌┐ d(▽ ̄*) +(′д`σ)σ +╰( ̄▽ ̄)╭ +U·ェ·*U +U·ェ·U +””\\( ̄ー ̄) ( ̄ー ̄)//”” +└( ̄  ̄└)(┘ ̄  ̄)┘ +o(*^@^*)o +……~(~o ̄▽ ̄)~o 。。。……o~(_△_o~) ~。。。 +(ToT)/~~~ +o(*^▽^*)o +╮╯-╰╭" +( >﹏<) +(╯▽╰ ) +(o゜▽゜)o☆ +( ′Д`)彡 +( ̄。。 ̄) + ┌(_Д_┌ )┐ + ┌(_Д_┌ )┐ +ε=( ̄。 ̄;A +(/0 ̄)o + ~( TロT)σ +((( ̄( ̄( ̄( ̄ー ̄) ̄) ̄) ̄))) +(@^^)/~~~ +(* ̄皿 ̄)=Σ口>=Σ口>=Σ口> +ヾ( ̄ー ̄)X(^▽^)ゞ +(〃 ̄︶ ̄)人( ̄︶ ̄〃) +o^^oo^^o + (o^~^)尸" +||┣(—_\) +<( ̄ ﹌  ̄)@m + (@゜▽゜) + (@`д′) +o(*^▽^*)┛ +┗( T﹏T )┛ +( ̄~ ̄) + ...φ(0 ̄*)啦啦啦_φ(* ̄0 ̄)′ +(°ー°〃) +(@^0^) +( ‵▽′)ノ'卍卍卍卍卍卍 Σ(゜д゜;) + ( `д′) +>< + ( -'`-; ) +┗(`o′)┓哼┏(`○′)┛哼┏(`o′)┓哈┗(`O′)┛兮!! +(o-ωq)).oO +...φ(0 ̄*)_φ(* ̄0 ̄)> +(~o ̄▽ ̄)~o ~。。。 +(o ;′Д`)ノ゛ +(  ̄ー ̄) +(*/ω\*) +(*/ω\*) +(*ˉ﹃ˉ)_☆☆ +(* ̄^ ̄(* ̄^ ̄(* ̄^ ̄) +☆{{{Д}}} ☆!! +(· ·)nnn +╮( ̄▽ ̄")╭ +||o(*°ω°*)o|Ю +ο(=·ω<=)ρ⌒☆ +(一-一) +o( =∩ω∩= )m +>▽< +<(* ̄▽ ̄*)/ +( ̄_, ̄ ) +ε(┬┬﹏┬┬)3 +(~ ̄▽ ̄)ノ +╰( ̄ω ̄o) +_| ̄|○ → _|\○_ → _/\○_ → ____○_ +┏┛墓┗┓...(((m -__-)m +(/// ̄皿 ̄)○~ +(﹁ ﹁ )σ +ヾ(≧へ≦)〃 +o( ̄︶ ̄)n +o(* ̄▽ ̄*)o +Σ(  ̄д ̄;) +ヾ(^▽^*))) + ~( TロT)σ + ~( TロT)σ +゜゜┌┴o゜゜゜゜° + ( -人-)···-~=~≡~≡ ((+o+))) +((( (-h-) ))) +……(((\( ̄一 ̄)/))) +<( ‵□′)>───Cε(┬﹏┬)3 +ε=怒ε=怒ε=怒ε=怒ε=( o`ω′)/ +_( ̄0 ̄)_ +((o_ _)'彡☆ +━((*′д`)爻(′д`*))━!!!! +└( ̄  ̄└)(┘ ̄  ̄)┘ +””\\( ̄ー ̄) ( ̄ー ̄)//”” +o(*≧▽≦)ツ┏━┓ +︿( ̄︶ ̄)︿ +( ^o)ρ┳┻┳°σ(o^ ) + (☆▽☆) +(o ̄Д ̄)<起床! ※=○☆(__*)Zzz +( *′д)/o(_ _)ozzZZ… +( ﹁ ﹁ ) ~~~ +o(* ̄3 ̄)o +(*  ̄)( ̄▽ ̄*)ゞ +(づ ̄ 3 ̄)づ... +∥WC||_·)╯ + ( ̄人 ̄)( ̄人:.;:…( ̄...:.;::..;::: .:;.…::;.:..:;.:... +( ̄▽ ̄)o∠※PAN!=.:*:'☆.:*:'★':* +*★,°*:.☆\( ̄▽ ̄)/$:*.°★* 。 +▄︻┻┳═一∵∴∷∶∵ (∵_,∵)>>>> +( ▼▼)/鹵〈 巛巛巛 ( ◎_x)/ +(* ̄▽ ̄)( ̄▽:;.…::;.:.:::;..::;.:... +(;′⌒`) +z(-_-z)).....((s-_-)s +(  ̄ー ̄)——)-=======>-->> +\( ̄0 ̄)/ +(。_。) +━━∑( ̄□ ̄*|||━━化 +(ˉ▽ˉ;)... +┫♀旦 ̄)σ(呃……) +(σ`д′)σ +(σ`д′)σ +σ~ (`′メ  +(~ ̄▽ ̄)→))* ̄▽ ̄*)o +o( ̄▽ ̄*)ゞ)) ̄▽ ̄*)o +(′д` )…彡…彡 +(:D)┼─┤ +……o((≧▽≦o) +ヽ(*。>Д<)o゜ +\("▔□▔)/\("▔□▔)/ +( *︾▽︾) +(ノω<。)ノ))☆.。 +ヾ(   )ノ゛ヾ( °д)ノ゛ヾ(°д°)ノ゛ヾ(д° )ノ゛ヾ(  )ノ゛ + ヾ(*′▽`*)彡 +<(* ̄ー ̄)ゞ来呀~ +<(* ̄ー ̄)ゞ来啊~ +(/ω\*)……… (/ω·\*) +(/ω·\*) +Σ[ ◎ ]}ー′) +凸艹皿艹 +凸゜皿゜メ +( >ρ < ”) +(o ̄ω ̄)○))o(__*)Zzz +ヽ(゜▽゜ )-C<(/;◇;)/~ +o((≧▽≦o) 太好笑了!! +Σ(⊙▽⊙"a... + (* ̄rǒ ̄) +*★,°*:.☆\( ̄▽ ̄)/$:*.°★* 。 +(← ← ) +( → →) +…〒_〒…‵o′-一┳═┻︻▄ +(#`O′) +( *^-^)ρ(^0^* ) +(* ̄;( ̄ *) +σ(· ·?) +(/▽\) +(。﹏。*) +||ヽ(* ̄▽ ̄*)ノミ|Ю +(~ ̄▽ ̄)~ +o(-"-;) +|(·_·) |·_·) |_·) |·) | ) +o( ̄ヘ ̄o* ) +o( ̄ヘ ̄o#) +( >﹏<。)~ +↑↑↓↓←→←→BA...┗( -o-)┛ +( ‵Д′)=○))~~~~~~Ю))>o<)/ +ヽ(ヽ `д′)ヽ`д′)ヽ`д′)┌┛┌┛┌┛★)`з゜)y +<( ‵□′)───C<─___-)|| +(o  ̄3)==@))゜ロ゜((@==(′ε′ )o  +(o  ̄3)==@))゜ロ゜((@==(′ε′ )o +((≧(≧▽(≧▽≦(≧▽≦)≧▽≦)▽≦)≦))) + ( _ _)ノ|壁 +╮(╯-╰)╭ +<(  ̄︿ ̄)︵θ︵θ︵θ︵θ︵☆(>口<-) +<(  ̄︿ ̄)︵θ︵θ︵θ︵θ︵☆(>口<-) +(╯▽╰ ) +(* ̄□ ̄)( ̄□:;.…::;.:.:::;..::;.:... +<( ̄︶ ̄)↗ +( ‵▽′)ψ +☆⌒(*^-゜)v +(゜゜ )(。。)(゜゜ )(。。) +( ╯▽╰) +不>( ̄ε ̄ =  ̄3 ̄)< +( *⊙~⊙) +( *⊙~⊙) +(* ̄□ ̄)( ̄□:;.…::;.:.:::;..::;.:... +( ̄ム ̄) +(9 ̄^ ̄)9 +(o゜▽゜)o☆ +||o(*°▽°*)o|Ю + +o(一︿一+)o +╔囧╗╔囧╝╚囧╝╚囧╗ +@o@" +X﹏X + o(* ̄▽ ̄*)ブ +(~ ̄(OO) ̄)ブ +(╯‵□′)╯···*~● +ˋ( ° ▽、° ) (o( ̄▽ ̄/// +( ̄︶ ̄)↗ +-______-" + o(〃'▽'〃)o +( `o′){ ···-=≡)) +( `o′){ ···-=≡)) +(o>ε(o>u(≧∩≦) +━━(o_ _)o━━(o―_―)o━━(9 ̄ー ̄)9 +( ゜,_ゝ゜) +(-"-) +o((>ω< ))o +o(>@<)o +( · ·)L☆ .....○ 冂 +ヨロ (*~▽~)ノ ヨロ ヽ(~▽~*)ヨロ (*~▽~)―〇 ☆ バシ ))>口<) +

    © 2010 @ag108lau
    Thanks @OnlyTiny
    +Last Update: 2010-11-13 +

    \ No newline at end of file diff --git a/inc/userlist.php b/inc/userlist.php index 0358777..34b9af8 100644 --- a/inc/userlist.php +++ b/inc/userlist.php @@ -1,188 +1,177 @@ -
    - - - People I'm blocking - - "; - break; - case 'friends': - echo $userid ? " -

    - People " . $userid . " is following -

    - " : " -

    - People I'm following -

    - "; - break; - case 'followers': - echo $userid ? " -

    - People who follow " . $userid . " -

    - " : " -

    - People who follow me -

    - "; - break; - case 'list_members': - echo " -

    - Members of list $id -

    - "; - break; - case 'list_followers': - echo " -

    - Followers of list $id -

    - "; - break; - case 'browse': - echo ""; - break; - } - } - - echo '
    '; - switch ($type) { - case 'blocks': - $p = $p < 1 ? 1 : $p; - $t->type = 'xml'; - $userlist = $t->blockingList($p)->user; - $nextlist = count($userlist) == 20 ? $p + 1 : 0; - $prelist = $p <= 1 ? 0 : $p - 1; - break; - case 'friends': - $t->type = 'xml'; - $userlist = $t->friends($id, $p); - $next_page = $userlist->next_cursor; - $previous_page = $userlist->previous_cursor; - $userlist = $userlist->users->user; - break; - case 'followers': - $t->type = 'xml'; - $userlist = $t->followers($id, $p); - $next_page = $userlist->next_cursor; - $previous_page = $userlist->previous_cursor; - $userlist = $userlist->users->user; - break; - case 'list_members': - $t->type = 'xml'; - $userlist = $t->listMembers($id, $c); - $nextlist = (string) $userlist->next_cursor; - $prelist = (string) $userlist->previous_cursor; - $userlist = $userlist->users->user; - break; - case 'list_followers': - $t->type = 'xml'; - $userlist = $t->listFollowers($id, $c); - $nextlist = (string) $userlist->next_cursor; - $prelist = (string) $userlist->previous_cursor; - $userlist = $userlist->users->user; - break; - case 'browse': - $userlist = $t->followers($id, $p); - break; - } - - $empty = count($userlist) == 0? true: false; - if ($empty) { - if($type == 'blocks'){ - $empty_msg = 'No blocked user to display.'; - }else{ - $empty_msg = 'No tweet to display.'; - } - echo "
    $empty_msg
    "; - } else { - $output = '
      '; - foreach ($userlist as $user) { - $output .= " -
    1. - ".initShortcutMenu($user)." - screen_name."\" target=\"_blank\">profile_image_url)."\" /> - -
      - screen_name\">$user->name $user->screen_name$user->id - Followers: $user->followers_count Following: $user->friends_count Tweets: $user->statuses_count - "; - if ($user->description) $output .= "Bio: $user->description"; - $list_id = explode("/",$id); - if ($type == 'list_members' && $list_id[0] == $t->username) $output .= "删除"; - $output .= " -
      -
    2. - "; - } - $output .= "
    "; - if ($type == 'list_members' || $type == 'list_followers' || $type == 'blocks') { - if ($prelist != 0) $output .= "Back"; - if ($nextlist != 0) $output .= "Next"; - } else { - if ($id) { - if ($p >0) - $output .= "Back"; - if ($next_page != 0) - $output .= "Next"; - } else { - if ($p >0) - $output .= "Back"; - if ($next_page != 0) - $output .= "Next"; - } - } - $output .= "
    "; - - echo $output; - } -?> -
    +
    + + + People I'm blocking + + "; + break; + case 'friends': + echo $userid ? " +

    + People " . $userid . " is following +

    + " : " +

    + People I'm following +

    + "; + break; + case 'followers': + echo $userid ? " +

    + People who follow " . $userid . " +

    + " : " +

    + People who follow me +

    + "; + break; + case 'list_members': + echo " +

    + Members of list $id +

    + "; + break; + case 'list_followers': + echo " +

    + Followers of list $id +

    + "; + break; + case 'browse': + echo ""; + break; + } + } + + echo '
    '; + $p = -1; + switch ($type) { + case 'blocks': + $userlist = $t->blockingList($id, $p); + $next_page = $userlist->next_cursor; + $previous_page = $userlist->previous_cursor; + $userlist = $userlist->users; + break; + case 'friends': + $userlist = $t->friends($id, $p); + $next_page = $userlist->next_cursor; + $previous_page = $userlist->previous_cursor; + $userlist = $userlist->users; + break; + case 'followers': + $userlist = $t->followers($id, $p); + $next_page = $userlist->next_cursor; + $previous_page = $userlist->previous_cursor; + $userlist = $userlist->users; + break; + case 'list_members': + $userlist = $t->listMembers($id, $c); + $nextlist = $userlist->next_cursor_str; + $prelist = $userlist->previous_cursor_str; + $userlist = $userlist->users; + break; + case 'list_followers': + $userlist = $t->listFollowers($id, $c); + $nextlist = $userlist->next_cursor_str; + $prelist = $userlist->previous_cursor_str; + $userlist = $userlist->users; + break; + case 'browse': + $userlist = $t->followers($id, $p); + break; + } + $empty = count($userlist) == 0? true: false; + if ($empty) { + echo "
    No user to display.
    "; + } else { + $output = '
      '; + foreach ($userlist as $user) { + $output .= " +
    1. + + profile_image_url)."\" /> + +
      + screen_name\">$user->name $user->screen_name$user->id + Followers: $user->followers_count Following: $user->friends_count Tweets: $user->statuses_count + "; + if ($user->description) $output .= "Bio: $user->description"; + $list_id = explode("/",$id); + if ($type == 'list_members' && $list_id[0] == $t->username) $output .= "delete"; + $output .= " +
      +
    2. + "; + } + $output .= "
    "; + if ($type == 'list_members' || $type == 'list_followers' || $type == 'blocks') { + if ($prelist != 0) $output .= "Back"; + if ($nextlist != 0) $output .= "Next"; + } else { + if ($id) { + if ($p >0) + $output .= "Back"; + if ($next_page != 0) + $output .= "Next"; + } else { + if ($p >0) + $output .= "Back"; + if ($next_page != 0) + $output .= "Next"; + } + } + $output .= "
    "; + + echo $output; + } +?> +
    diff --git a/index.php b/index.php index 6736f5b..ed9dc2c 100644 --- a/index.php +++ b/index.php @@ -1,90 +1,82 @@ -update($_POST['status'], $_POST['in_reply_to']); - if ($result) { - setUpdateCookie('success'); - - $user = $result->user; - $time = time()+3600*24*365; - if ($user) { - setcookie('friends_count', $user->friends_count, $time, '/'); - setcookie('statuses_count', $user->statuses_count, $time, '/'); - setcookie('followers_count', $user->followers_count, $time, '/'); - setcookie('imgurl', getAvatar($user->profile_image_url), $time, '/'); - setcookie('name', $user->name, $time, '/'); - } - } - else { - setUpdateCookie('error'); - } - } - header('location: index.php'); - } -?> - -
    - -friendsTimeline($p); - $retweetes = $t->retweeted_to_me($p); - if ($statuses === false) { - header('location: error.php'); - } - $empty = count($statuses) == 0 ? true: false; - if ($empty) { - echo "
    No tweet to display.
    "; - } else { - $output = '
      '; - - include('ajax/timeline_format.php'); - if(count($retweetes) > 0){ - $statuses = sort_timeline($statuses, $retweetes); - } - $MAX_STATUSES = 20; - $status_count = 0; - foreach ($statuses as $status) { - if(++$status_count >= $MAX_STATUSES){ - break; - } - if(isset($status->retweeted_status)){ - $output .= format_retweet($status); - }else{ - $output .= format_timeline($status, $t->username); - } - } - - $output .= "
    "; - - if ($p >1) $output .= "Back"; - if (!$empty) $output .= "Next"; - - $output .= "
    "; - - echo $output; - } -?> -
    - - - +update($_POST['status'], $_POST['in_reply_to']); + if ($result) + { + $user = $result->user; + $time = $_SERVER['REQUEST_TIME']+3600*24*365; + if ($user) + { + setcookie('friends_count', $user->friends_count, $time, '/'); + setcookie('statuses_count', $user->statuses_count, $time, '/'); + setcookie('followers_count', $user->followers_count, $time, '/'); + setcookie('imgurl', getAvatar($user->profile_image_url), $time, '/'); + setcookie('name', $user->name, $time, '/'); + } + } + } + header('location: index.php'); + } +?> + +
    +homeTimeline($p); + if ($statuses == false) + { + header('location: error.php');exit(); + } + $count = count($statuses); + $empty = $count == 0 ? true: false; + if ($empty) + { + echo "
    No tweet to display.
    "; + } + else + { + $output = '
      '; + + include('lib/timeline_format.php'); + $maxid = isset($_COOKIE['maxid']) ? $_COOKIE['maxid'] : ''; + foreach ($statuses as $status) { + if($maxid == '' || $p == 1 || strcmp($status->id_str,$maxid) < 0) { + if (isset($status->retweeted_status)) { + $output .= format_retweet($status); + } else { + $output .= format_timeline($status,$t->username); + } + } + } + + $output .= "
    "; + $time = $_SERVER['REQUEST_TIME']+3600; + setcookie('maxid',$statuses[$count-1]->id_str,$time,'/'); + + if ($p >1) $output .= "Back"; + if (!$empty) $output .= "Next"; + echo $output; + } +?> +
    +
    + diff --git a/js/all.js b/js/all.js index 3bf809e..2511670 100644 --- a/js/all.js +++ b/js/all.js @@ -1,177 +1,195 @@ -var INTERVAL_COOKIE = 'updatesInterval'; -$(function () { - formFunc(); - $(".rt_btn").live("click", function (e) { - e.preventDefault(); - onRT($(this)); - }); - $(".retw_btn").live("click", function (e) { - e.preventDefault(); - onNwRT($(this)); - }); - $(".replie_btn").live("click", function (e) { - e.preventDefault(); - onReplie($(this), e); - }); - $(".favor_btn").live("click", function (e) { - e.preventDefault(); - onFavor($(this)); - }); - $(".delete_btn").live("click", function (e) { - e.preventDefault(); - onDelete($(this), "Tweet"); - }); - $(".msg_replie_btn").live("click", function (e) { - e.preventDefault(); - onReplieDM($(this)); - }); - $(".msg_delete_btn").live("click", function (e) { - e.preventDefault(); - onDeleteMsg($(this)); - }); - $(".rt_undo").live("click", function (e) { - e.preventDefault(); - onUndoRt($(this)); - }); - markReply($("#allTimeline > li")); - $("#submit_btn").click(function (e) { - updateStatus(); - e.preventDefault(); - }); - document.onclick = function () { - document.title = document.title.replace(/(\([0-9]+\))/g, ""); - $(".allHighLight").text($(".allHighLight").text().replace(/(\([0-9]+\))/g, "")); - $("#statuses .new").each(function () { - $("#statuses .new").remove(); - }); - } - $("#allReplies").hide(); - $("#allMessage").hide(); - $("#allTimelineBtn").click(function () { - $("#allTimeline").show(); - $("#allReplies").hide(); - $("#allMessage").hide(); - $("#allTimelineBtn").addClass("allHighLight"); - if ($("#allRepliesBtn").hasClass("allHighLight")) $("#allRepliesBtn").removeClass("allHighLight"); - else $("#allMessageBtn").removeClass("allHighLight"); - $("#allTimelineBtn").text($("#allTimelineBtn").text().replace(/(\([0-9]+\))/g, "")); - }) - $("#allRepliesBtn").click(function () { - $("#allTimeline").hide(); - $("#allReplies").show(); - $("#allMessage").hide(); - $("#allRepliesBtn").addClass("allHighLight"); - if ($("#allTimelineBtn").hasClass("allHighLight")) $("#allTimelineBtn").removeClass("allHighLight"); - else $("#allMessageBtn").removeClass("allHighLight"); - $("#allRepliesBtn").text($("#allRepliesBtn").text().replace(/(\([0-9]+\))/g, "")); - }) - $("#allMessageBtn").click(function () { - $("#allTimeline").hide(); - $("#allReplies").hide(); - $("#allMessage").show(); - $("#allMessageBtn").addClass("allHighLight"); - if ($("#allRepliesBtn").hasClass("allHighLight")) $("#allRepliesBtn").removeClass("allHighLight"); - else $("#allTimelineBtn").removeClass("allHighLight"); - $("#allMessageBtn").text($("#allMessageBtn").text().replace(/(\([0-9]+\))/g, "")); - }) - $(function () { - setUpdateInterval(); - }); - }); -var setUpdateInterval = function () { - if (!location.href.split("?")[1] || location.href.split("?")[1] == "p=1") { - var interval = parseFloat($.cookie(INTERVAL_COOKIE)); - if (interval === 0.0) { - return false; - } - interval = interval > 0 ? interval : 3; - UPDATE_INTERVAL = setInterval(function () { - update(); - }, interval * 1000 * 60); - } -}; - -function update() { - if (PAUSE_UPDATE === true) { - window.setTimeout(update, 5000); - } else if (PAUSE_TIMELINE === true) { - return 0; - } else { - if($.cookie("intervalChanged") === "true"){ - clearInterval(UPDATE_INTERVAL); - $.cookie("intervalChanged", "") - setUpdateInterval(); - } - updateSentTip('Retrieving new tweets...', 5000, 'ing'); - updateFunc("timeline"); - updateFunc("replies"); - updateFunc("message"); - } -} - -function updateFunc(type, name, pw) { - PAUSE_TIMELINE = true; - var div, url, btnDiv, param; - switch (type) { - case "timeline": - div = "#allTimeline"; - btnDiv = "#allTimelineBtn"; - url = "ajax/updateTimeline.php"; - $(div + " li.mine").removeClass("mine").addClass("myTweet"); - break; - case "replies": - div = "#allReplies"; - btnDiv = "#allRepliesBtn"; - url = "ajax/updateReplies.php"; - break; - case "message": - div = "#allMessage"; - btnDiv = "#allMessageBtn"; - url = "ajax/updateMessage.php"; - break; - } - var since_id = 0; - if (div === "#allTimeline") { - since_id = $(div + " li:not(.myTweet):not(#ajax_statuses li):first").find("span.status_id").text(); - } else { - since_id = $(div + " li:first-child").find("span.status_id").text(); - } - param = "?since_id=" + since_id; - $.ajax({ - url: url + param, - type: "GET", - dataType: "text", - data: "since_id=" + since_id, - success: function (msg) { - if ($.trim(msg).indexOf("") > 0) { - var source = $(msg).prependTo(div); - if (div === "#allTimeline") { - $(div + " li.myTweet:not(:first)").removeClass("myTweet"); - markReply($('#allTimeline > li')); - } - var num = 0; - var navNum = 0; - if (document.title.match(/\d+/) != null) { - num = parseInt(document.title.match(/\d+/)); - } - var len = $(msg).length - 1; - document.title = "(" + (num + len) + ") " + document.title.replace(/(\([0-9]+\))/g, ""); - if ($(btnDiv).text().match(/\d+/) != null) { - navNum = parseInt($(btnDiv).text().match(/\d+/)); - } - $(btnDiv).text($(btnDiv).text().replace(/(\([0-9]+\))/g, "") + "(" + (navNum + len) + ")"); - filterEle(); - rabrTweet(source); - $(".new").slideDown("fast"); - $(".big-retweet-icon").tipsy({ - gravity: 's' - }); - previewMedia(source); - } - PAUSE_TIMELINE = false; - }, - error: function (msg) { - PAUSE_TIMELINE = false; - } - }); -} +var INTERVAL_COOKIE = 'updatesInterval'; +$(function () { + formFunc(); + $("ol.timeline").click(function(e) { + var $this = $(e.target); + var type = $this.attr('class'); + switch(type) { + case 'rt_btn': + e.preventDefault(); + onRT($this); + break; + case 'retw_btn': + e.preventDefault(); + onNwRT($this); + break; + case 'replie_btn': + e.preventDefault(); + onReplie($this,e); + break; + case 'favor_btn': + e.preventDefault(); + onFavor($this); + break; + case 'unfav_btn': + e.preventDefault(); + UnFavor($this); + break; + case 'delete_btn': + e.preventDefault(); + onDelete($this); + break; + case 'rt_undo': + e.preventDefault(); + onUndoRt($this); + break; + case 'msg_replie_btn': + e.preventDefault(); + onReplieDM($this); + break; + case 'msg_delete_btn': + e.preventDefault(); + onDeleteMsg($this); + break; + } + }); + markReply($("#allTimeline > li")); + $("#submit_btn").click(function (e) { + updateStatus(); + e.preventDefault(); + }); + document.onclick = function () { + document.title = document.title.replace(/(\([0-9]+\))/g, ""); + $(".allHighLight").text($(".allHighLight").text().replace(/(\([0-9]+\))/g, "")); + $("#statuses .new").each(function () { + $("#statuses .new").remove(); + }); + } + $("#allReplies").hide(); + $("#allMessage").hide(); + $("#allTimelineBtn").click(function () { + $("#allTimeline").show(); + $("#allTimeline img").lazyload({threshold : 100, effect : "fadeIn", placeholder:'img/blank.gif'}); + $("#allReplies").hide(); + $("#allMessage").hide(); + $("#allTimelineBtn").addClass("allHighLight"); + if ($("#allRepliesBtn").hasClass("allHighLight")) $("#allRepliesBtn").removeClass("allHighLight"); + else $("#allMessageBtn").removeClass("allHighLight"); + $("#allTimelineBtn").text($("#allTimelineBtn").text().replace(/(\([0-9]+\))/g, "")); + }) + $("#allRepliesBtn").click(function () { + $("#allTimeline").hide(); + $("#allReplies").show(); + $("#allReplies img").lazyload({threshold : 100, effect : "fadeIn",placeholder:'img/blank.gif'}); + $("#allMessage").hide(); + $("#allRepliesBtn").addClass("allHighLight"); + if ($("#allTimelineBtn").hasClass("allHighLight")) $("#allTimelineBtn").removeClass("allHighLight"); + else $("#allMessageBtn").removeClass("allHighLight"); + $("#allRepliesBtn").text($("#allRepliesBtn").text().replace(/(\([0-9]+\))/g, "")); + }) + $("#allMessageBtn").click(function () { + $("#allTimeline").hide(); + $("#allReplies").hide(); + $("#allMessage").show(); + $("#allMessage img").lazyload({threshold : 100, effect : "fadeIn",placeholder:'img/blank.gif'}); + $("#allMessageBtn").addClass("allHighLight"); + if ($("#allRepliesBtn").hasClass("allHighLight")) $("#allRepliesBtn").removeClass("allHighLight"); + else $("#allTimelineBtn").removeClass("allHighLight"); + $("#allMessageBtn").text($("#allMessageBtn").text().replace(/(\([0-9]+\))/g, "")); + $("#allMessage span.date").timeago(); + }) + $(function () { + setUpdateInterval(); + }); + }); +var setUpdateInterval = function () { + if (!location.href.split("?")[1] || location.href.split("?")[1] == "p=1") { + var interval = parseFloat($.cookie(INTERVAL_COOKIE)); + if (interval === 0.0) { + return false; + } + interval = interval > 0 ? interval : 3; + UPDATE_INTERVAL = setInterval(function () { + update(); + }, interval * 1000 * 60); + } +}; + +function update() { + if (PAUSE_UPDATE === true) { + window.setTimeout(update, 5000); + } else if (PAUSE_TIMELINE === true) { + return 0; + } else { + if($.cookie("intervalChanged") === "true"){ + clearInterval(UPDATE_INTERVAL); + $.cookie("intervalChanged", "") + setUpdateInterval(); + } + updateSentTip('Retrieving new tweets...', 5000, 'ing'); + updateFunc("timeline"); + updateFunc("replies"); + updateFunc("message"); + } +} + +function updateFunc(type, name, pw) { + PAUSE_TIMELINE = true; + var div, url, btnDiv, param; + switch (type) { + case "timeline": + div = "#allTimeline"; + btnDiv = "#allTimelineBtn"; + url = "ajax/updateTimeline.php"; + $(div + " li.mine").removeClass("mine").addClass("myTweet"); + break; + case "replies": + div = "#allReplies"; + btnDiv = "#allRepliesBtn"; + url = "ajax/updateReplies.php"; + break; + case "message": + div = "#allMessage"; + btnDiv = "#allMessageBtn"; + url = "ajax/updateMessage.php"; + break; + } + var since_id = 0; + if (div === "#allTimeline") { + since_id = $(div + " li:not(.myTweet):not(#ajax_statuses li):first").find("span.status_id").text(); + } else { + since_id = $(div + " li:first-child").find("span.status_id").text(); + } + $.ajax({ + url: url, + type: "GET", + dataType: "text", + data: "since_id=" + since_id, + success: function (msg) { + if ($.trim(msg).indexOf("") > 0) { + var source = $(msg).prependTo(div); + if (div === "#allTimeline") { + $(div + " li.myTweet:not(:first)").removeClass("myTweet"); + markReply($('#allTimeline > li')); + } + var num = 0; + var navNum = 0; + if (document.title.match(/\d+/) != null) { + num = parseInt(document.title.match(/\d+/)); + } + var len = $(msg).length - 1; + document.title = "(" + (num + len) + ") " + document.title.replace(/(\([0-9]+\))/g, ""); + if ($(btnDiv).text().match(/\d+/) != null) { + navNum = parseInt($(btnDiv).text().match(/\d+/)); + } + $(btnDiv).text($(btnDiv).text().replace(/(\([0-9]+\))/g, "") + "(" + (navNum + len) + ")"); + filterEle(); + embrTweet(source); + if($("div.new").length == 1) { + $("div.new").show().slideDown("fast"); + } else { + $("div.new").filter(":first").remove(); + $("span.tweetcount").filter(":last").text(navNum + len); + } + $("span.big-retweet-icon").tipsy({ + gravity: 's' + }); + previewMedia(source); + } + PAUSE_TIMELINE = false; + }, + error: function (msg) { + PAUSE_TIMELINE = false; + } + }); +} diff --git a/js/browse.js b/js/browse.js index fb8e310..66e1890 100644 --- a/js/browse.js +++ b/js/browse.js @@ -1,24 +1,44 @@ -$(function(){ - $(".rt_btn").click(function(){ - if ($("#textbox").length > 0) { - onRT($(this)); - } else { - $("#browse_title").after(formHTML); - formFunc(); - onRT($(this)); - } - }); - $(".replie_btn").click(function(e){ - e.preventDefault(); - if ($("#textbox").length > 0) { - onReplie($(this)); - } else { - $("#browse_title").after(formHTML); - formFunc(); - onReplie($(this)); - } - }); - $(".favor_btn").live("click", function(){ - onFavor($(this)); - }); +$(function(){ + $("ol.timeline").click(function(e) { + var $this = $(e.target); + var type = $this.attr('class'); + switch(type) { + case 'rt_btn': + e.preventDefault(); + if ($("#textbox").length > 0) { + onRT($this); + } else { + $("#browse_title").after(formHTML); + formFunc(); + onRT($this); + } + break; + case 'retw_btn': + e.preventDefault(); + onNwRT($this); + break; + case 'replie_btn': + e.preventDefault(); + if ($("#textbox").length > 0) { + onReplie($this,e); + } else { + $("#browse_title").after(formHTML); + formFunc(); + onReplie($this,e); + } + break; + case 'favor_btn': + e.preventDefault(); + onFavor($this); + break; + case 'unfav_btn': + e.preventDefault(); + UnFavor($this); + break; + case 'rt_undo': + e.preventDefault(); + onUndoRt($this); + break; + } + }); }); \ No newline at end of file diff --git a/js/btns.js b/js/btns.js index c9f2a48..663fdc7 100644 --- a/js/btns.js +++ b/js/btns.js @@ -1,45 +1,48 @@ $(function(){ formFunc(); - $(".rt_btn").live("click", function(e){ - e.preventDefault(); - onRT($(this)); - }); - - $(".retw_btn").live("click", function(e){ - e.preventDefault(); - onNwRT($(this)); - }); - - $(".replie_btn").live("click", function(e){ - e.preventDefault(); - onReplie($(this), e); - }); - - $(".favor_btn").live("click", function(e){ - e.preventDefault(); - onFavor($(this)); - }); - - $(".delete_btn").live("click", function(e){ - e.preventDefault(); - onDelete($(this), "Tweet"); - }); - - $(".msg_replie_btn").live("click", function(e){ - e.preventDefault(); - onReplieDM($(this)); - }); - - $(".msg_delete_btn").live("click", function(e){ - e.preventDefault(); - onDeleteMsg($(this)); - }); - - $(".rt_undo").live("click", function(e){ - e.preventDefault(); - onUndoRt($(this)); - }); - + $("ol.timeline").live("click", function(e) { + var $this = $(e.target); + var type = $this.attr('class'); + switch(type) { + case 'rt_btn': + e.preventDefault(); + onRT($this); + break; + case 'retw_btn': + e.preventDefault(); + onNwRT($this); + break; + case 'replie_btn': + e.preventDefault(); + onReplie($this,e); + break; + case 'favor_btn': + e.preventDefault(); + onFavor($this); + break; + case 'unfav_btn': + e.preventDefault(); + UnFavor($this); + break; + case 'delete_btn': + e.preventDefault(); + onDelete($this); + break; + case 'rt_undo': + case 'unrt_btn': + e.preventDefault(); + onUndoRt($this); + break; + case 'msg_replie_btn': + e.preventDefault(); + onReplieDM($this); + break; + case 'msg_delete_btn': + e.preventDefault(); + onDeleteMsg($this); + break; + } + }); $("#submit_btn").click(function(e){ updateStatus(); e.preventDefault(); diff --git a/js/formfunc.js b/js/formfunc.js index b150594..501e549 100644 --- a/js/formfunc.js +++ b/js/formfunc.js @@ -1,213 +1,229 @@ -FILTER_COOKIE = 'filKey'; -FILTER_COUNTER = 'filCnt'; -FILTER_KEY_OPT = { - expires: 30 -} -$(function () { - $("#photoBtn").click(function () { - $("#photoArea").slideToggle(100); - }); - $("#imageUploadSubmit").click(function (e) { - e.preventDefault(); - ajaxFileUpload(); - }); - $("#filterBtn").click(function () { - $("#filterArea").slideToggle(100); - }); - $("#symbolBtn").click(function () { - $("#symArea").toggle(); - }); - $("#symbols span").click(function () { - $("#textbox").val($("#textbox").val() + $(this).html()); - $("#symArea").hide(); - leaveWord(); - }); - $("#restoreBtn").click(function () { - $('#textbox').val($.cookie('recover')); - updateSentTip("Your previous tweet has been restored!", 3000, "success"); - }); - $("#autoBtn").click(function(){ - if ($("#autoBtn").hasClass("pause")) { - clearInterval(UPDATE_INTERVAL); - $("#autoBtn").removeClass("pause").addClass("start"); - updateSentTip("Auto refresh deactivated!", 3000, "success"); - } else { - setUpdateInterval(); - $("#autoBtn").removeClass("start").addClass("pause"); - updateSentTip("Auto refresh activated!", 3000, "success"); - update(); - } - }); - $("#refreshBtn").click(function () { - update(); - updateSentTip("Retrieving new tweets...", 3000, "ing"); - }); - $("#transBtn").click(function () { - $("#transArea").slideToggle(100); - }); - $("#filterSubmit").click(function (e) { - e.preventDefault(); - if ($.trim($('#iptFilter').val()).length == 0) { - updateSentTip("Please enter at least one keyword!", 3000, "failure"); - return false; - } else { - $.cookie(FILTER_COOKIE, null); - $.cookie(FILTER_COUNTER, null); - updateSentTip("New keyword: " + $.trim($('#iptFilter').val()) + " added!", 3000, "success"); - filterEle(); - } - }); - $("#filterReset").click(function (e) { - e.preventDefault(); - $.cookie(FILTER_COOKIE, null); - $.cookie(FILTER_COUNTER, null); - $('#iptFilter').val(""); - updateSentTip("Filtered tweets have been restored!", 5000, "success"); - $('#statuses .filter').slideDown("fast"); - }); - $("#filterHide").toggle( - - function () { - $('#statuses .reply').slideUp("fast"); - $('#filterHide').val("Show @"); - }, function () { - $('#statuses .reply').slideDown("fast"); - $('#filterHide').val("Hide @"); - }); - $("#clearBtn").click(function(e){ - e.preventDefault(); - if (confirm("This will sweep your timeline and remove excess tweets, are you sure?")) { - $("#statuses .timeline").each(function(){ - $(this).find("li:gt(19)").remove(); - }); - } - }); - }); -function ajaxFileUpload() { - updateSentTip("Uploading your image...", 10000, "ing"); - $.ajaxFileUpload({ - url: 'ajax/uploadPhoto.php', - secureuri: false, - fileElementId: 'imageFile', - dataType: 'json', - success: function (data, status) { - if (typeof(console) !== 'undefined' && console != null) { - console.info(data); - } - if (typeof(data.result) != 'undefined' && data.result == "success") { - $("#textbox").val($("#textbox").val() + data.url); - updateSentTip("Your image has been uploaded!", 3000, "success"); - $("#photoArea").slideToggle(100); - } else { - updateSentTip("Failed to upload, please try again.", 3000, "failure"); - $("#photoArea").slideToggle(100); - } - }, - error: function (data, status, e) { - updateSentTip("Failed to upload, please try again.", 3000, "failure"); - $("#photoArea").slideToggle(100); - } - }) - return false; -} -function enableFilter() { - if ($.cookie(FILTER_COOKIE) != null && $.cookie(FILTER_COOKIE) != "") { - $('#iptFilter').val(recoverKeywords()); - $.cookie(FILTER_COUNTER, null); - filterEle(); - } -} -function filterEle() { - if ($.trim($('#iptFilter').val()).length == 0) { - return false; - } else { - var objs; - var targets = new Array(); - var keywords = keywordRegexp(); - if (keywords === $.cookie(FILTER_COOKIE)) { - objs = $('#statuses .timeline li:not(.filter:hidden)').find('.status_word'); - } else { - objs = $('#statuses .timeline li').find('.status_word'); - } - var reg = new RegExp(keywords, "i"); - for (i = 0; i < objs.length; i++) { - if (reg.test($(objs[i]).text())) { - targets.push(objs[i]); - } - } - if ($.cookie(FILTER_COUNTER) != null && $.cookie(FILTER_COUNTER) != '') { - $.cookie(FILTER_COUNTER, targets.length + parseInt($.cookie(FILTER_COUNTER))); - } else { - $.cookie(FILTER_COUNTER, targets.length); - } - hideMatched(targets); - $.cookie(FILTER_COOKIE, keywords); - setCounter(); - } -} -function hideMatched(obj) { - $(obj).parent().parent().addClass("filter").hide(); -} -function isMatch(txt, keywords) { - var reg = RegExp(keywords, "i"); - return reg.test(txt); -} -function keywordRegexp() { - if ($.cookie(FILTER_COOKIE) === null) { - return setFilterCookie(); - } else { - return $.cookie(FILTER_COOKIE); - } -} -function recoverKeywords() { - return $.cookie(FILTER_COOKIE).replace(/\|/g, ','); -} -function setFilterCookie() { - var strs = $('#iptFilter').val().split(","); - var keywords = ''; - for (i = 0; i < strs.length; i++) { - if (strs[i] == "") continue; - keywords += strs[i] + "|"; - } - keywords = keywords.substr(0, keywords.length - 1); - return keywords; -} -var option = { expire: 30 }; -$(document).ready(function () { - enableFilter(); - if($.cookie('transLang') === null){ - $.cookie('transLang', 'en', option); - } - if($.cookie('myLangs') === null){ - $.cookie('myLangs', 'en', option); - } - var select = $('#transArea select[name=langs]'); - select.change(function(){ - var val = $(this).val(); - $.cookie('transLang', val, option); - $.cookie('fullLang', $(this).find('option[value=' + val + ']').text(), option); - }); - select.find('option').each(function(){ - var lang = $.cookie('transLang') - if(lang === null){ - lang = 'en'; - } - if($(this).val() === lang){ - $(this).attr('selected', 'selected'); - } - }); - var mylang = $('#transArea select[name=myLangs]'); - mylang.change(function(){ - var val = $(this).val(); - $.cookie('myLangs', val, option); - }); - mylang.find('option').each(function(){ - var lang = $.cookie('myLangs') - if(lang === null){ - lang = 'en'; - } - if($(this).val() === lang){ - $(this).attr('selected', 'selected'); - } - }); - }); +FILTER_COOKIE = 'filKey'; +FILTER_COUNTER = 'filCnt'; +FILTER_KEY_OPT ={ + expires: 30 +} +$(function (){ + $("#photoBtn").click(function (){ + $("#photoArea").slideToggle(100); + }); + $("#imageUploadSubmit").click(function (e){ + e.preventDefault(); + ImageUpload(); + }); + $("#filterBtn").click(function (){ + $("#filterArea").slideToggle(100); + }); + $("#symbolBtn").click(function (){ + $("#symArea").toggle(); + }); + $("#symbols span").click(function (){ + var obj = document.getElementById('textbox'); + var str = $(this).html(); + if(document.selection){ + obj.focus(); + var sel=document.selection.createRange(); + document.selection.empty(); + sel.text = str; + }else{ + var prefix, main, suffix; + prefix = obj.value.substring(0, obj.selectionStart); + main = obj.value.substring(obj.selectionStart, obj.selectionEnd); + suffix = obj.value.substring(obj.selectionEnd); + obj.value = prefix + str + suffix; + } + $("#symArea").hide(); + leaveWord(); + }); + $("#restoreBtn").click(function (){ + $('#textbox').val($.cookie('recover')); + updateSentTip("Your previous tweet has been restored!", 3e3, "success"); + }); + $("#autoBtn").click(function(){ + if ($("#autoBtn").hasClass("pause")){ + clearInterval(UPDATE_INTERVAL); + $("#autoBtn").removeClass("pause").addClass("start"); + updateSentTip("Auto refresh deactivated!", 3e3, "success"); + }else{ + setUpdateInterval(); + $("#autoBtn").removeClass("start").addClass("pause"); + updateSentTip("Auto refresh activated!", 3e3, "success"); + update(); + } + }); + $("#refreshBtn").click(function (){ + update(); + updateSentTip("Retrieving new tweets...", 3e3, "ing"); + }); + $("#transBtn").click(function (){ + $("#transArea").slideToggle(100); + }); + $("#filterSubmit").click(function (e){ + e.preventDefault(); + if ($.trim($('#iptFilter').val()).length == 0){ + updateSentTip("Please enter at least one keyword!", 3e3, "failure"); + return false; + }else{ + $.cookie(FILTER_COOKIE, null); + $.cookie(FILTER_COUNTER, null); + updateSentTip("New keyword: " + $.trim($('#iptFilter').val()) + " added!", 3e3, "success"); + filterEle(); + } + }); + $("#filterReset").click(function (e){ + e.preventDefault(); + $.cookie(FILTER_COOKIE, null); + $.cookie(FILTER_COUNTER, null); + $('#iptFilter').val(""); + updateSentTip("Filtered tweets have been restored!", 5e3, "success"); + $('#statuses .filter').slideDown("fast"); + }); + $("#filterHide").toggle( + + function (){ + $('#statuses .reply').slideUp("fast"); + $('#filterHide').val("Show @"); + }, function (){ + $('#statuses .reply').slideDown("fast"); + $('#filterHide').val("Hide @"); + }); + $("#clearBtn").click(function(e){ + e.preventDefault(); + if (confirm("This will sweep your timeline and remove excess tweets, are you sure?")){ + $("#statuses .timeline").each(function(){ + $(this).find("li:gt(19)").remove(); + }); + } + }); + }); + + function ImageUpload(){ + updateSentTip("Uploading your image...", 10000, "ing"); + $.ajaxFileUpload({ + url: 'ajax/uploadImage.php?do=image', + timeout: 60000, + secureuri: false, + fileElementId: 'imageFile', + dataType: 'json', + success: function (data, status){ + if (typeof(console) !== 'undefined' && console != null){ + console.info(data); + } + if (data.result != undefined && data.result == "success"){ + $("#textbox").val($("#textbox").val() + data.url); + updateSentTip("Your image has been uploaded!", 3e3, "success"); + $("#photoArea").slideToggle(100); + }else{ + updateSentTip("Failed to upload, please try again.", 3e3, "failure"); + $("#photoArea").slideToggle(100); + } + }, + error: function (data, status, e){ + updateSentTip("Failed to upload, please try again.", 3e3, "failure"); + $("#photoArea").slideToggle(100); + } + }) + return false; + } + +function enableFilter(){ + if ($.cookie(FILTER_COOKIE) != null && $.cookie(FILTER_COOKIE) != ""){ + $('#iptFilter').val(recoverKeywords()); + $.cookie(FILTER_COUNTER, null); + filterEle(); + } +} +function filterEle(){ + if ($.trim($('#iptFilter').val()).length == 0){ + return false; + }else{ + var objs; + var targets = []; + var keywords = keywordRegexp(); + if (keywords === $.cookie(FILTER_COOKIE)){ + objs = $('#statuses .timeline li:not(.filter:hidden)').find('.status_word'); + }else{ + objs = $('#statuses .timeline li').find('.status_word'); + } + var reg = new RegExp(keywords, "i"); + for (i = 0; i < objs.length; i++){ + if (reg.test($(objs[i]).text())){ + targets.push(objs[i]); + } + } + if ($.cookie(FILTER_COUNTER) != null && $.cookie(FILTER_COUNTER) != ''){ + $.cookie(FILTER_COUNTER, targets.length + parseInt($.cookie(FILTER_COUNTER))); + }else{ + $.cookie(FILTER_COUNTER, targets.length); + } + hideMatched(targets); + $.cookie(FILTER_COOKIE, keywords); + setCounter(); + } +} +function hideMatched(obj){ + $(obj).parent().parent().addClass("filter").hide(); +} +function isMatch(txt, keywords){ + var reg = RegExp(keywords, "i"); + return reg.test(txt); +} +function keywordRegexp(){ + if ($.cookie(FILTER_COOKIE) === null){ + return setFilterCookie(); + }else{ + return $.cookie(FILTER_COOKIE); + } +} +function recoverKeywords(){ + return $.cookie(FILTER_COOKIE).replace(/\|/g, ','); +} +function setFilterCookie(){ + var strs = $('#iptFilter').val().split(","); + var keywords = ''; + for (i = 0; i < strs.length; i++){ + if (strs[i] == "") continue; + keywords += strs[i] + "|"; + } + keywords = keywords.substr(0, keywords.length - 1); + return keywords; +} +var option ={ expire: 30 }; +$(document).ready(function (){ + enableFilter(); + if($.cookie('transLang') === null){ + $.cookie('transLang', 'en', option); + } + if($.cookie('myLangs') === null){ + $.cookie('myLangs', 'en', option); + } + var select = $('#transArea select[name=langs]'); + select.change(function(){ + var val = $(this).val(); + $.cookie('transLang', val, option); + $.cookie('fullLang', $(this).find('option[value=' + val + ']').text(), option); + }) + .find('option').each(function(){ + var lang = $.cookie('transLang') + if(lang === null){ + lang = 'en'; + } + if($(this).val() === lang){ + $(this).attr('selected', 'selected'); + } + }); + var mylang = $('#transArea select[name=myLangs]'); + mylang.change(function(){ + var val = $(this).val(); + $.cookie('myLangs', val, option); + }) + .find('option').each(function(){ + var lang = $.cookie('myLangs') + if(lang === null){ + lang = 'en'; + } + if($(this).val() === lang){ + $(this).attr('selected', 'selected'); + } + }); + }); diff --git a/js/home.js b/js/home.js index 55537f1..020585d 100644 --- a/js/home.js +++ b/js/home.js @@ -1,101 +1,113 @@ -// Global Const -var INTERVAL_COOKIE = 'homeInterval'; -$(function () { - formFunc(); - $(".rt_btn").live("click", function (e) { - e.preventDefault(); - onRT($(this)); - }); - $(".retw_btn").live("click", function (e) { - e.preventDefault(); - onNwRT($(this)); - }); - $(".replie_btn").live("click", function (e) { - e.preventDefault(); - onReplie($(this), e); - }); - $(".favor_btn").live("click", function (e) { - e.preventDefault(); - onFavor($(this)); - }); - $(".delete_btn").live("click", function (e) { - e.preventDefault(); - onDelete($(this), "Tweet"); - }); - $(".rt_undo").live("click", function (e) { - e.preventDefault(); - onUndoRt($(this)); - }); - markReply($("#allTimeline > li")); - $("#submit_btn").click(function (e) { - updateStatus(); - e.preventDefault(); - }); - document.onclick = function () { - document.title = document.title.replace(/(\([0-9]+\))/g, ""); - $(".new").each(function () { - $(".new").remove(); - }); - } - setUpdateInterval(); -}); -var setUpdateInterval = function () { - if (!location.href.split("?")[1] || location.href.split("?")[1] == "p=1") { - var interval = parseFloat($.cookie(INTERVAL_COOKIE)); - if (interval === 0.0) { - return false; - } - interval = interval > 0 ? interval : 1; - UPDATE_INTERVAL = setInterval(function () { - update(); - }, interval * 1000 * 60); - } -}; -function update() { - if (PAUSE_UPDATE === true) { - window.setTimeout(update, 5000); - } else if (PAUSE_TIMELINE === true) { - return 0; - } else { - PAUSE_TIMELINE = true; - updateSentTip('Retrieving new tweets...', 5000, 'ing'); - if ($.cookie("intervalChanged") === "true") { - clearInterval(UPDATE_INTERVAL); - $.cookie("intervalChanged", "") - setUpdateInterval(); - } - $("#statuses .timeline li.mine").removeClass("mine").addClass("myTweet"); - var since_id = $("#statuses .timeline li:not(.myTweet):not(#ajax_statuses li):first").find(".status_id").text(); - $.ajax({ - url: "ajax/updateTimeline.php", - type: "GET", - dataType: "text", - data: "since_id=" + since_id, - success: function (msg) { - if ($.trim(msg).indexOf("") > 0) { - $("#allTimeline li.myTweet:not(:first)").removeClass("myTweet"); - var source = $(msg).prependTo($(".timeline")); - var num = 0; - if (document.title.match(/\d+/) != null) { - num = parseInt(document.title.match(/\d+/)); - } - document.title = "(" + (num + $(msg).length - 1) + ") " + document.title.replace(/(\([0-9]+\))/g, ""); - markReply($('#allTimeline > li')); - filterEle(); - rabrTweet(source); - $(".new").slideDown("fast"); - $(".big-retweet-icon").tipsy({ - gravity: 's' - }); - previewMedia(source); - } else { - updateSentTip('No new tweets', 3000, 'failure'); - } - PAUSE_TIMELINE = false; - }, - error: function (msg) { - PAUSE_TIMELINE = false; - } - }); - } -} +// Global Const +var INTERVAL_COOKIE = 'homeInterval'; +$(function () { + formFunc(); + $("#allTimeline").click(function(e) { + var $this = $(e.target); + var type = $this.attr('class'); + switch(type) { + case 'rt_btn': + e.preventDefault(); + onRT($this); + break; + case 'retw_btn': + e.preventDefault(); + onNwRT($this); + break; + case 'replie_btn': + e.preventDefault(); + onReplie($this,e); + break; + case 'favor_btn': + e.preventDefault(); + onFavor($this); + break; + case 'unfav_btn': + e.preventDefault(); + UnFavor($this); + break; + case 'delete_btn': + e.preventDefault(); + onDelete($this); + break; + case 'rt_undo': + e.preventDefault(); + onUndoRt($this); + break; + } + }); + markReply($("#allTimeline > li")); + $("#submit_btn").click(function (e) { + e.preventDefault(); + updateStatus(); + }); + $("body").live("click", function (e) { + document.title = document.title.replace(/(\([0-9]+\))/g, ""); + $(".new").remove(); + }); + setUpdateInterval(); +}); +var setUpdateInterval = function () { + if (!location.href.split("?")[1] || location.href.split("?")[1] == "p=1") { + var interval = parseFloat($.cookie(INTERVAL_COOKIE)); + if (interval === 0.0) { + return false; + } + interval = interval > 0 ? interval : 1; + UPDATE_INTERVAL = setInterval(function () { + update(); + }, interval * 1000 * 60); + } +}; +function update() { + if (PAUSE_UPDATE === true) { + window.setTimeout(update, 5000); + } else if (PAUSE_TIMELINE === true) { + return 0; + } else { + PAUSE_TIMELINE = true; + updateSentTip('Retrieving new tweets...', 5000, 'ing'); + if ($.cookie("intervalChanged") === "true") { + clearInterval(UPDATE_INTERVAL); + $.cookie("intervalChanged", "") + setUpdateInterval(); + } + $("ol.timeline li.mine").removeClass("mine").addClass("myTweet"); + var since_id = $("ol.timeline li:not(.myTweet):not(#ajax_statuses li):first").find(".status_id").text(); + $.ajax({ + url: "ajax/updateTimeline.php", + type: "GET", + dataType: "text", + data: "since_id=" + since_id, + success: function (msg) { + if ($.trim(msg).indexOf("") > 0) { + var source = $(msg).prependTo($(".timeline")); + var num = 0; + if (document.title.match(/\d+/) != null) { + num = parseInt(document.title.match(/\d+/)); + } + document.title = "(" + (num + $(msg).length - 1) + ") " + document.title.replace(/(\([0-9]+\))/g, ""); + markReply($('#allTimeline > li')); + filterEle(); + embrTweet(source); + if($("div.new").length == 1) { + $("div.new").show().slideDown("fast"); + } else { + $("div.new").filter(":first").remove(); + $("span.tweetcount").filter(":last").text(num + $(msg).length - 1); + } + $("span.big-retweet-icon").tipsy({ + gravity: 's' + }); + previewMedia(source); + } else { + updateSentTip('No new tweets', 3000, 'failure'); + } + PAUSE_TIMELINE = false; + }, + error: function (msg) { + PAUSE_TIMELINE = false; + } + }); + } +} diff --git a/js/jquery.js b/js/jquery.js index 7c24308..bb67c85 100644 --- a/js/jquery.js +++ b/js/jquery.js @@ -1,154 +1,45 @@ /*! - * jQuery JavaScript Library v1.4.2 - * http://jquery.com/ + * jQuery Plugins Package for Embr + * https://embr.in/ * - * Copyright 2010, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2010, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Sat Feb 13 22:33:48 2010 -0500 + * Copyright 2010-2011, Plugins Authors + * Packaged by Contributors + * + * Currently including: + * - Cookie + * - Color + * - Tipsy + * - Lazy Load + * - Infinite Scroll + * - Autocomplete + * - Timeago + * - caret + * - ajaxFileupload */ -(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, -Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& -(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, -a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== -"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, -function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
    a"; -var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, -parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= -false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= -s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, -applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; -else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, -a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== -w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, -cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= -c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); -a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, -function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); -k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), -C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type= -e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& -f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; -if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", -e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, -"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, -d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, -e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); -t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| -g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, -CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, -g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, -text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, -setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= -h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== -"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, -h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& -q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=""; -if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="

    ";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); -(function(){var g=s.createElement("div");g.innerHTML="
    ";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: -function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= -{},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== -"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", -d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? -a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== -1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"},F={option:[1,""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
    ","
    "];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= -c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, -wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, -prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, -this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); -return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, -""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); -return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", -""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= -c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? -c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= -function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= -Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, -"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= -a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= -a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=//gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== -"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("
    ").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, -serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), -function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, -global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& -e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? -"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== -false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= -false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", -c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| -d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); -g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== -1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== -"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; -if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== -"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| -c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; -this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= -this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, -e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
    "; -a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); -c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, -d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- -f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": -"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in -e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); + +//Cookie +jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options=$.extend({},options);options.expires=-1}var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000))}else{date=options.expires}expires='; expires='+date.toUTCString()}var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('')}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i
    ');b.css({position:"absolute",zIndex:1e5});a.data(this,"active.tipsy",b)}if(a(this).attr("title")||typeof a(this).attr("original-title")!="string"){a(this).attr("original-title",a(this).attr("title")||"").removeAttr("title")}var d;if(typeof c.title=="string"){d=a(this).attr(c.title=="title"?"original-title":c.title)}else if(typeof c.title=="function"){d=c.title.call(this)}b.find(".tipsy-inner")[c.html?"html":"text"](d||c.fallback);var e=a.extend({},a(this).offset(),{width:this.offsetWidth,height:this.offsetHeight});b.get(0).className="tipsy";b.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).appendTo(document.body);var f=b[0].offsetWidth,g=b[0].offsetHeight;var h=typeof c.gravity=="function"?c.gravity.call(this):c.gravity;switch(h.charAt(0)){case"n":b.css({top:e.top+e.height,left:e.left+e.width/2-f/2}).addClass("tipsy-north");break;case"s":b.css({top:e.top-g,left:e.left+e.width/2-f/2}).addClass("tipsy-south");break;case"e":b.css({top:e.top+e.height/2-g/2,left:e.left-f}).addClass("tipsy-east");break;case"w":b.css({top:e.top+e.height/2-g/2,left:e.left+e.width}).addClass("tipsy-west");break}if(c.fade){b.css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:.8})}else{b.css({visibility:"visible"})}},function(){a.data(this,"cancel.tipsy",false);var b=this;setTimeout(function(){if(a.data(this,"cancel.tipsy"))return;var d=a.data(b,"active.tipsy");if(c.fade){d.stop().fadeOut(function(){a(this).remove()})}else{d.remove()}},100)})})};a.fn.tipsy.elementOptions=function(b,c){return a.metadata?a.extend({},c,a(b).metadata()):c};a.fn.tipsy.defaults={fade:false,fallback:"",gravity:"n",html:false,title:"title"};a.fn.tipsy.autoNS=function(){return a(this).offset().top>a(document).scrollTop()+a(window).height()/2?"s":"n"};a.fn.tipsy.autoWE=function(){return a(this).offset().left>a(document).scrollLeft()+a(window).width()/2?"e":"w"}})(jQuery); + +//Lazy Load +(function(a){a.fn.lazyload=function(b){var c={threshold:0,failurelimit:0,event:"scroll",effect:"show",container:window};if(b){a.extend(c,b)}var d=this;if("scroll"==c.event){a(c.container).bind("scroll",function(b){var e=0;d.each(function(){if(a.abovethetop(this,c)||a.leftofbegin(this,c)){}else if(!a.belowthefold(this,c)&&!a.rightoffold(this,c)){a(this).trigger("appear")}else{if(e++>c.failurelimit){return false}}});var f=a.grep(d,function(a){return!a.loaded});d=a(f)})}this.each(function(){var b=this;if(undefined==a(b).attr("original")){a(b).attr("original",a(b).attr("src"))}if("scroll"!=c.event||undefined==a(b).attr("src")||c.placeholder==a(b).attr("src")||a.abovethetop(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.rightoffold(b,c)){if(c.placeholder){a(b).attr("src",c.placeholder)}else{a(b).removeAttr("src")}b.loaded=false}else{b.loaded=true}a(b).one("appear",function(){if(!this.loaded){a("").bind("load",function(){a(b).hide().attr("src",a(b).attr("original"))[c.effect](c.effectspeed);b.loaded=true}).attr("src",a(b).attr("original"))}});if("scroll"!=c.event){a(b).bind(c.event,function(c){if(!b.loaded){a(b).trigger("appear")}})}});a(c.container).trigger(c.event);return this};a.belowthefold=function(b,c){if(c.container===undefined||c.container===window){var d=a(window).height()+a(window).scrollTop()}else{var d=a(c.container).offset().top+a(c.container).height()}return d<=a(b).offset().top-c.threshold};a.rightoffold=function(b,c){if(c.container===undefined||c.container===window){var d=a(window).width()+a(window).scrollLeft()}else{var d=a(c.container).offset().left+a(c.container).width()}return d<=a(b).offset().left-c.threshold};a.abovethetop=function(b,c){if(c.container===undefined||c.container===window){var d=a(window).scrollTop()}else{var d=a(c.container).offset().top}return d>=a(b).offset().top+c.threshold+a(b).height()};a.leftofbegin=function(b,c){if(c.container===undefined||c.container===window){var d=a(window).scrollLeft()}else{var d=a(c.container).offset().left}return d>=a(b).offset().left+c.threshold+a(b).width()};a.extend(a.expr[":"],{"below-the-fold":"$.belowthefold(a, {threshold : 0, container: window})","above-the-fold":"!$.belowthefold(a, {threshold : 0, container: window})","right-of-fold":"$.rightoffold(a, {threshold : 0, container: window})","left-of-fold":"!$.rightoffold(a, {threshold : 0, container: window})"})})(jQuery); + +//Infinite Scroll +(function(a){a.fn.infinitescroll=function(b,c){function l(){if(n.isDone){i();return false}else{var b=o.children().get();if(b.length==0){return a.event.trigger("ajaxError",[{status:404}])}else{m.callback(o)}while(o[0].firstChild){p.appendChild(o[0].firstChild)}a(m.contentSelector)[0].appendChild(p);n.loadingMsg.fadeOut("normal");if(m.animate){var d=a(window).scrollTop()+a("#infscr-loading").height()+m.extraScrollPx+"px";a("html,body").animate({scrollTop:d},800,function(){n.isDuringAjax=false})}c.call(a(m.contentSelector)[0],b);if(!m.animate)n.isDuringAjax=false}}function k(){n.isDuringAjax=true;n.loadingMsg.appendTo(m.contentSelector).show();a(m.navSelector).hide();n.currPage++;d("heading into ajax",r);o=a(m.contentSelector).is("table")?a(""):a("
    ");p=document.createDocumentFragment();o.load(r.join(n.currPage)+" "+m.itemSelector,null,l)}function j(){if(n.isDuringAjax||n.isInvalidPage||n.isDone)return;if(!h(m,n))return;a(document).trigger("retrieve.infscr")}function i(){n.loadingMsg.find("img").hide().parent().find("div").html(m.donetext).animate({opacity:1},2e3).fadeOut("normal");m.errorCallback()}function h(){var b=0+g()-(m.localMode?a(n.container).scrollTop():a(n.container).scrollTop()||a(n.container.ownerDocument.body).scrollTop())-a(m.localMode?n.container:window).height();d("math:",b,n.pixelsFromNavToBottom);var c=b;var e=n.pixelsFromNavToBottom;return b-m.bufferPx-1&&a(b[c]).length===0){d("Your "+c+" found no elements.");return false}return true}}function d(){if(m.debug){window.console&&console.log.call(console,arguments)}}a.browser.ie6=a.browser.msie&&a.browser.version<7;var m=a.extend({},a.infinitescroll.defaults,b),n=a.infinitescroll,o,p;c=c||function(){};if(!e(m)){return false}n.container=m.localMode?this:document.documentElement;m.contentSelector=m.contentSelector||this;var q=/(.*?\/\/).*?(\/.*)/,r=a(m.nextSelector).attr("href");if(!r){d("Navigation selector not found");return}r=f(r);if(m.localMode)a(n.container)[0].scrollTop=0;n.pixelsFromNavToBottom=n.container==document.documentElement?300:g()+a(n.container).offset().top-a(m.navSelector).offset().top;n.loadingMsg=a('
  • Loading... '+m.loadingText+"
  • ");(new Image).src=m.loadingImg;a(document).ajaxError(function(b,c,e){d("Page not found. Self-destructing...");if(c.status==404){i();n.isDone=true;a(m.localMode?this:window).unbind("scroll.infscr")}});a(m.localMode?this:window).bind("scroll.infscr",j).trigger("scroll.infscr");a(document).bind("retrieve.infscr",k);return this};a.infinitescroll={defaults:{debug:false,preload:false,nextSelector:"a#more:last",loadingImg:"img/square.gif",loadingText:" Please wait...",donetext:"Sorry, but we have no more loading for you!",navSelector:"div.navigation",contentSelector:null,extraScrollPx:150,itemSelector:"#allTimeline li",animate:false,localMode:false,bufferPx:400,errorCallback:function(){},callback:undefined},loadingImg:undefined,loadingMsg:undefined,container:undefined,currPage:1,currDOMChunk:null,isDuringAjax:false,isInvalidPage:false,isDone:false}})(jQuery); + +//Autocomplete +(function(a){a.fn.extend({autocomplete:function(b,c){var d=typeof b=="string";c=a.extend({},a.Autocompleter.defaults,{url:d?b:null,data:d?null:b,delay:d?a.Autocompleter.defaults.delay:10,max:c&&!c.scroll?10:150},c);c.highlight=c.highlight||function(a){return a};c.formatMatch=c.formatMatch||c.formatItem;return this.each(function(){new a.Autocompleter(this,c)})},result:function(a){return this.bind("result",a)},search:function(a){return this.trigger("search",[a])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(a){return this.trigger("setOptions",[a])},unautocomplete:function(){return this.trigger("unautocomplete")}});a.Autocompleter=function(b,c){function x(){e.removeClass(c.loadingClass)}function w(b){var d=[];var e=b.split("\n");for(var f=0;f0){var i={timestamp:+(new Date)};a.each(c.extraParams,function(a,b){i[a]=typeof b=="function"?b():b});a.ajax({mode:"abort",port:"autocomplete"+b.name,dataType:c.dataType,url:c.url,data:a.extend({q:q(d),limit:c.max},i),success:function(a){var b=c.parse&&c.parse(a)||w(a);h.add(d,b);e(d,b)}})}else{l.emptyList();f(d)}}function u(a,b){if(b&&b.length&&i){x();l.display(b,a);r(a,b[0].value);l.show()}else{t()}}function t(){var d=l.visible();l.hide();clearTimeout(f);x();if(c.mustMatch){e.search(function(a){if(!a){if(c.multiple){var b=p(e.val()).slice(0,-1);e.val(b.join(c.multipleSeparator)+(b.length?c.multipleSeparator:""))}else e.val("")}})}if(d)a.Autocompleter.Selection(b,b.value.length,b.value.length)}function s(){clearTimeout(f);f=setTimeout(t,200)}function r(f,h){if(c.autoFill&&q(e.val()).toLowerCase()==f.toLowerCase()&&j!=d.BACKSPACE){e.val(e.val()+h.substring(q(g).length));a.Autocompleter.Selection(b,g.length,g.length+h.length)}}function q(a){if(!c.multiple)return a;var b=p(a);return b[b.length-1]}function p(b){if(!b){return[""]}var d=b.split(c.multipleSeparator);var e=[];a.each(d,function(b,c){if(a.trim(c))e[b]=a.trim(c)});return e}function o(a,b){if(j==d.DEL){l.hide();return}var f=e.val();if(!b&&f==g)return;g=f;f=q(f);if(f.length>=c.minChars){e.addClass(c.loadingClass);if(!c.matchCase)f=f.toLowerCase();v(f,u,t)}else{x();l.hide()}}function n(){var a=l.selected();if(!a)return false;var b=a.result;g=b;if(c.multiple){var d=p(e.val());if(d.length>1){b=d.slice(0,d.length-1).join(c.multipleSeparator)+c.multipleSeparator+b}b+=c.multipleSeparator}e.val(b);t();e.trigger("result",[a.data,a.value]);return true}var d={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var e=a(b).attr("autocomplete","off").addClass(c.inputClass);var f;var g="";var h=a.Autocompleter.Cache(c);var i=0;var j;var k={mouseDownOnSelect:false};var l=a.Autocompleter.Select(c,b,n,k);var m;a.browser.opera&&a(b.form).bind("submit.autocomplete",function(){if(m){m=false;return false}});e.bind((a.browser.opera?"keypress":"keydown")+".autocomplete",function(b){j=b.keyCode;switch(b.keyCode){case d.UP:b.preventDefault();if(l.visible()){l.prev()}else{o(0,true)}break;case d.DOWN:b.preventDefault();if(l.visible()){l.next()}else{o(0,true)}break;case d.PAGEUP:b.preventDefault();if(l.visible()){l.pageUp()}else{o(0,true)}break;case d.PAGEDOWN:b.preventDefault();if(l.visible()){l.pageDown()}else{o(0,true)}break;case c.multiple&&a.trim(c.multipleSeparator)==","&&d.COMMA:case d.TAB:case d.RETURN:if(n()){b.preventDefault();m=true;return false}break;case d.ESC:l.hide();break;default:clearTimeout(f);f=setTimeout(o,c.delay);break}}).focus(function(){i++}).blur(function(){i=0;if(!k.mouseDownOnSelect){s()}}).click(function(){if(i++>1&&!l.visible()){o(0,true)}}).bind("search",function(){function c(a,c){var d;if(c&&c.length){for(var f=0;f1?arguments[1]:null;a.each(p(e.val()),function(a,b){v(b,c,c)})}).bind("flushCache",function(){h.flush()}).bind("setOptions",function(){a.extend(c,arguments[1]);if("data"in arguments[1])h.populate()}).bind("unautocomplete",function(){l.unbind();e.unbind();a(b.form).unbind(".autocomplete")});};a.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(a){return a[0]},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(a,b){return a.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+b.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"$1")},scroll:true,scrollHeight:180};a.Autocompleter.Cache=function(b){function h(){c={};d=0}function g(){if(!b.data)return false;var c={},d=0;if(!b.url)b.cacheLength=1;c[""]=[];for(var e=0,g=b.data.length;eb.cacheLength){h()}if(!c[a]){d++}c[a]=e}function e(a,c){if(!b.matchCase)a=a.toLowerCase();var d=a.indexOf(c);if(b.matchContains=="word"){d=a.toLowerCase().search("\\b"+c.toLowerCase())}if(d==-1)return false;return d==0||b.matchContains}var c={};var d=0;setTimeout(g,25);return{flush:h,add:f,populate:g,load:function(f){if(!b.cacheLength||!d)return null;if(!b.url&&b.matchContains){var g=[];for(var h in c){if(h.length>0){var i=c[h];a.each(i,function(a,b){if(e(b.value,f)){g.push(b)}})}}return g}else if(c[f]){return c[f]}else if(b.matchSubset){for(var j=f.length-1;j>=b.minChars;j--){var i=c[f.substr(0,j)];if(i){var g=[];a.each(i,function(a,b){if(e(b.value,f)){g[g.length]=b}});return g}}}return null}}};a.Autocompleter.Select=function(b,c,d,e){function s(){m.empty();var c=r(i.length);for(var d=0;d").html(b.highlight(e,j)).addClass(d%2==0?"ac_even":"ac_odd").appendTo(m)[0];a.data(k,"ac_data",i[d])}g=m.find("li");if(b.selectFirst){g.slice(0,1).addClass(f.ACTIVE);h=0}if(a.fn.bgiframe)m.bgiframe()}function r(a){return b.max&&b.max=g.size()){h=0}}function p(a){g.slice(h,h+1).removeClass(f.ACTIVE);q(a);var c=g.slice(h,h+1).addClass(f.ACTIVE);if(b.scroll){var d=0;g.slice(0,h).each(function(){d+=this.offsetHeight});if(d+c[0].offsetHeight-m.scrollTop()>m[0].clientHeight){m.scrollTop(d+c[0].offsetHeight-m.innerHeight())}else if(d").hide().addClass(b.resultsClass).css("position","absolute").appendTo(document.body);m=a("
      ").appendTo(l).mouseover(function(b){if(o(b).nodeName&&o(b).nodeName.toUpperCase()=="LI"){h=a("li",m).removeClass(f.ACTIVE).index(o(b));a(o(b)).addClass(f.ACTIVE)}}).click(function(b){a(o(b)).addClass(f.ACTIVE);d();c.focus();return false}).mousedown(function(){e.mouseDownOnSelect=true}).mouseup(function(){e.mouseDownOnSelect=false});if(b.width>0)l.css("width",b.width);k=false}var f={ACTIVE:"ac_over"};var g,h=-1,i,j="",k=true,l,m;return{display:function(a,b){n();i=a;j=b;s()},next:function(){p(1)},prev:function(){p(-1)},pageUp:function(){if(h!=0&&h-8<0){p(-h)}else{p(-8)}},pageDown:function(){if(h!=g.size()-1&&h+8>g.size()){p(g.size()-1-h)}else{p(8)}},hide:function(){l&&l.hide();g&&g.removeClass(f.ACTIVE);h=-1},visible:function(){return l&&l.is(":visible")},current:function(){return this.visible()&&(g.filter("."+f.ACTIVE)[0]||b.selectFirst&&g[0])},show:function(){var d=a(c).offset();l.css({width:typeof b.width=="string"||b.width>0?b.width:a(c).width(),top:d.top+c.offsetHeight,left:d.left}).show();if(b.scroll){m.scrollTop(0);m.css({maxHeight:b.scrollHeight,overflow:"auto"});if(a.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var e=0;g.each(function(){e+=this.offsetHeight});var f=e>b.scrollHeight;m.css("height",f?b.scrollHeight:e);if(!f){g.width(m.width()-parseInt(g.css("padding-left"))-parseInt(g.css("padding-right")))}}}},selected:function(){var b=g&&g.filter("."+f.ACTIVE).removeClass(f.ACTIVE);return b&&b.length&&a.data(b[0],"ac_data")},emptyList:function(){m&&m.empty()},unbind:function(){l&&l.remove()}}};a.Autocompleter.Selection=function(a,b,c){if(a.createTextRange){var d=a.createTextRange();d.collapse(true);d.moveStart("character",b);d.moveEnd("character",c);d.select()}else if(a.setSelectionRange){a.setSelectionRange(b,c)}else{if(a.selectionStart){a.selectionStart=b;a.selectionEnd=c}}a.focus()}})(jQuery); + +//Timeago +(function(a){function f(a){return(new Date).getTime()-a.getTime()}function e(a){return b.inWords(f(a))}function d(b){b=a(b);var c=a.trim(b.attr("id"));if(!b.data("timeago")){b.data("timeago",{datetime:new Date(c*1e3)})}return b.data("timeago")}function c(){var b=d(this);if(!isNaN(b.datetime)){a(this).text(e(b.datetime))}return this}a.timeago=function(a){if(a instanceof Date){return e(a)}};var b=a.timeago;a.extend(a.timeago,{settings:{refreshMillis:6e4,allowFuture:false,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",seconds:"%d seconds",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",numbers:[]}},inWords:function(b){function k(d,e){var f=a.isFunction(d)?d(e,b):d;var g=c.numbers&&c.numbers[e]||e;return f.replace(/%d/i,g)}var c=this.settings.strings;var d=c.prefixAgo;var e=c.suffixAgo;if(this.settings.allowFuture){if(b<0){d=c.prefixFromNow;e=c.suffixFromNow}b=Math.abs(b)}var f=b/1e3;var g=f/60;var h=g/60;var i=h/24;var j=i/365;var l=f<45&&k(c.seconds,Math.round(f))||f<90&&k(c.minute,1)||g<45&&k(c.minutes,Math.round(g))||g<90&&k(c.hour,1)||h<24&&k(c.hours,Math.round(h))||h<48&&k(c.day,1)||i<30&&k(c.days,Math.floor(i))||i<60&&k(c.month,1)||i<365&&k(c.months,Math.floor(i/30))||j<2&&k(c.year,1)||k(c.years,Math.floor(j));return a.trim([d,l,e].join(" "))}});a.fn.timeago=function(){var a=this;a.each(c);var d=b.settings;if(d.refreshMillis>0){setInterval(function(){a.each(c)},d.refreshMillis)}return a}})(jQuery); + +//caret +(function(a){a.extend(a.fn,{caret:function(a,b){var c=this[0];if(c){if(typeof a=="undefined"){if(c.selectionStart){a=c.selectionStart;b=c.selectionEnd}else if(document.selection){var d=this.val();var e=document.selection.createRange().duplicate();e.moveEnd("character",d.length);a=e.text==""?d.length:d.lastIndexOf(e.text);e=document.selection.createRange().duplicate();e.moveStart("character",-d.length);b=e.text.length}}else{var d=this.val();if(typeof a!="number")a=-1;if(typeof b!="number")b=-1;if(a<0)a=0;if(b>d.length)b=d.length;if(bb)a=b;c.focus();if(c.selectionStart){c.selectionStart=a;c.selectionEnd=b}else if(document.selection){var e=c.createTextRange();e.collapse(true);e.moveStart("character",a);e.moveEnd("character",b-a);e.select()}}return{start:a,end:b}}}})})(jQuery); + +//ajaxFileupload +jQuery.extend({createUploadIframe:function(a,b){var c="jUploadFrame"+a;var d=''; +EMBED_FRAME = ''; +function getFlashReg(sSite) { + switch (sSite) { + case 'www.xiami.com': + EMBED_FRAME = XIAMI_EMBED; + return /[\S]+\.xiami\.com\/song\/([\d]+)[\S]*/i; + break; + case 'www.tudou.com': + EMBED_FRAME = TUDOU_EMBED; + return /[\S]+.tudou.[\S]+\/([\w-]+)[\S]*/i; + break; + case 'v.youku.com': + EMBED_FRAME = YOUKU_EMBED; + return /[\S]+.youku.com\/v_show\/id_([\w-]+)[\S]*(.html)/i; + break; + case 'youtu.be': + EMBED_FRAME = YOUTUBE_EMBED; + return /youtu.be\/([\w-_?]+)[\S]*/i; + break; + case 'www.youtube.com': + EMBED_FRAME = YOUTUBE_EMBED; + return /[\S]+.youtube.[\S]+\/watch\?v=([\w-_?]+)[\S]*/i; + break; + case 'v.ku6.com': + EMBED_FRAME = KU6_EMBED; + return /[\S]+.ku6.com\/show\/([\w-]+)[\S]*(.html)/i; + case 'vimeo.com': + EMBED_FRAME = VIMEO_EMBED; + return /vimeo.com\/(\d+)[\S]*/i; + default: + return null; + } +} +var previewFlash = function (obj) { + var reg = /http:\/\/([\w]*[\.]*[\w]+\.[\w]+)\//i; + var embed = ""; + var href = obj.attr("href"); + if (reg.exec(href.toLowerCase()) !== null) { + var re = getFlashReg(RegExp.$1); + if (re !== null) { + if (re.exec(href) !== null) { + embed = EMBED_FRAME.replace(/src_id/, RegExp.$1); + $(embed).appendTo(obj.parent().parent().find(".tweet")); + } + } + } +} + +function get_img_processor(type) { + switch (type) { + case "instagr.am": + proc = { + reg: /^http:\/\/(?:www\.)?instagr\.am\/([\w\/]+)/, + func: function (url_key, url_elem) { + var src = "http://instagr.am/" + url_key[1] + "media/?size=m"; + append_image(src, url_elem); + } + }; + return proc; + case "twitgoo.com": + proc = { + reg: /^http:\/\/(?:www\.)?twitgoo\.com\/(\w+)/, + func: function (url_key, url_elem) { + var src = "img.php?imgurl=http://twitgoo.com/show/thumb/" + url_key[1]; + append_image(src, url_elem); + } + }; + return proc; + case "yfrog.com": + proc = { + reg: /^http:\/\/(?:www\.)?yfrog\.com\/(\w+)/, + func: function (url_key, url_elem) { + var src = "img.php?imgurl=" + url_key[0] + ":iphone"; + append_image(src, url_elem); + } + }; + return proc; + case "twitpic.com": + proc = { + reg: /^http:\/\/(?:www\.)?twitpic\.com\/(\w+)/, + func: function (url_key, url_elem) { + var src = "img.php?imgurl=http://twitpic.com/show/large/" + url_key[1]; + append_image(src, url_elem); + } + }; + return proc; + case "img.ly": + proc = { + reg: /^http:\/\/(?:www\.)?img\.ly\/(\w+)/, + func: function (url_key, url_elem) { + var src = "img.php?imgurl=http://img.ly/show/medium/" + url_key[1]; + append_image(src, url_elem); + } + }; + return proc; + case "ow.ly": + proc = { + reg: /^http:\/\/(?:www\.)?ow\.ly\/i\/(\w+)/, + func: function (url_key, url_elem) { + var src = "img.php?imgurl=http://static.ow.ly/photos/thumb/" + url_key[1] + ".jpg"; + append_image(src, url_elem); + } + }; + return proc; + case "tweetphoto.com": + proc = { + reg: /^http:\/\/(?:www\.)?tweetphoto\.com\/(\w+)/, + func: function (url_key, url_elem) { + var src = "http://api.plixi.com/api/TPAPI.svc/imagefromurl?size=medium&url=" + url_key[0]; + append_image(src, url_elem); + } + }; + return proc; + case "plixi.com": + proc = { + reg: /^http:\/\/(?:www\.)?plixi\.com\/p\/(\w+)/, + func: function (url_key, url_elem) { + var src = "http://api.plixi.com/api/tpapi.svc/imagefromurl?size=medium&url=http://plixi.com/p/" + url_key[1]; + append_image(src, url_elem); + } + }; + return proc; + case "hellotxt.com": + proc = { + reg: /^http:\/\/(?:www\.)?hellotxt.com\/i\/(\w+)/, + func: function (url_key, url_elem) { + var src = "http://hellotxt.com/image/" + url_key[1] + ".s.jpg" + append_image(src, url_elem); + } + }; + return proc; + case "moby.to": + proc = { + reg: /^(http:\/\/(?:www\.)?moby\.to\/(\w+))/, + func: function (url_key, url_elem) { + var src = "http://api.mobypicture.com?s=small&format=plain&k=OozRuDDauQlucrZ3&t=" + url_key[1]; + append_image(src, url_elem); + } + }; + return proc; + case "p.twipple.jp": + proc = { + reg: /^http:\/\/(?:p\.)?twipple\.jp\/(\w+)/, + func: function (url_key, url_elem) { + var src = "img.php?url=http://p.twipple.jp/show/large/" + url_key[1]; + append_image(src, url_elem); + } + }; + return proc; + case "picplz.com": + proc = { + reg: /^http:\/\/(?:www\.)?picplz\.com\/(\w+)/, + func: function(url_key, url_elem) { + $.getJSON('http://api.picplz.com/api/v2/pic.json?pic_formats=400r&callback=?&shorturl_id='+url_key[1],function (data) { + if (data.result == "ok") { + var imgsrc = data.value.pics[0].pic_files["400r"].img_url; + append_image(imgsrc, url_elem); + } + }); + } + }; + return proc; + case "flic.kr": + proc = { + reg: /^http:\/\/(?:www\.)?flic\.kr\/p\/(\w+)/, + func: function (url_key, url_elem) { + function base58_decode(snipcode) { + var alphabet = '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'; + var num = snipcode.length; + var decoded = 0; + var multi = 1; + for (var i = (num - 1); i >= 0; i--) { + decoded = decoded + multi * alphabet.indexOf(snipcode[i]); + multi = multi * alphabet.length; + } + return decoded; + } + var id = base58_decode(url_key[1]); + var apiKey = '4ef2fe2affcdd6e13218f5ddd0e2500d'; + var url = "http://api.flickr.com/services/rest/?method=flickr.photos.getInfo&api_key=" + apiKey + "&photo_id=" + id; + $.getJSON(url + "&format=json&jsoncallback=?", function (data) { + if (data.stat == "ok") { + var imgsrc = "img.php?imgurl=http://farm" + data.photo.farm + ".static.flickr.com/" + data.photo.server + "/" + data.photo.id + "_" + data.photo.secret + "_m.jpg"; + append_image(imgsrc, url_elem); + } + }); + } + }; + return proc; + case "twitxr.com": + proc = { + reg: /^http:\/\/(?:www\.)?twitxr.com\/[^ ]+\/updates\/(\d+)/, + func: function (url_key, url_elem) { + var src = 'http://twitxr.com/thumbnails/' + url_key[1].substr(-2, 2) + '/' + url_key[1] + '_th.jpg'; + append_image(src, url_elem); + } + }; + return proc; + default: + return null; + } +} +var append_image = function(src, elem) { + var img = $('').attr("src", src); + var link = $(elem).clone().empty().append(img); + $(elem).parent().after($('
      ').append(link)); +} +var previewImg = function (obj) { + var rel = obj.attr("href"); + /(https?\:\/\/[\S]*\.(jpg|png|gif))/.exec(obj.attr("href")); + if(RegExp.$2.length == 3){ + append_image(RegExp.$1, obj); + return; + } + /https?\:\/\/(?:www\.)?([\w-.]+)\/[\S]*/i.exec(obj.attr("href")); + var img_processor = get_img_processor(RegExp.$1); + if (img_processor === null) { + return null; + } + if ((img_url_key = img_processor.reg.exec(obj.attr("href"))) != null) { + obj.attr("alt", "image"); + img_processor.func(img_url_key, obj); + } +} +var previewMedia = function (objs) { + var temp =[]; + objs.find("span.tweet a[rel^=noref], span.tweet_url").each(function () { + var t = $(this); + var href = t.attr("href"); + if(!(href in temp) && !t.data("previewed")) { + if ($.cookie('showpic') === 'true') previewImg(t); + if ($.cookie('mediaPre') === 'true') previewFlash(t); + temp[href]=true; + } + t.data("previewed",true); + }); +} +// Check if jQuery's loaded +function GM_wait() { + if (typeof $ == 'undefined') { + window.setTimeout(GM_wait, 100); + } + else { + $(document).ready(function () { + previewMedia($('.timeline')); + }); + } +} +GM_wait(); \ No newline at end of file diff --git a/js/message.js b/js/message.js index 297a2f9..1470aa5 100644 --- a/js/message.js +++ b/js/message.js @@ -1,35 +1,50 @@ -$(document).ready(function(){ - $(".delete_btn").click(function(e){ - e.preventDefault(); - - var $this = $(this); - var message_id = $.trim($this.parent().parent().find(".status_id").text()); - var confirm = window.confirm("Are you sure to delete this message?"); - - if (confirm) { - updateSentTip("Deleting message..."); - $.ajax({ - url: "ajax/delete.php", - type: "POST", - data: "message_id=" + message_id, - success: function(msg) { - if (msg.indexOf("success") >= 0) { - $this.parent().parent().parent().remove(); - updateSentTip("Message deleted."); - } else { - updateSentTip("Failed to delete this message!"); - } - }, - error: function(msg) { - updateSentTip("Failed to delete this message!"); - } - }); +//message function +$(function () { + formFunc(); + var temp = []; + var auto = []; + $("a.user_name").each(function(){ + var u = this.text; + if (!(u in temp)) { + temp[u] = true; + auto.push(u); } }); + $("#sent_id").autocomplete(auto); + $("#allMessage").click(function(e) { + var $this = $(e.target); + var type = $this.attr('class'); + switch(type) { + case 'msg_replie_btn': + e.preventDefault(); + $("#sent_id").val($this.parent().parent().find(".status_word").find(".user_name").text()); + $("#textbox").focus(); + break; + case 'msg_delete_btn': + e.preventDefault(); + var message_id = $.trim($this.parent().parent().find(".status_id").text()); + var confirm = window.confirm("Are you sure to delete this message?"); - $(".msg_replie_btn").click(function(e){ - e.preventDefault(); - $("#sent_id").val($(this).parent().parent().find(".status_word").find(".user_name").text()); - $("#textbox").focus(); + if (confirm) { + updateSentTip("Deleting message...", 5000, "ing"); + $.ajax({ + url: "ajax/delete.php", + type: "POST", + data: "message_id=" + message_id, + success: function(msg) { + if (msg.indexOf("success") >= 0) { + $this.parent().parent().parent().remove(); + updateSentTip("Message deleted.", 3000, "success"); + } else { + updateSentTip("Failed to delete this message!", 3000, "failure"); + } + }, + error: function(msg) { + updateSentTip("Failed to delete this message!", 3000, "failure"); + } + }); + } + break; + } }); -}); +}); \ No newline at end of file diff --git a/js/public.js b/js/public.js index d09f073..3a6ad4d 100644 --- a/js/public.js +++ b/js/public.js @@ -1,981 +1,1218 @@ -var UPDATE_INTERVAL; -var PAUSE_UPDATE = false; -var PAUSE_TIMELINE = false; -function register() { - window.open("signup/index.php", "registerwindow", "height=450, width=550, toolbar=no, menubar=no, scrollbars=no, resizable=yes, location=yes, status=yes") -}; -function oauth() { - var wtfgfw = window.confirm("Please make sure your proxy is ready to visit Twitter.com before authenticating."); - if (wtfgfw) { - window.location.href = "oauth.php" - } -}; -function leaveWord(num) { - if(!num){ - num = 140; - } - var leave = num-$("#textbox").val().length; - if (leave < 0) { - $("#tip").css("color","#CC0000"); - $("#tip b").css("color","#CC0000"); - $("#tip").html("-" + (-leave) + ""); - $("#tweeting_button").addClass('btn-disabled'); - } else { - $("#tip").css("color","#CCCCCC"); - $("#tip b").css("color","#CCCCCC"); - $("#tip").html("" + leave + ""); - $("#tweeting_button").removeClass('btn-disabled'); - } - if(leave === 140) { - $("#in_reply_to").val(""); - $("#tweeting_button").addClass('btn-disabled'); - } -} -var formHTML = '140
      '; -formHTML += ''; -formHTML += ''; -formHTML += '
      '; -function rabrTweet(objs) { - if(typeof objs === 'undefined'){ - var objs = $('#statuses .timeline .source a'); - }else{ - var objs = objs.find('.source a'); - } - for (i = 0; i < objs.length; i++) { - if (/rabr/i.test($(objs[i]).text())) { - $(objs[i]).css("color", "#33CCFF"); - } - } -} -var getConversation = function (obj) { - var url = $(obj).attr("href"); - var target = $(obj).parent().parent().parent().parent(); - $.ajax({ - url: url, - type: "GET", - dataType: "text", - success: function(msg){ - if ($.trim(msg).indexOf("") > 0) { - $(msg).appendTo(target); - }else{ - updateSentTip('Get thread failed.', 5000, 'failure'); - } - target.removeClass("loading"); - }, - error: function(msg){ - updateSentTip('Get thread failed.', 5000, 'failure'); - target.removeClass("loading"); - } - }); -} -$(function () { - $(".ajax_reply").live("click", function (e) { - var obj = $(this).parent().parent().parent().parent(); - var thread = obj.find(".ajax_form"); - if (thread.size() > 0) { - thread.slideToggle("fast"); - } else { - obj.addClass("loading"); - getConversation($(this)); - } - e.preventDefault(); - }); - }); -$(function(){ - $("#statuses .trans_btn").live("click", function(){ - var tBody = $(this).parent().parent(); - if(tBody.find(".trans_body").size() !== 0){ - return; - } - var id = $.trim(tBody.find('.status_id').text()); - var text = $.trim(tBody.find('.tweet').text()); - var lang = $.cookie('transLang'); - if(lang === null){ - lang = 'zh'; - } - tBody.parent().addClass('loading'); - translate(text, id, lang, 'transCallback'); - }); - $("#statuses .trans_close").live("click", function(){ - $(this).parent().parent().parent().parent().find(".translated").remove(); - }); - $("#translateMy").live("click", function(){ - var orig = $("#textbox").val(); - ORIG_TEXT = orig; - var lang = $.cookie('myLangs') - if(lang === null){ - lang = 'en'; - } - $('#tip').addClass('loading'); - translate(orig, '', lang, 'transMyCallback'); - }); - $("#transRecover").live("click", function(){ - $("#textbox").val(ORIG_TEXT); - $("#transRecover").fadeOut('fast'); - }); - }); -var translate = function(text, context, lang, callback) { - var a = "http://www.google.com/uds/Gtranslate"; - a += "?callback=" + callback; - a += "&context=" + context; - a += "&q=" + encodeURIComponent(text); - a += "&key=notsupplied"; - a += "&v=1.0"; - a += "&nocache=1240207680396"; - a += "&langpair=%7C" + lang; - $.getScript(a); -}; -var transMyCallback = function(content, translation){ - if(translation.translatedText !== null){ - $('#tip').removeClass('loading'); - $("#transArea").hide(); - $("#textbox").val(translation.translatedText); - $("#transRecover").fadeIn('fast'); - } -}; -var transCallback = function(content, translation){ - if(translation.translatedText !== null){ - var lang = $.cookie('transLang') - if(lang === null){ - lang = 'zh'; - } - var langTxt = $.cookie('fullLang'); - if(langTxt === null){ - langTxt = $('#transArea select[name=langs] option[value=' + lang + ']').text(); - } - var html = '
      (Hide)Translation (from ' + translation.detectedSourceLanguage; - html += ' to ' + langTxt + ') : '; - html += '' + translation.translatedText + '
      '; - var li, target; - if(typeof INTERVAL_COOKIE !== 'undefined'){ - li = $("#statuses ol:visible li:has(.status_id)").filter(":contains(" + content + ")"); - target = li.find(".status_word:first"); - }else{ - li = $("#statuses li:has(.status_id)").filter(":contains(" + content + ")"); - target = li.find(".status_word:first"); - } - $(html).appendTo(target); - li.removeClass("loading"); - } -}; -$(window).load(function(){ - var scrollTo = function (top, duration, callback) { - var w = $(window); - var FPS = 50; - var currentTop = w.scrollTop(); - var offset = (currentTop - top) / (duration * FPS / 1000); - var n = 0; - var prevTop = currentTop; - var t = setInterval(function () { - if ((prevTop - top) * (currentTop - top) <= 0) { - clearInterval(t); - currentTop = prevTop = top; - w.scrollTop(top); - if (callback) callback(); - } else { - prevTop = currentTop; - w.scrollTop(currentTop -= offset); - } - }, 1000 / FPS); - } - var scrollToTop = function(){ - scrollTo(0, 200, function () { - scrollTo(30, 50, function () { - scrollTo(0, 50); - }); - }); - }; - var scrollToBottom = function(){ - var height = document.body.clientHeight; - scrollTo(height, 200, function () { - scrollTo(height + 30, 50, function () { - scrollTo(height, 50); - }); - }); - - }; - $('body').dblclick(function () { - scrollToTop(); - $("#textbox").focus(); - }); - $('#content').dblclick(function (e) { - e.stopPropagation(); - }); - var hkFadeIn = function(text){ - $("#shortcutTip").fadeIn("fast").html(text); - }; - var hkFadeOut = function(){ - setTimeout(function () {$("#shortcutTip").fadeOut("fast");}, 2000); - }; - // hotkeys - var hotkeyHandler = function(code){ - switch(code){ - case 82: // R - refresh - hkFadeIn("Refresh"); - update(); - hkFadeOut(); - break; - case 67: // C - focus textbox - case 85: // U - hkFadeIn("Compose"); - scrollTo(0, 1, function () { - $("#textbox").focus(); - }); - hkFadeOut(); - break; - case 66: // B - scroll to bottom - hkFadeIn("Boom!"); - scrollToBottom(); - hkFadeOut(); - break; - case 84: // T - scroll to top - hkFadeIn("Whiz!"); - scrollToTop(); - hkFadeOut(); - break; - case 83: // S - search - hkFadeIn("Search"); - $("#sidepost").animate({backgroundColor: "#FF6347"}, 500, function(){ - $("#header_search_query").focus(); - $("#sidepost").animate({backgroundColor: $("#side_base").css("background-color")}, 1000); - }); - hkFadeOut(); - break; - } - }; - $(document).keydown(function(e){ - var tag = e.target.tagName; - if(tag === "BODY" || tag === "HTML"){ - if(!e.altKey && !e.shiftKey && !e.ctrlKey && !e.metaKey){ - hotkeyHandler(e.keyCode); - } - } - }); - }); -$(document).ready(function () { - $("
    " > 0)) { - $("#trend_entries").html(msg); - } - $("#trends_title").removeClass().addClass("open"); - $("#trend_entries").slideDown("fast"); - } - }); - } - $(function () { - $("#trends_title").toggle( - function () { - $("#trends_title").removeClass().addClass("loading"); - updateTrends(); - }, function () { - $("#trend_entries").slideUp("fast"); - $("#trends_title").removeClass(); - }); - }); - function updateFollowing() { - $.ajax({ - url: "ajax/updateFollowing.php", - type: "GET", - success: function (msg) { - if ($.trim(msg).indexOf("" > 0)) { - $("#following_list").html(msg); - } - $("#following_title").removeClass().addClass("open"); - $("#following_list").slideDown("fast"); - } - }); - } - $(function () { - $("#following_title").toggle( - function () { - $("#following_title").removeClass().addClass("loading"); - updateFollowing(); - }, function () { - $("#following_list").slideUp("fast"); - $("#following_title").removeClass(); - }); - }); - $(function () { - $("#toolbox_title").toggle( - function () { - $("#toolbox_title").removeClass().addClass("open"); - $("#tools_list").slideDown("fast"); - }, function () { - $("#tools_list").slideUp("fast"); - $("#toolbox_title").removeClass(); - }); - }); - $(function () { - $(".status_author img, .rank_img img").live("click", function (e) { - $(".right_menu").hide(); - $(this).parent().parent().find(".right_menu").css("display", "block"); - e.preventDefault(); - }); - $('body').click(function () { - $(".right_menu").hide(); - }); - $('.status_author li a').click(function () { - $(".right_menu").hide(); - }); - $(".rm_mention").live("click", function (e) { - e.preventDefault(); - rmmention($(this), e); - }); - $(".rm_dm").live("click", function (e) { - e.preventDefault(); - rmdm($(this), e); - }); - $(".rm_follow").live("click", function (e) { - e.preventDefault(); - var $this = $(this); - var id = $this.parent().parent().parent().find(".status_word").find(".user_name").text(); - updateSentTip("Following " + id + "...", 5000, "ing"); - $.ajax({ - url: "ajax/relation.php", - type: "POST", - data: "action=create&id=" + id, - success: function (msg) { - if (msg.indexOf("success") >= 0) { - updateSentTip("You have followed " + id + "!", 3000, "success"); - } else { - updateSentTip("Failed to follow " + id + ", please try again.", 3000, "failure"); - } - }, - error: function (msg) { - updateSentTip("Failed to follow " + id + ", please try again.", 3000, "failure"); - } - }); - }); - $(".rm_unfollow").live("click", function (e) { - e.preventDefault(); - var $this = $(this); - var id = $this.parent().parent().parent().find(".status_word").find(".user_name").text(); - if (confirm("Are you sure to unfollow " + id + " ?")) { - updateSentTip("Unfollowing " + id + "...", 5000, "ing"); - $.ajax({ - url: "ajax/relation.php", - type: "POST", - data: "action=destory&id=" + id, - success: function (msg) { - if (msg.indexOf("success") >= 0) { - updateSentTip("You have unfollowed " + id + "!", 3000, "success"); - } else { - updateSentTip("Failed to unfollow " + id + ", please try again.", 3000, "failure"); - } - }, - error: function (msg) { - updateSentTip("Failed to unfollow " + id + ", please try again.", 3000, "failure"); - } - }); - } - }); - $(".rm_block").live("click", function (e) { - e.preventDefault(); - var $this = $(this); - var id = $this.parent().parent().parent().find(".status_word").find(".user_name").text(); - if (confirm("Are you sure to block " + id + " ?")) { - updateSentTip("Blocking " + id + "...", 5000, "ing"); - $.ajax({ - url: "ajax/relation.php", - type: "POST", - data: "action=block&id=" + id, - success: function (msg) { - if (msg.indexOf("success") >= 0) { - updateSentTip("You have blocked " + id + "!", 3000, "success"); - } else { - updateSentTip("Failed to block " + id + ", please try again.", 3000, "failure"); - } - }, - error: function (msg) { - updateSentTip("Failed to block " + id + ", please try again.", 3000, "failure"); - } - }); - } - }); - }) - $(".rm_spam").live("click", function (e) { - e.preventDefault(); - var $this = $(this); - var id = $this.parent().parent().parent().find(".status_word").find(".user_name").text(); - if (confirm("Are you sure to report " + id + " ?")) { - updateSentTip("Reporting " + id + " as a spammer...", 5000, "ing"); - $.ajax({ - url: "ajax/reportSpam.php", - type: "POST", - data: "spammer=" + id, - success: function (msg) { - if (msg.indexOf("success") >= 0) { - updateSentTip("Successfully reported!", 3000, "success"); - } else { - updateSentTip("Failed to report " + id + ", please try again.", 3000, "failure"); - } - }, - error: function (msg) { - updateSentTip("Failed to report " + id + ", please try again.", 3000, "failure"); - } - }); - } - }); - function rmmention($this, e) { - var replie_id = $this.parent().parent().parent().find(".status_word").find(".user_name").text(); - var in_reply_id = $this.parent().parent().parent().find(".status_id").text(); - var text = "@" + replie_id; - var mode = "In reply to "; - scroll(0, 0); - $("#textbox").focus(); - $("#textbox").val($("#textbox").val() + text + ' '); - $("#in_reply_to").val(in_reply_id); - $("#full_status").hide(); - $("#latest_meta").html("").hide(); - $("#full_meta").hide(); - $("#currently .full-text").hide(); - $("#latest_meta").hide(); - $("#currently .status-text").html(mode + text); - leaveWord(); - } - function rmdm($this, e) { - var replie_id = $this.parent().parent().parent().find(".status_word").find(".user_name").text(); - var text = "D " + replie_id; - scroll(0, 0); - $("#textbox").focus(); - $("#textbox").val($("#textbox").val() + text + ' '); - $("#in_reply_to").val($this.parent().parent().parent().find(".status_id").text()); - $("#full_status").hide(); - $("#latest_meta").hide(); - $("#full_meta").hide(); - $("#currently .full-text").hide(); - $("#latest_meta").hide(); - $("#currently .status-text").html("Reply direct message to @" + replie_id); - leaveWord(); - } - function sidebarFollow(id) { - updateSentTip("Following " + id + "...", 5000, "ing"); - $.ajax({ - url: "ajax/relation.php", - type: "POST", - data: "action=create&id=" + id, - success: function (msg) { - if (msg.indexOf("success") >= 0) { - updateSentTip("You have followed " + id + "!", 3000, "success"); - $.cookie('followus', 1, { - expire: 30 - }); - $.cookie('whofollowedus', $("#sideid").html(), { - expire: 30 - }); - $("#follow_us").fadeOut("fast"); - } else { - updateSentTip("Failed to follow " + id + ", please try again.", 3000, "failure"); - } - }, - error: function (msg) { - updateSentTip("Failed to follow " + id + ", please try again.", 3000, "failure"); - } - }); - }; - $(function () { - $('#fl_ds').click(function (e) { - e.preventDefault(); - if (confirm("Are you sure to follow @disinfeqt?")) { - sidebarFollow("disinfeqt"); - } - }); - $('#fl_ys').click(function (e) { - e.preventDefault(); - if (confirm("Are you sure to follow @Chris_Ys?")) { - sidebarFollow("chris_ys"); - } - }); - }) - //sidebar shortcuts tips - $(function () { - $("#sidebarTip").toggle( - function () { - $('#sidebarTip_more').slideDown('fast'); - $('#indicator').html('[-]'); - }, function () { - $('#sidebarTip_more').slideUp('fast'); - $('#indicator').html('[+]'); - }); - }); - //init global functions - $(document).ready(function () { - rabrTweet(); - $("#statuses .mine").live("mouseout", function (e) { - $(this).removeClass("mine").addClass("myTweet"); - }); - $("#primary_nav li a").bind("click", function () { - $("#primary_nav li a").each(function (i, o) { - if ($(this).hasClass("active")) { - $(this).removeClass() - } - }); - $(this).removeClass().addClass("active").css("background", "transparent url('../img/spinner.gif') no-repeat scroll 173px center") - }); - $("#statuses .big-retweet-icon, #func_set .func_btn").tipsy({ - gravity: 's' - }); - $('#symbols span').tipsy({ - gravity: $.fn.tipsy.autoNS - }); - if ($.cookie('followus') == 1 && $.cookie('whofollowedus') == $("#sideid").html()) { - $("#follow_us").hide(); - } - $(".timeline img").lazyload({threshold : 100, effect : "fadeIn"}); - }); - var freshProfile = function(){ - $('#update_count').text($.cookie('statuses_count')); - $('#user_stats a[href*=friends] span.count').text(parseInt($.cookie('friends_count'))); - $('#user_stats a[href*=followers] span.count').text(parseInt($.cookie('followers_count'))); - $('#user_stats a[href*=lists] span.count').text(parseInt($.cookie('listed_count'))); - }; - var markReply = function(obj){ - obj.each(function (i, o) { - if ($(this).find("> span").find('.tweet').text().toLowerCase().indexOf("@" + $("#sideid").text().toLowerCase()) > -1) { - $(this).addClass("reply"); - } - }); - }; \ No newline at end of file +var UPDATE_INTERVAL; +var PAUSE_UPDATE = false; +var PAUSE_TIMELINE = false; +//form function +function updateSentTip(message,duration,className){ + var sentTip = $("#sentTip"); + var bgColor = $("body").css("background-color"); + sentTip.html(message).removeClass().addClass(className) + .css({ + "border-style": "solid", + "border-width": "1px", + "border-color": "transparent" + }).slideDown("fast"); + setTimeout(function (){ + sentTip.slideUp('fast'); + },duration); + return sentTip; +}; +function leaveWord(num){ + if(!num){ + num = 140; + } + var leave = num-$("#textbox").val().length; + var sent_id = $("#sent_id").val(); + var $tb = $("#tip b"); + if (sent_id){ + leave -= sent_id.length+3; + } + if (leave < 0){ + $tb.text(leave).css("color","#C00"); + $("#tweeting_button").addClass('btn-disabled'); + }else{ + $tb.text(leave); + $("#tweeting_button").removeClass('btn-disabled'); + if (leave > 40){ + $tb.css("color","#CCC"); + }else if(leave > 20){ + $tb.css("color","#CAA"); + }else if(leave > 10){ + $tb.css("color","#C88"); + }else{ + $tb.css("color","#C44"); + } + } + if(leave === 140){ + $("#in_reply_to").val(""); + $("#tweeting_button").addClass('btn-disabled'); + } +} +var formHTML = '140
    '; + +var embrTweet=function(objs){ + if(typeof objs === 'undefined'){ + var objs = $('#statuses .timeline .source a'); + }else{ + var objs = objs.find('.source a'); + } + objs.each(function (){ + var $this = $(this); + if (/embr/i.test($this.text())) $this.addClass('embr'); + }); + if($("span.date a").length > 0){ + $("span.date a,#latest_meta a,#full_meta a").timeago(); + }else{ + $("span.date,#latest_meta a,#full_meta a").timeago(); + } +} +var formFunc = function(){ + leaveWord(); + $("#textbox").keyup(function (e){ + leaveWord(); + $(e.target).unbind('keydown'); + if ((e.ctrlKey || e.metaKey) && e.which == 13){ + if (PAUSE_UPDATE !== true){ + updateStatus(); + }else{ + return 0; + } + }else{ + if($.inArray(e.which,[91,93,224,17]) > -1){ + $(e.target).keydown(function(e){ + if(e.which == 13){ + if (PAUSE_UPDATE !== true){ + updateStatus(); + }else{ + return 0; + } + e.stopPropagation(); + } + }); + } + } + }); + $("#tweeting_button").click(function (e){ + e.preventDefault(); + if ($("#textbox").val().length >0 ){ + updateStatus(); + } + }); +}; + var updateStatus = function(){ + PAUSE_UPDATE = true; + var text = $("#textbox").val(); + var sent_id = $("#sent_id").val(); + if(sent_id){ + text = "D "+sent_id+' '+text; + } + var wordsCount = text.length; + if (wordsCount > 140){ + $.cookie('recover',text,{'expire': 30}); + if(window.confirm("Your tweet is longer than 140 words! truncated? (you can restore later using restore button.)")){ + text = text.substr(0,137)+'...' ; + } + } + if (wordsCount == 0 || $.trim(text).length == 0){ + updateSentTip("Your cannot send an empty tweet!",3e3,"failure"); + return false; + }else{ + $('#tip').addClass('loading').find('b').css('color','transparent'); + $.cookie('recover',text,{'expire': 30}); + $.ajax({ + url: "ajax/update.php", + type: "POST", + data:{ + "status": text, + "in_reply_to": $("#in_reply_to").val() + }, + success: function (msg){ + if ($.trim(msg).indexOf("") > 0){ + $('#tip').removeClass('loading').find("b").text("140").show(); + if ( (text.substring(0,2)).toUpperCase() == "D "){ //exclude the DMs. the exam of user_name is omitted. + updateSentTip("Your DM has been sent!",3e3,"success"); + $("#sent_id,#textbox").val(""); + leaveWord(); + }else{ + updateSentTip("Your status has been updated!",3e3,"success"); + $("#textbox").val(""); + leaveWord(); + if(typeof INTERVAL_COOKIE !== 'undefined'){ + var source = $(msg).prependTo($("#allTimeline")); + source.hide().slideDown('fast'); + var statusid = $.trim($(msg).find('.status_id').text()); + var statusText = $.trim($(msg).find('.tweet').html()); + embrTweet(source); + $(".mine").slideDown("fast"); + $("#full_status").fadeIn("fast"); + $("#currently .status-text").hide().text(limitation(text)).fadeIn("fast"); + $("#latest_meta").hide().html("less than 5 seconds ago").fadeIn("fast"); + $("#currently .full-text").hide().html(statusText); + $("#full_meta").hide().html("less than 5 seconds ago"); + $("#full_meta a,.full-text a").click(function (e){e.stopPropagation();}); + previewMedia(source); + freshProfile(); + } + } + }else{ + $('#tip').removeClass('loading'); + leaveWord(); + updateSentTip("Update failed. Please try again.",3e3,"failure"); + $('#tweeting_button').removeClass('btn-disabled'); + } + PAUSE_UPDATE = false; + }, + error: function (msg){ + $('#tip').removeClass('loading'); + leaveWord(); + updateSentTip("Update failed. Please try again.",3e3,"failure"); + $('#tweeting_button').removeClass('btn-disabled'); + PAUSE_UPDATE = false; + } + }); + } +}; +function shortUrlDisplay(){ + var stringVar = $("#textbox").val(); + if (stringVar.length === 0){ + updateSentTip("There's no URL in your tweet to shorten!",3e3,"failure"); + }else{ + var str = ''; + var regexp = /http(s)?:\/\/([\w\-]+\.)+[\w\-]+(\/[\w\-\.\/?\%\!\&=\+\~\:\#\;\,]*)?/ig; + var l_urls = ''; + str = stringVar.match(regexp); + if (str !== null){ + unshorten = 0; + for (idx = 0; idx < str.length; idx++){ + regexp2 = /(http:\/\/j.mp\/[\S]+)|(http:\/\/bit.ly\/[\S]+)|(http:\/\/goo.gl\/[\S]+)|(http:\/\/t.co\/[\S]+)/gi; + if (!str[idx].match(regexp2)){ + l_urls += str[idx]+"|"; + }else{ + unshorten++; + } + } + if (unshorten){ + updateSentTip(unshorten+" URL(s) are maintained!",3e3,"failure"); + } + if (l_urls != ""){ + $('#tip').addClass('loading').find('b').css('color','transparent'); + $.post("ajax/shorturl.php",{ + long_urls: l_urls + },function (data){ + getShortUrl(data); + }); + } + } + } +} +function getShortUrl(res){ + var $textbox = $('#textbox'); + var url_arry,s_url,l_url,part; + var err_cnt = 0; + url_arry = res.split('^'); + for (i = 0; i < url_arry.length; i++){ + part = url_arry[i].split('|'); + if (part.length == 2){ + s_url = part[0]; + l_url = part[1]; + } + if (s_url){ + $textbox.val($textbox.val().replace(l_url,s_url)+""); + leaveWord(); + $('#tip').removeClass('loading'); + updateSentTip("Successfully shortened your URLs!",3e3,"success"); + } else{ + err_cnt++; + } + } + if (err_cnt > 0){ + updateSentTip("Failed to shorten URLs,please try again.",3e3,"failure"); + } +} + +function shortenTweet(){ + var tweet = $.trim($("#textbox").val()); + if (tweet.length === 0){ + updateSentTip("There's nothing to shorten!",3e3,"failure"); + }else{ + $('#tip').addClass('loading'); + $.ajax({ + url: "ajax/shortenTweet.php", + type: "POST", + data: "text="+tweet, + success: function(msg){ + if(msg !== 'error'){ + $("#textbox").val(msg); + leaveWord(); + $('#tip').removeClass('loading'); + updateSentTip("Your tweet has been shortened!",5e3,"success"); + }else{ + updateSentTip("Failed to shorten your tweet.",5e3,"failure"); + } + }, + error: function(msg){ + updateSentTip("Failed to shorten your tweet.",5e3,"failure"); + } + }); + } +} +$(function (){ + $("#latest_status").toggle( + function (){ + $("#currently .status-text,#latest_meta").css("display","none"); + $("#currently .full-text,#full_meta").css("display","inline"); + },function (){ + $("#currently .status-text,#latest_meta").css("display","inline"); + $("#currently .full-text,#full_meta").css("display","none"); + }); + $("#full_meta a,.full-text a").click(function (e){ + e.stopPropagation(); + }); + var $temp = $("#currently .status-text"); + $temp.text(limitation($temp.text())); + $("#translateMy").live("click",function(){ + var orig = $("#textbox").val(); + ORIG_TEXT = orig; + var lang = $.cookie('myLangs') + if(lang === null){ + lang = 'en'; + } + $('#tip').addClass('loading'); + translate(orig,'',lang,'transMyCallback'); + }); +}); +var limitation = function (text){ + if (text.length > 60){ + text = text.substr(0,60)+" ..."; + } + return text; +}; +function ajax_reply($this){ + var $that = $this.parent().parent().parent().parent(); + var thread = $that.find(".ajax_form"); + if (thread.length > 0){ + thread.slideToggle("fast"); + }else{ + $that.addClass("loading"); + $.ajax({ + url: $this.attr("href"), + type: "GET", + dataType: "text", + success: function(msg){ + $that.removeClass("loading"); + if ($.trim(msg).indexOf("") > 0){ + var source = $(msg).appendTo($that); + embrTweet(source); + }else{ + updateSentTip('Get thread failed.',5e3,'failure'); + } + }, + error: function(msg){ + updateSentTip('Get thread failed.',5e3,'failure'); + $that.removeClass("loading"); + } + }); + } +} +//tweet function + +function rminit($this){ + var $that = $this.parent().parent().parent(); + var $rm = $that.find(".right_menu"); + if($rm.length > 0){ + $rm.fadeIn('fast'); + }else{ + var id = $that.find(".status_word").find(".user_name").text(); + $that.addClass("loading"); + $.ajax({ + url: 'ajax/relation.php', + type: "POST", + data: "action=show&id="+id, + success: function(msg){ + var html = ''; + $this.parent().parent().after(html); + $(html).fadeIn('fast'); + $that.removeClass(); + }, + error: function(){ + updateSentTip('Loading Avatar Menu Failed,Please Retry!',3e3,"failure"); + $that.removeClass(); + } + }); + } +} + +function rmmention($this,e){ + var replie_id = $this.parent().parent().parent().find(".status_word").find(".user_name").text(); + var in_reply_id = $this.parent().parent().parent().find(".status_id").text(); + var text = "@"+replie_id; + var mode = "In reply to "; + scroll(0,0); + $("#textbox").focus().val($("#textbox").val()+text+' '); + $("#in_reply_to").val(in_reply_id); + $("#full_status,#latest_meta,#full_meta,#currently .full-text").hide(); + $("#currently .status-text").html(mode+text); + leaveWord(); +} +function rmdm($this,e){ + var replie_id = $this.parent().parent().parent().find(".status_word").find(".user_name").text(); + var text = "D "+replie_id; + scroll(0,0); + $("#textbox").focus().val($("#textbox").val()+text+' ');; + $("#in_reply_to").val(e.target.parent().parent().parent().find(".status_id").text()); + $("#full_status,#latest_meta,#full_meta,#currently .full-text").hide(); + $("#currently .status-text").html("Reply direct message to @"+replie_id); + leaveWord(); +} +function rmfollow($this){ + var id = $this.parent().parent().parent().find(".status_word").find(".user_name").text(); + updateSentTip("Following "+id+"...",5e3,"ing"); + $.ajax({ + url: "ajax/relation.php", + type: "POST", + data: "action=create&id="+id, + success: function (msg){ + if (msg.indexOf("success") >= 0){ + updateSentTip("You have followed "+id+"!",3e3,"success"); + }else{ + updateSentTip("Failed to follow "+id+",please try again.",3e3,"failure"); + } + }, + error: function (msg){ + updateSentTip("Failed to follow "+id+",please try again.",3e3,"failure"); + } + }); +} +function rmunfollow($this){ + var id = $this.parent().parent().parent().find(".status_word").find(".user_name").text(); + if (confirm("Are you sure to unfollow "+id+" ?")){ + updateSentTip("Unfollowing "+id+"...",5e3,"ing"); + $.ajax({ + url: "ajax/relation.php", + type: "POST", + data: "action=destory&id="+id, + success: function (msg){ + if (msg.indexOf("success") >= 0){ + updateSentTip("You have unfollowed "+id+"!",3e3,"success"); + }else{ + updateSentTip("Failed to unfollow "+id+",please try again.",3e3,"failure"); + } + }, + error: function (msg){ + updateSentTip("Failed to unfollow "+id+",please try again.",3e3,"failure"); + } + }); + } +} +function rmblock($this){ + var id = $this.parent().parent().parent().find(".status_word").find(".user_name").text(); + if (confirm("Are you sure to block "+id+" ?")){ + updateSentTip("Blocking "+id+"...",5e3,"ing"); + $.ajax({ + url: "ajax/relation.php", + type: "POST", + data: "action=block&id="+id, + success: function (msg){ + if (msg.indexOf("success") >= 0){ + updateSentTip("You have blocked "+id+"!",3e3,"success"); + }else{ + updateSentTip("Failed to block "+id+",please try again.",3e3,"failure"); + } + }, + error: function (msg){ + updateSentTip("Failed to block "+id+",please try again.",3e3,"failure"); + } + }); + } +} +function rmunblock($this){ + var id = $this.parent().parent().parent().find(".status_word").find(".user_name").text(); + if (confirm("Are you sure to unblock "+id+" ?")){ + updateSentTip("Unblocking "+id+"...",5e3,"ing"); + $.ajax({ + url: "ajax/relation.php", + type: "POST", + data: "action=unblock&id="+id, + success: function (msg){ + if (msg.indexOf("success") >= 0){ + updateSentTip("You have unblocked "+id+"!",3e3,"success"); + }else{ + updateSentTip("Failed to unblock "+id+",please try again.",3e3,"failure"); + } + }, + error: function (msg){ + updateSentTip("Failed to unblock "+id+",please try again.",3e3,"failure"); + } + }); + } +} +function rmspam($this){ + var id = $this.parent().parent().parent().find(".status_word").find(".user_name").text(); + if (confirm("Are you sure to report "+id+" ?")){ + updateSentTip("Reporting "+id+" as a spammer...",5e3,"ing"); + $.ajax({ + url: "ajax/reportSpam.php", + type: "POST", + data: "spammer="+id, + success: function (msg){ + if (msg.indexOf("success") >= 0){ + updateSentTip("Successfully reported!",3e3,"success"); + }else{ + updateSentTip("Failed to report "+id+",please try again.",3e3,"failure"); + } + }, + error: function (msg){ + updateSentTip("Failed to report "+id+",please try again.",3e3,"failure"); + } + }); + } +} +//tweet actions +function onFavor($this){ + var status_id = $.trim($this.parent().parent().find(".status_id").text()); + updateSentTip("Adding this tweet to your favorites...",5e3,"ing"); + $.ajax({ + url: "ajax/addfavor.php", + type: "POST", + data: "status_id="+status_id, + success: function (msg){ + if (msg.indexOf("success") >= 0){ + updateSentTip("Favorite added successfully.",3e3,"success"); + $this.parent().parent().parent().append(''); + $this.removeClass().addClass("unfav_btn").attr("title","UnFav").text("UnFav"); + }else{ + updateSentTip("Add failed. Please try again.",3e3,"failure"); + } + }, + error: function (msg){ + updateSentTip("Add failed. Please try again.",3e3,"failure"); + } + }); +} +function onReplie($this,e){ + var $word = $this.parent().parent().find(".status_word"); + var replie_id = $word.find(".user_name").text(); + var in_reply_id = $this.parent().parent().find(".status_id").text(); + var text = "@"+replie_id; + var start = text.length+1; + var mode = "In reply to "; + if (!e.ctrlKey && !e.metaKey){ + var temp=[]; + temp[text] = true; + var self = '@'+$("#side_name").text(); + temp[self] = true; + var mentionArray = [text]; + var mentions = $word.find('.tweet').find('a[href^="user.php"]'); + $.each(mentions,function (){ + var t = this.text; + if (!(t in temp)){ + temp[t] = true; + mentionArray.push(t); + } + text = mentionArray.join(' '); + }); + if (mentionArray.length > 1){ + mode = "Reply to all: "; + } + } + if (e.altKey){ + mode = "Non-conversational reply to "; + in_reply_id = ""; + } + scroll(0,0); + var end = text.length; + $("#textbox").focus().val($("#textbox").val()+text+' ').caret(start,end); + $("#in_reply_to").val(in_reply_id); + $("#full_status,#latest_meta,#full_meta,#currently .full-text,#latest_meta").hide(); + $("#currently .status-text").html(mode+text); + leaveWord(); +} +function onRT($this){ + var replie_id = $this.parent().parent().find(".status_word").find(".user_name").text(); + scroll(0,0); + var status_word = $this.parent().parent().find(".status_word").clone(); + status_word.find('.tweet a[rel=noreferrer]').each(function(){ + $(this).text($(this).attr('href')); + }); + $("#textbox").focus().val(" RT @"+replie_id+":"+status_word.text().replace(replie_id,"")).caret(0); + $("#full_status,#latest_meta,#full_meta,#currently .full-text,#latest_meta").hide(); + $("#currently .status-text").html("Retweet @"+replie_id+"'s tweet with comment."); + leaveWord(); +} +function onReplieDM($this){ + var replie_id = $this.parent().parent().find(".status_word").find(".user_name").text(); + var text = "D "+replie_id; + scroll(0,0); + $("#textbox").focus().val($("#textbox").val()+text+' '); + $("#full_status,#latest_meta,#full_meta,#currently .full-text,#latest_meta").hide(); + $("#currently .status-text").html("Reply direct message to @"+replie_id); + leaveWord(); +} +function onNwRT($this){ + if (confirm("Are you sure to retweet this?")){ + var statusBody = $this.parent().parent(); + var status_id = statusBody.find(".status_id").text(); + var div = "#"+statusBody.parent().parent().attr('id'); + var btnDiv = div+"Btn"; + updateSentTip("Retweeting tweet...",5e3,"ing"); + $.ajax({ + url: "ajax/retweet.php", + type: "post", + data: "status_id="+status_id, + success: function (msg){ + if (msg.length >= 0){ + statusBody.parent().addClass("retweet"); + statusBody.find(".source").hide(); + statusBody.find(".status_info").append("Retweeted by you from embr").fadeIn("fast"); + statusBody.find(".date").hide(); + statusBody.find(".status_info").append(" (Undo)"+msg+"").fadeIn("fast"); + updateSentTip("This tweet has been retweeted!",3e3,"success"); + $(".rt_undo").tipsy({ + gravity: 's' + }); + }else{ + if (msg === "duplicated"){ + updateSentTip("You have retweeted this tweet!",3e3,"failure"); + }else{ + updateSentTip("Failed to retweet!",3e3,"failure"); + } + } + }, + error: function (msg){ + updateSentTip("Retweet failed. Please try again.",3e3,"failure"); + } + }); + } +} +function UnFavor($this){ + if (window.confirm("Are you sure to unfavor this tweet?")){ + var $that=$this.parent().parent(); + var status_id = $.trim($that.find(".status_id").text()); + $that.parent().css("background-color","#FF3300"); + updateSentTip("Unfavoring tweet...",5e3,"ing"); + $.ajax({ + url: "ajax/delete.php", + type: "POST", + data: "favor_id="+status_id, + success: function (msg){ + if (msg.indexOf("success") >= 0){ + if (location.href.indexOf('favor.php')>0){ + $that.parent().fadeOut("fast"); + }else{ + $that.parent().find(".faved").fadeOut("fast"); + $this.removeClass().addClass("favor_btn").attr("title","Fav").text("Fav"); + } + updateSentTip("This tweet has been unfavored!",3e3,"success"); + }else{ + updateSentTip("Unfavor failed. Please try again.",3e3,"failure"); + } + $that.parent().css("background-color",""); + }, + error: function (msg){ + updateSentTip("Unfavor failed. Please try again.",3e3,"failure"); + $that.parent().css("background-color",""); + } + }); + } +} +function onDelete($this){ + if (window.confirm("Are you sure to delete this tweet?")){ + var $this=$this.parent().parent(); + var status_id = $.trim($this.find(".status_id").text()); + $this.parent().css("background-color","#FF3300"); + updateSentTip("Deleting tweet...",5e3,"ing"); + $.ajax({ + url: "ajax/delete.php", + type: "POST", + data: "status_id="+status_id, + success: function (msg){ + if (msg.indexOf("success") >= 0){ + $this.parent().fadeOut("fast"); + updateSentTip("Your tweet has been destroyed!",3e3,"success"); + }else{ + updateSentTip("Delete failed. Please try again.",3e3,"failure"); + } + $this.parent().css("background-color",""); + }, + error: function (msg){ + updateSentTip("Delete failed. Please try again.",3e3,"failure"); + $this.parent().css("background-color",""); + } + }); + } +} +function onUndoRt($this){ + if (window.confirm("Are you sure to undo this retweet?")){ + var status_id = $.trim($this.parent().find(".rt_id").text()); + var statusBody = $this.parent().parent().parent(); + statusBody.css("background-color","#FF3300"); + updateSentTip("Undoing retweet...",5e3,"ing"); + $.ajax({ + url: "ajax/delete.php", + type: "POST", + data: "status_id="+status_id, + success: function (msg){ + if (msg.indexOf("success") >= 0){ + statusInfo = $this.parent().parent(); + if (statusInfo.find(".rt_source").size() === 1){ + statusInfo.find(".source").show().find(".date").show(); + statusInfo.find(".rt_source").remove() + statusInfo.find(".rt_undo").remove(); + statusBody.removeClass("retweet"); + }else{ + statusBody.fadeOut("fast"); + } + updateSentTip("Your retweet has been undo!",3e3,"success"); + }else{ + updateSentTip("Undo failed. Please try again.",3e3,"failure"); + } + statusBody.css("background-color",""); + }, + error: function (msg){ + updateSentTip("Undo failed. Please try again.",3e3,"failure"); + statusBody.css("background-color",""); + } + }); + + } +} +function onDeleteMsg($this){ + if (window.confirm("Are you sure to delete this message?")){ + var $this=$this.parent().parent(); + var message_id = $.trim($this.find(".status_id").text()); + $this.parent().css("background-color","#FF3300"); + updateSentTip("Deleting message...",5e3,"ing"); + $.ajax({ + url: "ajax/delete.php", + type: "POST", + data: "message_id="+message_id, + success: function (msg){ + if (msg.indexOf("success") >= 0){ + $this.parent().fadeOut("fast"); + updateSentTip("Message deleted.",3e3,"success"); + }else{ + updateSentTip("Failed to delete this message!",3e3,"failure"); + } + $this.parent().css("background-color",""); + }, + error: function (msg){ + updateSentTip("Failed to delete this message!",3e3,"failure"); + $this.parent().css("background-color",""); + } + }); + } +} +$(function (){ + $("#statuses .trans_close").live('click',function(e){ + e.preventDefault(); + $(e.target).parent().parent().parent().parent().find(".translated").remove(); + }); + $("#transRecover").click(function(e){ + $("#textbox").val(ORIG_TEXT); + $(e.target).fadeOut('fast'); + }); + }); +var translate = function(text,context,lang,callback){ + + var a = "http://www.google.com/uds/Gtranslate"; + a += "?callback="+callback; + a += "&context="+context; + a += "&q="+encodeURIComponent(text); + a += "&key=notsupplied&v=1.0&nocache=1240207680396&langpair=%7C"; + a += lang; + $.getScript(a); +}; +var transMyCallback = function(content,translation){ + if(translation.translatedText !== null){ + $('#tip').removeClass('loading'); + $("#transArea").hide(); + $("#textbox").val(translation.translatedText); + $("#transRecover").fadeIn('fast'); + } +}; +var transCallback = function(content,translation){ + if(translation.translatedText !== null){ + var lang = $.cookie('transLang') + if(lang === null){ + lang = 'zh'; + } + var langTxt = $.cookie('fullLang'); + if(langTxt === null){ + langTxt = $('#transArea select[name=langs] option[value='+lang+']').text(); + } + var html = '
    (Hide)Translation (from '+translation.detectedSourceLanguage; + html += ' to '+langTxt+') : '; + html += ''+translation.translatedText+'
    '; + var li,target; + if(typeof INTERVAL_COOKIE !== 'undefined'){ + li = $("#statuses ol:visible li:has(.status_id)").filter(":contains("+content+")"); + target = li.find(".status_word").filter(":first"); + }else{ + li = $("#statuses li:has(.status_id)").filter(":contains("+content+")"); + target = li.find(".status_word").filter(":first"); + } + $(html).appendTo(target); + li.removeClass("loading"); + } +}; + +$(function (){ + $('body').click(function (){ + $('ul.right_menu').fadeOut('fast'); + }); + $('ol.timeline').click(function(e){ + var $this = $(e.target); + switch(e.target.id){ + //avatar menu + case 'avatar': + e.preventDefault(); + rminit($this); + e.stopPropagation(); + break; + } + switch(e.target.className){ + //ajax_reply + case 'ajax_reply': + e.preventDefault(); + ajax_reply($this); + break; + //avatar_menu_action + case 'rm_mention': + e.preventDefault(); + rmmention($this,e); + break; + case 'rm_dm': + e.preventDefault(); + rmdm($this,e); + break; + case 'rm_follow': + e.preventDefault(); + rmfollow($this); + break; + case 'rm_unfollow': + e.preventDefault(); + rmunfollow($this); + break; + case 'rm_block': + e.preventDefault(); + rmblock($this); + break; + case 'rm_unblock': + e.preventDefault(); + rmunblock($this); + break; + case 'rm_spam': + e.preventDefault(); + rmspam($this); + break; + //translate + case 'trans_btn': + e.preventDefault(); + var tBody = $this.parent().parent(); + if(tBody.find(".trans_body").length !== 0){ + return; + } + var id = $.trim(tBody.find('.status_id').text()); + var text = $.trim(tBody.find('.tweet').text()); + var lang = $.cookie('transLang'); + if(lang === null){ + lang = 'zh'; + } + tBody.parent().addClass('loading'); + translate(text,id,lang,'transCallback'); + break; + // unshorturl + case 'tweet_url': + var tp = $this.text().split('/'); + var d = tp[0]; + if(d == 't.cn' || d == 'goo.gl' || d == 'bit.ly' || d == 'j.mp' || d == 'is.gd' || d == '163.fm') { + e.preventDefault(); + updateSentTip('Unshorting the URL...',3e3,'ing'); + $.getJSON('http://api.longurl.org/v2/expand?url=' +encodeURIComponent($this.attr('href')) + '&format=json&callback=?', function(data) { + if('long-url' in data) { + var url = data['long-url']; + if (url != $this.attr('href')) { + var tmp = url.split("://"); + $this.text(tmp[1]); + $this.attr('href',url); + updateSentTip('Successfully unshort the URL!',3e3,'success'); + if ($.cookie('showpic') === 'true') previewImg($this); + if ($.cookie('mediaPre') === 'true') previewFlash($this); + $this.data('previewed',true); + } + } else { + updateSentTip('Fail to unshort the URL! Please try again later!',3e3,'failure'); + } + }); + } + break; + } + }); + $('ol.timeline').on("dbclick", 'a.tweet_url', function(e){ + $this = $(e.target); + + }); +}); + +//sidebar function +var scroller = function(){ + var $sidebar = $("#side"); + var $window = $(window); + var top = $sidebar.data("top"); + if ($window.scrollTop() > top){ + $sidebar.css({ + marginTop: '', + top: 0, + position: 'fixed' + }); + }else{ + $sidebar.css({ + marginTop:'', + top:'', + position:'relative' + }); + } +} +var sidebarscroll = function (msg){ + if($.cookie('sidebarscroll') != 'false' && location.href.indexOf('profile.php')< 0 && location.href.indexOf('setting.php') < 0){ + var $sidebar = $("#side"); + var $window = $(window); + if(!$sidebar.data("top")){ + var offset = $sidebar.offset(); + $sidebar.data("top",offset.top); + } + if(msg == undefined){ + $window.scroll(scroller); + } + if (msg == 'pause'){ + var top = $window.scrollTop() - $sidebar.data('top'); + if (top <= 0) top = 0; + $sidebar.css({ + marginTop:top, + position:'relative' + }); + $window.unbind('scroll',scroller); + } + } +}; +$(function (){ + if($.cookie('autoscroll') != 'false' && $("#more").length > 0 && $("ol.timeline").length > 0){ + $("ol.timeline").infinitescroll({ + nextSelector:"#more:last", + navSelector:"#pagination", + itemSelector:"ol.timeline li", + callback: function(obj){ + embrTweet(obj); + previewMedia(obj); + }, + }); + } + $("#indicator").toggle( + function (){ + $('#sidebarTip_more').slideDown('fast'); + $('#indicator').html('[-]'); + },function (){ + $('#sidebarTip_more').slideUp('fast'); + $('#indicator').html('[+]'); + }); + $("#sidebarTip [contenteditable]").live('focusout',function(){ + var $this = $("#sidebarTip [contenteditable]"); + $.post( + 'ajax/setTip.php', + {Tip_Title: $this.eq(0).text()+' ',Tip_Content:$this.eq(1).text()+' ',Tip_More:$this.eq(2).text()+' '}, + function (msg){ + if(msg == 'unsecured'){ + updateSentTip('Fail to save your tip for the security issues!',3e3,'failure'); + }else if(msg == 'error'){ + updateSentTip('Fail to save your tip! Please try again later!',3e3,'failure'); + }else{ + updateSentTip('Successfully save your tip!',3e3,'success'); + } + } + ); + }); + $("#sidebarTip #tip_reset").live('click',function(e){ + e.preventDefault(); + if(window.confirm('Are you sure to restore to default tips?')){ + $.post( + 'ajax/setTip.php', + {reset: 'true'}, + function (msg){ + if(msg == 'reset'){ + updateSentTip('Successfully restore to the default tips!',3e3,'success'); + location.reload(); + }else{ + updateSentTip('Fail to save your tip! Please try again later!',3e3,'failure'); + } + } + ); + } + }) + $("#profileRefresh").click(function(e){ + e.preventDefault(); + var that = $(this); + if (!that.hasClass('refreshing')){ + that.addClass('refreshing'); + $.ajax({ + url: "ajax/updateProfile.php", + type: "GET", + dataType: "json", + success: function(msg){ + if (msg.result == 'success'){ + freshProfile(); + updateSentTip("Profile updated successfully!",3e3,"success"); + } + else{ + updateSentTip("Failed to update your profile!",3e3,"failure"); + } + }, + error: function (msg){ + updateSentTip("Failed to update your profile!",3e3,"failure"); + }, + complete: function(){ + that.removeClass('refreshing'); + } + }); + } + }); +}); + +// sidepost function +$(function (){ + $("#trends_title").toggle( + function (){ + $("#trends_title").removeClass().addClass("loading"); + updateTrends(); + },function (){ + $("#trends_title").removeClass(); + $("#trend_entries").slideUp("fast"); + sidebarscroll(); + }); + $("#following_title").toggle( + function (){ + $("#following_title").removeClass().addClass("loading"); + sidebarscroll('pause'); + updateFollowing(); + },function (){ + $("#following_title").removeClass(); + $("#following_list").slideUp("fast"); + sidebarscroll(); + }); + $("#apiquota_title").toggle( + function (){ + $("#apiquota_title").removeClass().addClass("loading"); + sidebarscroll('pause'); + updateAPIQuota(); + },function (){ + $("#apiquota_title").removeClass(); + $("#apiquota_list").slideUp("fast"); + sidebarscroll(); + }); +}); +function updateTrends(){ + sidebarscroll('pause'); + if (navigator.geolocation) { + if ($.cookie('woeid') == undefined) { + navigator.geolocation.getCurrentPosition(function (pos, error) { + $.ajax({ + url: "ajax/updateTrends.php?lat=" + pos.coords.latitude + "&long=" + pos.coords.longitude, + type: "GET", + success: function (msg){ + if ($.trim(msg).indexOf("" > 0)){ + $("#trend_entries").html(msg); + } + $("#trends_title").removeClass().addClass("open"); + $("#trend_entries").slideDown("fast"); + } + }) + }); + } else { + $.ajax({ + url: "ajax/updateTrends.php", + type: "GET", + success: function (msg){ + if ($.trim(msg).indexOf("" > 0)){ + $("#trend_entries").html(msg); + } + $("#trends_title").removeClass().addClass("open"); + $("#trend_entries").slideDown("fast"); + } + }); + } + } +} +function updateFollowing(){ + $.ajax({ + url: "ajax/updateFollowing.php", + type: "GET", + success: function (msg){ + if ($.trim(msg).indexOf("" > 0)){ + $("#following_list").html(msg); + } + $("#following_title").removeClass().addClass("open"); + $("#following_list").slideDown("fast"); + } + }); +} +function updateAPIQuota(){ + $.ajax({ + url: "ajax/apiQuota.php", + type: "GET", + success: function (msg){ + if ($.trim(msg).indexOf("" > 0)){ + $("#apiquota_list").html(msg); + } + $("#apiquota_title").removeClass().addClass("open"); + $("#apiquota_list").slideDown("fast"); + } + }); +} +$(window).load(function(){ + var scrollTo = function (top,duration,callback){ + var w = $(window); + var FPS = 50; + var currentTop = w.scrollTop(); + var offset = (currentTop - top) / (duration * FPS / 1000); + var n = 0; + var prevTop = currentTop; + var t = setInterval(function (){ + if ((prevTop - top) * (currentTop - top) <= 0){ + clearInterval(t); + currentTop = prevTop = top; + w.scrollTop(top); + if (callback) callback(); + }else{ + prevTop = currentTop; + w.scrollTop(currentTop -= offset); + } + },1e3 / FPS); + } + var scrollToTop = function(){ + scrollTo(0,200,function (){ + scrollTo(30,50,function (){ + scrollTo(0,50); + }); + }); + }; + var scrollToBottom = function(){ + var height = document.body.clientHeight; + scrollTo(height,200,function (){ + scrollTo(height+30,50,function (){ + scrollTo(height,50); + }); + }); + }; + $('body').dblclick(function (){ + scrollToTop(); + $("#textbox").focus(); + }); + $('#content').dblclick(function (e){ + e.stopPropagation(); + }); + var hkFadeIn = function(text){ + $("#shortcutTip").fadeIn("fast").html(text); + }; + var hkFadeOut = function(){ + setTimeout(function (){$("#shortcutTip").fadeOut("fast");},2000); + }; + // hotkeys + var hotkeyHandler = function(code){ + switch(code){ + case 82: // R - refresh + hkFadeIn("Refresh"); + update(); + hkFadeOut(); + break; + case 67: // C - focus textbox + case 85: // U + hkFadeIn("Compose"); + scrollTo(0,1,function (){ + $("#textbox").focus(); + }); + hkFadeOut(); + break; + case 66: // B - scroll to bottom + hkFadeIn("Boom!"); + scrollToBottom(); + hkFadeOut(); + break; + case 84: // T - scroll to top + hkFadeIn("Whiz!"); + scrollToTop(); + hkFadeOut(); + break; + case 83: // S - search + hkFadeIn("Search"); + $("#sidepost").animate({backgroundColor: "#FF6347"},500,function(){ + $("#header_search_query").focus(); + $("#sidepost").animate({backgroundColor: $("#side_base").css("background-color")},1000); + }); + hkFadeOut(); + break; + } + }; + $(document).keydown(function(e){ + var tag = e.target.tagName; + if(tag === "BODY" || tag === "HTML"){ + if(!e.altKey && !e.shiftKey && !e.ctrlKey && !e.metaKey){ + hotkeyHandler(e.keyCode); + } + } + }); + $("#statuses .big-retweet-icon,#func_set .func_btn,#profileRefresh").tipsy({ + gravity: 's' + }); + $('#symbols span').tipsy({ + gravity: $.fn.tipsy.autoNS + }); + $("#statuses .mine").live("mouseout",function (e){ + $(e.target).removeClass("mine").addClass("myTweet"); + }); +}); +//init global functions +$(document).ready(function (){ + embrTweet(); + $("#primary_nav li a").click(function (e){ + $(e.target).each(function (){ + if ($(this).hasClass("active")){ + $(this).removeClass() + } + }); + $(this).removeClass().addClass("active").css("background","transparent url('../img/spinner.gif') no-repeat scroll 173px center") + }); + $("#avatar,#sideimg").lazyload({threshold:100,effect:"fadeIn",placeholder:"img/blank.gif"}); + sidebarscroll(); +}); +var freshProfile = function(){ + $("#side_name").text($.cookie('name')); + $.cookie('name',null); + $("span.count").eq(0).text($.cookie('friends_count')).end() + .eq(1).text($.cookie('followers_count')).end() + .eq(2).text($.cookie('listed_count')); + $("#update_count").text($.cookie('statuses_count')); + $('#sideimg').attr("src",$.cookie('imgurl')); +}; +var markReply = function(obj){ + var sidename = "@"+$("#side_name").text().toLowerCase(); + obj.each(function (i,o){ + if ($(this).find("> span").find('.tweet').text().toLowerCase().indexOf(sidename) > -1){ + $(this).addClass("reply"); + } + }); +}; \ No newline at end of file diff --git a/js/search.js b/js/search.js index cda7cac..86b320d 100644 --- a/js/search.js +++ b/js/search.js @@ -1,36 +1,54 @@ -$(function(){ - formHTML = "

    What are you doing?

    " + formHTML + "
    "; - $(".rt_btn").click(function(e){ - e.preventDefault(); - if ($("#textbox").length > 0) { - onRT($(this)); - } else { - $("#search_form").after(formHTML); - formFunc(); - onRT($(this)); - } - }); - $(".replie_btn").click(function(e){ - e.preventDefault(); - if ($("#textbox").length > 0) { - onReplie($(this), e); - } else { - $("#search_form").after(formHTML); - formFunc(); - onReplie($(this), e); - } - }); - $(".favor_btn").live("click", function(e){ - e.preventDefault(); - onFavor($(this)); - }); - $(".retw_btn").live("click", function(e){ - e.preventDefault(); - onNwRT($(this)); - }); - $("#submit_btn").live("click", function(e){ - updateStatus(); - e.preventDefault(); - }); - updateTrends(); -}); +$(function(){ + formHTML = "

    What are you doing?

    " + formHTML + "
    "; + $("#allTimeline").click(function(e) { + var $this = $(e.target); + var type = $this.attr('class'); + switch(type) { + case 'rt_btn': + e.preventDefault(); + if ($("#textbox").length > 0) { + onRT($this); + } else { + $("#search_form").after(formHTML); + formFunc(); + onRT($this); + } + break; + case 'retw_btn': + e.preventDefault(); + onNwRT($this); + break; + case 'replie_btn': + e.preventDefault(); + if ($("#textbox").length > 0) { + onReplie($this,e); + } else { + $("#search_form").after(formHTML); + formFunc(); + onReplie($this,e); + } + break; + case 'favor_btn': + e.preventDefault(); + onFavor($this); + break; + case 'unfav_btn': + e.preventDefault(); + UnFavor($this); + break; + case 'delete_btn': + e.preventDefault(); + onDelete($this); + break; + case 'rt_undo': + e.preventDefault(); + onUndoRt($this); + break; + } + }); + $("#submit_btn").click(function(e){ + updateStatus(); + e.preventDefault(); + }); + updateTrends(); +}); diff --git a/js/setting.js b/js/setting.js index 5fc9b76..c2390cc 100644 --- a/js/setting.js +++ b/js/setting.js @@ -1,90 +1,194 @@ -$(function(){ - $('.bg_input').ColorPicker({ - onBeforeShow: function () { - $(this).ColorPickerSetColor(this.value); - }, - onSubmit: function(hsb, hex, rgb, el) { - $(el).val("#" + hex); - $(el).ColorPickerHide(); - } - }).bind('keyup', function(){ - $(this).ColorPickerSetColor(this.value); - }); - - $('#reset_link').bind('click', function(e){ - e.preventDefault(); - if(confirm("You will lose all customized settings!")){ - $.cookie('myCSS', ''); - $.cookie('fontsize', ''); - $.cookie('bodyBg', ''); - location.reload(); - } - }); - - var style = { - "Twitter Default":{myCSS:"/*default*/ "}, - "Dark Rabr":{myCSS:"@import url(themes/1.css);"}, - "Monokai Python":{myCSS:"@import url(themes/2.css);"}, - "Old Times":{myCSS:"@import url(themes/3.css);"}, - "Pink":{myCSS:"@import url(themes/4.css);"}, - "Warm @lgsoltek":{myCSS:"@import url(themes/5.css);"}, - "Cold @lgsoltek":{myCSS:"@import url(themes/6.css);"}, - "Green":{myCSS:"@import url(themes/7.css);"}, - "Shine":{myCSS:"@import url(themes/8.css);"}, - "Flew":{myCSS:"@import url(themes/9.css);"}, - "Golden":{myCSS:"@import url(themes/10.css);"}, - "#red":{myCSS:"@import url(themes/11.css);"}, - "Storm":{myCSS:"@import url(themes/12.css);"}, - "City":{myCSS:"@import url(themes/13.css);"}, - "Cosmos":{myCSS:"@import url(themes/14.css);"}, - "Pride (Rainbow)":{myCSS:"@import url(themes/15.css); /* Have a gay day! */"}, - "Drop Bombs":{myCSS:"@import url(themes/16.css);"}, - "Minimal":{myCSS:"@import url(themes/minimal.css);"}, - }; - - $.each(style, function (i,o) { - $("#styleSelect").append(''); - }); - $("#styleSelect").change(function(){ - if ($(this).val() != "n/a") { - $.each(style[$(this).val()], function (i,o) { - $("#"+i).val(o); - }); - } - }); -}); - -$(show_pic_option); - -function show_pic_option () { - var cookie_val = $.cookie (COOKIE_NAME); - if (cookie_val === null) { - $.cookie (COOKIE_NAME, true, options); - } - else if (cookie_val === 'false') { - $("#show_pic").attr("checked", false); - } - - $("#show_pic").click(function (){ - $.cookie (COOKIE_NAME, $("#show_pic").attr("checked"), options); - }); - - if ($.cookie('mediaPre') === null) { - $.cookie('mediaPre', true, { expires: 30 }); - $("#mediaPreSelect").attr('checked', true); - } - - if($.cookie('mediaPre') === 'true'){ - $("#mediaPreSelect").attr('checked', true); - }else{ - $("#mediaPreSelect").attr('checked', false);; - } - - $("#mediaPreSelect").click(function(){ - if($(this).attr('checked') == true){ - $.cookie('mediaPre', true, { expires: 30 }); - }else{ - $.cookie('mediaPre', false, { expires: 30 }); - } - }); -} +$(function(){ + checkbox('showpic',"#showpic",true); + checkbox('mediaPre',"#mediaPreSelect",true); + checkbox('p_avatar',"#proxifyAvatar",false,function(){ + var imgurl = $.cookie('imgurl'); + if(imgurl.indexOf('img.php') > -1) { + imgurl = imgurl.substr(15); + } else { + imgurl = 'img.php?imgurl='+imgurl; + } + $.cookie('imgurl',imgurl,{expires:365}); + freshProfile(); + }); + checkbox('autoscroll',"#autoscroll",true); + checkbox('sidebarscroll',"#sidebarscroll",true,function(){ + $(window).unbind('scroll',scroller); + }); + checkbox('twitterbg',"#twitterbg",false,function(){ + if($.cookie('twitterbg') === 'true'){ + $.ajax({ + url:'ajax/updateProfile.php?extra=bg', + dataType:'json', + success: function (){ + location.reload(); + } + }); + } else { + $.cookie('Bgcolor', ''); + $.cookie('Bgimage',''); + $.cookie('Bgrepeat','no-repeat'); + location.reload(); + } + }); + selectbox('homeInterval',"#homeInterval",function(){ + $.cookie('intervalChanged','true',{expires:365}); + }); + selectbox('updatesInterval',"#updatesInterval",function(){ + $.cookie('intervalChanged','true',{expires:365}); + }); + selectbox('fontsize',"#fontsize"); + $('.bg_input').ColorPicker({ + onBeforeShow: function () { + $(this).ColorPickerSetColor(this.value); + }, + onSubmit: function(hsb, hex, rgb, el) { + $(el).val("#" + hex); + $(el).ColorPickerHide(); + $.cookie('bodyBg',"#" + hex,{expires:365}); + location.reload(); + updateSentTip('Setting saved successfully!',3000,'success'); + } + }).bind('keyup', function(){ + $(this).ColorPickerSetColor(this.value); + }); + $('#reset_link').bind('click', function(e){ + e.preventDefault(); + if(confirm("You will lose all customized settings!")){ + $.cookie('myCSS', '/*default.css*/'); + $.cookie('theme','') + $.cookie('fontsize', ''); + $.cookie('Bgcolor', ''); + $.cookie('Bgimage',''); + $.cookie('showpic','true'); + $.cookie('mediaPre','true'); + $.cookie('p_avatar','false'); + $.cookie('homeInterval',1); + $.cookie('updatesInterval',3); + location.reload(); + updateSentTip('Setting Reset successfully!',3000,'success'); + } + }); + var style = { + "Twitter Default":{theme:"/*default*/"}, + "Dark Rabr":{theme:"@import url(themes/1.css);"}, + "Monokai Python":{theme:"@import url(themes/2.css);"}, + "Old Times":{theme:"@import url(themes/3.css);"}, + "Pink":{theme:"@import url(themes/4.css);"}, + "Warm @lgsoltek":{theme:"@import url(themes/5.css);"}, + "Cold @lgsoltek":{theme:"@import url(themes/6.css);"}, + "Green":{theme:"@import url(themes/7.css);"}, + "Shine":{theme:"@import url(themes/8.css);"}, + "Flew":{theme:"@import url(themes/9.css);"}, + "Golden":{theme:"@import url(themes/10.css);"}, + "#red":{theme:"@import url(themes/11.css);"}, + "Storm":{theme:"@import url(themes/12.css);"}, + "City":{theme:"@import url(themes/13.css);"}, + "Cosmos":{theme:"@import url(themes/14.css);"}, + "Pride (Rainbow)":{theme:"@import url(themes/15.css); /* Have a gay day! */"}, + "Drop Bombs":{theme:"@import url(themes/16.css);"}, + "Minimal":{theme:"@import url(themes/minimal.css);"}, + }; + $.each(style, function (i,o) { + $("#styleSelect").append(''); + }); + var theme = $.cookie('theme') == undefined ? '/*default*/' : $.cookie('theme'); + $("#styleSelect").change(function(){ + var o =$(this).val(); + $.cookie('theme',o,{expires:365}); + $.cookie('Bgimage',''); + location.reload(); + updateSentTip('Themes Saved Successfully!',3000,'success'); + }).eq(0).val(theme); + + $("textarea#myCSS").change(function(){ + $.cookie('myCSS',$(this).val(),{expires:365}); + location.reload(); + updateSentTip('Themes saved successfully!',3000,'success'); + }); + $("#AvatarUpload").click(function (e) { + e.preventDefault(); + ProfileImageUpload(); + }); + $("#saveProfile").click(function(e){ + e.preventDefault(); + $.ajax({ + url: 'ajax/updateProfile.php', + type: 'POST', + data: { + 'name': $('input[name="name"]').val(), + 'url' : $('input[name="url"]').val(), + 'location': $('input[name="location"]').val(), + 'description': $('textarea[name="description"]').text() + }, + dataType: 'json', + success: function(msg) { + if (msg.result == 'success') { + freshProfile(); + updateSentTip ('Profile updated successfully!',3000,'success'); + } else { + updateSentTip ('Fail to update your profile, please try again',3000,'failure'); + } + }, + error: function() { + updateSentTip ('Fail to update your profile, please try again',3000,'failure'); + } + }); + }); +}); +function checkbox(c,id,d,extra){ + var $id = $(id); + if ($.cookie (c) === null) { + $.cookie (c, d, { expires: 30 }); + } + $id.prop('checked', $.cookie (c) === 'true').click(function (){ + $.cookie(c,$id.prop("checked"),{expires:365}); + if (extra != undefined) extra(); + updateSentTip('Setting saved successfully!',1000,'success'); + }); +} +function selectbox(c,id,extra){ + var $id = $(id); + if($.cookie(c) != undefined){ + $id.eq(0).val($.cookie(c)); + } + $id.change(function (){ + $.cookie(c,$id.find(':selected').val(),{expires:365}); + if (extra != undefined) extra(); + updateSentTip('Setting saved successfully!',1000,'success'); + }); +} + +function ProfileImageUpload() { + updateSentTip("Uploading your profile image...", 10000, "ing"); + $.ajaxFileUpload({ + url: 'ajax/uploadImage.php?do=profile', + timeout: 60000, + secureuri: false, + fileElementId: 'profile_image', + dataType: 'json', + success: function (data, status) { + if (typeof(console) !== 'undefined' && console != null) { + console.info(data); + } + if (typeof(data.result) != 'undefined' && data.result == "success") { + $.ajax({ + url: '../ajax/updateProfile.php', + type: "GET", + dataType: "json", + success: function(msg){ + freshProfile(); + $(".settings > img").attr("src",$.cookie("imgurl")); + } + }); + updateSentTip("Your profile image has been uploaded!", 3000, "success"); + } else { + updateSentTip("Failed to upload, please try again.", 3000, "failure"); + } + }, + error: function (data, status, e) { + updateSentTip("Failed to upload, please try again.", 3000, "failure"); + } + }) + return false; +} \ No newline at end of file diff --git a/js/user.js b/js/user.js index 54f1a99..f0370a0 100644 --- a/js/user.js +++ b/js/user.js @@ -1,35 +1,45 @@ $(function(){ - - $("#submit_btn").click(function(e){ - updateStatus(); - e.preventDefault(); - }); - - $(".retw_btn").live("click", function(e){ - e.preventDefault(); - onNwRT($(this)); - }); - - $(".rt_btn").click(function(e){ - e.preventDefault(); - if ($("#textbox").length > 0) { - onInfoRT($(this)); - } else { - $("#info_head").after('

    What\'s happening?

    ' + formHTML); - formFunc(); - onInfoRT($(this)); - } - }); - - $(".replie_btn").click(function(e){ - e.preventDefault(); - var replie_id = $("#info_name").text(); - if ($("#textbox").length > 0) { - onInfoReplie($(this)); - } else { - $("#info_head").after('

    In reply to ' + replie_id + '

    ' + formHTML); - formFunc(); - onInfoReplie($(this)); + $("#allTimeline").click(function(e) { + var $this = $(e.target); + var type = $this.attr('class'); + switch(type) { + case 'rt_btn': + e.preventDefault(); + if ($("#textbox").length > 0) { + onInfoRT($this); + } else { + $("#info_head").after('

    What\'s happening?

    ' + formHTML); + formFunc(); + onInfoRT($this); + } + break; + case 'retw_btn': + e.preventDefault(); + onNwRT($this); + break; + case 'replie_btn': + e.preventDefault(); + var replie_id = $this.parent().parent().find(".status_word").find(".user_name").text(); + if ($("#textbox").length > 0) { + onInfoReplie($this,e); + } else { + $("#info_head").after('

    In reply to ' + replie_id + '

    ' + formHTML); + formFunc(); + onInfoReplie($this,e); + } + break; + case 'favor_btn': + e.preventDefault(); + onFavor($this); + break; + case 'unfav_btn': + e.preventDefault(); + UnFavor($this); + break; + case 'rt_undo': + e.preventDefault(); + onUndoRt($this); + break; } }); @@ -47,23 +57,14 @@ $(function(){ leaveWord(); } }); - if (getCookie("infoShow") == "hide") { onHide(); } - - - $("#info_hide_btn").live("click", function(){ + $("#info_hide_btn").click(function(){ onHide(); }); - - $(".favor_btn").live("click", function(){ - e.preventDefault(); - onFavor($(this)); - }); - - $("#info_follow_btn").live("click", function(e){ + $("#info_follow_btn").click(function(e){ e.preventDefault(); var $this = $(this); var id = $("#info_name").text(); @@ -74,7 +75,7 @@ $(function(){ data: "action=create&id=" + id, success: function(msg) { if (msg.indexOf("success") >= 0) { - updateSentTip("You have followed " + id + "!"); + updateSentTip("You have followed " + id + "!", 3000, "success"); $this.after('Unfollow'); $this.remove(); if($('#unblock') != null){ @@ -91,7 +92,7 @@ $(function(){ }); }); - $("#info_block_btn").live("click", function(e){ + $("#info_block_btn").click(function(e){ e.preventDefault(); var $this = $(this); var id = $("#info_name").text(); @@ -117,7 +118,7 @@ $(function(){ } }); - $("#block_btn").live("click", function(e){ + $("#block_btn").click(function(e){ e.preventDefault(); var $this = $(this); var id = $("#info_name").text(); @@ -147,7 +148,7 @@ $(function(){ } }); - $("#unblock_btn").live("click", function(e){ + $("#unblock_btn").click(function(e){ e.preventDefault(); var $this = $(this); var id = $("#info_name").text(); @@ -172,6 +173,46 @@ $(function(){ }); } }); + + $("#report_btn").click(function(e){ + e.preventDefault(); + var $this = $(this); + var id = $("#info_name").text(); + if (confirm("Are you sure to report " + id + " for spam?")) { + updateSentTip("Reporting " + id + " for spam...", 5000, "ing"); + $.ajax({ + url: "ajax/relation.php", + type: "POST", + data: "action=report&id=" + id, + success: function(msg) { + if (msg.indexOf("success") >= 0) { + updateSentTip("You have reported " + id + " for spam!", 3000, "success"); + /* + $this.after('Unblock'); + $this.remove(); + + if($('#info_block_btn') != null){ + $('#info_block_btn').after('Follow'); + $('#info_block_btn').remove(); + } + */ + } else { + updateSentTip("Failed to report " + id + " for spam, please try again.", 3000, "failure"); + } + }, + error: function(msg) { + updateSentTip("Failed to report " + id + " for spam, please try again.", 3000, "failure"); + } + }); + } + }); + $("#tweeting_button").click(function (e) { + e.preventDefault(); + if ($("#textbox").val().length >0 ) { + updateStatus(); + } + }); + }); function onInfoReplie($this) { @@ -184,8 +225,11 @@ function onInfoReplie($this) { function onInfoRT($this) { var replie_id = $("#info_name").text(); - $("#textbox").val("RT @" + replie_id + ":" + $this.parent().parent().find(".status_word").text()); - $("#textbox").focus(); + var status_word = $this.parent().parent().find(".status_word").clone(); + status_word.find('.tweet a[rel=noreferrer]').each(function(){ + $(this).text($(this).attr('href')); + }); + $("#textbox").focus().val(" RT @" + replie_id + ":" + status_word.text().replace(replie_id, "")).caret(0); leaveWord(); } function getCookie(name){ diff --git a/js/userlist.js b/js/userlist.js index 5143132..50944d3 100644 --- a/js/userlist.js +++ b/js/userlist.js @@ -1,152 +1,233 @@ -$(function () { - $(".rank_img img").tipsy({gravity: 's'}); - $(".rank_img img").live("click", function (e) { - $(".right_menu").hide(); - $(this).parent().parent().parent().find(".right_menu").css("display", "block"); - e.preventDefault(); - }); - $('body').click(function () { - $(".right_menu").hide(); - }); - $('.status_author li a').click(function () { - $(".right_menu").hide(); - }); - $(".ul_mention").live("click", function (e) { - e.preventDefault(); - ulmention($(this), e); - }); - $(".ul_dm").live("click", function (e) { - e.preventDefault(); - uldm($(this), e); - }); - $(".ul_follow").live("click", function (e) { - e.preventDefault(); - var $this = $(this); - var id = $this.parent().parent().parent().find(".rank_screenname").text(); - updateSentTip("Following " + id + "...", 5000, "ing"); - $.ajax({ - url: "ajax/relation.php", - type: "POST", - data: "action=create&id=" + id, - success: function (msg) { - if (msg.indexOf("success") >= 0) { - $this.parent().parent().parent().addClass("reply"); - updateSentTip("You have followed " + id + "!", 3000, "success"); - } else { - updateSentTip("Failed to follow " + id + ", please try again.", 3000, "failure"); - } - }, - error: function (msg) { - updateSentTip("Failed to follow " + id + ", please try again.", 3000, "failure"); - } - }); - }); - $(".ul_unfollow").live("click", function (e) { - e.preventDefault(); - var $this = $(this); - var id = $this.parent().parent().parent().find(".rank_screenname").text(); - if (confirm("Are you sure to unfollow " + id + " ?")) { - updateSentTip("Unfollowing " + id + "...", 5000, "ing"); - $.ajax({ - url: "ajax/relation.php", - type: "POST", - data: "action=destory&id=" + id, - success: function (msg) { - if (msg.indexOf("success") >= 0) { - $this.parent().parent().parent().addClass("filter"); - updateSentTip("You have unfollowed " + id + "!", 3000, "success"); - } else { - updateSentTip("Failed to unfollow " + id + ", please try again.", 3000, "failure"); - } - }, - error: function (msg) { - updateSentTip("Failed to unfollow " + id + ", please try again.", 3000, "failure"); - } - }); - } - }); - $(".ul_block").live("click", function (e) { - e.preventDefault(); - var $this = $(this); - var id = $this.parent().parent().parent().find(".rank_screenname").text(); - if (confirm("Are you sure to block " + id + " ?")) { - updateSentTip("Blocking " + id + "...", 5000, "ing"); - $.ajax({ - url: "ajax/relation.php", - type: "POST", - data: "action=block&id=" + id, - success: function (msg) { - if (msg.indexOf("success") >= 0) { - $this.parent().parent().parent().fadeOut("normal"); - updateSentTip("You have blocked " + id + "!", 3000, "success"); - } else { - updateSentTip("Failed to block " + id + ", please try again.", 3000, "failure"); - } - }, - error: function (msg) { - updateSentTip("Failed to block " + id + ", please try again.", 3000, "failure"); - } - }); - } - }); -}) -$(".ul_spam").live("click", function (e) { - e.preventDefault(); - var $this = $(this); - var id = $this.parent().parent().parent().find(".rank_screenname").text(); - if (confirm("Are you sure to report " + id + " ?")) { - updateSentTip("Reporting " + id + " as a spammer...", 5000, "ing"); - $.ajax({ - url: "ajax/reportSpam.php", - type: "POST", - data: "spammer=" + id, - success: function (msg) { - if (msg.indexOf("success") >= 0) { - $this.parent().parent().parent().fadeOut("normal"); - updateSentTip("Successfully reported!", 3000, "success"); - } else { - updateSentTip("Failed to report " + id + ", please try again.", 3000, "failure"); - } - }, - error: function (msg) { - updateSentTip("Failed to report " + id + ", please try again.", 3000, "failure"); - } - }); - } -}); -function ulmention($this, e) { - var replie_id = $this.parent().parent().parent().find(".rank_screenname").text(); - if ($("#textbox").length > 0) { - var text = "@" + replie_id; - scroll(0, 0); - $("#textbox").focus(); - $("#textbox").val($("#textbox").val() + text + ' '); - leaveWord(); - } else { - $("#statuses h2").before('

    Mention

    ' + formHTML); - formFunc(); - var text = "@" + replie_id; - scroll(0, 0); - $("#textbox").focus(); - $("#textbox").val($("#textbox").val() + text + ' '); - leaveWord(); - } -} -function uldm($this, e) { - var replie_id = $this.parent().parent().parent().find(".rank_screenname").text(); - if ($("#textbox").length > 0) { - var text = "D " + replie_id; - scroll(0, 0); - $("#textbox").focus(); - $("#textbox").val($("#textbox").val() + text + ' '); - leaveWord(); - } else { - $("#statuses h2").before('

    Send direct message

    ' + formHTML); - formFunc(); - var text = "D " + replie_id; - scroll(0, 0); - $("#textbox").focus(); - $("#textbox").val($("#textbox").val() + text + ' '); - leaveWord(); - } -} \ No newline at end of file +$(function () { + $('ol.rank_list').click(function(e){ + var $this = $(e.target); + switch(e.target.id) { + //avatar menu + case 'avatar': + e.preventDefault(); + ulinit($this); + break; + } + switch(e.target.className) { + //avatar_menu_action + case 'ul_mention': + e.preventDefault(); + ulmention($this,e); + break; + case 'ul_dm': + e.preventDefault(); + uldm($this,e); + break; + case 'ul_follow': + e.preventDefault(); + ulfollow($this); + break; + case 'ul_unfollow': + e.preventDefault(); + ulunfollow($this); + break; + case 'ul_block': + e.preventDefault(); + ulblock($this); + break; + case 'ul_unblock': + e.preventDefault(); + ulunblock($this); + break; + case 'ul_spam': + e.preventDefault(); + ulspam($this); + break; + } + }); +}) +function ulinit($this) { + var $that = $this.parent().parent(); + var ul = $that.find(".right_menu"); + if (ul.length>0) { + ul.fadeIn('fast'); + } else { + var id = getid($this); + $that.addClass("loading"); + $.ajax({ + url: 'ajax/relation.php', + type: "POST", + data: "action=show&id=" + id, + success: function(msg){ + var html = ''; + $this.parent().after(html); + $(html).fadeIn('fast'); + $that.removeClass("loading"); + }, + error: function(){ + return; + } + }); + } +} +function ulmention($this, e) { + var replie_id = getid($this.parent());; + if ($("#textbox").length > 0) { + var text = "@" + replie_id; + scroll(0, 0); + $("#textbox").focus().val($("#textbox").val() + text + ' '); + leaveWord(); + } else { + $("#statuses h2").before('

    Mention

    ' + formHTML); + formFunc(); + var text = "@" + replie_id; + scroll(0, 0); + $("#textbox").focus().val($("#textbox").val() + text + ' '); + leaveWord(); + } +} +function uldm($this, e) { + var replie_id = getid($this.parent()); + if ($("#textbox").length > 0) { + var text = "D " + replie_id; + } else { + $("#statuses h2").before('

    Send direct message

    ' + formHTML); + formFunc(); + var text = "D " + replie_id; + } + scroll(0, 0); + $("#textbox").focus().val($("#textbox").val() + text + ' '); + leaveWord(); +} +function ulfollow($this) { + var id = getid($this.parent()); + updateSentTip("Following " + id + "...", 5000, "ing"); + $.ajax({ + url: "ajax/relation.php", + type: "POST", + data: "action=create&id=" + id, + success: function (msg) { + if (msg.indexOf("success") >= 0) { + $this.parent().parent().parent().addClass("reply"); + updateSentTip("You have followed " + id + "!", 3000, "success"); + } else { + updateSentTip("Failed to follow " + id + ", please try again.", 3000, "failure"); + } + }, + error: function (msg) { + updateSentTip("Failed to follow " + id + ", please try again.", 3000, "failure"); + } + }); +} +function ulunfollow($this) { + var id = getid($this.parent());; + if (confirm("Are you sure to unfollow " + id + " ?")) { + updateSentTip("Unfollowing " + id + "...", 5000, "ing"); + $.ajax({ + url: "ajax/relation.php", + type: "POST", + data: "action=destory&id=" + id, + success: function (msg) { + if (msg.indexOf("success") >= 0) { + $this.parent().parent().parent().addClass("filter"); + updateSentTip("You have unfollowed " + id + "!", 3000, "success"); + } else { + updateSentTip("Failed to unfollow " + id + ", please try again.", 3000, "failure"); + } + }, + error: function (msg) { + updateSentTip("Failed to unfollow " + id + ", please try again.", 3000, "failure"); + } + }); + } +} +function ulblock($this) { + var id = getid($this.parent());; + if (confirm("Are you sure to block " + id + " ?")) { + updateSentTip("Blocking " + id + "...", 5000, "ing"); + $.ajax({ + url: "ajax/relation.php", + type: "POST", + data: "action=block&id=" + id, + success: function (msg) { + if (msg.indexOf("success") >= 0) { + $this.parent().parent().parent().fadeOut("normal"); + updateSentTip("You have blocked " + id + "!", 3000, "success"); + } else { + updateSentTip("Failed to block " + id + ", please try again.", 3000, "failure"); + } + }, + error: function (msg) { + updateSentTip("Failed to block " + id + ", please try again.", 3000, "failure"); + } + }); + } +} +function ulunblock($this) { + var id = getid($this.parent());; + if (confirm("Are you sure to unblock " + id + " ?")) { + updateSentTip("Unblocking " + id + "...", 5000, "ing"); + $.ajax({ + url: "ajax/relation.php", + type: "POST", + data: "action=unblock&id=" + id, + success: function (msg) { + if (msg.indexOf("success") >= 0) { + $this.parent().parent().parent().fadeOut("normal"); + updateSentTip("You have unblocked " + id + "!", 3000, "success"); + } else { + updateSentTip("Failed to unblock " + id + ", please try again.", 3000, "failure"); + } + }, + error: function (msg) { + updateSentTip("Failed to unblock " + id + ", please try again.", 3000, "failure"); + } + }); + } +} +function ulspam($this) { + var id = getid($this.parent()); + if (confirm("Are you sure to report " + id + " ?")) { + updateSentTip("Reporting " + id + " as a spammer...", 5000, "ing"); + $.ajax({ + url: "ajax/reportSpam.php", + type: "POST", + data: "spammer=" + id, + success: function (msg) { + if (msg.indexOf("success") >= 0) { + $this.parent().parent().parent().fadeOut("normal"); + updateSentTip("Successfully reported!", 3000, "success"); + } else { + updateSentTip("Failed to report " + id + ", please try again.", 3000, "failure"); + } + }, + error: function (msg) { + updateSentTip("Failed to report " + id + ", please try again.", 3000, "failure"); + } + }); + } +} +var getid = function ($this) { + return $this.parent().parent().find(".rank_screenname").text(); +} +$(document).ready(function(){ + $.ajax({ + url: '../ajax/updateProfile.php', + type: "GET", + success: function(){ + freshProfile(); + } + }); +}); \ No newline at end of file diff --git a/lib/config.sample.php b/lib/config.sample.php new file mode 100644 index 0000000..954654e --- /dev/null +++ b/lib/config.sample.php @@ -0,0 +1,21 @@ + diff --git a/lib/mobile_device_detect.php b/lib/mobile_device_detect.php index 4f86fd6..f0f0fc9 100644 --- a/lib/mobile_device_detect.php +++ b/lib/mobile_device_detect.php @@ -1,122 +1,2 @@ 'ppc;', from array to reduce false positives - * 09.03.09 - Added support for Palm OS options - * 09.03.09 - Added sample .htaccess html.html and help.html files to download - -*/ - -function mobile_device_detect($iphone=true,$android=true,$opera=true,$blackberry=true,$palm=true,$windows=true,$mobileredirect=false,$desktopredirect=false){ - - $mobile_browser = false; // set mobile browser as false till we can prove otherwise - $user_agent = $_SERVER['HTTP_USER_AGENT']; // get the user agent value - this should be cleaned to ensure no nefarious input gets executed - $accept = $_SERVER['HTTP_ACCEPT']; // get the content accept value - this should be cleaned to ensure no nefarious input gets executed - - switch(true){ // using a switch against the following statements which could return true is more efficient than the previous method of using if statements - - case (eregi('ipod',$user_agent)||eregi('iphone',$user_agent)); // we find the words iphone or ipod in the user agent - $mobile_browser = $iphone; // mobile browser is either true or false depending on the setting of iphone when calling the function - if(substr($iphone,0,4)=='http'){ // does the value of iphone resemble a url - $mobileredirect = $iphone; // set the mobile redirect url to the url value stored in the iphone value - } // ends the if for iphone being a url - break; // break out and skip the rest if we've had a match on the iphone or ipod - - case (eregi('android',$user_agent)); // we find android in the user agent - $mobile_browser = $android; // mobile browser is either true or false depending on the setting of android when calling the function - if(substr($android,0,4)=='http'){ // does the value of android resemble a url - $mobileredirect = $android; // set the mobile redirect url to the url value stored in the android value - } // ends the if for android being a url - break; // break out and skip the rest if we've had a match on android - - case (eregi('opera mini',$user_agent)); // we find opera mini in the user agent - $mobile_browser = $opera; // mobile browser is either true or false depending on the setting of opera when calling the function - if(substr($opera,0,4)=='http'){ // does the value of opera resemble a rul - $mobileredirect = $opera; // set the mobile redirect url to the url value stored in the opera value - } // ends the if for opera being a url - break; // break out and skip the rest if we've had a match on opera - - case (eregi('blackberry',$user_agent)); // we find blackberry in the user agent - $mobile_browser = $blackberry; // mobile browser is either true or false depending on the setting of blackberry when calling the function - if(substr($blackberry,0,4)=='http'){ // does the value of blackberry resemble a rul - $mobileredirect = $blackberry; // set the mobile redirect url to the url value stored in the blackberry value - } // ends the if for blackberry being a url - break; // break out and skip the rest if we've had a match on blackberry - - case (preg_match('/(palm os|palm|hiptop|avantgo|plucker|xiino|blazer|elaine)/i',$user_agent)); // we find palm os in the user agent - the i at the end makes it case insensitive - $mobile_browser = $palm; // mobile browser is either true or false depending on the setting of palm when calling the function - if(substr($palm,0,4)=='http'){ // does the value of palm resemble a rul - $mobileredirect = $palm; // set the mobile redirect url to the url value stored in the palm value - } // ends the if for palm being a url - break; // break out and skip the rest if we've had a match on palm os - - case (preg_match('/(windows ce; ppc;|windows ce; smartphone;|windows ce; iemobile)/i',$user_agent)); // we find windows mobile in the user agent - the i at the end makes it case insensitive - $mobile_browser = $windows; // mobile browser is either true or false depending on the setting of windows when calling the function - if(substr($windows,0,4)=='http'){ // does the value of windows resemble a rul - $mobileredirect = $windows; // set the mobile redirect url to the url value stored in the windows value - } // ends the if for windows being a url - break; // break out and skip the rest if we've had a match on windows - - case (preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|vodafone|o2|pocket|kindle|mobile|pda|psp|treo)/i',$user_agent)); // check if any of the values listed create a match on the user agent - these are some of the most common terms used in agents to identify them as being mobile devices - the i at the end makes it case insensitive - $mobile_browser = true; // set mobile browser to true - break; // break out and skip the rest if we've preg_match on the user agent returned true - - case ((strpos($accept,'text/vnd.wap.wml')>0)||(strpos($accept,'application/vnd.wap.xhtml+xml')>0)); // is the device showing signs of support for text/vnd.wap.wml or application/vnd.wap.xhtml+xml - $mobile_browser = true; // set mobile browser to true - break; // break out and skip the rest if we've had a match on the content accept headers - - case (isset($_SERVER['HTTP_X_WAP_PROFILE'])||isset($_SERVER['HTTP_PROFILE'])); // is the device giving us a HTTP_X_WAP_PROFILE or HTTP_PROFILE header - only mobile devices would do this - $mobile_browser = true; // set mobile browser to true - break; // break out and skip the final step if we've had a return true on the mobile specfic headers - - case (in_array(strtolower(substr($user_agent,0,4)),array('1207'=>'1207','3gso'=>'3gso','4thp'=>'4thp','501i'=>'501i','502i'=>'502i','503i'=>'503i','504i'=>'504i','505i'=>'505i','506i'=>'506i','6310'=>'6310','6590'=>'6590','770s'=>'770s','802s'=>'802s','a wa'=>'a wa','acer'=>'acer','acs-'=>'acs-','airn'=>'airn','alav'=>'alav','asus'=>'asus','attw'=>'attw','au-m'=>'au-m','aur '=>'aur ','aus '=>'aus ','abac'=>'abac','acoo'=>'acoo','aiko'=>'aiko','alco'=>'alco','alca'=>'alca','amoi'=>'amoi','anex'=>'anex','anny'=>'anny','anyw'=>'anyw','aptu'=>'aptu','arch'=>'arch','argo'=>'argo','bell'=>'bell','bird'=>'bird','bw-n'=>'bw-n','bw-u'=>'bw-u','beck'=>'beck','benq'=>'benq','bilb'=>'bilb','blac'=>'blac','c55/'=>'c55/','cdm-'=>'cdm-','chtm'=>'chtm','capi'=>'capi','comp'=>'comp','cond'=>'cond','craw'=>'craw','dall'=>'dall','dbte'=>'dbte','dc-s'=>'dc-s','dica'=>'dica','ds-d'=>'ds-d','ds12'=>'ds12','dait'=>'dait','devi'=>'devi','dmob'=>'dmob','doco'=>'doco','dopo'=>'dopo','el49'=>'el49','erk0'=>'erk0','esl8'=>'esl8','ez40'=>'ez40','ez60'=>'ez60','ez70'=>'ez70','ezos'=>'ezos','ezze'=>'ezze','elai'=>'elai','emul'=>'emul','eric'=>'eric','ezwa'=>'ezwa','fake'=>'fake','fly-'=>'fly-','fly_'=>'fly_','g-mo'=>'g-mo','g1 u'=>'g1 u','g560'=>'g560','gf-5'=>'gf-5','grun'=>'grun','gene'=>'gene','go.w'=>'go.w','good'=>'good','grad'=>'grad','hcit'=>'hcit','hd-m'=>'hd-m','hd-p'=>'hd-p','hd-t'=>'hd-t','hei-'=>'hei-','hp i'=>'hp i','hpip'=>'hpip','hs-c'=>'hs-c','htc '=>'htc ','htc-'=>'htc-','htca'=>'htca','htcg'=>'htcg','htcp'=>'htcp','htcs'=>'htcs','htct'=>'htct','htc_'=>'htc_','haie'=>'haie','hita'=>'hita','huaw'=>'huaw','hutc'=>'hutc','i-20'=>'i-20','i-go'=>'i-go','i-ma'=>'i-ma','i230'=>'i230','iac'=>'iac','iac-'=>'iac-','iac/'=>'iac/','ig01'=>'ig01','im1k'=>'im1k','inno'=>'inno','iris'=>'iris','jata'=>'jata','java'=>'java','kddi'=>'kddi','kgt'=>'kgt','kgt/'=>'kgt/','kpt '=>'kpt ','kwc-'=>'kwc-','klon'=>'klon','lexi'=>'lexi','lg g'=>'lg g','lg-a'=>'lg-a','lg-b'=>'lg-b','lg-c'=>'lg-c','lg-d'=>'lg-d','lg-f'=>'lg-f','lg-g'=>'lg-g','lg-k'=>'lg-k','lg-l'=>'lg-l','lg-m'=>'lg-m','lg-o'=>'lg-o','lg-p'=>'lg-p','lg-s'=>'lg-s','lg-t'=>'lg-t','lg-u'=>'lg-u','lg-w'=>'lg-w','lg/k'=>'lg/k','lg/l'=>'lg/l','lg/u'=>'lg/u','lg50'=>'lg50','lg54'=>'lg54','lge-'=>'lge-','lge/'=>'lge/','lynx'=>'lynx','leno'=>'leno','m1-w'=>'m1-w','m3ga'=>'m3ga','m50/'=>'m50/','maui'=>'maui','mc01'=>'mc01','mc21'=>'mc21','mcca'=>'mcca','medi'=>'medi','meri'=>'meri','mio8'=>'mio8','mioa'=>'mioa','mo01'=>'mo01','mo02'=>'mo02','mode'=>'mode','modo'=>'modo','mot '=>'mot ','mot-'=>'mot-','mt50'=>'mt50','mtp1'=>'mtp1','mtv '=>'mtv ','mate'=>'mate','maxo'=>'maxo','merc'=>'merc','mits'=>'mits','mobi'=>'mobi','motv'=>'motv','mozz'=>'mozz','n100'=>'n100','n101'=>'n101','n102'=>'n102','n202'=>'n202','n203'=>'n203','n300'=>'n300','n302'=>'n302','n500'=>'n500','n502'=>'n502','n505'=>'n505','n700'=>'n700','n701'=>'n701','n710'=>'n710','nec-'=>'nec-','nem-'=>'nem-','newg'=>'newg','neon'=>'neon','netf'=>'netf','noki'=>'noki','nzph'=>'nzph','o2 x'=>'o2 x','o2-x'=>'o2-x','opwv'=>'opwv','owg1'=>'owg1','opti'=>'opti','oran'=>'oran','p800'=>'p800','pand'=>'pand','pg-1'=>'pg-1','pg-2'=>'pg-2','pg-3'=>'pg-3','pg-6'=>'pg-6','pg-8'=>'pg-8','pg-c'=>'pg-c','pg13'=>'pg13','phil'=>'phil','pn-2'=>'pn-2','pt-g'=>'pt-g','palm'=>'palm','pana'=>'pana','pire'=>'pire','pock'=>'pock','pose'=>'pose','psio'=>'psio','qa-a'=>'qa-a','qc-2'=>'qc-2','qc-3'=>'qc-3','qc-5'=>'qc-5','qc-7'=>'qc-7','qc07'=>'qc07','qc12'=>'qc12','qc21'=>'qc21','qc32'=>'qc32','qc60'=>'qc60','qci-'=>'qci-','qwap'=>'qwap','qtek'=>'qtek','r380'=>'r380','r600'=>'r600','raks'=>'raks','rim9'=>'rim9','rove'=>'rove','s55/'=>'s55/','sage'=>'sage','sams'=>'sams','sc01'=>'sc01','sch-'=>'sch-','scp-'=>'scp-','sdk/'=>'sdk/','se47'=>'se47','sec-'=>'sec-','sec0'=>'sec0','sec1'=>'sec1','semc'=>'semc','sgh-'=>'sgh-','shar'=>'shar','sie-'=>'sie-','sk-0'=>'sk-0','sl45'=>'sl45','slid'=>'slid','smb3'=>'smb3','smt5'=>'smt5','sp01'=>'sp01','sph-'=>'sph-','spv '=>'spv ','spv-'=>'spv-','sy01'=>'sy01','samm'=>'samm','sany'=>'sany','sava'=>'sava','scoo'=>'scoo','send'=>'send','siem'=>'siem','smar'=>'smar','smit'=>'smit','soft'=>'soft','sony'=>'sony','t-mo'=>'t-mo','t218'=>'t218','t250'=>'t250','t600'=>'t600','t610'=>'t610','t618'=>'t618','tcl-'=>'tcl-','tdg-'=>'tdg-','telm'=>'telm','tim-'=>'tim-','ts70'=>'ts70','tsm-'=>'tsm-','tsm3'=>'tsm3','tsm5'=>'tsm5','tx-9'=>'tx-9','tagt'=>'tagt','talk'=>'talk','teli'=>'teli','topl'=>'topl','tosh'=>'tosh','up.b'=>'up.b','upg1'=>'upg1','utst'=>'utst','v400'=>'v400','v750'=>'v750','veri'=>'veri','vk-v'=>'vk-v','vk40'=>'vk40','vk50'=>'vk50','vk52'=>'vk52','vk53'=>'vk53','vm40'=>'vm40','vx98'=>'vx98','virg'=>'virg','vite'=>'vite','voda'=>'voda','vulc'=>'vulc','w3c '=>'w3c ','w3c-'=>'w3c-','wapj'=>'wapj','wapp'=>'wapp','wapu'=>'wapu','wapm'=>'wapm','wig '=>'wig ','wapi'=>'wapi','wapr'=>'wapr','wapv'=>'wapv','wapy'=>'wapy','wapa'=>'wapa','waps'=>'waps','wapt'=>'wapt','winc'=>'winc','winw'=>'winw','wonu'=>'wonu','x700'=>'x700','xda2'=>'xda2','xdag'=>'xdag','yas-'=>'yas-','your'=>'your','zte-'=>'zte-','zeto'=>'zeto','acs-'=>'acs-','alav'=>'alav','alca'=>'alca','amoi'=>'amoi','aste'=>'aste','audi'=>'audi','avan'=>'avan','benq'=>'benq','bird'=>'bird','blac'=>'blac','blaz'=>'blaz','brew'=>'brew','brvw'=>'brvw','bumb'=>'bumb','ccwa'=>'ccwa','cell'=>'cell','cldc'=>'cldc','cmd-'=>'cmd-','dang'=>'dang','doco'=>'doco','eml2'=>'eml2','eric'=>'eric','fetc'=>'fetc','hipt'=>'hipt','http'=>'http','ibro'=>'ibro','idea'=>'idea','ikom'=>'ikom','inno'=>'inno','ipaq'=>'ipaq','jbro'=>'jbro','jemu'=>'jemu','java'=>'java','jigs'=>'jigs','kddi'=>'kddi','keji'=>'keji','kyoc'=>'kyoc','kyok'=>'kyok','leno'=>'leno','lg-c'=>'lg-c','lg-d'=>'lg-d','lg-g'=>'lg-g','lge-'=>'lge-','libw'=>'libw','m-cr'=>'m-cr','maui'=>'maui','maxo'=>'maxo','midp'=>'midp','mits'=>'mits','mmef'=>'mmef','mobi'=>'mobi','mot-'=>'mot-','moto'=>'moto','mwbp'=>'mwbp','mywa'=>'mywa','nec-'=>'nec-','newt'=>'newt','nok6'=>'nok6','noki'=>'noki','o2im'=>'o2im','opwv'=>'opwv','palm'=>'palm','pana'=>'pana','pant'=>'pant','pdxg'=>'pdxg','phil'=>'phil','play'=>'play','pluc'=>'pluc','port'=>'port','prox'=>'prox','qtek'=>'qtek','qwap'=>'qwap','rozo'=>'rozo','sage'=>'sage','sama'=>'sama','sams'=>'sams','sany'=>'sany','sch-'=>'sch-','sec-'=>'sec-','send'=>'send','seri'=>'seri','sgh-'=>'sgh-','shar'=>'shar','sie-'=>'sie-','siem'=>'siem','smal'=>'smal','smar'=>'smar','sony'=>'sony','sph-'=>'sph-','symb'=>'symb','t-mo'=>'t-mo','teli'=>'teli','tim-'=>'tim-','tosh'=>'tosh','treo'=>'treo','tsm-'=>'tsm-','upg1'=>'upg1','upsi'=>'upsi','vk-v'=>'vk-v','voda'=>'voda','vx52'=>'vx52','vx53'=>'vx53','vx60'=>'vx60','vx61'=>'vx61','vx70'=>'vx70','vx80'=>'vx80','vx81'=>'vx81','vx83'=>'vx83','vx85'=>'vx85','wap-'=>'wap-','wapa'=>'wapa','wapi'=>'wapi','wapp'=>'wapp','wapr'=>'wapr','webc'=>'webc','whit'=>'whit','winw'=>'winw','wmlb'=>'wmlb','xda-'=>'xda-',))); // check against a list of trimmed user agents to see if we find a match - $mobile_browser = true; // set mobile browser to true - break; // break even though it's the last statement in the switch so there's nothing to break away from but it seems better to include it than exclude it - - } // ends the switch - - // tell adaptation services (transcoders and proxies) to not alter the content based on user agent as it's already being managed by this script - header('Cache-Control: no-transform'); // http://mobiforge.com/developing/story/setting-http-headers-advise-transcoding-proxies - header('Vary: User-Agent, Accept'); // http://mobiforge.com/developing/story/setting-http-headers-advise-transcoding-proxies - - // if redirect (either the value of the mobile or desktop redirect depending on the value of $mobile_browser) is true redirect else we return the status of $mobile_browser - if($redirect = ($mobile_browser==true) ? $mobileredirect : $desktopredirect){ - header('Location: '.$redirect); // redirect to the right url for this device - exit; - }else{ - return $mobile_browser; // will return either true or false - } - -} // ends function mobile_device_detect - -?> + function mobile_device_detect($iphone=true,$ipad=true,$android=true,$opera=true,$blackberry=true,$palm=true,$windows=true,$mobileredirect=false,$desktopredirect=false){ $mobile_browser = false; $user_agent = $_SERVER['HTTP_USER_AGENT']; $accept = $_SERVER['HTTP_ACCEPT']; switch(true){ case (preg_match('/ipad/i',$user_agent)); $mobile_browser = $ipad; $status = 'Apple iPad'; if(substr($ipad,0,4)=='http'){ $mobileredirect = $ipad; } break; case (preg_match('/ipod/i',$user_agent)||preg_match('/iphone/i',$user_agent)); $mobile_browser = $iphone; $status = 'Apple'; if(substr($iphone,0,4)=='http'){ $mobileredirect = $iphone; } break; case (preg_match('/android/i',$user_agent)); $mobile_browser = $android; $status = 'Android'; if(substr($android,0,4)=='http'){ $mobileredirect = $android; } break; case (preg_match('/opera mini/i',$user_agent)); $mobile_browser = $opera; $status = 'Opera'; if(substr($opera,0,4)=='http'){ $mobileredirect = $opera; } break; case (preg_match('/blackberry/i',$user_agent)); $mobile_browser = $blackberry; $status = 'Blackberry'; if(substr($blackberry,0,4)=='http'){ $mobileredirect = $blackberry; } break; case (preg_match('/(pre\/|palm os|palm|hiptop|avantgo|plucker|xiino|blazer|elaine)/i',$user_agent)); $mobile_browser = $palm; $status = 'Palm'; if(substr($palm,0,4)=='http'){ $mobileredirect = $palm; } break; case (preg_match('/(iris|3g_t|windows ce|opera mobi|windows ce; smartphone;|windows ce; iemobile)/i',$user_agent)); $mobile_browser = $windows; $status = 'Windows Smartphone'; if(substr($windows,0,4)=='http'){ $mobileredirect = $windows; } break; case (preg_match('/(mini 9.5|vx1000|lge |m800|e860|u940|ux840|compal|wireless| mobi|ahong|lg380|lgku|lgu900|lg210|lg47|lg920|lg840|lg370|sam-r|mg50|s55|g83|t66|vx400|mk99|d615|d763|el370|sl900|mp500|samu3|samu4|vx10|xda_|samu5|samu6|samu7|samu9|a615|b832|m881|s920|n210|s700|c-810|_h797|mob-x|sk16d|848b|mowser|s580|r800|471x|v120|rim8|c500foma:|160x|x160|480x|x640|t503|w839|i250|sprint|w398samr810|m5252|c7100|mt126|x225|s5330|s820|htil-g1|fly v71|s302|-x113|novarra|k610i|-three|8325rc|8352rc|sanyo|vx54|c888|nx250|n120|mtk |c5588|s710|t880|c5005|i;458x|p404i|s210|c5100|teleca|s940|c500|s590|foma|samsu|vx8|vx9|a1000|_mms|myx|a700|gu1100|bc831|e300|ems100|me701|me702m-three|sd588|s800|8325rc|ac831|mw200|brew |d88|htc\/|htc_touch|355x|m50|km100|d736|p-9521|telco|sl74|ktouch|m4u\/|me702|8325rc|kddi|phone|lg |sonyericsson|samsung|240x|x320|vx10|nokia|sony cmd|motorola|up.browser|up.link|mmp|symbian|smartphone|midp|wap|vodafone|o2|pocket|kindle|mobile|psp|treo)/i',$user_agent)); $mobile_browser = true; $status = 'Mobile matched on piped preg_match'; break; case ((strpos($accept,'text/vnd.wap.wml')>0)||(strpos($accept,'application/vnd.wap.xhtml+xml')>0)); $mobile_browser = true; $status = 'Mobile matched on content accept header'; break; case (isset($_SERVER['HTTP_X_WAP_PROFILE'])||isset($_SERVER['HTTP_PROFILE'])); $mobile_browser = true; $status = 'Mobile matched on profile headers being set'; break; case (in_array(strtolower(substr($user_agent,0,4)),array('1207'=>'1207','3gso'=>'3gso','4thp'=>'4thp','501i'=>'501i','502i'=>'502i','503i'=>'503i','504i'=>'504i','505i'=>'505i','506i'=>'506i','6310'=>'6310','6590'=>'6590','770s'=>'770s','802s'=>'802s','a wa'=>'a wa','acer'=>'acer','acs-'=>'acs-','airn'=>'airn','alav'=>'alav','asus'=>'asus','attw'=>'attw','au-m'=>'au-m','aur '=>'aur ','aus '=>'aus ','abac'=>'abac','acoo'=>'acoo','aiko'=>'aiko','alco'=>'alco','alca'=>'alca','amoi'=>'amoi','anex'=>'anex','anny'=>'anny','anyw'=>'anyw','aptu'=>'aptu','arch'=>'arch','argo'=>'argo','bell'=>'bell','bird'=>'bird','bw-n'=>'bw-n','bw-u'=>'bw-u','beck'=>'beck','benq'=>'benq','bilb'=>'bilb','blac'=>'blac','c55/'=>'c55/','cdm-'=>'cdm-','chtm'=>'chtm','capi'=>'capi','cond'=>'cond','craw'=>'craw','dall'=>'dall','dbte'=>'dbte','dc-s'=>'dc-s','dica'=>'dica','ds-d'=>'ds-d','ds12'=>'ds12','dait'=>'dait','devi'=>'devi','dmob'=>'dmob','doco'=>'doco','dopo'=>'dopo','el49'=>'el49','erk0'=>'erk0','esl8'=>'esl8','ez40'=>'ez40','ez60'=>'ez60','ez70'=>'ez70','ezos'=>'ezos','ezze'=>'ezze','elai'=>'elai','emul'=>'emul','eric'=>'eric','ezwa'=>'ezwa','fake'=>'fake','fly-'=>'fly-','fly_'=>'fly_','g-mo'=>'g-mo','g1 u'=>'g1 u','g560'=>'g560','gf-5'=>'gf-5','grun'=>'grun','gene'=>'gene','go.w'=>'go.w','good'=>'good','grad'=>'grad','hcit'=>'hcit','hd-m'=>'hd-m','hd-p'=>'hd-p','hd-t'=>'hd-t','hei-'=>'hei-','hp i'=>'hp i','hpip'=>'hpip','hs-c'=>'hs-c','htc '=>'htc ','htc-'=>'htc-','htca'=>'htca','htcg'=>'htcg','htcp'=>'htcp','htcs'=>'htcs','htct'=>'htct','htc_'=>'htc_','haie'=>'haie','hita'=>'hita','huaw'=>'huaw','hutc'=>'hutc','i-20'=>'i-20','i-go'=>'i-go','i-ma'=>'i-ma','i230'=>'i230','iac'=>'iac','iac-'=>'iac-','iac/'=>'iac/','ig01'=>'ig01','im1k'=>'im1k','inno'=>'inno','iris'=>'iris','jata'=>'jata','java'=>'java','kddi'=>'kddi','kgt'=>'kgt','kgt/'=>'kgt/','kpt '=>'kpt ','kwc-'=>'kwc-','klon'=>'klon','lexi'=>'lexi','lg g'=>'lg g','lg-a'=>'lg-a','lg-b'=>'lg-b','lg-c'=>'lg-c','lg-d'=>'lg-d','lg-f'=>'lg-f','lg-g'=>'lg-g','lg-k'=>'lg-k','lg-l'=>'lg-l','lg-m'=>'lg-m','lg-o'=>'lg-o','lg-p'=>'lg-p','lg-s'=>'lg-s','lg-t'=>'lg-t','lg-u'=>'lg-u','lg-w'=>'lg-w','lg/k'=>'lg/k','lg/l'=>'lg/l','lg/u'=>'lg/u','lg50'=>'lg50','lg54'=>'lg54','lge-'=>'lge-','lge/'=>'lge/','lynx'=>'lynx','leno'=>'leno','m1-w'=>'m1-w','m3ga'=>'m3ga','m50/'=>'m50/','maui'=>'maui','mc01'=>'mc01','mc21'=>'mc21','mcca'=>'mcca','medi'=>'medi','meri'=>'meri','mio8'=>'mio8','mioa'=>'mioa','mo01'=>'mo01','mo02'=>'mo02','mode'=>'mode','modo'=>'modo','mot '=>'mot ','mot-'=>'mot-','mt50'=>'mt50','mtp1'=>'mtp1','mtv '=>'mtv ','mate'=>'mate','maxo'=>'maxo','merc'=>'merc','mits'=>'mits','mobi'=>'mobi','motv'=>'motv','mozz'=>'mozz','n100'=>'n100','n101'=>'n101','n102'=>'n102','n202'=>'n202','n203'=>'n203','n300'=>'n300','n302'=>'n302','n500'=>'n500','n502'=>'n502','n505'=>'n505','n700'=>'n700','n701'=>'n701','n710'=>'n710','nec-'=>'nec-','nem-'=>'nem-','newg'=>'newg','neon'=>'neon','netf'=>'netf','noki'=>'noki','nzph'=>'nzph','o2 x'=>'o2 x','o2-x'=>'o2-x','opwv'=>'opwv','owg1'=>'owg1','opti'=>'opti','oran'=>'oran','p800'=>'p800','pand'=>'pand','pg-1'=>'pg-1','pg-2'=>'pg-2','pg-3'=>'pg-3','pg-6'=>'pg-6','pg-8'=>'pg-8','pg-c'=>'pg-c','pg13'=>'pg13','phil'=>'phil','pn-2'=>'pn-2','pt-g'=>'pt-g','palm'=>'palm','pana'=>'pana','pire'=>'pire','pock'=>'pock','pose'=>'pose','psio'=>'psio','qa-a'=>'qa-a','qc-2'=>'qc-2','qc-3'=>'qc-3','qc-5'=>'qc-5','qc-7'=>'qc-7','qc07'=>'qc07','qc12'=>'qc12','qc21'=>'qc21','qc32'=>'qc32','qc60'=>'qc60','qci-'=>'qci-','qwap'=>'qwap','qtek'=>'qtek','r380'=>'r380','r600'=>'r600','raks'=>'raks','rim9'=>'rim9','rove'=>'rove','s55/'=>'s55/','sage'=>'sage','sams'=>'sams','sc01'=>'sc01','sch-'=>'sch-','scp-'=>'scp-','sdk/'=>'sdk/','se47'=>'se47','sec-'=>'sec-','sec0'=>'sec0','sec1'=>'sec1','semc'=>'semc','sgh-'=>'sgh-','shar'=>'shar','sie-'=>'sie-','sk-0'=>'sk-0','sl45'=>'sl45','slid'=>'slid','smb3'=>'smb3','smt5'=>'smt5','sp01'=>'sp01','sph-'=>'sph-','spv '=>'spv ','spv-'=>'spv-','sy01'=>'sy01','samm'=>'samm','sany'=>'sany','sava'=>'sava','scoo'=>'scoo','send'=>'send','siem'=>'siem','smar'=>'smar','smit'=>'smit','soft'=>'soft','sony'=>'sony','t-mo'=>'t-mo','t218'=>'t218','t250'=>'t250','t600'=>'t600','t610'=>'t610','t618'=>'t618','tcl-'=>'tcl-','tdg-'=>'tdg-','telm'=>'telm','tim-'=>'tim-','ts70'=>'ts70','tsm-'=>'tsm-','tsm3'=>'tsm3','tsm5'=>'tsm5','tx-9'=>'tx-9','tagt'=>'tagt','talk'=>'talk','teli'=>'teli','topl'=>'topl','hiba'=>'hiba','up.b'=>'up.b','upg1'=>'upg1','utst'=>'utst','v400'=>'v400','v750'=>'v750','veri'=>'veri','vk-v'=>'vk-v','vk40'=>'vk40','vk50'=>'vk50','vk52'=>'vk52','vk53'=>'vk53','vm40'=>'vm40','vx98'=>'vx98','virg'=>'virg','vite'=>'vite','voda'=>'voda','vulc'=>'vulc','w3c '=>'w3c ','w3c-'=>'w3c-','wapj'=>'wapj','wapp'=>'wapp','wapu'=>'wapu','wapm'=>'wapm','wig '=>'wig ','wapi'=>'wapi','wapr'=>'wapr','wapv'=>'wapv','wapy'=>'wapy','wapa'=>'wapa','waps'=>'waps','wapt'=>'wapt','winc'=>'winc','winw'=>'winw','wonu'=>'wonu','x700'=>'x700','xda2'=>'xda2','xdag'=>'xdag','yas-'=>'yas-','your'=>'your','zte-'=>'zte-','zeto'=>'zeto','acs-'=>'acs-','alav'=>'alav','alca'=>'alca','amoi'=>'amoi','aste'=>'aste','audi'=>'audi','avan'=>'avan','benq'=>'benq','bird'=>'bird','blac'=>'blac','blaz'=>'blaz','brew'=>'brew','brvw'=>'brvw','bumb'=>'bumb','ccwa'=>'ccwa','cell'=>'cell','cldc'=>'cldc','cmd-'=>'cmd-','dang'=>'dang','doco'=>'doco','eml2'=>'eml2','eric'=>'eric','fetc'=>'fetc','hipt'=>'hipt','http'=>'http','ibro'=>'ibro','idea'=>'idea','ikom'=>'ikom','inno'=>'inno','ipaq'=>'ipaq','jbro'=>'jbro','jemu'=>'jemu','java'=>'java','jigs'=>'jigs','kddi'=>'kddi','keji'=>'keji','kyoc'=>'kyoc','kyok'=>'kyok','leno'=>'leno','lg-c'=>'lg-c','lg-d'=>'lg-d','lg-g'=>'lg-g','lge-'=>'lge-','libw'=>'libw','m-cr'=>'m-cr','maui'=>'maui','maxo'=>'maxo','midp'=>'midp','mits'=>'mits','mmef'=>'mmef','mobi'=>'mobi','mot-'=>'mot-','moto'=>'moto','mwbp'=>'mwbp','mywa'=>'mywa','nec-'=>'nec-','newt'=>'newt','nok6'=>'nok6','noki'=>'noki','o2im'=>'o2im','opwv'=>'opwv','palm'=>'palm','pana'=>'pana','pant'=>'pant','pdxg'=>'pdxg','phil'=>'phil','play'=>'play','pluc'=>'pluc','port'=>'port','prox'=>'prox','qtek'=>'qtek','qwap'=>'qwap','rozo'=>'rozo','sage'=>'sage','sama'=>'sama','sams'=>'sams','sany'=>'sany','sch-'=>'sch-','sec-'=>'sec-','send'=>'send','seri'=>'seri','sgh-'=>'sgh-','shar'=>'shar','sie-'=>'sie-','siem'=>'siem','smal'=>'smal','smar'=>'smar','sony'=>'sony','sph-'=>'sph-','symb'=>'symb','t-mo'=>'t-mo','teli'=>'teli','tim-'=>'tim-','tosh'=>'tosh','treo'=>'treo','tsm-'=>'tsm-','upg1'=>'upg1','upsi'=>'upsi','vk-v'=>'vk-v','voda'=>'voda','vx52'=>'vx52','vx53'=>'vx53','vx60'=>'vx60','vx61'=>'vx61','vx70'=>'vx70','vx80'=>'vx80','vx81'=>'vx81','vx83'=>'vx83','vx85'=>'vx85','wap-'=>'wap-','wapa'=>'wapa','wapi'=>'wapi','wapp'=>'wapp','wapr'=>'wapr','webc'=>'webc','whit'=>'whit','winw'=>'winw','wmlb'=>'wmlb','xda-'=>'xda-',))); $mobile_browser = true; $status = 'Mobile matched on in_array'; break; default; $mobile_browser = false; $status = 'Desktop / full capability browser'; break; } if($redirect = ($mobile_browser==true) ? $mobileredirect : $desktopredirect){ header('Location: '.$redirect); exit; }else{ if($mobile_browser==''){ return $mobile_browser; }else{ return array($mobile_browser,$status); } } } ?> \ No newline at end of file diff --git a/lib/oauth_lib.php b/lib/oauth_lib.php index c3709e9..6f84b07 100644 --- a/lib/oauth_lib.php +++ b/lib/oauth_lib.php @@ -1,776 +1,571 @@ -key = $key; - $this->secret = $secret; - } - - function __toString() { - return "OAuthConsumer[key=$this->key,secret=$this->secret]"; - } -} - -class OAuthToken { - // access tokens and request tokens - public $key; - public $secret; - - /** - * key = the token - * secret = the token secret - */ - function __construct($key, $secret) { - $this->key = $key; - $this->secret = $secret; - } - - /** - * generates the basic string serialization of a token that a server - * would respond to request_token and access_token calls with - */ - function to_string() { - return "oauth_token=" . - OAuthUtil::urlencode_rfc3986($this->key) . - "&oauth_token_secret=" . - OAuthUtil::urlencode_rfc3986($this->secret); - } - - function __toString() { - return $this->to_string(); - } -} - -class OAuthSignatureMethod { - public function check_signature(&$request, $consumer, $token, $signature) { - $built = $this->build_signature($request, $consumer, $token); - return $built == $signature; - } -} - -class OAuthSignatureMethod_HMAC_SHA1 extends OAuthSignatureMethod { - function get_name() { - return "HMAC-SHA1"; - } - - public function build_signature($request, $consumer, $token) { - $base_string = $request->get_signature_base_string(); - $request->base_string = $base_string; - - $key_parts = array( - $consumer->secret, - ($token) ? $token->secret : "" - ); - - $key_parts = OAuthUtil::urlencode_rfc3986($key_parts); - $key = implode('&', $key_parts); - - return base64_encode(hash_hmac('sha1', $base_string, $key, true)); - } -} - -class OAuthSignatureMethod_PLAINTEXT extends OAuthSignatureMethod { - public function get_name() { - return "PLAINTEXT"; - } - - public function build_signature($request, $consumer, $token) { - $sig = array( - OAuthUtil::urlencode_rfc3986($consumer->secret) - ); - - if ($token) { - array_push($sig, OAuthUtil::urlencode_rfc3986($token->secret)); - } else { - array_push($sig, ''); - } - - $raw = implode("&", $sig); - // for debug purposes - $request->base_string = $raw; - - return OAuthUtil::urlencode_rfc3986($raw); - } -} - -class OAuthSignatureMethod_RSA_SHA1 extends OAuthSignatureMethod { - public function get_name() { - return "RSA-SHA1"; - } - - protected function fetch_public_cert(&$request) { - // not implemented yet, ideas are: - // (1) do a lookup in a table of trusted certs keyed off of consumer - // (2) fetch via http using a url provided by the requester - // (3) some sort of specific discovery code based on request - // - // either way should return a string representation of the certificate - throw Exception("fetch_public_cert not implemented"); - } - - protected function fetch_private_cert(&$request) { - // not implemented yet, ideas are: - // (1) do a lookup in a table of trusted certs keyed off of consumer - // - // either way should return a string representation of the certificate - throw Exception("fetch_private_cert not implemented"); - } - - public function build_signature(&$request, $consumer, $token) { - $base_string = $request->get_signature_base_string(); - $request->base_string = $base_string; - - // Fetch the private key cert based on the request - $cert = $this->fetch_private_cert($request); - - // Pull the private key ID from the certificate - $privatekeyid = openssl_get_privatekey($cert); - - // Sign using the key - $ok = openssl_sign($base_string, $signature, $privatekeyid); - - // Release the key resource - openssl_free_key($privatekeyid); - - return base64_encode($signature); - } - - public function check_signature(&$request, $consumer, $token, $signature) { - $decoded_sig = base64_decode($signature); - - $base_string = $request->get_signature_base_string(); - - // Fetch the public key cert based on the request - $cert = $this->fetch_public_cert($request); - - // Pull the public key ID from the certificate - $publickeyid = openssl_get_publickey($cert); - - // Check the computed signature against the one passed in the query - $ok = openssl_verify($base_string, $decoded_sig, $publickeyid); - - // Release the key resource - openssl_free_key($publickeyid); - - return $ok == 1; - } -} - -class OAuthRequest { - private $parameters; - private $http_method; - private $http_url; - // for debug purposes - public $base_string; - public static $version = '1.0a'; - public static $POST_INPUT = 'php://input'; - - function __construct($http_method, $http_url, $parameters=NULL) { - @$parameters or $parameters = array(); - $this->parameters = $parameters; - $this->http_method = $http_method; - $this->http_url = $http_url; - } - - - /** - * attempt to build up a request from what was passed to the server - */ - public static function from_request($http_method=NULL, $http_url=NULL, $parameters=NULL) { - $scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on") - ? 'http' - : 'https'; - @$http_url or $http_url = $scheme . - '://' . $_SERVER['HTTP_HOST'] . - ':' . - $_SERVER['SERVER_PORT'] . - $_SERVER['REQUEST_URI']; - @$http_method or $http_method = $_SERVER['REQUEST_METHOD']; - - // We weren't handed any parameters, so let's find the ones relevant to - // this request. - // If you run XML-RPC or similar you should use this to provide your own - // parsed parameter-list - if (!$parameters) { - // Find request headers - $request_headers = OAuthUtil::get_headers(); - - // Parse the query-string to find GET parameters - $parameters = OAuthUtil::parse_parameters($_SERVER['QUERY_STRING']); - - // It's a POST request of the proper content-type, so parse POST - // parameters and add those overriding any duplicates from GET - if ($http_method == "POST" - && @strstr($request_headers["Content-Type"], - "application/x-www-form-urlencoded") - ) { - $post_data = OAuthUtil::parse_parameters( - file_get_contents(self::$POST_INPUT) - ); - $parameters = array_merge($parameters, $post_data); - } - - // We have a Authorization-header with OAuth data. Parse the header - // and add those overriding any duplicates from GET or POST - if (@substr($request_headers['Authorization'], 0, 6) == "OAuth ") { - $header_parameters = OAuthUtil::split_header( - $request_headers['Authorization'] - ); - $parameters = array_merge($parameters, $header_parameters); - } - - } - - return new OAuthRequest($http_method, $http_url, $parameters); - } - - /** - * pretty much a helper function to set up the request - */ - public static function from_consumer_and_token($consumer, $token, $http_method, $http_url, $parameters=NULL) { - @$parameters or $parameters = array(); - $defaults = array("oauth_version" => OAuthRequest::$version, - "oauth_nonce" => OAuthRequest::generate_nonce(), - "oauth_timestamp" => OAuthRequest::generate_timestamp(), - "oauth_consumer_key" => $consumer->key); - if ($token) - $defaults['oauth_token'] = $token->key; - - $parameters = array_merge($defaults, $parameters); - - return new OAuthRequest($http_method, $http_url, $parameters); - } - - public function set_parameter($name, $value, $allow_duplicates = true) { - if ($allow_duplicates && isset($this->parameters[$name])) { - // We have already added parameter(s) with this name, so add to the list - if (is_scalar($this->parameters[$name])) { - // This is the first duplicate, so transform scalar (string) - // into an array so we can add the duplicates - $this->parameters[$name] = array($this->parameters[$name]); - } - - $this->parameters[$name][] = $value; - } else { - $this->parameters[$name] = $value; - } - } - - public function get_parameter($name) { - return isset($this->parameters[$name]) ? $this->parameters[$name] : null; - } - - public function get_parameters() { - return $this->parameters; - } - - public function unset_parameter($name) { - unset($this->parameters[$name]); - } - - /** - * The request parameters, sorted and concatenated into a normalized string. - * @return string - */ - public function get_signable_parameters() { - // Grab all parameters - $params = $this->parameters; - - // Remove oauth_signature if present - // Ref: Spec: 9.1.1 ("The oauth_signature parameter MUST be excluded.") - if (isset($params['oauth_signature'])) { - unset($params['oauth_signature']); - } - - return OAuthUtil::build_http_query($params); - } - - /** - * Returns the base string of this request - * - * The base string defined as the method, the url - * and the parameters (normalized), each urlencoded - * and the concated with &. - */ - public function get_signature_base_string() { - $parts = array( - $this->get_normalized_http_method(), - $this->get_normalized_http_url(), - $this->get_signable_parameters() - ); - - $parts = OAuthUtil::urlencode_rfc3986($parts); - - return implode('&', $parts); - } - - /** - * just uppercases the http method - */ - public function get_normalized_http_method() { - return strtoupper($this->http_method); - } - - /** - * parses the url and rebuilds it to be - * scheme://host/path - */ - public function get_normalized_http_url() { - $parts = parse_url($this->http_url); - - $port = @$parts['port']; - $scheme = $parts['scheme']; - $host = $parts['host']; - $path = @$parts['path']; - - $port or $port = ($scheme == 'https') ? '443' : '80'; - - if (($scheme == 'https' && $port != '443') - || ($scheme == 'http' && $port != '80')) { - $host = "$host:$port"; - } - return "$scheme://$host$path"; - } - - /** - * builds a url usable for a GET request - */ - public function to_url() { - $post_data = $this->to_postdata(); - $out = $this->get_normalized_http_url(); - if ($post_data) { - $out .= '?'.$post_data; - } - return $out; - } - - /** - * builds the data one would send in a POST request - */ - public function to_postdata() { - return OAuthUtil::build_http_query($this->parameters); - } - - /** - * builds the Authorization: header - */ - public function to_header() { - $out ='Authorization: OAuth realm=""'; - $total = array(); - foreach ($this->parameters as $k => $v) { - if (substr($k, 0, 5) != "oauth") continue; - if (is_array($v)) { - throw new OAuthException('Arrays not supported in headers'); - } - $out .= ',' . - OAuthUtil::urlencode_rfc3986($k) . - '="' . - OAuthUtil::urlencode_rfc3986($v) . - '"'; - } - return $out; - } - - public function __toString() { - return $this->to_url(); - } - - - public function sign_request($signature_method, $consumer, $token) { - $this->set_parameter( - "oauth_signature_method", - $signature_method->get_name(), - false - ); - $signature = $this->build_signature($signature_method, $consumer, $token); - $this->set_parameter("oauth_signature", $signature, false); - } - - public function build_signature($signature_method, $consumer, $token) { - $signature = $signature_method->build_signature($this, $consumer, $token); - return $signature; - } - - /** - * util function: current timestamp - */ - private static function generate_timestamp() { - return time(); - } - - /** - * util function: current nonce - */ - private static function generate_nonce() { - $mt = microtime(); - $rand = mt_rand(); - - return md5($mt . $rand); // md5s look nicer than numbers - } -} - -class OAuthServer { - protected $timestamp_threshold = 300; // in seconds, five minutes - protected $version = 1.0; // hi blaine - protected $signature_methods = array(); - - protected $data_store; - - function __construct($data_store) { - $this->data_store = $data_store; - } - - public function add_signature_method($signature_method) { - $this->signature_methods[$signature_method->get_name()] = - $signature_method; - } - - // high level functions - - /** - * process a request_token request - * returns the request token on success - */ - public function fetch_request_token(&$request) { - $this->get_version($request); - - $consumer = $this->get_consumer($request); - - // no token required for the initial token request - $token = NULL; - - $this->check_signature($request, $consumer, $token); - - $new_token = $this->data_store->new_request_token($consumer); - - return $new_token; - } - - /** - * process an access_token request - * returns the access token on success - */ - public function fetch_access_token(&$request) { - $this->get_version($request); - - $consumer = $this->get_consumer($request); - - // requires authorized request token - $token = $this->get_token($request, $consumer, "request"); - - - $this->check_signature($request, $consumer, $token); - - $new_token = $this->data_store->new_access_token($token, $consumer); - - return $new_token; - } - - /** - * verify an api call, checks all the parameters - */ - public function verify_request(&$request) { - $this->get_version($request); - $consumer = $this->get_consumer($request); - $token = $this->get_token($request, $consumer, "access"); - $this->check_signature($request, $consumer, $token); - return array($consumer, $token); - } - - // Internals from here - /** - * version 1 - */ - private function get_version(&$request) { - $version = $request->get_parameter("oauth_version"); - if (!$version) { - $version = 1.0; - } - if ($version && $version != $this->version) { - throw new OAuthException("OAuth version '$version' not supported"); - } - return $version; - } - - /** - * figure out the signature with some defaults - */ - private function get_signature_method(&$request) { - $signature_method = - @$request->get_parameter("oauth_signature_method"); - if (!$signature_method) { - $signature_method = "PLAINTEXT"; - } - if (!in_array($signature_method, - array_keys($this->signature_methods))) { - throw new OAuthException( - "Signature method '$signature_method' not supported " . - "try one of the following: " . - implode(", ", array_keys($this->signature_methods)) - ); - } - return $this->signature_methods[$signature_method]; - } - - /** - * try to find the consumer for the provided request's consumer key - */ - private function get_consumer(&$request) { - $consumer_key = @$request->get_parameter("oauth_consumer_key"); - if (!$consumer_key) { - throw new OAuthException("Invalid consumer key"); - } - - $consumer = $this->data_store->lookup_consumer($consumer_key); - if (!$consumer) { - throw new OAuthException("Invalid consumer"); - } - - return $consumer; - } - - /** - * try to find the token for the provided request's token key - */ - private function get_token(&$request, $consumer, $token_type="access") { - $token_field = @$request->get_parameter('oauth_token'); - $token = $this->data_store->lookup_token( - $consumer, $token_type, $token_field - ); - if (!$token) { - throw new OAuthException("Invalid $token_type token: $token_field"); - } - return $token; - } - - /** - * all-in-one function to check the signature on a request - * should guess the signature method appropriately - */ - private function check_signature(&$request, $consumer, $token) { - // this should probably be in a different method - $timestamp = @$request->get_parameter('oauth_timestamp'); - $nonce = @$request->get_parameter('oauth_nonce'); - - $this->check_timestamp($timestamp); - $this->check_nonce($consumer, $token, $nonce, $timestamp); - - $signature_method = $this->get_signature_method($request); - - $signature = $request->get_parameter('oauth_signature'); - $valid_sig = $signature_method->check_signature( - $request, - $consumer, - $token, - $signature - ); - - if (!$valid_sig) { - throw new OAuthException("Invalid signature"); - } - } - - /** - * check that the timestamp is new enough - */ - private function check_timestamp($timestamp) { - // verify that timestamp is recentish - $now = time(); - if ($now - $timestamp > $this->timestamp_threshold) { - throw new OAuthException( - "Expired timestamp, yours $timestamp, ours $now" - ); - } - } - - /** - * check that the nonce is not repeated - */ - private function check_nonce($consumer, $token, $nonce, $timestamp) { - // verify that the nonce is uniqueish - $found = $this->data_store->lookup_nonce( - $consumer, - $token, - $nonce, - $timestamp - ); - if ($found) { - throw new OAuthException("Nonce already used: $nonce"); - } - } - -} - -class OAuthDataStore { - function lookup_consumer($consumer_key) { - // implement me - } - - function lookup_token($consumer, $token_type, $token) { - // implement me - } - - function lookup_nonce($consumer, $token, $nonce, $timestamp) { - // implement me - } - - function new_request_token($consumer) { - // return a new token attached to this consumer - } - - function new_access_token($token, $consumer) { - // return a new access token attached to this consumer - // for the user associated with this token if the request token - // is authorized - // should also invalidate the request token - } - -} - -class OAuthUtil { - public static function urlencode_rfc3986($input) { - if (is_array($input)) { - return array_map(array('OAuthUtil', 'urlencode_rfc3986'), $input); - } else if (is_scalar($input)) { - return str_replace( - '+', - ' ', - str_replace('%7E', '~', rawurlencode($input)) - ); - } else { - return ''; - } -} - - - // This decode function isn't taking into consideration the above - // modifications to the encoding process. However, this method doesn't - // seem to be used anywhere so leaving it as is. - public static function urldecode_rfc3986($string) { - return urldecode($string); - } - - // Utility function for turning the Authorization: header into - // parameters, has to do some unescaping - // Can filter out any non-oauth parameters if needed (default behaviour) - public static function split_header($header, $only_allow_oauth_parameters = true) { - $pattern = '/(([-_a-z]*)=("([^"]*)"|([^,]*)),?)/'; - $offset = 0; - $params = array(); - while (preg_match($pattern, $header, $matches, PREG_OFFSET_CAPTURE, $offset) > 0) { - $match = $matches[0]; - $header_name = $matches[2][0]; - $header_content = (isset($matches[5])) ? $matches[5][0] : $matches[4][0]; - if (preg_match('/^oauth_/', $header_name) || !$only_allow_oauth_parameters) { - $params[$header_name] = OAuthUtil::urldecode_rfc3986($header_content); - } - $offset = $match[1] + strlen($match[0]); - } - - if (isset($params['realm'])) { - unset($params['realm']); - } - - return $params; - } - - // helper to try to sort out headers for people who aren't running apache - public static function get_headers() { - if (function_exists('apache_request_headers')) { - // we need this to get the actual Authorization: header - // because apache tends to tell us it doesn't exist - return apache_request_headers(); - } - // otherwise we don't have apache and are just going to have to hope - // that $_SERVER actually contains what we need - $out = array(); - foreach ($_SERVER as $key => $value) { - if (substr($key, 0, 5) == "HTTP_") { - // this is chaos, basically it is just there to capitalize the first - // letter of every word that is not an initial HTTP and strip HTTP - // code from przemek - $key = str_replace( - " ", - "-", - ucwords(strtolower(str_replace("_", " ", substr($key, 5)))) - ); - $out[$key] = $value; - } - } - return $out; - } - - // This function takes a input like a=b&a=c&d=e and returns the parsed - // parameters like this - // array('a' => array('b','c'), 'd' => 'e') - public static function parse_parameters( $input ) { - if (!isset($input) || !$input) return array(); - - $pairs = split('&', $input); - - $parsed_parameters = array(); - foreach ($pairs as $pair) { - $split = split('=', $pair, 2); - $parameter = OAuthUtil::urldecode_rfc3986($split[0]); - $value = isset($split[1]) ? OAuthUtil::urldecode_rfc3986($split[1]) : ''; - - if (isset($parsed_parameters[$parameter])) { - // We have already recieved parameter(s) with this name, so add to the list - // of parameters with this name - - if (is_scalar($parsed_parameters[$parameter])) { - // This is the first duplicate, so transform scalar (string) into an array - // so we can add the duplicates - $parsed_parameters[$parameter] = array($parsed_parameters[$parameter]); - } - - $parsed_parameters[$parameter][] = $value; - } else { - $parsed_parameters[$parameter] = $value; - } - } - return $parsed_parameters; - } - - public static function build_http_query($params) { - if (!$params) return ''; - - // Urlencode both keys and values - $keys = OAuthUtil::urlencode_rfc3986(array_keys($params)); - $values = OAuthUtil::urlencode_rfc3986(array_values($params)); - $params = array_combine($keys, $values); - - // Parameters are sorted by name, using lexicographical byte value ordering. - // Ref: Spec: 9.1.1 (1) - uksort($params, 'strcmp'); - - $pairs = array(); - foreach ($params as $parameter => $value) { - if (is_array($value)) { - // If two or more parameters share the same name, they are sorted by their value - // Ref: Spec: 9.1.1 (1) - natsort($value); - foreach ($value as $duplicate_value) { - $pairs[] = $parameter . '=' . $duplicate_value; - } - } else { - $pairs[] = $parameter . '=' . $value; - } - } - // For each parameter, the name is separated from the corresponding value by an '=' character (ASCII code 61) - // Each name-value pair is separated by an '&' character (ASCII code 38) - return implode('&', $pairs); - } -} - -?> +key = $key; + $this->secret = $secret; + } + + function __toString() { + return "OAuthConsumer[key=$this->key,secret=$this->secret]"; + } +} + +class OAuthToken { + // access tokens and request tokens + public $key; + public $secret; + + /** + * key = the token + * secret = the token secret + */ + function __construct($key, $secret) { + $this->key = $key; + $this->secret = $secret; + } + + /** + * generates the basic string serialization of a token that a server + * would respond to request_token and access_token calls with + */ + function to_string() { + return "oauth_token=" . + OAuthUtil::urlencode_rfc3986($this->key) . + "&oauth_token_secret=" . + OAuthUtil::urlencode_rfc3986($this->secret); + } + + function __toString() { + return $this->to_string(); + } +} + +class OAuthSignatureMethod { + public function check_signature(&$request, $consumer, $token, $signature) { + $built = $this->build_signature($request, $consumer, $token); + return $built == $signature; + } +} + +class OAuthSignatureMethod_HMAC_SHA1 extends OAuthSignatureMethod { + function get_name() { + return "HMAC-SHA1"; + } + + public function build_signature($request, $consumer, $token) { + $base_string = $request->get_signature_base_string(); + $request->base_string = $base_string; + + $key_parts = array( + $consumer->secret, + ($token) ? $token->secret : "" + ); + + $key_parts = OAuthUtil::urlencode_rfc3986($key_parts); + $key = implode('&', $key_parts); + + return base64_encode(hash_hmac('sha1', $base_string, $key, true)); + } +} + +class OAuthSignatureMethod_PLAINTEXT extends OAuthSignatureMethod { + public function get_name() { + return "PLAINTEXT"; + } + + public function build_signature($request, $consumer, $token) { + $sig = array( + OAuthUtil::urlencode_rfc3986($consumer->secret) + ); + + if ($token) { + array_push($sig, OAuthUtil::urlencode_rfc3986($token->secret)); + } else { + array_push($sig, ''); + } + + $raw = implode("&", $sig); + // for debug purposes + $request->base_string = $raw; + + return OAuthUtil::urlencode_rfc3986($raw); + } +} + +class OAuthSignatureMethod_RSA_SHA1 extends OAuthSignatureMethod { + public function get_name() { + return "RSA-SHA1"; + } + + protected function fetch_public_cert(&$request) { + // not implemented yet, ideas are: + // (1) do a lookup in a table of trusted certs keyed off of consumer + // (2) fetch via http using a url provided by the requester + // (3) some sort of specific discovery code based on request + // + // either way should return a string representation of the certificate + throw Exception("fetch_public_cert not implemented"); + } + + protected function fetch_private_cert(&$request) { + // not implemented yet, ideas are: + // (1) do a lookup in a table of trusted certs keyed off of consumer + // + // either way should return a string representation of the certificate + throw Exception("fetch_private_cert not implemented"); + } + + public function build_signature(&$request, $consumer, $token) { + $base_string = $request->get_signature_base_string(); + $request->base_string = $base_string; + + // Fetch the private key cert based on the request + $cert = $this->fetch_private_cert($request); + + // Pull the private key ID from the certificate + $privatekeyid = openssl_get_privatekey($cert); + + // Sign using the key + $ok = openssl_sign($base_string, $signature, $privatekeyid); + + // Release the key resource + openssl_free_key($privatekeyid); + + return base64_encode($signature); + } + + public function check_signature(&$request, $consumer, $token, $signature) { + $decoded_sig = base64_decode($signature); + + $base_string = $request->get_signature_base_string(); + + // Fetch the public key cert based on the request + $cert = $this->fetch_public_cert($request); + + // Pull the public key ID from the certificate + $publickeyid = openssl_get_publickey($cert); + + // Check the computed signature against the one passed in the query + $ok = openssl_verify($base_string, $decoded_sig, $publickeyid); + + // Release the key resource + openssl_free_key($publickeyid); + + return $ok == 1; + } +} + +class OAuthRequest { + private $parameters; + private $http_method; + private $http_url; + public $http_header; + // for debug purposes + public $base_string; + public static $version = '1.0a'; + public static $POST_INPUT = 'php://input'; + + function __construct($http_method, $http_url, $parameters = array(), $http_header= array()) { + //@$parameters or $parameters = array(); + $this->parameters = $parameters; + //@$http_header or $http_header = array(); + $this->http_header = $http_header; + $this->http_method = $http_method; + $this->http_url = $http_url; + } + + + /** + * attempt to build up a request from what was passed to the server + */ + public static function from_request($http_method=NULL, $http_url=NULL, $parameters=NULL) { + $scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on") + ? 'http' + : 'https'; + @$http_url or $http_url = $scheme . + '://' . $_SERVER['HTTP_HOST'] . + ':' . + $_SERVER['SERVER_PORT'] . + $_SERVER['REQUEST_URI']; + @$http_method or $http_method = $_SERVER['REQUEST_METHOD']; + + // We weren't handed any parameters, so let's find the ones relevant to + // this request. + // If you run XML-RPC or similar you should use this to provide your own + // parsed parameter-list + if (!$parameters) { + // Find request headers + $request_headers = OAuthUtil::get_headers(); + + // Parse the query-string to find GET parameters + $parameters = OAuthUtil::parse_parameters($_SERVER['QUERY_STRING']); + + // It's a POST request of the proper content-type, so parse POST + // parameters and add those overriding any duplicates from GET + if ($http_method == "POST" + && @strstr($request_headers["Content-Type"], + "application/x-www-form-urlencoded") + ) { + $post_data = OAuthUtil::parse_parameters( + file_get_contents(self::$POST_INPUT) + ); + $parameters = array_merge($parameters, $post_data); + } + + // We have a Authorization-header with OAuth data. Parse the header + // and add those overriding any duplicates from GET or POST + if (@substr($request_headers['Authorization'], 0, 6) == "OAuth ") { + $header_parameters = OAuthUtil::split_header( + $request_headers['Authorization'] + ); + $parameters = array_merge($parameters, $header_parameters); + } + + } + + return new OAuthRequest($http_method, $http_url, $parameters); + } + + /** + * pretty much a helper function to set up the request + */ + public static function from_consumer_and_token($consumer, $token, $http_method, $http_url, $parameters=NULL) { + @$parameters or $parameters = array(); + $defaults = array("oauth_version" => OAuthRequest::$version, + "oauth_nonce" => OAuthRequest::generate_nonce(), + "oauth_timestamp" => OAuthRequest::generate_timestamp(), + "oauth_consumer_key" => $consumer->key); + if ($token) + $defaults['oauth_token'] = $token->key; + + $parameters = array_merge($defaults, $parameters); + + return new OAuthRequest($http_method, $http_url, $parameters); + } + + public function set_parameter($name, $value, $allow_duplicates = true) { + if ($allow_duplicates && isset($this->parameters[$name])) { + // We have already added parameter(s) with this name, so add to the list + if (is_scalar($this->parameters[$name])) { + // This is the first duplicate, so transform scalar (string) + // into an array so we can add the duplicates + $this->parameters[$name] = array($this->parameters[$name]); + } + + $this->parameters[$name][] = $value; + } else { + $this->parameters[$name] = $value; + } + } + + + public function set_http_header(&$multipart = NULL) { + if (empty($this->parameters)) { + $this->http_header[] = 'Content-Type:'; + $this->http_header[] = 'Content-Length:'; + } else { + if($multipart) $this->http_header[] = $this->to_header(); //add OAuth header if we post multipart + $this->http_header[] = 'Expect: '; + } + } + + public function get_parameter($name) { + return isset($this->parameters[$name]) ? $this->parameters[$name] : null; + } + + public function get_parameters() { + return $this->parameters; + } + + public function unset_parameter($name) { + unset($this->parameters[$name]); + } + + /** + * The request parameters, sorted and concatenated into a normalized string. + * @return string + */ + public function get_signable_parameters() { + // Grab all parameters + $params = $this->parameters; + + // Remove oauth_signature if present + // Ref: Spec: 9.1.1 ("The oauth_signature parameter MUST be excluded.") + if (isset($params['oauth_signature'])) { + unset($params['oauth_signature']); + } + + return OAuthUtil::build_http_query($params); + } + + /** + * Returns the base string of this request + * + * The base string defined as the method, the url + * and the parameters (normalized), each urlencoded + * and the concated with &. + */ + public function get_signature_base_string() { + $parts = array( + $this->get_normalized_http_method(), + $this->get_normalized_http_url(), + $this->get_signable_parameters() + ); + + $parts = OAuthUtil::urlencode_rfc3986($parts); + + return implode('&', $parts); + } + + /** + * just uppercases the http method + */ + public function get_normalized_http_method() { + return strtoupper($this->http_method); + } + + /** + * parses the url and rebuilds it to be + * scheme://host/path + */ + public function get_normalized_http_url() { + $parts = parse_url($this->http_url); + + $port = @$parts['port']; + $scheme = $parts['scheme']; + $host = $parts['host']; + $path = @$parts['path']; + + $port or $port = ($scheme == 'https') ? '443' : '80'; + + if (($scheme == 'https' && $port != '443') + || ($scheme == 'http' && $port != '80')) { + $host = "$host:$port"; + } + return "$scheme://$host$path"; + } + + /** + * builds a url usable for a GET request + */ + public function to_url() { + $post_data = $this->to_postdata(); + $out = $this->get_normalized_http_url(); + if ($post_data) { + $out .= '?'.$post_data; + } + return $out; + } + + /** + * builds the data one would send in a POST request + */ + public function to_postdata() { + return OAuthUtil::build_http_query($this->parameters); + } + + /** + * builds the Authorization: header + */ + public function to_header($realm=NULL) { + $out = 'Authorization: OAuth '; + if ($realm) $out .= 'realm="'.$realm.'",'; + $total = array(); + foreach ($this->parameters as $k => $v) { + if (substr($k, 0, 5) != "oauth") continue; + if (is_array($v)) { + throw new OAuthException('Arrays not supported in headers'); + } + $out .= OAuthUtil::urlencode_rfc3986($k) . + '="' . + OAuthUtil::urlencode_rfc3986($v) . + '",'; + } + return substr($out,0,-1); + } + + public function __toString() { + return $this->to_url(); + } + + + public function sign_request($signature_method, $consumer, $token) { + $this->set_parameter( + "oauth_signature_method", + $signature_method->get_name(), + false + ); + $signature = $this->build_signature($signature_method, $consumer, $token); + $this->set_parameter("oauth_signature", $signature, false); + } + + public function build_signature($signature_method, $consumer, $token) { + $signature = $signature_method->build_signature($this, $consumer, $token); + return $signature; + } + + /** + * util function: current timestamp + */ + private static function generate_timestamp() { + return $_SERVER['REQUEST_TIME']; + } + + /** + * util function: current nonce + */ + private static function generate_nonce() { + $mt = microtime(); + $rand = mt_rand(); + + return md5($mt . $rand); // md5s look nicer than numbers + } +} + +class OAuthUtil { + public static function urlencode_rfc3986($input) { + if (is_array($input)) { + return array_map(array('OAuthUtil', 'urlencode_rfc3986'), $input); + } else if (is_scalar($input)) { + return str_replace( + '+', + ' ', + str_replace('%7E', '~', rawurlencode($input)) + ); + } else { + return ''; + } +} + + + // This decode function isn't taking into consideration the above + // modifications to the encoding process. However, this method doesn't + // seem to be used anywhere so leaving it as is. + public static function urldecode_rfc3986($string) { + return urldecode($string); + } + + // Utility function for turning the Authorization: header into + // parameters, has to do some unescaping + // Can filter out any non-oauth parameters if needed (default behaviour) + public static function split_header($header, $only_allow_oauth_parameters = true) { + $pattern = '/(([-_a-z]*)=("([^"]*)"|([^,]*)),?)/'; + $offset = 0; + $params = array(); + while (preg_match($pattern, $header, $matches, PREG_OFFSET_CAPTURE, $offset) > 0) { + $match = $matches[0]; + $header_name = $matches[2][0]; + $header_content = (isset($matches[5])) ? $matches[5][0] : $matches[4][0]; + if (preg_match('/^oauth_/', $header_name) || !$only_allow_oauth_parameters) { + $params[$header_name] = OAuthUtil::urldecode_rfc3986($header_content); + } + $offset = $match[1] + strlen($match[0]); + } + + if (isset($params['realm'])) { + unset($params['realm']); + } + + return $params; + } + + // helper to try to sort out headers for people who aren't running apache + public static function get_headers() { + if (function_exists('apache_request_headers')) { + // we need this to get the actual Authorization: header + // because apache tends to tell us it doesn't exist + return apache_request_headers(); + } + // otherwise we don't have apache and are just going to have to hope + // that $_SERVER actually contains what we need + $out = array(); + foreach ($_SERVER as $key => $value) { + if (substr($key, 0, 5) == "HTTP_") { + // this is chaos, basically it is just there to capitalize the first + // letter of every word that is not an initial HTTP and strip HTTP + // code from przemek + $key = str_replace( + " ", + "-", + ucwords(strtolower(str_replace("_", " ", substr($key, 5)))) + ); + $out[$key] = $value; + } + } + return $out; + } + + // This function takes a input like a=b&a=c&d=e and returns the parsed + // parameters like this + // array('a' => array('b','c'), 'd' => 'e') + public static function parse_parameters( $input ) { + if (!isset($input) || !$input) return array(); + + $pairs = explode('&', $input); + + $parsed_parameters = array(); + foreach ($pairs as $pair) { + $split = explode('=', $pair, 2); + $parameter = OAuthUtil::urldecode_rfc3986($split[0]); + $value = isset($split[1]) ? OAuthUtil::urldecode_rfc3986($split[1]) : ''; + + if (isset($parsed_parameters[$parameter])) { + // We have already recieved parameter(s) with this name, so add to the list + // of parameters with this name + + if (is_scalar($parsed_parameters[$parameter])) { + // This is the first duplicate, so transform scalar (string) into an array + // so we can add the duplicates + $parsed_parameters[$parameter] = array($parsed_parameters[$parameter]); + } + + $parsed_parameters[$parameter][] = $value; + } else { + $parsed_parameters[$parameter] = $value; + } + } + return $parsed_parameters; + } + + public static function build_http_query($params,$multipart=NULL) { + if (!$params) return ''; + + // Urlencode both keys and values + $keys = OAuthUtil::urlencode_rfc3986(array_keys($params)); + $values = OAuthUtil::urlencode_rfc3986(array_values($params)); + $params = array_combine($keys, $values); + + // Parameters are sorted by name, using lexicographical byte value ordering. + // Ref: Spec: 9.1.1 (1) + uksort($params, 'strcmp'); + + $pairs = array(); + foreach ($params as $parameter => $value) { + if (is_array($value)) { + // If two or more parameters share the same name, they are sorted by their value + // Ref: Spec: 9.1.1 (1) + natsort($value); + foreach ($value as $duplicate_value) { + $pairs[] = $parameter . '=' . $duplicate_value; + } + } else { + $pairs[] = $parameter . '=' . $value; + } + } + // For each parameter, the name is separated from the corresponding value by an '=' character (ASCII code 61) + // Each name-value pair is separated by an '&' character (ASCII code 38) + return implode('&', $pairs); + } +} + +?> diff --git a/lib/timeline_format.php b/lib/timeline_format.php new file mode 100644 index 0000000..f60a10d --- /dev/null +++ b/lib/timeline_format.php @@ -0,0 +1,150 @@ +user; + $rt_status = $status->retweeted_status; + $status_owner = $rt_status->user; + $date = format_time($status->created_at); + $text = formatEntities($rt_status->entities,$rt_status->text); + $html = '
  • + + + + + + '.$status->id_str.' + '.$status_owner->screen_name.'  '.$text.' + + Reply + Retweet'; + if($retweetByMe != true){ + $html .= 'New Retweet'; + } else { + $html .= 'UndoRT'; + } + $html .= $status->favorited ? 'UnFav' : 'Fav'; + $html .= 'Translate'; + if($retweetByMe == true){ + $html .= ''; + } + $html .='by '.$retweeter->screen_name.' via '.$status->source.' + '.date('Y-m-d H:i:s', $date).' + + '; + $html .= $status->favorited ? '' : ''; + $html .= '
  • '; + return $html; + } + + function format_retweet_of_me($status){ + $status_owner = $status->user; + $date = format_time($status->created_at); + $text = formatEntities($status->entities,$status->text); + $html = '
  • + + + + + '.$status->id_str.' + + '.$status_owner->screen_name.' '.$text.' + + Reply + Retweet'; + $html .= $status->favorited ? 'UnFav' : 'Fav'; + $html .= 'Translate + + via '.$status->source.' + '.date('Y-m-d H:i:s', $date).' + + '; + $html .= $status->favorited ? '' : ''; + $html .= '
  • '; + return $html; + } + + function getRetweeters($id, $count = 20){ + $t = getTwitter(); + $retweeters = $t->getRetweeters($id); + $html = ''; + foreach($retweeters as $retweeter){ + $user = $retweeter->user; + $html .= ' + '.$user->name.' + '; + } + $html .= ""; + return $html; + } + + function format_timeline($status, $screen_name, $updateStatus = false){ + $user = $status->user; + $date = format_time($status->created_at); + $text = formatEntities($status->entities,$status->text); + + if(preg_match('/^\@'.getTwitter()->username.'/i', $text) == 1){ + $output = "
  • "; + }elseif($updateStatus == true){ + $output = "
  • "; + }else{ + $output = "
  • "; + } + $output .= ' + + + + '.$status->id_str.' + '.$user->screen_name.'  '.$text.''; + $output .= " + Reply + Retweet + "; + if($user->screen_name != $screen_name){ + $output .= "New Retweet"; + } + $output .= $status->favorited == true ? "UnFav" : "Fav"; + $output .= "Translate"; + if ($user->screen_name == $screen_name) $output .= "Delete"; + $output .= ""; + if ($status->in_reply_to_status_id) $output .= " in_reply_to_status_id_str&uid=$user->id \">to $status->in_reply_to_screen_name "; + $output .= "via $status->source + id_str\" id=\"$date\" target=\"_blank\">".date('Y-m-d H:i:s', $date)." + + "; + $output .= $status->favorited == true ? '' : ''; + $output .= "
  • "; + return $output; + } + + function format_message($message,$isSentPage=false) { + if ($isSentPage) { + $name = $message->recipient_screen_name; + $imgurl = getAvatar($message->recipient->profile_image_url); + $messenger = $message->recipient; + } else { + $name = $message->sender_screen_name; + $imgurl = getAvatar($message->sender->profile_image_url); + $messenger = $message->sender; + } + $date = format_time($message->created_at); + $text = formatEntities($message->entities,$message->text); + + $output = " +
  • + + + + + $message->id + $name $text + + "; + + if ($isSentPage) { + $output .= "delete"; + } else { + $output .= "replydelete"; + } + $output .="".date('Y-m-d H:i:s', $date)."
  • "; + return $output; + } +?> diff --git a/lib/twitese.php b/lib/twitese.php index 3866d7c..05fb287 100644 --- a/lib/twitese.php +++ b/lib/twitese.php @@ -4,121 +4,104 @@ session_start(); } include_once('mobile_device_detect.php'); - mobile_device_detect(true,true,true,true,true,true,'https://dabr.in/',false); + mobile_device_detect(true,true,true,true,true,true,'https://t.orzdream.com/',false); include_once('config.php'); include_once('utility.php'); - include_once('twitter.php'); include_once('twitteroauth.php'); include_once('oauth_lib.php'); - include_once('image_uploader.php'); - $site_owner = SITE_OWNER; - function errorHandler($errno, $errstr, $errfile, $errline){ - return TRUE; - } - function verify($name, $password, $remember) { - $t = new twitter($name, $password); + function refreshProfile(){ + $t = getTwitter(); $user = $t->veverify(); - if (!isset($user->error) && isset($user->name)) { - $time = $remember ? time()+3600*24*365 : 0; - setEncryptCookie('twitese_name', $name, $time, '/'); - setEncryptCookie('twitese_pw', $password, $time, '/'); - refreshProfile($t); - $time = time()+3600*24*365; - if(!isset($_COOKIE['showpic_cookie'])){ - setcookie('showpic_cookie', 'true', $time, '/'); - } - if(!isset($_COOKIE['mediaPre'])){ - setcookie('mediaPre', 'true', $time, '/'); - } - return true; - } else { - return false; - } - } - - function refreshProfile($t = false, $user = false){ - $t = $t == false ? getTwitter() : $t; - if($user == false){ - $user = $t->veverify(); - } - $time = time()+3600*24*365; + $time = $_SERVER['REQUEST_TIME']+3600*24*365; setcookie('friends_count', $user->friends_count, $time, '/'); setcookie('statuses_count', $user->statuses_count, $time, '/'); setcookie('followers_count', $user->followers_count, $time, '/'); setcookie('imgurl', getAvatar($user->profile_image_url), $time, '/'); - setcookie('name', $user->name, $time, '/'); + setcookie('name', $user->screen_name, $time, '/'); setcookie('listed_count', GetListed($t), $time, '/'); } - function saveStyle($myCSS, $fontsize, $ad_display, $bodyBg) { - $time = time() + 3600*24*30; - setcookie("myCSS", $myCSS, $time); - setcookie("fontsize", $fontsize, $time); - setcookie("ad_display", $ad_display, $time); - setcookie("bodyBg", $bodyBg, $time); - } - - function resetStyle() { - delCookie("myCSS"); - delCookie("fontsize"); - delCookie("ad_display"); - delCookie("bodyBg"); - } - - function getColor($name, $default) { + function getDefCookie($name, $default="") { if (getCookie($name)) return getCookie($name); else return $default; } - - function shortUrl($url) { - return $url; - } - - function setUpdateCookie($value) { - setcookie('update_status', $value); + function format_time($time){ + date_default_timezone_set('UTC'); + return strtotime($time); } - - function getUpdateCookie() { - if ( isset($_COOKIE['update_status']) ) { - $update_status = $_COOKIE['update_status']; - setcookie('update_status', '', time()-300); - return $update_status; - } else { - return null; - } - } - function formatText($text) { - //Èç¹û¿ªÆôÁËħÊõÒýºÅ\" \' ת»ØÀ´ - //if (get_magic_quotes_gpc()) { - // $text = stripslashes($text); - //} + //如果开启了魔术引号\" \' 转回来 + if (get_magic_quotes_gpc()) { + $text = stripslashes($text); + } - //Ìí¼ÓurlÁ´½Ó - $urlReg = '/(((http|https|ftp):\/\/){1}([[:alnum:]\-\.])+(\.)(([[:alnum:]]){2,4})?([[:alnum:]\/+=%#&\:\;_\.~\?\!\-\,]*))/i'; + //添加url链接 + $urlReg = '/(((http|https|ftp):\/\/){1}([[:alnum:]\-\.])+(\.)(([[:alnum:]]){2,4})?([[:alnum:]\/+=%#&@\:\;_\.~\?\!\-\,]*))/i'; $text = preg_replace($urlReg, '\1', $text); - //Ìí¼Ó@Á´½Ó + //添加@链接 $atReg = '/\B@{1}(([a-zA-Z0-9\_\.\-])+)/i'; - $text = preg_replace($atReg, '\0', $text); + $text = preg_replace($atReg, '\0', $text); - //Ìí¼Ó list Á´½Ó + //添加 list 链接 $listReg = '/(\@{1}([a-zA-Z0-9_\.\-]+)<\/a\>([\/a-zA-Z0-9_\.\-]+))/i'; - $text = preg_replace($listReg, '@\2\3', $text); + $text = preg_replace($listReg, '@\2\3', $text); - //Ìí¼Ó±êÇ©Á´½Ó - //$tagReg = "/(\#{1}([a-zA-Z0-9_\.\-]+))([\s]*)/u"; - $tagReg = "/\B(\#{1}([\w]*[a-zA-Z_]+[\w]*))([\s]*)/u"; - $text = preg_replace($tagReg, '\1\3', $text); + //添加标签链接 + $tagReg = "/\B(\#{1}([\w]*[\pN\pC\pL]+[\w]*))([\s]*)/u"; + $text = preg_replace($tagReg, '#\2\3', $text); $text = formatTweetID($text); return $text; } + function formatEntities(&$entities,$html){ + $user_mentions = $entities->user_mentions; + $hashtags = $entities->hashtags; + $urls = $entities->urls; + if(count($user_mentions) > 0) { + foreach($user_mentions as $user_mention) { + $name = $user_mention->screen_name; + $html = str_replace("@$name","@$name",$html); + } + } + if(count($hashtags) > 0) { + foreach($hashtags as $hashtag) { + $text = $hashtag->text; + $html = str_replace("#$text","#$text",$html); + } + } + if(count($urls) > 0) { + $scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on") ? 'http' : 'https'; + foreach($urls as $url) { + $exp = is_null($url->expanded_url) ? $url->url : $url->expanded_url; + if(substr($url->url,0,4) != 'http') $url->url = 'http://'.$url->url; + if(isset($url->display_url)) { + $dis = $url->display_url; + } else { + $tmp = explode('://', $url->url); + $dis = $tmp[1]; + } + $html = str_replace($url->url,"$dis",$html); + } + } + if(isset($entities->media)) { + $medias = $entities->media; + foreach($medias as $media) { + $url = $media->media_url_https; + if (getcookie('p_avatar') == 'true') { + $url = 'img.php?imgurl='.$url; + } + $html = str_replace($media->url,"$media->display_url",$html); + } + } + return $html; + } + function formatTweetID($text){ - $reg = '/(\[\S]+<\/a\>)/i'; + $reg = '/(\[\S]+<\/a\>)/i'; preg_match_all($reg, $text, $tmpMatches); if(count($tmpMatches) > 0){ $text = preg_replace($reg, '$_holder_$', $text); @@ -137,102 +120,34 @@ return $text; } - function formatDate($date){ - $offset = 0; - $differ = time() - strtotime($date) - $offset; - //$differ = time() - time(date('Y-m-d H:i:s', strtotime($date))); - - if ($differ < 60) { - $dateFormated = "less than " . ceil($differ) . " seconds ago"; - } else if ($differ < 3600) { - $dateFormated = ceil($differ/60) . " minutes ago"; - } else if ($differ < 3600*24) { - $dateFormated = "about " . ceil($differ/3600) . " hours ago"; - } else { - $dateFormated = date('Y-m-d H:i:s', strtotime($date)); - } - - return $dateFormated; - } - - /* ---------- Recover unshorten urls ---------- */ - function recoverShortens($text){ - $patten = '/(http[s]?\:\/\/[\w]+[\w\.]*\/[\w\/+=%#&\:_\.~\?\!\-\,]+)/i'; - preg_match_all($patten, $text, $matches); - $output = ''; - for($i = 0; $i < count($matches[0]); $i += 2){ - if($recovered = unshortUrl($matches[0][$i])){ - $output .= "

    URL

    $recovered
    "; - } - } - return $output; - } - - function unshortUrl($text) { - $urlRegs = array(); - - $urlRegs[] ='/http:\/\/tinyurl\.com\/([a-z0-9]{5}[a-z0-9]*)/i'; - $urlRegs[] = '/http:\/\/bit\.ly\/([a-z0-9]*)/i'; - $urlRegs[] ='/http:\/\/j\.mp\/([a-z0-9]*)/i'; - $urlRegs[] ='/http:\/\/is\.gd\/([a-z0-9]*)/i'; - $urlRegs[] ='/http:\/\/retwt\.me\/([a-z0-9]{5}[a-z0-9]*)/i'; - $urlRegs[] ='/http:\/\/ff\.im\/-([a-z0-9]{5}[a-z0-9]*)/i'; - $urlRegs[] ='/http:\/\/tr\.im\/([a-z0-9]{5}[a-z0-9]*)/i'; - $urlRegs[] ='/http:\/\/htxt\.it\/([a-z0-9]{4}[a-z0-9]*)/i'; - $urlRegs[] ='/http:\/\/yy\.cx\/([a-z0-9]*)/i'; - $urlRegs[] ='/http:\/\/aa\.cx\/([a-z0-9]*)/i'; - $urlRegs[] ='/http:\/\/digg\.com\/([a-z0-9]{6}[a-z0-9]*)/i'; - $urlRegs[] ='/http:\/\/goo\.gl\/fb\/([a-z0-9]*)/i'; - $urlRegs[] ='/http:\/\/goo\.gl\/([a-z0-9]*)/i'; - $urlRegs[] ='/http:\/\/orz\.se\/([a-z0-9]*)/i'; - $urlRegs[] ='/http:\/\/zi\.mu\/([a-z0-9]*)/i'; - $urlRegs[] ='/http:\/\/knb\.im\/([a-z0-9]*)/i'; - $urlRegs[] ='/http:\/\/ff\.im\/([a-z0-9]*)/i'; - $urlRegs[] ='/http:\/\/sinaurl\.cn\/([a-z0-9]*)/i'; - $urlRegs[] ='/http:\/\/163\.fm\/([a-z0-9]*)/i'; - $urlRegs[] = '/http:\/\/guao\.cc\/([a-z0-9]*)/i'; - - foreach($urlRegs as $urlReg) { - if(preg_match($urlReg,$text,$match)){ - if(strpos($match[0], "is.gd") !== false){ - //$request = 'http://realurl.org/api/v1/getrealurl.php?url=' . $match[0]; - $request = 'http://longurlplease.appspot.com/api/v1.1?q=' . $match[0]; - //$obj = objectifyXml(processCurl( $request )); - $obj = objectifyJson(processCurl( $request )); - //if (isset($obj->url)) return $obj->url->real; - if (isset($obj->{$match[0]})) return $obj->{$match[0]}; - }else{ - $request = 'http://api.unshort.me/?r=' . $match[0]; - $obj = objectifyXml(processCurl( $request )); - if (isset($obj->resolvedURL)) return $obj->resolvedURL; - } - } - } - return false; - } - - function processCurl($url,$postargs=false) + function processCurl($url,$postdata=false,$header=false) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); - curl_setopt($ch, CURLOPT_TIMEOUT,5);//added by yegle - + curl_setopt($ch, CURLOPT_TIMEOUT,120); + + if($postdata !== false) { + curl_setopt ($ch, CURLOPT_POST, true); + curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata); + } + + if($header !== false) { + curl_setopt($ch, CURLOPT_HTTPHEADER, $header); + } + $response = curl_exec($ch); $responseInfo=curl_getinfo($ch); - curl_close($ch); - if( intval( $responseInfo['http_code'] ) == 200 ) - return $response; + return $response; else return false; } - function objectifyXml( $data ) - { + function objectifyXml( $data ){ if( function_exists('simplexml_load_string') ) { $obj = simplexml_load_string( $data ); @@ -254,36 +169,62 @@ } + function imageUpload($image){ + $t = getTwitter(); + $signingurl = 'https://api.twitter.com/1/account/verify_credentials.json'; + $request = OAuthRequest::from_consumer_and_token($t->consumer, $t->token, 'GET', $signingurl, array()); + $request->sign_request($t->sha1_method, $t->consumer, $t->token); + $r_header = $request->to_header("http://api.twitter.com/"); + + $url = 'http://img.ly/api/2/upload.json'; + $postdata = array('media' => $image); + $ch = curl_init($url); + if($postdata !== false) + { + curl_setopt ($ch, CURLOPT_POST, true); + curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata); + } + curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-Auth-Service-Provider: '.$signingurl,'X-Verify-Credentials-'.$r_header)); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_USERAGENT, 'embr'); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); + curl_setopt($ch, CURLOPT_TIMEOUT,120); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,5); + + $response = curl_exec($ch); + $response_info=curl_getinfo($ch); + curl_close($ch); + + if ($response_info['http_code'] == 200) { + return objectifyJson($response); + } else { + return null; + } + } + function getTwitter() { - if(isOAuth()){ - $access_token = $_SESSION['access_token']; + if(loginStatus()){ + $access_token = $_SESSION['access_token'] ? $_SESSION['access_token'] : null; + $oauth_token = $access_token ? $access_token['oauth_token'] : $_COOKIE['oauth_token']; + $oauth_token_secret = $access_token ? $access_token['oauth_token_secret'] : $_COOKIE['oauth_token_secret']; $oauth = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $access_token['oauth_token'], $access_token['oauth_token_secret']); return $oauth; } - $type = function_exists('json_decode') ? 'json': 'xml'; - return new twitter(getEncryptCookie('twitese_name'), getEncryptCookie('twitese_pw'), $type); + return null; } - function isLogin(){ - return getEncryptCookie('twitese_name') && getEncryptCookie('twitese_pw'); - } - - function loginStatus() { - return isLogin() || isOAuth(); - } - - function isOAuth() { - if(isset($_SESSION['login_status'])){ - return $_SESSION['login_status'] == 'verified' ? true : false; - }elseif(getEncryptCookie("oauth_token") != "" && getEncryptCookie("oauth_token_secret") != "" && getEncryptCookie("user_id") != "" && getEncryptCookie("twitese_name") != ""){ - $access_token = array("oauth_token" => getEncryptCookie("oauth_token"), "oauth_token_secret" => getEncryptCookie("oauth_token_secret"), "user_id" => getEncryptCookie("user_id"), "screen_name" => getEncryptCookie("twitese_name")); - $_SESSION['access_token'] = $access_token; - $_SESSION['login_status'] = 'verified'; - refreshProfile(); - return true; - } - return false; - } + function loginStatus() { + if(isset($_SESSION['login_status'])){ + return $_SESSION['login_status'] == 'verified' ? true : false; + }elseif(getEncryptCookie("oauth_token") != "" && getEncryptCookie("oauth_token_secret") != "" && getEncryptCookie("user_id") != "" && getEncryptCookie("twitese_name") != ""){ + $access_token = array("oauth_token" => getEncryptCookie("oauth_token"), "oauth_token_secret" => getEncryptCookie("oauth_token_secret"), "user_id" => getEncryptCookie("user_id"), "screen_name" => getEncryptCookie("twitese_name")); + $_SESSION['access_token'] = $access_token; + $_SESSION['login_status'] = 'verified'; + refreshProfile(); + return true; + } + return false; + } function GetListed($t, $cursor = false){ $lists = $t->beAddedLists($t->username, $cursor); @@ -291,16 +232,14 @@ if($lists->next_cursor > 1){ $listed += GetListed($t, $lists->next_cursor); } - return $listed; + return $listed; } function getAvatar($profileImg){ - $httpsMode = false; - if($httpsMode == true){ - $reg = "/(http[s]?\:[\S]+\.com\/)/i"; - $profileImg = preg_replace($reg, "https://s3.amazonaws.com/twitter_production/", $profileImg); + if (getcookie('p_avatar') == 'true') { + return 'img.php?imgurl='.$profileImg; } - return $profileImg; + return preg_replace('/https?:\/\/\w+([0-9])\.twimg\.com/i','https://s3.amazonaws.com/twitter_production',$profileImg); } // $target: can't be current user @@ -328,4 +267,22 @@ } return 9; } + + function urlshorten($url, $type='goo.gl'){ + switch($type){ + case 'goo.gl': + $data = json_encode(array('longUrl' => $url)); + $api = 'https://www.googleapis.com/urlshortener/v1/url?key=AIzaSyDsX2BAo9Jc2yG3Pq1VbLQALqdrtDFvXkg'; + $header = array('Content-type: application/json'); + $result = objectifyJson(processCurl($api,$data,$header))->id; + break; + case 'zi.mu': + $api = 'http://zi.mu/api.php?format=simple&action=shorturl&url='; + $result = objectifyJson(processCurl($api.rawurlencode($url))); + break; + default: + break; + } + return $result; + } ?> diff --git a/lib/twitteroauth.php b/lib/twitteroauth.php index b72aaaf..9dedf59 100644 --- a/lib/twitteroauth.php +++ b/lib/twitteroauth.php @@ -1,797 +1,830 @@ -http_status; } - function lastAPICall() { return $this->last_api_call; } - - /** - * construct TwitterOAuth object - */ - function __construct($consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL) { - $this->sha1_method = new OAuthSignatureMethod_HMAC_SHA1(); - $this->consumer = new OAuthConsumer($consumer_key, $consumer_secret); - if (!empty($oauth_token) && !empty($oauth_token_secret)) { - $this->token = new OAuthConsumer($oauth_token, $oauth_token_secret); - $this->screen_name = $_SESSION['access_token']['screen_name']; - $this->username = $_SESSION['access_token']['screen_name']; - $this->user_id = $_SESSION['access_token']['user_id']; - } else { - $this->token = NULL; - } - } - - - /** - * Get a request_token from Twitter - * - * @returns a key/value array containing oauth_token and oauth_token_secret - */ - function getRequestToken($oauth_callback = NULL) { - $parameters = array(); - if (!empty($oauth_callback)) { - $parameters['oauth_callback'] = $oauth_callback; - } - $request = $this->oAuthRequest($this->requestTokenURL(), 'GET', $parameters); - $token = OAuthUtil::parse_parameters($request); - $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']); - return $token; - } - - /** - * Get the authorize URL - * - * @returns a string - */ - function getAuthorizeURL($token, $sign_in_with_twitter = TRUE) { - if (is_array($token)) { - $token = $token['oauth_token']; - } - if (empty($sign_in_with_twitter)) { - return $this->authorizeURL() . "?oauth_token={$token}"; - } else { - return $this->authenticateURL() . "?oauth_token={$token}"; - } - } - - /** - * Exchange the request token and secret for an access token and - * secret, to sign API calls. - * - * @returns array("oauth_token" => the access token, - * "oauth_token_secret" => the access secret) - */ - function getAccessToken($oauth_verifier = FALSE) { - $parameters = array(); - if (!empty($oauth_verifier)) { - $parameters['oauth_verifier'] = $oauth_verifier; - } - $request = $this->oAuthRequest($this->accessTokenURL(), 'GET', $parameters); - $token = OAuthUtil::parse_parameters($request); - $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']); - return $token; - } - - /** - * GET wrappwer for oAuthRequest. - */ - function get($url, $parameters = array()) { - $response = $this->oAuthRequest($url, 'GET', $parameters); - if($response == false){ - return false; - } - if ($this->type == 'json' && $this->decode_json) { - return @json_decode($response); - }elseif($this->type == 'xml' && function_exists('simplexml_load_string')){ - return @simplexml_load_string($response); - } - return $response; - } - - /** - * POST wreapper for oAuthRequest. - */ - function post($url, $parameters = array()) { - $response = $this->oAuthRequest($url, 'POST', $parameters); - if($response === false){ - return false; - } - if ($this->type === 'json' && $this->decode_json) { - return json_decode($response); - }elseif($this->type == 'xml' && function_exists('simplexml_load_string')){ - return simplexml_load_string($response); - } - return $response; - } - - /** - * DELTE wrapper for oAuthReqeust. - */ - function delete($url, $parameters = array()) { - $response = $this->oAuthRequest($url, 'DELETE', $parameters); - if($response === false){ - return false; - } - if ($this->type === 'json' && $this->decode_json) { - return json_decode($response); - }elseif($this->type == 'xml' && function_exists('simplexml_load_string')){ - return simplexml_load_string($response); - } - return $response; - } - - /** - * Format and sign an OAuth / API request - */ - function oAuthRequest($url, $method, $parameters) { - if (strrpos($url, 'https://') !== 0 && strrpos($url, 'http://') !== 0) { - $url = "{$this->host}{$url}.{$this->type}"; - } - $request = OAuthRequest::from_consumer_and_token($this->consumer, $this->token, $method, $url, $parameters); - $request->sign_request($this->sha1_method, $this->consumer, $this->token); - switch ($method) { - case 'GET': - return $this->http($request->to_url(), 'GET'); - default: - return $this->http($request->get_normalized_http_url(), $method, $request->to_postdata()); - } - } - - /** - * Make an HTTP request - * - * @return API results - */ - function http($url, $method, $postfields = NULL) { - $ci = curl_init(); - /* Curl settings */ - curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout); - curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout); - curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE); - curl_setopt($ci, CURLOPT_HTTPHEADER, array('Expect:')); - curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer); - - switch ($method) { - case 'POST': - curl_setopt($ci, CURLOPT_POST, TRUE); - if (!empty($postfields)) { - curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields); - } - break; - case 'DELETE': - curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE'); - if (!empty($postfields)) { - $url = "{$url}?{$postfields}"; - } - } - - curl_setopt($ci, CURLOPT_URL, $url); - $response = curl_exec($ci); - $this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE); - $this->last_api_call = $url; - curl_close ($ci); - return $response; - } - - /* ---------- API METHODS ---------- */ - /* */ - /* ---------- Block ---------- */ - function blockingIDs(){ - $url = 'blocks/blocking/ids'; - return $this->get($url); - } - - function blockingList($page){ - $url = '/blocks/blocking'; - $args = array(); - if($page){ - $args['page'] = $page; - } - return $this->get($url, $args); - } - - function blockUser($id){ - $url = $this->host.'/blocks/create'; - $url .= "/$id.$this->type"; - return $this->post($url); - } - - function isBlocked($id){ - $url = $this->host.'/blocks/exists'; - $url .= "/$id.$this->type"; - return $this->get($url); - } - - function unblockUser($id){ - $url = $this->host.'/blocks/destroy'; - $url .= "/$id.$this->type"; - return $this->delete($url); - } - - /* ---------- Messages ---------- */ - function deleteDirectMessage($id){ - $url = $this->host.'/direct_messages/destroy'; - $url .= "/$id.$this->type"; - return $this->delete($url); - } - - function directMessages($page = false, $since_id = false, $count = null){ - $url = '/direct_messages'; - $args = array(); - if( $since_id ) - $args['since_id'] = $since_id; - if( $page ) - $args['page'] = $page; - return $this->get($url, $args); - } - - function sendDirectMessage($user, $text){ - $url = '/direct_messages/new'; - $args = array(); - $args['user'] = $user; - if($text) - $args['text'] = $text; - return $this->post($url, $args); - } - - function sentDirectMessage($page = false, $since = false, $since_id = false){ - $url = '/direct_messages/sent'; - $args = array(); - if($since) - $args['since'] = $since; - if($since_id) - $args['since_id'] = $since_id; - if($page) - $args['page'] = $page; - return $this->get($url, $args); - } - - /* ---------- List ---------- */ - function addListMember($listid, $memberid){ - $url = "/1/$this->username/$listid/members"; - $args = array(); - if($memberid){ - $args['id'] = $memberid; - } - return $this->post($url, $args); - } - - function beAddedLists($username = '', $cursor = false){ - $url = $this->host."/$username/lists/memberships.$this->type"; - $args = array(); - if($cursor){ - $args['cursor'] = $cursor; - } - return $this->get($url, $args); - } - - function createList($name, $description, $isPortect){ - $url = "/$this->username/lists"; - $args = array(); - if($name){ - $args['name'] = $name; - } - if($description){ - $args['description'] = $description; - } - if($isProtect){ - $args['mode'] = 'private'; - } - return $this->post($url, $args); - } - - function createdLists($username = '', $cursor = false){ - $url = $this->host."/$username/lists.$this->type"; - $args = array(); - if($cursor){ - $args['cursor'] = $cursor; - } - return $this->get($url, $args); - } - - function deleteList($id){ - $arr = explode('/', $id); - $url = "/$arr[0]/lists/$arr[1]"; - return $this->delete($url); - } - - function deleteListMember($id, $memberid){ - $arr = explode("/", $id); - $url = "/1/".$arr[0]."/".$arr[1]."/members"; - $args = array(); - if($memberid){ - $args['id'] = $memberid; - } - return $this->delete($url, $args); - } - - function editList($prename, $name, $description, $isProtect){ - $url = "$this->username/lists/$prename"; - $args = array(); - if($name){ - $args['name'] = $name; - } - if($description){ - $args['description'] = $description; - } - if($isProtect){ - $args['mode'] = "private"; - } - return $this->post($url, $args); - } - - function followedLists($username = '', $cursor = false){ - $url = $this->host."/$username/lists/subscriptions.$this->type"; - $args = array(); - if($cursor){ - $args['cursor'] = $cursor; - } - return $this->get($url, $args); - } - - function followList($id){ - $arr = explode("/", $id); - $url = $this->host."/1/$arr[0]/$arr[1]/subscribers/$this->type"; - return $this->post($url, $args); - } - - function isFollowedList($id){ - $arr = explode('/', $id); - $url = $this->host."/$arr[0]/$arr[1]/subscribers/$this->username.$this->type"; - return $this->get($url); - } - - function listFollowers($id, $cursor = false){ - $arr = explode('/', $id); - $url = $this->host."/1/$arr[0]/$arr[1]/subscribers.$this->type"; - $args = array(); - if($cursor){ - $args['cursor'] = $cursor; - } - return $this->get($url, $args); - } - - function listInfo($id){ - $arr = explode('/', $id); - $url = $this->host."/$arr[0]/lists/$arr[1].$this->type"; - return $this->get($url); - } - - function listMembers($id, $cursor = false){ - $arr = explode("/", $id); - $url = $this->host."/1/$arr[0]/$arr[1]/members.$this->type"; - $args = array(); - if($cursor){ - $args['cursor'] = $cursor; - } - return $this->get($url, $args); - - } - - function listStatus($id, $page = false, $since_id = false){ - $arr = explode('/', $id); - $url = $this->host."/$arr[0]/lists/$arr[1]/statuses.$this->type"; - $args = array(); - if($page){ - $args['page'] = $page; - } - if($since_id){ - $args['since_id'] = $since_id; - } - return $this->get($url, $args); - } - - function unfollowList($id){ - $arr = explode("/", $id); - $url = $this->host."/1/$arr[0]/$arr[1]/subscribers.$this->type"; - return $this->delete($url); - } - - /* ---------- Friendship ---------- */ - function destroyUser($id){ - $url = $this->host.'/friendships/destroy'; - $url .= "/$id.$this->type"; - return $this->delete($url); - } - - function followers($id = false, $page = false, $count = 30){ - $url = $this->host.'/statuses/followers'; - $url .= $id ? "/$id.$this->type" : ".$this->type"; - if( $id ) - $args['id'] = $id; - if( $count ) - $args['count'] = (int) $count; - $args['cursor'] = $page ? $page : -1; - return $this->get($url, $args); - } - - function followUser($id, $notifications = false){ - $url = $this->host.'/friendships/create'; - $url .= "/$id.$this->type"; - $args = array(); - if($notifications) - $args['follow'] = true; - return $this->post($url, $args); - } - - function friends($id = false, $page = false, $count = 30){ - $url = $this->host.'/statuses/friends'; - $url .= $id ? "/$id.$this->type" : ".$this->type"; - $args = array(); - if( $id ) - $args['id'] = $id; - if( $count ) - $args['count'] = (int) $count; - $args['cursor'] = $page ? $page : -1; - return $this->get($url, $args); - } - - function isFriend($user_a, $user_b){ - $url = '/friendships/exists'; - $args = array(); - $args['user_a'] = $user_a; - $args['user_b'] = $user_b; - return $this->get($url, $args); - } - - function relationship($target, $source = false){ - $url = API_TWITTER.'/1/friendships/show.'.$this->type; - $args = array(); - $args['target_screen_name'] = $target; - if($source){ - $args['source_screen_name'] = $source; - } - return $this->get($url, $args); - } - - function showUser($id = false, $email = false, $user_id = false, $screen_name = false){ - $url = '/users/show'; - $args = array(); - if($id) - $args['id'] = $id; - elseif($screen_name) - $args['id'] = $screen_name; - else - $args['id'] = $this->user_id; - - return $this->get($url, $args); - } - - /* ---------- Ratelimit ---------- */ - function ratelimit(){ - $url = '/account/rate_limit_status'; - return $this->get($url); - } - - function ratelimit_status(){ - return $this->ratelimit(); - } - - /* ---------- Retweet ---------- */ - function getRetweeters($id, $count = false){ - $url = $this->host."/1/statuses/retweets/$id.$this->type"; - if($count != false){ - $url .= "?count=$count"; - } - return $this->get($url); - } - - function retweet($id){ - $url = "http://api.twitter.com/1/statuses/retweet/$id.$this->type"; - return $this->post($url); - } - - function retweets($id, $count = 20){ - if($count > 100){ - $count = 100; - } - $url = "http://api.twitter.com/1/statuses/retweets/id.$this->type?count=$count"; - return $this->get($url); - } - - // Returns the 20 most recent retweets posted by the authenticating user. - function retweeted_by_me($page = false, $count = 20, $since_id = false, $max_id = false){ - $url = "http://api.twitter.com/1/statuses/retweeted_by_me.$this->type"; - $args = array(); - if($since_id){ - $args['since_id'] = $since_id; - } - if($max_id){ - $args['max_id'] = $max_id; - } - if($count){ - $args['count'] = $count; - } - if($page){ - $args['page'] = $page; - } - return $this->get($url, $args); - } - - // Returns the 20 most recent retweets posted by the authenticating user's friends. - function retweeted_to_me($page = false, $count = false, $since_id = false, $max_id = false){ - $url = "http://api.twitter.com/1/statuses/retweeted_to_me.$this->type"; - $args = array(); - if($since_id){ - $args['since_id'] = $since_id; - } - if($max_id){ - $args['max_id'] = $max_id; - } - if($count){ - $args['count'] = $count; - } - if($page){ - $args['page'] = $page; - } - return $this->get($url, $args); - } - - function retweets_of_me($page = false, $count = false, $since_id = false, $max_id = false){ - $url = "http://api.twitter.com/1/statuses/retweets_of_me.$this->type"; - $args = array(); - if($since_id){ - $args['since_id'] = $since_id; - } - if($max_id){ - $args['max_id'] = $max_id; - } - if($count){ - $args['count'] = $count; - } - if($page){ - $args['page'] = $page; - } - return $this->get($url, $args); - } - - /* ---------- Search ---------- */ - function search($q = false, $page = false, $rpp = false){ - $url = '/search'; - if(!$q) - return false; - $args = array(); - if($page){ - $args['page'] = $page; - } - if($rpp){ - $args['rpp'] = $rpp; - } - $args['q'] = $q; - return $this->get($url, $args); - } - - /* ---------- Spam ---------- */ - function reportSpam($screen_name){ - $url = API_TWITTER."/1/report_spam.$this->type"; - $args = array(); - $args['screen_name'] = $screen_name; - return $this->post($url, $args); - } - - /* ---------- Timeline ---------- */ - function deleteStatus($id){ - $url = $this->host.'/statuses/destroy'; - $url .= "/$id.$this->type"; - return $this->delete($url); - } - - function friendsTimeline($page = false, $since_id = false, $count = false){ - $url = '/statuses/friends_timeline'; - $args = array(); - if($page) - $args['page'] = $page; - if($since_id) - $args['since_id'] = $since_id; - if($count) - $args['count'] = $count; - return $this->get($url, $args); - } - - function getFavorites($page = false){ - $url = '/favorites'; - $args = array(); - if($page) - $args['page'] = $page; - return $this->get($url, $args); - } - - function makeFavorite($id){ - $url = $this->host.'/favorites/create/'; - $url .= "$id.$this->type"; - return $this->post($url); - } - - function publicTimeline($sinceid = false){ - $url = '/statuses/public_timeline'; - $args = array(); - if($sinceid){ - $args['since_id'] = $sinceid; - } - return $this->get($url, $args); - } - - function removeFavorite($id){ - $url = $this->host.'/favorites/destroy/'; - $url .= "$id.$this->type"; - return $this->post($url); - } - - function replies($page = false, $since_id = false){ - $url = '/statuses/mentions'; - $args = array(); - if($page) - $args['page'] = (int) $page; - if($since_id) - $args['since_id'] = $since_id; - return $this->get($url, $args); - } - - function showStatus($id){ - $url = $this->host.'/statuses/show'; - $url .= "/$id.$this->type"; - return $this->get($url); - } - - function update($status, $replying_to = false){ - try{ - $url = '/statuses/update'; - $args = array(); - $args['status'] = $status; - if($replying_to) - $args['in_reply_to_status_id'] = $replying_to; - return $this->post($url, $args); - }catch(Exception $ex){ - echo $ex->getLine." : ".$ex->getMessage(); - } - } - - function userTimeline($page = false, $id = false, $count = false, $since_id = false){ - $url = '/statuses/user_timeline'; - $args = array(); - if($page) - $args['page'] = $page; - if($id) - $args['id'] = $id; - if($count) - $args['count'] = $count; - if($since_id) - $args['since_id'] = $since_id; - $response = $this->get($url, $args); - if($response->error === 'Not authorized'){ - return 'protected'; - } - return $response; - } - - function trends(){ - $url = "http://search.twitter.com/trends.$this->type"; - return $this->get($url); - } - - /* ---------- Misc. ---------- */ - function twitterAvailable(){ - $url = "/help/test"; - if($this->get($url) == 'ok'){ - return true; - } - return false; - } - - function updateProfile($fields = array()){ - $url = '/account/update_profile'; - $args = array(); - foreach( $fields as $pk => $pv ){ - switch( $pk ){ - case 'name' : - $args[$pk] = (string) substr( $pv, 0, 20 ); - break; - case 'email' : - if( preg_match( '/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i', $pv ) ) - $args[$pk] = (string) $pv; - break; - case 'url' : - $args[$pk] = (string) substr( $pv, 0, 100 ); - break; - case 'location' : - $args[$pk] = (string) substr( $pv, 0, 30 ); - break; - case 'description' : - $args[$pk] = (string) substr( $pv, 0, 160 ); - break; - default : - break; - } - } - return $this->post($url, $args); - } - - function veverify(){ - $url = $this->host.'/account/verify_credentials.'.$this->type; - return $this->get($url); - } - - /* ---------- image upload ---------- */ - function imglyUpload($image){ - $imgly = new image_uploader(); - return is_null($imgly->imgly($image)); - } - - /* ---------- twitese method ---------- */ - function rank($page = false, $count = false){ - $url = TWITESE_API_URL."/rank.$this->type"; - $args = array(); - if($page){ - $args['page'] = $page; - } - if($count){ - $args['count'] = $count; - } - return $this->get($url, $args); - } - - function browse($page = false, $count = false){ - $url = TWITESE_API_URL."/browse.$this->type"; - $args = array(); - if($page){ - $args['page'] = $page; - } - if($count){ - $args['count'] = $count; - } - return $this->get($url, $args); - } -} - +http_status; } + function lastAPICall() { return $this->last_api_call; } + + /** + * construct TwitterOAuth object + */ + function __construct($consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL) { + $this->sha1_method = new OAuthSignatureMethod_HMAC_SHA1(); + $this->consumer = new OAuthConsumer($consumer_key, $consumer_secret); + if (!empty($oauth_token) && !empty($oauth_token_secret)) { + $this->token = new OAuthConsumer($oauth_token, $oauth_token_secret); + $this->screen_name = $_SESSION['access_token']['screen_name']; + $this->username = $_SESSION['access_token']['screen_name']; + $this->user_id = $_SESSION['access_token']['user_id']; + } else { + $this->token = NULL; + } + } + + + /** + * Get a request_token from Twitter + * + * @returns a key/value array containing oauth_token and oauth_token_secret + */ + function getRequestToken($oauth_callback = NULL) { + $parameters = array(); + if (!empty($oauth_callback)) { + $parameters['oauth_callback'] = $oauth_callback; + } + $request = $this->oAuthRequest($this->requestTokenURL(), 'GET', $parameters); + $token = OAuthUtil::parse_parameters($request); + $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']); + return $token; + } + + /** + * Get the authorize URL + * + * @returns a string + */ + function getAuthorizeURL($token) { + if (is_array($token)) { + $token = $token['oauth_token']; + } + return $this->authorizeURL() . "?oauth_token={$token}"; + } + + /** + * Exchange the request token and secret for an access token and + * secret, to sign API calls. + * + * @returns array("oauth_token" => the access token, + * "oauth_token_secret" => the access secret) + */ + function getAccessToken($oauth_verifier = FALSE) { + $parameters = array(); + if (!empty($oauth_verifier)) { + $parameters['oauth_verifier'] = $oauth_verifier; + } + $request = $this->oAuthRequest($this->accessTokenURL(), 'GET', $parameters); + $token = OAuthUtil::parse_parameters($request); + $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']); + return $token; + } + + /** + * GET wrappwer for oAuthRequest. + */ + function get($url, $parameters = array()) { + $response = $this->oAuthRequest($url, 'GET', $parameters); + if($response == false){ + return false; + } + if ($this->type == 'json' && $this->decode_json) { + return json_decode($response); + }elseif($this->type == 'xml' && function_exists('simplexml_load_string')){ + return simplexml_load_string($response); + } + return $response; + } + + /** + * POST wreapper for oAuthRequest. + */ + function post($url, $parameters = array(), $multipart = NULL) { + $response = $this->oAuthRequest($url, 'POST', $parameters, $multipart); + if($response === false){ + return false; + } + if ($this->type === 'json' && $this->decode_json) { + return json_decode($response); + }elseif($this->type == 'xml' && function_exists('simplexml_load_string')){ + return simplexml_load_string($response); + } + return $response; + } + + /** + * DELTE wrapper for oAuthReqeust. + */ + function delete($url, $parameters = array()) { + $response = $this->oAuthRequest($url, 'DELETE', $parameters); + if($response === false){ + return false; + } + if ($this->type === 'json' && $this->decode_json) { + return json_decode($response); + }elseif($this->type == 'xml' && function_exists('simplexml_load_string')){ + return simplexml_load_string($response); + } + return $response; + } + + /** + * Format and sign an OAuth / API request, then make an HTTP request + */ + function oAuthRequest($url, $method, $parameters, $multipart=NULL) { + if ($url[0] == '/') { //non-twitter.com api shall offer the entire url. + $url = "{$this->host}{$url}.{$this->type}"; + } + $request = OAuthRequest::from_consumer_and_token($this->consumer, $this->token, $method, $url, $parameters); + $request->sign_request($this->sha1_method, $this->consumer, $this->token); + $request->set_http_header($multipart); + + $ci = curl_init(); + /* Curl settings */ + curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout); + curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout); + curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE); + curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer); + + switch ($method) { + case 'GET': + curl_setopt($ci, CURLOPT_URL, $request->to_url()); + curl_setopt($ci, CURLOPT_HTTPHEADER, array('Expect:')); + break; + case 'POST': + $postfields = $multipart ? $multipart : $request->to_postdata(); + curl_setopt($ci, CURLOPT_URL, $request->get_normalized_http_url()); + curl_setopt($ci, CURLOPT_HTTPHEADER, $request->http_header); + curl_setopt($ci, CURLOPT_POST, TRUE); + if (!empty($postfields)) { + curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields); + } + break; + case 'DELETE': + $postfields = $request->to_postdata($multipart); + $url = $request->get_normalized_http_url(); + curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE'); + curl_setopt($ci, CURLOPT_HTTPHEADER, array('Expect:')); + if (!empty($postfields)) { + $url = "{$url}?{$postfields}"; + curl_setopt($ci, CURLOPT_URL, $url); + } + } + + $response = curl_exec($ci); + $this->http_header = $request->http_header; + $this->curl_info = curl_getinfo($ci); + $this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE); + $this->last_api_call = curl_getinfo($ci, CURLINFO_EFFECTIVE_URL); + + curl_close ($ci); + + return $response; + } + + + /* ---------- API METHODS ---------- */ + /* */ + /* ---------- Block ---------- */ + function blockingIDs(){ + $url = '/blocks/blocking/ids'; + return $this->get($url); + } + + function blockingList($id, $cursor=-1, $skip_status = 1){ + $url = '/blocks/list'; + $args = array(); + if($id) + $args['user_id'] = $id; + if($cursor) + $args['cursor'] = $cursor; + $args['skip_status'] = $skip_status; + return $this->get($url, $args); + } + + function blockUser($id){ + $url = "/blocks/create/$id"; + return $this->post($url); + } + + function isBlocked($id){ + $url = "/blocks/exists/$id"; + return $this->get($url); + } + + function unblockUser($id){ + $url = "/blocks/destroy/$id"; + return $this->delete($url); + } + + /* ---------- Messages ---------- */ + function deleteDirectMessage($id){ + $url = "/direct_messages/destroy/$id"; + return $this->delete($url); + } + + function directMessages($page = false, $since_id = false, $count = null, $include_entities = true){ + $url = '/direct_messages'; + $args = array(); + if( $since_id ) + $args['since_id'] = $since_id; + if( $page ) + $args['page'] = $page; + if($include_entities) + $args['include_entities'] = $include_entities; + return $this->get($url, $args); + } + + function sendDirectMessage($user, $text){ + $url = '/direct_messages/new'; + $args = array(); + $args['user'] = $user; + if($text) + $args['text'] = $text; + return $this->post($url, $args); + } + + function sentDirectMessage($page = false, $since = false, $since_id = false){ + $url = '/direct_messages/sent'; + $args = array(); + if($since) + $args['since'] = $since; + if($since_id) + $args['since_id'] = $since_id; + if($page) + $args['page'] = $page; + return $this->get($url, $args); + } + + /* ---------- List ---------- */ + function addListMember($listid, $memberid){ + $url = "/lists/members/create_all"; + $args = array(); + if($listid) + $args['slug'] = $listid; + if($memberid) + $args['user_id'] = $memberid; + + return $this->post($url, $args); + } + + function beAddedLists($owner_screen_name = '', $cursor = false){ + $url = "/lists/memberships"; + $args = array(); + if($owner_screen_name) + $args['owner_screen_name'] = $owner_screen_name; + if($cursor){ + $args['cursor'] = $cursor; + } + return $this->get($url, $args); + } + + function createList($name, $description, $isPortect){ + $url = "/lists/create"; + $args = array(); + if($name) + $args['name'] = $name; + if($description) + $args['description'] = $description; + if($isProtect) + $args['mode'] = 'private'; + + return $this->post($url, $args); + } + + function createdLists($username = '', $cursor = false){ + $url = "/lists/ownerships"; + $args = array(); + if($cursor) + $args['cursor'] = $cursor; + + return $this->get($url, $args); + } + + function deleteList($id){ + $url = "/lists/destroy"; + $args = array(); + $args['owner_screen_name'] = $arr[0]; + $args['slug'] = $arr[1]; + return $this->post($url, $args); + } + + function deleteListMember($id, $memberid){ + $arr = explode("/", $id); + $url = "/lists/members/destroy_all"; + $args = array(); + $args['slug'] = $arr[1]; + if($memberid) + $args['id'] = $memberid; + + return $this->post($url, $args); + } + + function editList($prename, $name, $description, $isProtect){ + $url = "/lists/update"; + $args = array(); + if($prename) + $args['slug'] = $prename; + if($name) + $args['name'] = $name; + if($description) + $args['description'] = $description; + if($isProtect) + $args['mode'] = "private"; + return $this->post($url, $args); + } + + function followedLists($username = '', $cursor = false){ + $url = "/lists/subscriptions"; + $args = array(); + if($username) + $args['user_id'] = $username; + if($cursor) + $args['cursor'] = $cursor; + return $this->get($url, $args); + } + + function followList($id){ + $url = "/lists/subscribers/create"; + $arr = explode("/", $id); + $args = array(); + $args['owner_screen_name'] = $arr[0]; + $args['slug'] = $arr[1]; + return $this->post($url, $args); + } + + function isFollowedList($id){ + $url = "/lists/subscribers/show"; + $arr = explode('/', $id); + $args = array(); + $args['owner_screen_name'] = $arr[0]; + $args['slug'] = $arr[1]; + $args['user_id'] = $this->username; + return $this->get($url, $args); + } + + function listFollowers($id, $cursor = false, $skip_status = 1){ + $url = "/lists/subscribers"; + $arr = explode('/', $id); + $args = array(); + $args['owner_screen_name'] = $arr[0]; + $args['slug'] = $arr[1]; + if($cursor){ + $args['cursor'] = $cursor; + } + $args['skip_status'] = $skip_status; + return $this->get($url, $args); + } + + function listInfo($id){ + $arr = explode('/', $id); + $url = "/lists/show"; + $args = array(); + $args['owner_screen_name'] = $arr[0]; + $args['slug'] = $arr[1]; + return $this->get($url, $args); + } + + function listMembers($id, $cursor = false, $skip_status = 1){ + $arr = explode("/", $id); + $url = "/lists/members"; + $args = array(); + $args['owner_screen_name'] = $arr[0]; + $args['slug'] = $arr[1]; + if($cursor){ + $args['cursor'] = $cursor; + } + $args['skip_status'] = $skip_status; + return $this->get($url, $args); + + } + + function listStatus($id, $page = false, $since_id = false,$include_rts = true, $include_entities = true){ + $arr = explode('/', $id); + $url = '/lists/statuses'; + $args = array(); + $args['slug'] = $arr[1]; + $args['owner_screen_name'] = $arr[0]; + if($page){ + $args['page'] = $page; + } + if($since_id){ + $args['since_id'] = $since_id; + } + if($include_rts) + $args['include_rts'] = $include_rts; + if($include_entities) + $args['include_entities'] = $include_entities; + return $this->get($url, $args); + } + + function unfollowList($id){ + $arr = explode("/", $id); + $url = "/lists/subscribers/destroy"; + $args = array(); + $args['owner_screen_name'] = $arr[0]; + $args['slug'] = $arr[1]; + return $this->post($url, $args); + } + + /* ---------- Friendship ---------- */ + function destroyUser($id){ + $url = "/friendships/destroy/$id"; + return $this->delete($url); + } + + function followers($id = false, $page = false, $skip_status = true){ + $url = 'followers/list'; + if( $id ) + $args['user_id'] = $id; + $args['cursor'] = $page ? $page : -1; + $args['skip_status'] = $skip_status; + return $this->get($url, $args); + } + + function followUser($id, $notifications = false){ + $url = "/friendships/create/$id"; + $args = array(); + if($notifications) + $args['follow'] = true; + return $this->post($url, $args); + } + + function friends($id = false, $page = false, $skip_status = true){ + $url = '/friends/list'; + $args = array(); + if( $id ) + $args['user_id'] = $id; + $args['cursor'] = $page ? $page : -1; + $args['skip_status'] = $skip_status; + return $this->get($url, $args); + } + + function isFriend($user_a, $user_b){ + $url = '/friendships/exists'; + $args = array(); + $args['user_a'] = $user_a; + $args['user_b'] = $user_b; + return $this->get($url, $args); + } + + function friendship($source_screen_name,$target_screen_name){ + $url = '/friendships/show'; + $args = array(); + $args['source_screen_name'] = $source_screen_name; + $args['target_screen_name'] = $target_screen_name; + return $this->get($url, $args); + } + + function relationship($target, $source = false){ + $url = '/friendships/show'; + $args = array(); + $args['target_screen_name'] = $target; + if($source){ + $args['source_screen_name'] = $source; + } + return $this->get($url, $args); + } + + function showUser($id = false, $email = false, $user_id = false, $screen_name = false,$include_entities = true){ + $url = '/users/show'; + $args = array(); + if($id) + $args['id'] = $id; + elseif($screen_name) + $args['id'] = $screen_name; + else + $args['id'] = $this->user_id; + + return $this->get($url, $args); + } + + /* ---------- Ratelimit ---------- */ + function ratelimit(){ + $url = '/account/rate_limit_status'; + return $this->get($url,array(),false); + } + + /* ---------- Retweet ---------- */ + function getRetweeters($id, $count = false){ + $url = "/statuses/retweets/$id"; + if($count != false) { + $url .= "?count=$count"; + } + return $this->get($url); + } + + function retweet($id){ + $url = "/statuses/retweet/$id"; + return $this->post($url); + } + + function retweets($id, $count = 20,$include_entities = true){ + if($count > 100){ + $count = 100; + } + $url = "/statuses/retweets/$id"; + $args = array(); + $args['count'] = unt; + if($include_ities) + $args['include_entities'] = $include_entities; + return $this->get($url,$args); + } + + function retweets_of_me($page = false, $count = false, $since_id = false, $max_id = false,$include_entities = true){ + $url = '/statuses/retweets_of_me'; + $args = array(); + if($since_id) + $args['since_id'] = $since_id; + if($max_id) + $args['max_id'] = $max_id; + if($count) + $args['count'] = $count; + if($page) + $args['page'] = $page; + if($include_entities) + $args['include_entities'] = $include_entities; + return $this->get($url, $args); + } + + /* ---------- Search ---------- */ + function search($q = false, $max_id = false, $include_entities = true){ + $url = "/search/tweets"; + if(!$q) { + return false; + } else { + $args = array(); + $args['q'] = $q; + } + if($max_id) + $args['max_id'] = $max_id; + if($include_entities) + $args['include_entities'] = $include_entities; + return $this->get($url, $args); + } + + /* ---------- Spam ---------- */ + function reportSpam($screen_name){ + $url = '/report_spam'; + $args = array(); + $args['screen_name'] = $screen_name; + return $this->post($url, $args); + } + + /* ---------- Timeline ---------- */ + function deleteStatus($id){ + $url = "/statuses/destroy/$id"; + return $this->delete($url); + } + + function homeTimeline($page = false, $since_id = false, $count = false, $include_entities = true) { + $url = '/statuses/home_timeline'; + $args = array(); + if($page) + $args['page'] = $page; + if($since_id) + $args['since_id'] = $since_id; + if($count) + $args['count'] = $count; + if($include_entities) + $args['include_entities'] = $include_entities; + return $this->get($url, $args); + } + + function friendsTimeline($page = false, $since_id = false, $count = false,$include_entities = true){ + $url = '/statuses/friends_timeline'; + $args = array(); + if($page) + $args['page'] = $page; + if($since_id) + $args['since_id'] = $since_id; + if($count) + $args['count'] = $count; + if($include_entities) + $args['include_entities'] = $include_entities; + return $this->get($url, $args); + } + + function getFavorites($page = false,$userid=false,$include_entities = true){ + $url = '/favorites/list'; + $args = array(); + if($userid) + $args['user_id'] = $userid; + if($page) + $args['page'] = $page; + if($include_entities) + $args['include_entities'] = $include_entities; + return $this->get($url, $args); + } + + function makeFavorite($id){ + $url = "/favorites/create/$id"; + return $this->post($url); + } + + function publicTimeline($sinceid = false,$include_entities = true){ + $url = '/statuses/public_timeline'; + $args = array(); + if($sinceid){ + $args['since_id'] = $sinceid; + } + if($include_entities) + $args['include_entities'] = $include_entities; + return $this->get($url, $args); + } + + function removeFavorite($id){ + $url = "/favorites/destroy/$id"; + return $this->post($url); + } + + function replies($page = false, $since_id = false,$include_entities = true){ + $url = '/statuses/mentions_timeline'; + $args = array(); + if($page) + $args['page'] = (int) $page; + if($since_id) + $args['since_id'] = $since_id; + if($include_entities) + $args['include_entities'] = $include_entities; + return $this->get($url, $args); + } + + function showStatus($id,$include_entities = true){ + $url = "/statuses/show/"; + $args = array(); + if($id) + $args['id'] = $id; + if($include_entities) + $args['include_entities'] = $include_entities; + return $this->get($url,$args); + } + + function update($status, $replying_to = false,$include_entities = true){ + try{ + $url = '/statuses/update'; + $args = array(); + $args['status'] = $status; + if($replying_to) + $args['in_reply_to_status_id'] = $replying_to; + if($include_entities) + $args['include_entities'] = $include_entities; + return $this->post($url, $args); + }catch(Exception $ex){ + echo $ex->getLine." : ".$ex->getMessage(); + } + } + + function userTimeline($page = false, $id = false, $count = false, $since_id = false, $include_rts = true, $include_entities = true){ + $url = '/statuses/user_timeline'; + $args = array(); + if($page) + $args['page'] = $page; + if($id) + $args['id'] = $id; + if($count) + $args['count'] = $count; + if($since_id) + $args['since_id'] = $since_id; + if($include_rts) + $args['include_rts'] = $include_rts; + if($include_entities) + $args['include_entities'] = $include_entities; + $response = $this->get($url, $args); + return $response; + } + + function trends_closest($lat = false, $long=false) { + $url = "/trends/closest"; + $args = array(); + if ($lat) + $args['lat'] = $lat; + if ($long) + $args['long'] = $long; + return $this->get($url, $args); + } + + function trends_place($id = 1) { + $url = "/trends/place"; + $args = array(); + if ($id) + $args['id'] = $id; + return $this->get($url, $args); + } + /* ---------- Misc. ---------- */ + function twitterAvailable(){ + $url = "/help/test"; + if($this->get($url) == 'ok'){ + return true; + } + return false; + } + + function veverify($skip_status = false){ + $url = '/account/verify_credentials'; + $args = array('skip_status' => $skip_status); + return $this->get($url,$args); + } + + function updateProfile($fields = array(), $skip_status = true){ + $url = '/account/update_profile'; + $args = array(); + foreach( $fields as $pk => $pv ){ + switch( $pk ){ + case 'name' : + $args[$pk] = (string) substr( $pv, 0, 20 ); + break; + case 'url' : + $args[$pk] = (string) substr( $pv, 0, 100 ); + break; + case 'location' : + $args[$pk] = (string) substr( $pv, 0, 30 ); + break; + case 'description' : + $args[$pk] = (string) substr( $pv, 0, 160 ); + break; + default : + break; + } + $args['skip_status'] = $skip_status; + } + return $this->post($url, $args); + } + + /* media */ + function updateProfileImage($image, $skip_status=true) { + $url = '/account/update_profile_image'; + $mul = array(); + if($image){ + $mul['image']=$image; + } + if($skip_status) { + $args['skip_status']=$skip_status; + } + return $this->post($url, $args, $mul); + } + + function updateProfileBackground($image, $skip_status=true) { + $url = '/account/update_profile_background_image'; + $mul = array(); + if($image){ + $mul['image']=$image; + $mul['skip_status']=$skip_status; + } + return $this->post($url, NULL, $mul); + } + + function updateMedia($status,$image,$replying_to = false) { + $url = 'https://upload.twitter.com/1/statuses/update_with_media'.$this->type; + $args = array(); + if($status) $args['status'] = $status; + if($replying_to) $args['in_reply_to_status_id'] = $replying_to; + $mul = array(); + if($image) $mul['media'][] = $image; + return $this->post($url,$args,$mul); + } +} + diff --git a/lib/utility.php b/lib/utility.php index b2a4d85..0811c46 100644 --- a/lib/utility.php +++ b/lib/utility.php @@ -1,6 +1,6 @@ diff --git a/list.php b/list.php index 28090b0..d1df369 100644 --- a/list.php +++ b/list.php @@ -5,7 +5,7 @@ if (!loginStatus()) header('location: login.php'); ?> - +
    listStatus($id, $p); $listInfo = $t->listInfo($id); if ($statuses === false) { - header('location: error.php'); + header('location: error.php');exit(); } $isFollower = false; @@ -37,9 +37,9 @@
    - Unfollow + Unfollow - Follow + Follow Tweet Followers (subscriber_count?>) @@ -51,35 +51,13 @@ '; - + include('lib/timeline_format.php'); foreach ($statuses as $status) { - $user = $status->user; - $date = formatDate($status->created_at); - $text = formatText($status->text); - - $output .= " -
  • - - screen_name\" target=\"_blank\">profile_image_url)."\" title=\"$user->screen_name\" /> - - - $status->id - screen_name\">$user->screen_name $text "; - if ($shorturl = unshortUrl($text)) $output .= "

    URL

    $shorturl
    "; - $output .= " - id\">回复 - id\">回推 - New Retweet - id\">收藏"; - if ($user->screen_name == $t->username) $output .= "id&t=s\">删除"; - $output .= ""; - if ($status->in_reply_to_status_id) $output .= " in_reply_to_status_id&uid=$user->id \">in reply to $status->in_reply_to_screen_name"; - $output .= "from $status->source - id\" target=\"_blank\">$date - -
    -
  • - "; + if (isset($status->retweeted_status)) { + $output .= format_retweet($status); + } else { + $output .= format_timeline($status,$t->username); + } } $output .= "
    "; @@ -91,16 +69,11 @@ echo $output; } - - - + ?>
    - - diff --git a/list_members.php b/list_members.php index ac4d2b7..b8a4300 100644 --- a/list_members.php +++ b/list_members.php @@ -3,11 +3,10 @@ include ('lib/twitese.php'); $title = "@{$_GET['id']} - Following"; include ('inc/header.php'); ?> - + diff --git a/lists.php b/lists.php index 47a8eb2..133209d 100644 --- a/lists.php +++ b/lists.php @@ -6,35 +6,34 @@ if (!loginStatus()) header('location: login.php'); ?> - +
    type = 'xml'; if ( isset($_POST['list_name']) ) { if ($_POST['is_edit'] == 0) { if (trim($_POST['list_name']) == '') { - echo "
    创建推群失败,推群名不能为空
    "; + echo "
    Fail to create list, the name CANNOT be empty
    "; } else { $isProtect = isset($_POST['list_protect']) ? true : false; $result = $t->createList($_POST['list_name'], $_POST['list_description'], $isProtect); if ($result) { - echo "
    创建推群成功
    "; + echo "
    Success
    "; } else { - echo "
    创建推群失败,请重试
    "; + echo "
    Failed, please retry
    "; } } } else { if (trim($_POST['list_name']) == '') { - echo "
    修改推群失败,推群名不能为空
    "; + echo "
    Fail to create list, the name CANNOT be empty
    "; } else { $isProtect = isset($_POST['list_protect']) ? true : false; $result = $t->editList($_POST['pre_list_name'], $_POST['list_name'], $_POST['list_description'], $isProtect); if ($result) { - echo "
    修改推群成功
    "; + echo "
    Success
    "; } else { - echo "
    修改推群失败,请重试
    "; + echo "
    Failed, please retry
    "; } } } @@ -42,26 +41,14 @@ if ( isset($_POST['list_members']) ) { if (trim($_POST['list_members']) == '') { - echo "
    添加成员失败,成员列表不能为空
    "; + echo "
    Fail to add members, the member list is empty!
    "; } else { $listId = $_POST['member_list_name']; - $memberList = explode(",", $_POST['list_members']); - $count = 0; - $failList = ''; - - foreach ($memberList as $member) { - $result = $t->addListMember($listId, $member); - if (!isset($result->error) && isset($result->user)) $count ++; - else $failList .= $member . " "; - } - - if ($count > 0) { - if ($count == count($memberList)) - echo "
    成功添加 $count 个成员
    "; - else - echo "
    成功添加 $count 个成员,失败名单:$failList
    "; + $result = $t->addListMember($listId, $_POST['list_members']); + if (isset($result->error)) { + echo "
    Failed, please retry!
    "; } else { - echo "
    添加成员失败,请重试
    "; + echo "
    Success!
    "; } } } @@ -79,26 +66,21 @@ switch ($type) { case 0: $lists = $t->followedLists($id, $c); - $nextlist = $lists->next_cursor; - $prelist = $lists->previous_cursor; - $lists = $lists->lists; break; case 1: - $lists = $t->createdLists($id); - $lists = $lists->lists; + $lists = $t->createdLists($id, $c); break; case 2: $lists = $t->beAddedLists($id, $c); - $nextlist = $lists->next_cursor; - $prelist = $lists->previous_cursor; - $lists = $lists->lists; break; default: $lists = false; } - + $nextlist = $lists->next_cursor; + $prelist = $lists->previous_cursor; + $lists = $lists->lists; if ($lists === false) { - header('location: error.php'); + header('location: error.php');exit(); } @@ -125,12 +107,12 @@ list) == 0? true: false; + $empty = count($lists) == 0? true: false; if ($empty) { echo "
    No Tweet To Display
    "; } else { $output = '
      '; - foreach ($lists->list as $list) { + foreach ($lists as $list) { $listurl = substr($list->uri,1); $user = $list->user; @@ -139,12 +121,12 @@ $output .= "
    1. - screen_name\">profile_image_url)."\" /> + profile_image_url)."\" />
      $listname[0]/$listname[1] Followers:$list->subscriber_count  Members:$list->member_count  $mode "; - if ($list->description != '') $output .= "简介:$list->description"; + if ($list->description != '') $output .= "Description: $list->description"; if ($type == 0) $output .= "Unfollow"; if ($type == 1 && $isSelf) $output .= "Edit Delete Add Members"; $output .= " @@ -195,8 +177,5 @@ - - diff --git a/login.php b/login.php index dddc560..adbb78c 100644 --- a/login.php +++ b/login.php @@ -1,136 +1,125 @@ - - - - - - - - - -Rabr / Sign In - - - - - - -
      - - -
      -
      -
        -
      1. -
        -
          -
        • - -
        • -
        • -
        • Remember Me
        • -
        -
        -
      2. -
      - -
      -
      - -
      - - + + + + + + + + +Embr / Sign In + + + + + + +
      + + + + +
      +

      Sorry, you are unauthorized to this site!

      +

      Please contact the sitemaster for the ID-authorization issues.

      +
      + + +
      +
      + +
        +
      1. +
        +
          +
        • I CANNOT access to twitter.com!
        • +
        +
        +
      2. +
      +
      +
      + +
      + + \ No newline at end of file diff --git a/logout.php b/logout.php index d7437f2..f0727fc 100644 --- a/logout.php +++ b/logout.php @@ -1,22 +1,28 @@ diff --git a/message.php b/message.php index 1efed47..0e7483f 100644 --- a/message.php +++ b/message.php @@ -1,150 +1,79 @@ - - - - - - -
      - - - sendDirectMessage(trim($_POST['sent_id']), $_POST['message']); - if ($result) setUpdateCookie('success'); - else setUpdateCookie('error'); - } - - header('location: message.php?t=sent'); - } - - if (getUpdateCookie()) { - switch (getUpdateCookie()) { - case 'success': - echo "
      You message has been sent.
      "; - break; - case 'empty': - echo "
      You cannot send an empty message!
      "; - break; - case 'error': - echo "
      Send message failed, please try again.
      "; - break; - default: - break; - } - } - ?> - -
      - -

      Send message to

      - -

      Send message to

      - - 140 - - -
      -
      - - - - sentDirectMessage($p); - } else { - $messages = $t->directMessages($p); - } - if ($messages === false) { - header('location: error.php'); - } - $empty = count($messages) == 0? true: false; - if ($empty) { - echo "
      No tweets to display.
      "; - } else { - $output = '
        '; - - foreach ($messages as $message) { - $name = $message->sender_screen_name; - $imgurl = getAvatar($message->sender->profile_image_url); - $date = formatDate($message->created_at); - $text = formatText($message->text); - - $output .= " -
      1. - ".initShortcutMenu($message->sender)." - - - - $message->id - $name $text - - "; - if (!$isSentPage) { - $output .= "回复id&t=m\">删除"; - } else { - $output .= "id&t=m\">删除"; - } - $output .=" - $date - - -
      2. - "; - } - - $output .= "
      "; - - - if ($isSentPage) { - if ($p >1) $output .= "Back"; - if (!$empty) $output .= "Next"; - } else { - if ($p >1) $output .= "Back"; - if (!$empty) $output .= "Next"; - } - - $output .= "
      "; - - echo $output; - } - - - - ?> -
      - - - - + + + + + + +
      + + +

      To

      + +

      To

      + + + + + + + sentDirectMessage($p); + } else { + $messages = $t->directMessages($p); + } + if ($messages === false) { + header('location: error.php');exit(); + } + $empty = count($messages) == 0? true: false; + if ($empty) { + echo "
      No tweets to display.
      "; + } else { + include ('lib/timeline_format.php'); + $output = '
        '; + + foreach ($messages as $message) { + $output .= format_message($message,$isSentPage); + } + + $output .= "
      "; + + + if ($isSentPage) { + if ($p >1) $output .= "Back"; + if (!$empty) $output .= "Next"; + } else { + if ($p >1) $output .= "Back"; + if (!$empty) $output .= "Next"; + } + + $output .= "
      "; + echo $output; + } + ?> +
      + + diff --git a/oauth.php b/oauth.php index 54be7f0..eae87c5 100644 --- a/oauth.php +++ b/oauth.php @@ -1,16 +1,17 @@ veverify(); + + if ( ID_AUTH && (!in_array(strtoupper($t->screen_name),$AUTH_ID)) ){ + session_destroy(); + header("Location: login.php?oauth=denied");exit; + } /* And set new cookies */ - $time = time()+3600*24*365; - setEncryptCookie("oauth_token", $access_token['oauth_token'], $time, "/"); - setEncryptCookie("oauth_token_secret", $access_token['oauth_token_secret'], $time, "/"); - setEncryptCookie("user_id", $access_token['user_id'], $time, "/"); + $time = $_SERVER['REQUEST_TIME']+3600*24*365; + setEncryptCookie('oauth_token', $access_token['oauth_token'], $time, '/'); + setEncryptCookie('oauth_token_secret', $access_token['oauth_token_secret'], $time, '/'); + setEncryptCookie('user_id', $access_token['user_id'], $time, '/'); setEncryptCookie('twitese_name', $t->screen_name, $time, '/'); refreshProfile(); - if(!isset($_COOKIE['showpic_cookie'])){ - setcookie('showpic_cookie', 'true', $time, '/'); + + if(!isset($_COOKIE['showpic'])){ + setcookie('showpic', 'true', $time, '/'); } if(!isset($_COOKIE['mediaPre'])){ setcookie('mediaPre', 'true', $time, '/'); } - header('Location: ./all.php'); + if(!isset($_COOKIE['loginPage'])) { + header('Location: index.php');exit(); + } else { + $scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on") ? 'http' : 'https'; + $port = $_SERVER['SERVER_PORT'] != 80 ? ':'.$_SERVER['SERVER_PORT'] : ''; + $login_page = $scheme . '://' . $_SERVER['HTTP_HOST'] . $port . $_COOKIE['loginPage']; + header('Location: '. $login_page);exit(); + } + } else { session_destroy(); - header('Location: ./login.php?oauth=error'); + header('Location: login.php?oauth=error');exit(); } } }else{ /* Create TwitterOAuth object and get request token */ $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET); - + + /* Get callback URL */ + $scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on") ? 'http' : 'https'; + $port = $_SERVER['SERVER_PORT'] != 80 ? ':'.$_SERVER['SERVER_PORT'] : ''; + $oauth_callback = $scheme . '://' . $_SERVER['HTTP_HOST'] . $port . $_SERVER['REQUEST_URI']; + /* Get request token */ - $request_token = $connection->getRequestToken(OAUTH_CALLBACK); + $request_token = $connection->getRequestToken($oauth_callback); /* Save request token to session */ $_SESSION['oauth_token'] = $token = $request_token['oauth_token']; @@ -64,13 +84,23 @@ /* If last connection fails don't display authorization link */ switch ($connection->http_code) { case 200: - /* Build authorize URL */ + + $time = $_SERVER['REQUEST_TIME']+3600*24*365; $url = $connection->getAuthorizeURL($token); - header('Location: ' . $url); + if ( isset($_POST['proxify']) ) { + $raw= processCurl($url); + $new = str_replace('https://api.twitter.com/oauth/authorize', 'authorize.php',$raw); + $new = str_replace('html { display:none; }','.error,a.sign-up,input[name="deny"]{display:none !important;}',$new); + $new = preg_replace('/https?:\/\/\w+([0-9])\.twimg\.com/i','https://s3.amazonaws.com/twitter_production',$new); + echo $new; + } //OAuth Proxy End + else { + header('Location: ' . $url); + } break; default: - echo 'Could not connect to Twitter. Refresh the page or try again later.'; + header('Location: error.php?t=1');exit(); break; } } -?> +?> \ No newline at end of file diff --git a/profile.php b/profile.php index ebcc092..b88cde9 100644 --- a/profile.php +++ b/profile.php @@ -6,13 +6,11 @@ if (!loginStatus()) header('location: login.php'); ?> - +
      - - - userTimeline($p); if ($statuses === false) { - header('location: error.php'); + header('location: error.php');exit(); } $empty = count($statuses) == 0? true: false; if ($empty) { echo "
      No tweet to display.
      "; } else { - include_once('ajax/timeline_format.php'); + include_once('lib/timeline_format.php'); $output = '
        '; foreach ($statuses as $status) { - $output .= format_timeline($status, $t->username); + if (isset($status->retweeted_status)) { + $output .= format_retweet($status,true); + } else { + $output .= format_timeline($status,$t->username); + } } $output .= "
      "; @@ -52,8 +54,5 @@ - - diff --git a/replies.php b/replies.php index 3a74a88..c88b949 100644 --- a/replies.php +++ b/replies.php @@ -2,40 +2,15 @@ include ('lib/twitese.php'); $title = "Replies"; include ('inc/header.php'); - if (!loginStatus()) header('location: login.php'); ?> - +
      - - - - replies($p); if ($statuses === false) { - header('location: error.php'); + header('location: error.php');exit(); } $empty = count($statuses) == 0? true: false; if ($empty) { @@ -54,30 +29,7 @@ $output = '
        '; foreach ($statuses as $status) { - $user = $status->user; - $date = formatDate($status->created_at); - $text = formatText($status->text); - - $output .= " -
      1. - - screen_name\" target=\"_blank\">profile_image_url)."\" title=\"$user->screen_name\" /> - - - $status->id - screen_name\">$user->screen_name $text "; - if ($shorturl = unshortUrl($text)) $output .= "

        URL

        $shorturl
        "; - $output .= " - id\">回复id\">回推id\">收藏 - "; - if ($status->in_reply_to_status_id) $output .= " in_reply_to_status_id&uid=$user->id \">in reply to $status->in_reply_to_screen_name"; - $output .= " - from $status->source - screen_name/status/$status->id\" target=\"_blank\">$date - -
        -
      2. - "; + $output .= format_timeline($status,$t->username); } $output .= "
      "; @@ -89,16 +41,10 @@ echo $output; } - - - ?>
      - - diff --git a/retweets.php b/retweets.php index af62b19..3e86cf3 100644 --- a/retweets.php +++ b/retweets.php @@ -2,72 +2,36 @@ include_once('lib/twitese.php'); $title = "Retweets"; include_once('inc/header.php'); - include_once('ajax/timeline_format.php'); + include_once('lib/timeline_format.php'); if (!loginStatus()) header('location: login.php'); $type = 'retweets'; - $retweetsType = isset($_GET['type']) ? $_GET['type'] : 'to'; - $page = isset($_GET['page']) ? $_GET['page'] : false; + $page = isset($_GET['p']) ? $_GET['p'] : 1; $count = isset($_GET['count']) ? $_GET['count'] : 20; $since_id = isset($_GET['since']) ? $_GET['since'] : false; $max_id = isset($_GET['maxid']) ? $_GET['maxid'] : false; $t = getTwitter(); - $retweets_to_me_class = ''; - $retweeted_by_me_class = ''; - $retweeted_of_me_class = ''; - $retweets; - switch($retweetsType){ - case "by": - $retweets_to_me_class = 'subnavLink'; - $retweeted_by_me_class = 'subnavNormal'; - $retweeted_of_me_class = 'subnavLink'; - $retweets = $t->retweeted_by_me($page, $count, $since_id, $max_id); - break; - case "mine": - $retweets_to_me_class = 'subnavLink'; - $retweeted_by_me_class = 'subnavLink'; - $retweeted_of_me_class = 'subnavNormal'; - $retweets = $t->retweets_of_me($page, $count, $since_id, $max_id); - break; - default: - $retweets_to_me_class = 'subnavNormal'; - $retweeted_by_me_class = 'subnavLink'; - $retweeted_of_me_class = 'subnavLink'; - $retweets = $t->retweeted_to_me($page, $count, $since_id, $max_id); - } + $retweets = $t->retweets_of_me($page, $count, $since_id, $max_id); echo '
      '; include_once('inc/sentForm.php'); - $html .= ' - '; - $html .= ""; $html .='
      '; $empty = count($retweets) == 0? true: false; if ($empty) { $html .= "
      No retweets to display.
      "; } else { - $html .= '
        '; - if($retweetsType == 'mine'){ - foreach($retweets as $retweet){ - $html .= format_retweet_of_me($retweet); - } - }elseif($retweetsType == 'by'){ - foreach($retweets as $retweet){ - $html .= format_retweet($retweet, true); - } - }else{ - foreach($retweets as $retweet){ - $html .= format_retweet($retweet); - } + $html .= '
          '; + foreach($retweets as $retweet){ + $html .= format_retweet_of_me($retweet); } $html .= '
        "; } echo $html; include_once('inc/sidebar.php'); diff --git a/search.php b/search.php index a20eb3b..1011803 100644 --- a/search.php +++ b/search.php @@ -1,100 +1,57 @@ -search($query, $page, $MAX_TWEETS); - - //if ($statuses === false) { - // header('location: error.php'); - //} - $resultCount = count($statuses->results); - if ($resultCount <= 0) { - echo "
        No tweet to display.
        "; - } else { - include_once('ajax/timeline_format.php'); - $output = '
          '; - foreach ($statuses->results as $status) { - $date = formatDate($status->created_at); - $text = formatText($status->text); - - $output .= " -
        1. - - from_user\" target=\"_blank\">profile_image_url)."\" title=\"$status->from_user\" /> - - - $status->id - from_user\">$status->from_user $text "; - $output .= recoverShortens($text); - $output .=" - id\">回复id\">回推 - New Retweet - id\">收藏"; - $output .= "from ".html_entity_decode($status->source)." - id\" title=\"".date('Y-m-d H:i:s', strtotime($status->created_at))."\" target=\"_blank\">$date - - -
        2. - "; - } - - $output .= "
        "; - - if ($page > 1) $output .= "Back"; - if ($resultCount == $MAX_TWEETS) $output .= "Next"; - $output .= "
        "; - } - } - - if (!loginStatus()) header('location: login.php'); -?> - - -
        - -
        - - -
        - - - -
        - - - - +search($query, $max_id_str); + $statuses = $result->statuses; + $max_id_str = end($statuses)->id_str; + $resultCount = count($statuses); + if ($resultCount <= 0) { + echo "
        No tweet to display.
        "; + } else { + include_once('lib/timeline_format.php'); + $output = '
          '; + foreach ($statuses as $status) { + $output .= format_timeline($status, $t->username); + } + $output .= "
        "; + } + } + + if (!loginStatus()) header('location: login.php'); +?> + + +
        + +
        + + +
        + +
        + + diff --git a/setting.php b/setting.php index 6f4daa3..1f35604 100644 --- a/setting.php +++ b/setting.php @@ -1,228 +1,185 @@ - - - - -
        -
        -updateProfile($args); - if ($result) echo "
        Your profile has been updated!
        "; - else echo "
        Update failed. Please try again.
        "; - } - - if (isset($_GET['t'])){ - $settingType = $_GET['t']; - } -?> -
        - - CustomizeEdit ProfileAdvanced - - CustomizeEdit ProfileAdvanced - - CustomizeEdit ProfileAdvanced - -
        -veverify(); -?> -
        - - - - - - - - - - - - - - - - - - - - -
        Name:
        URL:
        Location:
        Bio:*Max 160 chars
        -
        - -
        More features coming soon!
        -Your style has been updated!
        "; - $arr; - preg_match('/\(([\w\/\.\-_\&\#\$\%\:]+)\)/i', $_POST['myCSS'], $arr); - echo ''; - } catch (Exception $e) { - echo "
        Update failed. Please try again.
        "; - } - } - if ( isset($_GET['reset']) ) { - resetStyle(); - echo "
        Styles have been reseted!
        "; - } - if(isset($_POST['updatesInterval'])){ - setcookie('updatesInterval', $_POST['updatesInterval'], time()+3600*24*365, '/'); - setcookie('intervalChanged', 'true', time()+3600*24*365, '/'); - } - if(isset($_POST['homeInterval'])){ - setcookie('homeInterval', $_POST['updatesInterval'], time()+3600*24*365, '/'); - setcookie('intervalChanged', 'true', time()+3600*24*365, '/'); - } -?> -
        - -
        - - Enhancements - - - - (Supports mainstream image hostings) - -

        - - - - (Supports Xiami and Tudou)
        - -
        - -
        - - Auto Refresh Interval - - - - (https://rabr.in/index.php) - -

        - - - - (https://rabr.in/all.php) - -
        - -
        - - UI Preferences - - - - (We have awesome themes for you!) - -

        - - - " /> - (Choose your favorite color here) - -

        - - - - (Set the font size) - -

        - - - - (Sidebar AD display management) - -

        - - - (You can put your own CSS hack here, or your Twitter style code) -
        - - -
        - - - - - -
        - - Reset to default -
        - -
        - - -
        -
      - - - - + + + + +
      +
      +
      + + CustomizeProfile + + CustomizeProfile + +
      +veverify(true); +?> +
      +
      + Avatar +
        +
      1. +
          +
        1. +
        2. BMP,JPG or PNG accepted, less than 800K.
        3. +
      +
      +
      +
      +
      + Literature + + + + + + + + + + + + + + + + + + + +
      Name:
      URL:
      Location:
      Bio:*Max 160 chars
      + +
      + + + +
      + + Utility + + + + +

      + + + +

      + + + +
      + +
      + + Media Preview + + + + (Supports common image hostings) + +

      + + + + (Supports Xiami and Tudou)
      + +
      + +
      + + Auto Refresh Interval + + + + + + +
      + +
      + + UI Preferences + + + +

      + + + + (We have awesome themes for you!) + +

      + + + " /> + (Choose your favorite color here) + +

      + + + + (Set the font size) + +

      + + + (You can put your own CSS hack here, or your Twitter style code) +
      + + You must use CSSTidy to compress your stylesheet. +
      + +
      + + + Reset to default + +
      +
      +
      + + diff --git a/share.php b/share.php index 913cc22..431ece5 100644 --- a/share.php +++ b/share.php @@ -1,154 +1,62 @@ - + + -Share to Rabr - - - + @@ -156,100 +64,62 @@ function leaveWord(num) { 140) { + if (mb_strlen($status,'utf-8') > 140){ $status = mb_substr($status, 0, 140, 'utf-8'); } - $shortUrl = shortUrl($_POST['url']); - if ($shortUrl) { - $status .= $shortUrl; - } else { - $status .= ' ' . $_POST['url']; - } + $status .= $_POST['url']; $result = $t->update($status); } $text = ''; - if ( isset($_GET['u']) ) { + if ( isset($_GET['u']) ){ $url = $_GET['u']; } - if ( isset($_GET['t']) ) { + if ( isset($_GET['t']) ){ $title = $_GET['t']; $text = $_GET['t']; } - if ( isset($_GET['d']) ) { + if ( isset($_GET['d']) ){ $select = $_GET['d']; if ( trim($select) != "" ) $text = $select; } - $text = $text; - + $text = $text; $siteUrl = str_replace('share', 'index', 'http://' . $_SERVER ['HTTP_HOST'] . $_SERVER['PHP_SELF']); ?> - -
      - username ) {?> + username ){?>
      Please login first.
      - -
      Successfully shared your stuff on Rabr! Close
      +
      Successfully shared your stuff on Embr! Close
      - +
      Failed to share your stuff, please try again. Go Back
      - + - +

      Share to Rabr

      140

      Share to Embr

      140
      diff --git a/status.php b/status.php index 43f1e5f..40df598 100644 --- a/status.php +++ b/status.php @@ -1,169 +1,112 @@ -showStatus($statusid); - if (!$status) { - header('location: error.php'); - } - $user = $status->user; - $date = formatDate($status->created_at); - $text = formatText($status->text); - } else { - header('location: error.php'); - } - -?> - - - - - - - - - -Rabr / <?php echo $title ?> - - - - - - - - - - -
      -
      -
      - - - - - -
      -
      -
      -
        -
      1. - - - - - - screen_name ?> - - in_reply_to_status_id) {?> in reply to in_reply_to_screen_name?> - from source ?> - - - -
      2. -
      -
      -
      -
      - -
      -
      - - - - +showStatus($statusid); + if (!$status) { + header('location: error.php');exit(); + } + $user = $status->user; + $date = format_time($status->created_at); + $text = formatEntities(&$status->entities,$status->text); + } else { + header('location: error.php');exit(); + } +?> + + + + + + + + + + + +Embr / Tweet + + + + + + + + + +
      +
      + + +
      +
      +
      +
      +
      + + + +
      +
      +
      +
        +
      1. + + + + + + screen_name ?> + + in_reply_to_status_id_str) {?> in reply to in_reply_to_screen_name?> + from source ?> + + + +
      2. +
      +
      + + diff --git a/themes/1.css b/themes/1.css index 4972b7b..d9130a9 100644 --- a/themes/1.css +++ b/themes/1.css @@ -1,2 +1,2 @@ /*Theme 9 from Twitter.com*/ -body{background:#1A1B1F url(https://s3.amazonaws.com/twitter_production/a/1257465343/images/themes/theme9/bg.gif) fixed no-repeat top left;}a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover{color:#2FC2EF;}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#666;}#side_base{border-left:1px solid #181A1E;background-color:#252429;}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:#3D3C41;}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover{background-color:#252429!important;}#side .actions,#side .promo{border:1px solid #181A1E;}#side div.section-header h3{border-bottom:1px solid #181A1E;}#side hr{background:#181A1E;color:#181A1E;}ul.sidebar-menu li.loading a{background:#3D3C41 url(https://s3.amazonaws.com/twitter_production/a/1257465343/images/spinner.gif) no-repeat 171px .5em!important;}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1257465343/images/toggle_up_light.png) no-repeat center right!important;}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1257465343/images/toggle_down_light.png) no-repeat center right!important;}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1257465343/images/arrow_right_light.png) no-repeat left top;}#side span.pipe{border-left:1px solid #181A1E;}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0;}a.edit-list{border-right:1px solid #181A1E!important;} \ No newline at end of file +body{background:#1A1B1F url(http://s3.amazonaws.com/twitter_production/images/themes/theme9/bg.gif) fixed no-repeat top left}a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#side_name{color:#2FC2EF}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#666}#side_base{border-left:1px solid #181A1E;background-color:#252429}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:#3D3C41}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover{background-color:#252429!important}#side .actions,#side .promo{border:1px solid #181A1E}#side div.section-header h3{border-bottom:1px solid #181A1E}#side hr{background:#181A1E;color:#181A1E}ul.sidebar-menu li.loading a{background:#3D3C41 url(img/spinner.gif) no-repeat 171px .5em!important}#side .collapsible h2.sidebar-title{background:transparent url(img/toggle_up_light.png) no-repeat center right!important}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(img/toggle_down_light.png) no-repeat center right!important}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1257465343/images/arrow_right_light.png) no-repeat left top}#side span.pipe{border-left:1px solid #181A1E}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0}a.edit-list{border-right:1px solid #181A1E!important}nav:hover{box-shadow:0 0 10px #2FC2EF;-webkit-box-shadow:0 0 10px #2FC2EF} \ No newline at end of file diff --git a/themes/10.css b/themes/10.css index 857b858..9a55648 100644 --- a/themes/10.css +++ b/themes/10.css @@ -1,2 +1,2 @@ /*theme 19 from twitter.com*/ -body{background:#FFF04D url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/themes/theme19/bg.gif) fixed no-repeat;background-position:0 0;padding-top:0!important;_padding-top:10px!important;}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#333;}.unconfirmed-email-banner{border-bottom:solid 1px #fff8ad;}#side_base{border-left:1px solid #fff8ad;background-color:#f6ffd1;}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:transparent;}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#f6ffd1!important;}#side .actions,#side .promo{border:1px solid #fff8ad;}#side div.section-header h3{border-bottom:1px solid #fff8ad;}#side p.sidebar-location{border-bottom:1px dotted #fff8ad;}#side hr{background:#fff8ad;color:#fff8ad;}ul.sidebar-menu li.loading a{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/spinner.gif) no-repeat 171px .5em!important;}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_up_dark.png) no-repeat center right!important;}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_down_dark.png) no-repeat center right!important;}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/arrow_right_dark.png) no-repeat left top;}#side span.pipe{border-left:1px solid #fff8ad;}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0;}a.edit-list{border-right:1px solid #fff8ad!important;}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug{color:#09C;} \ No newline at end of file +body{background:#FFF04D url(http://s3.amazonaws.com/twitter_production/images/themes/theme19/bg.gif) fixed no-repeat;background-position:0 0;padding-top:0!important;_padding-top:10px!important}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#333}.unconfirmed-email-banner{border-bottom:solid 1px #fff8ad}#side_base{border-left:1px solid #fff8ad;background-color:#f6ffd1}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:transparent}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#f6ffd1!important}#side .actions,#side .promo{border:1px solid #fff8ad}#side div.section-header h3{border-bottom:1px solid #fff8ad}#side p.sidebar-location{border-bottom:1px dotted #fff8ad}#side hr{background:#fff8ad;color:#fff8ad}ul.sidebar-menu li.loading a{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/spinner.gif) no-repeat 171px .5em!important}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_up_dark.png) no-repeat center right!important}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_down_dark.png) no-repeat center right!important}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/arrow_right_dark.png) no-repeat left top}#side span.pipe{border-left:1px solid #fff8ad}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0}a.edit-list{border-right:1px solid #fff8ad!important}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug,#side_name{color:#09C}nav:hover{box-shadow:0 0 10px #09C;-webkit-box-shadow:0 0 10px #09C} \ No newline at end of file diff --git a/themes/11.css b/themes/11.css index 7cc95e6..415de96 100644 --- a/themes/11.css +++ b/themes/11.css @@ -1,2 +1,2 @@ /*theme 20 #red from twitter.com*/ -body{background:#BF1238 url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/themes/theme20/bg.png) fixed no-repeat;background-position:0 0;padding-top:0!important;_padding-top:10px!important;}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#333;}.unconfirmed-email-banner{border-bottom:solid 1px #FFF;}#side_base{border-left:1px solid #FFF;background-color:#EFEFEF;}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:transparent;}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#EFEFEF!important;}#side .actions,#side .promo{border:1px solid #FFF;}#side div.section-header h3{border-bottom:1px solid #FFF;}#side p.sidebar-location{border-bottom:1px dotted #FFF;}#side hr{background:#FFF;color:#FFF;}ul.sidebar-menu li.loading a{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/spinner.gif) no-repeat 171px .5em!important;}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_up_dark.png) no-repeat center right!important;}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_down_dark.png) no-repeat center right!important;}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/arrow_right_dark.png) no-repeat left top;}#side span.pipe{border-left:1px solid #FFF;}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0;}a.edit-list{border-right:1px solid #FFF!important;}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug{color:#BF1238;} \ No newline at end of file +body{background:#BF1238 url(http://s3.amazonaws.com/twitter_production/images/themes/theme20/bg.png) fixed no-repeat;background-position:0 0;padding-top:0!important;_padding-top:10px!important}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#333}.unconfirmed-email-banner{border-bottom:solid 1px #FFF}#side_base{border-left:1px solid #FFF;background-color:#EFEFEF}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:transparent}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#EFEFEF!important}#side .actions,#side .promo{border:1px solid #FFF}#side div.section-header h3{border-bottom:1px solid #FFF}#side p.sidebar-location{border-bottom:1px dotted #FFF}#side hr{background:#FFF;color:#FFF}ul.sidebar-menu li.loading a{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/spinner.gif) no-repeat 171px .5em!important}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_up_dark.png) no-repeat center right!important}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_down_dark.png) no-repeat center right!important}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/arrow_right_dark.png) no-repeat left top}#side span.pipe{border-left:1px solid #FFF}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0}a.edit-list{border-right:1px solid #FFF!important}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug,#side_name{color:#BF1238}nav:hover{box-shadow:0 0 10px #BF1238;-webkit-box-shadow:0 0 10px #BF1238} \ No newline at end of file diff --git a/themes/12.css b/themes/12.css index 9aab7f2..9b2c3f5 100644 --- a/themes/12.css +++ b/themes/12.css @@ -1,2 +1,2 @@ /*Storm theme by disinfeqt*/ -body{background:#969696 url(../themes/img/01602_sandringhambeach_1440x900.jpg) fixed no-repeat;background-position:center center;padding-top:0!important;_padding-top:10px!important;}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#424242;}.unconfirmed-email-banner{border-bottom:solid 1px #A6A6A6;}#side_base{border-left:1px solid #A6A6A6;background-color:#E2E2E2;}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:transparent;}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#E2E2E2!important;}#side .actions,#side .promo{border:1px solid #A6A6A6;}#side div.section-header h3{border-bottom:1px solid #A6A6A6;}#side p.sidebar-location{border-bottom:1px dotted #A6A6A6;}#side hr{background:#A6A6A6;color:#A6A6A6;}ul.sidebar-menu li.loading a{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/spinner.gif) no-repeat 171px .5em!important;}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_up_dark.png) no-repeat center right!important;}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_down_dark.png) no-repeat center right!important;}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/arrow_right_dark.png) no-repeat left top;}#side span.pipe{border-left:1px solid #A6A6A6;}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0;}a.edit-list{border-right:1px solid #A6A6A6!important;}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug{color:#690200;} \ No newline at end of file +body{background:#969696 url(../themes/img/01602_sandringhambeach_1440x900.jpg) fixed no-repeat;background-position:center center;padding-top:0!important;_padding-top:10px!important}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#424242}.unconfirmed-email-banner{border-bottom:solid 1px #A6A6A6}#side_base{border-left:1px solid #A6A6A6;background-color:#E2E2E2}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:transparent}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#E2E2E2!important}#side .actions,#side .promo{border:1px solid #A6A6A6}#side div.section-header h3{border-bottom:1px solid #A6A6A6}#side p.sidebar-location{border-bottom:1px dotted #A6A6A6}#side hr{background:#A6A6A6;color:#A6A6A6}ul.sidebar-menu li.loading a{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/spinner.gif) no-repeat 171px .5em!important}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_up_dark.png) no-repeat center right!important}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_down_dark.png) no-repeat center right!important}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/arrow_right_dark.png) no-repeat left top}#side span.pipe{border-left:1px solid #A6A6A6}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0}a.edit-list{border-right:1px solid #A6A6A6!important}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug,#side_name{color:#690200}nav:hover{box-shadow:0 0 10px #690200;-webkit-box-shadow:0 0 10px #690200} \ No newline at end of file diff --git a/themes/13.css b/themes/13.css index 80c6539..10daffc 100644 --- a/themes/13.css +++ b/themes/13.css @@ -1,2 +1,2 @@ /*City theme by disinfeqt*/ -body{background-size: 100% 100%;background:#969696 url(../themes/img/01500_iceonthelake_1440x900.jpg) fixed no-repeat;background-position:center center;padding-top:0!important;_padding-top:10px!important;}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#3B3B3B;}.unconfirmed-email-banner{border-bottom:solid 1px #BFFEFF;}#side_base{border-left:1px solid #BFFEFF;background-color:#EDEDED;}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:transparent;}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#EDEDED!important;}#side .actions,#side .promo{border:1px solid #BFFEFF;}#side div.section-header h3{border-bottom:1px solid #BFFEFF;}#side p.sidebar-location{border-bottom:1px dotted #BFFEFF;}#side hr{background:#BFFEFF;color:#BFFEFF;}ul.sidebar-menu li.loading a{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/spinner.gif) no-repeat 171px .5em!important;}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_up_dark.png) no-repeat center right!important;}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_down_dark.png) no-repeat center right!important;}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/arrow_right_dark.png) no-repeat left top;}#side span.pipe{border-left:1px solid #BFFEFF;}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0;}a.edit-list{border-right:1px solid #BFFEFF!important;}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug{color:#009294;} \ No newline at end of file +body{background-size: 100% 100%;background:#969696 url(../themes/img/01500_iceonthelake_1440x900.jpg) fixed no-repeat;background-position:center center;padding-top:0!important;_padding-top:10px!important}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#3B3B3B}.unconfirmed-email-banner{border-bottom:solid 1px #BFFEFF}#side_base{border-left:1px solid #BFFEFF;background-color:#EDEDED}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:transparent}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#EDEDED!important}#side .actions,#side .promo{border:1px solid #BFFEFF}#side div.section-header h3{border-bottom:1px solid #BFFEFF}#side p.sidebar-location{border-bottom:1px dotted #BFFEFF}#side hr{background:#BFFEFF;color:#BFFEFF}ul.sidebar-menu li.loading a{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/spinner.gif) no-repeat 171px .5em!important}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_up_dark.png) no-repeat center right!important}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_down_dark.png) no-repeat center right!important}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/arrow_right_dark.png) no-repeat left top}#side span.pipe{border-left:1px solid #BFFEFF}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0}a.edit-list{border-right:1px solid #BFFEFF!important}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug,#side_name{color:#009294}nav:hover{box-shadow:0 0 10px #009294;-webkit-box-shadow:0 0 10px #009294} \ No newline at end of file diff --git a/themes/14.css b/themes/14.css index 8ca3e7c..9dbea60 100644 --- a/themes/14.css +++ b/themes/14.css @@ -1,3 +1,3 @@ /*Cosmos Theme by disinfeqt Image (c) Apple Inc*/ -body{background:#000 url(../themes/img/cosmos.jpg) fixed no-repeat;background-position:center center;padding-top:0!important;_padding-top:10px!important;}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#636363;}.unconfirmed-email-banner{border-bottom:solid 1px #DEDEDE;}#side_base{border-left:1px solid #DEDEDE;background-color:#2B2B2B;}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:transparent;}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#2B2B2B!important;}#side .actions,#side .promo{border:1px solid #DEDEDE;}#side div.section-header h3{border-bottom:1px solid #DEDEDE;}#side p.sidebar-location{border-bottom:1px dotted #DEDEDE;}#side hr{background:#DEDEDE;color:#DEDEDE;}ul.sidebar-menu li.loading a{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/spinner.gif) no-repeat 171px .5em!important;}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_up_light.png) no-repeat center right!important;}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_down_light.png) no-repeat center right!important;}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/arrow_right_light.png) no-repeat left top;}#side span.pipe{border-left:1px solid #DEDEDE;}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0;}a.edit-list{border-right:1px solid #DEDEDE!important;}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug{color:#006A87;} \ No newline at end of file +body{background:#000 url(http://static.colourlovers.com/images/themeleon/twitter/themes/0/0/17-bg.jpg) fixed no-repeat;background-position:center center;padding-top:0!important;_padding-top:10px!important}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#636363}.unconfirmed-email-banner{border-bottom:solid 1px #DEDEDE}#side_base{border-left:1px solid #DEDEDE;background-color:#2B2B2B}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:transparent}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#2B2B2B!important}#side .actions,#side .promo{border:1px solid #DEDEDE}#side div.section-header h3{border-bottom:1px solid #DEDEDE}#side p.sidebar-location{border-bottom:1px dotted #DEDEDE}#side hr{background:#DEDEDE;color:#DEDEDE}ul.sidebar-menu li.loading a{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/spinner.gif) no-repeat 171px .5em!important}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_up_light.png) no-repeat center right!important}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_down_light.png) no-repeat center right!important}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/arrow_right_light.png) no-repeat left top}#side span.pipe{border-left:1px solid #DEDEDE}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0}a.edit-list{border-right:1px solid #DEDEDE!important}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug,#side_name{color:#006A87}nav:hover{box-shadow:0 0 10px #006A87;-webkit-box-shadow:0 0 10px #006A87} \ No newline at end of file diff --git a/themes/15.css b/themes/15.css index 78a69fc..b53fad7 100644 --- a/themes/15.css +++ b/themes/15.css @@ -1,4 +1,5 @@ /*Pride (Rainbow) Theme by disinfeqt Loving you ain't my fault, is it? */ -body{background:#000 url(../themes/img/rainbow.jpg) fixed no-repeat;background-position:center center;padding-top:0!important;_padding-top:10px!important;}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#525252;}.unconfirmed-email-banner{border-bottom:solid 1px #333;}#side_base{border-left:1px solid #333;background-color:#000;}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:transparent;}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#000!important;}#side .actions,#side .promo{border:1px solid #333;}#side div.section-header h3{border-bottom:1px solid #333;}#side p.sidebar-location{border-bottom:1px dotted #333;}#side hr{background:#333;color:#333;}ul.sidebar-menu li.loading a{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/spinner.gif) no-repeat 171px .5em!important;}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_up_light.png) no-repeat center right!important;}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_down_light.png) no-repeat center right!important;}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/arrow_right_light.png) no-repeat left top;}#side span.pipe{border-left:1px solid #333;}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0;}a.edit-list{border-right:1px solid #333!important;}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug{color:#4F4F4F;} -#sideid {background:url("../themes/img/pride_flag.png") no-repeat scroll 165px 4px transparent;} \ No newline at end of file +body{background:#000 url(../themes/img/rainbow.jpg) fixed no-repeat;background-position:center center;padding-top:0!important;_padding-top:10px!important}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#525252}.unconfirmed-email-banner{border-bottom:solid 1px #333}#side_base{border-left:1px solid #333;background-color:#000}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:transparent}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#000!important}#side .actions,#side .promo{border:1px solid #333}#side div.section-header h3{border-bottom:1px solid #333}#side p.sidebar-location{border-bottom:1px dotted #333}#side hr{background:#333;color:#333}ul.sidebar-menu li.loading a{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/spinner.gif) no-repeat 171px .5em!important}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_up_light.png) no-repeat center right!important}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_down_light.png) no-repeat center right!important}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/arrow_right_light.png) no-repeat left top}#side span.pipe{border-left:1px solid #333}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0}a.edit-list{border-right:1px solid #333!important}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug{color:#4F4F4F} +#side_name{background:url("../themes/img/pride_flag.png") no-repeat scroll 165px 4px transparent} +nav:hover{box-shadow:0 0 10px #4F4F4F;-webkit-box-shadow:0 0 10px #4F4F4F} \ No newline at end of file diff --git a/themes/16.css b/themes/16.css index 58246e4..762f618 100644 --- a/themes/16.css +++ b/themes/16.css @@ -1,2 +1,2 @@ /*Drop Bombs by disinfeqt*/ -body{background:#1F1F1F url(../themes/img/drop_bombs.png) fixed no-repeat;}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#75715E;}.unconfirmed-email-banner{border-bottom:solid 1px #000;}#side_base{border-left:1px solid #000;background-color:#1F1F1F;}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:#373737;}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#1F1F1F!important;}#side .actions,#side .promo,#design .side-section{border:1px solid #000;}#side div.section-header h3{border-bottom:1px solid #000;}#side p.sidebar-location{border-bottom:1px dotted #000;}#side hr{background:#000;color:#000;}ul.sidebar-menu li.loading a{background:#373737 url(https://s3.amazonaws.com/twitter_production/a/1267486213/images/spinner.gif) no-repeat 171px .5em!important;}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1267486213/images/toggle_up_light.png) no-repeat center right!important;}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1267486213/images/toggle_down_light.png) no-repeat center right!important;}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1267486213/images/arrow_right_light.png) no-repeat left top;}#side span.pipe{border-left:1px solid #000;}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0;}a.edit-list{border-right:1px solid #000!important;}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug,.tweet-label a:hover{color:#858585;} \ No newline at end of file +body{background:#1F1F1F url(../themes/img/drop_bombs.png) fixed no-repeat}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#75715E}.unconfirmed-email-banner{border-bottom:solid 1px #000}#side_base{border-left:1px solid #000;background-color:#1F1F1F}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:#373737}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#1F1F1F!important}#side .actions,#side .promo,#design .side-section{border:1px solid #000}#side div.section-header h3{border-bottom:1px solid #000}#side p.sidebar-location{border-bottom:1px dotted #000}#side hr{background:#000;color:#000}ul.sidebar-menu li.loading a{background:#373737 url(https://s3.amazonaws.com/twitter_production/a/1267486213/images/spinner.gif) no-repeat 171px .5em!important}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1267486213/images/toggle_up_light.png) no-repeat center right!important}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1267486213/images/toggle_down_light.png) no-repeat center right!important}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1267486213/images/arrow_right_light.png) no-repeat left top}#side span.pipe{border-left:1px solid #000}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0}a.edit-list{border-right:1px solid #000!important}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug,.tweet-label a:hover,#side_name{color:#858585}nav:hover{box-shadow:0 0 10px #858585;-webkit-box-shadow:0 0 10px #858585}} \ No newline at end of file diff --git a/themes/2.css b/themes/2.css index e15e966..33dc1bf 100644 --- a/themes/2.css +++ b/themes/2.css @@ -1,2 +1,2 @@ /*disinfeqt's Monokai Python Style*/ -body{background:#272822 url(../themes/img/bg.py.png) fixed no-repeat top left;}a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover{color:#66D8EF;}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#75715E;}#side_base{border-left:1px solid #F92673;background-color:#272822;}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:#3F403A;}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover{background-color:#272822!important;}#side .actions,#side .promo{border:1px solid #F92673;}#side div.section-header h3{border-bottom:1px solid #F92673;}#side hr{background:#F92673;color:#F92673;}ul.sidebar-menu li.loading a{background:#3F403A url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/spinner.gif) no-repeat 171px .5em!important;}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/toggle_up_light.png) no-repeat center right!important;}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/toggle_down_light.png) no-repeat center right!important;}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/arrow_right_light.png) no-repeat left top;}#side span.pipe{border-left:1px solid #F92673;}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0;}a.edit-list{border-right:1px solid #F92673!important;} \ No newline at end of file +body{background:#272822 url(../themes/img/bg.py.png) fixed no-repeat top left}a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#side_name{color:#66D8EF}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#75715E}#side_base{border-left:1px solid #F92673;background-color:#272822}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:#3F403A}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover{background-color:#272822!important}#side .actions,#side .promo{border:1px solid #F92673}#side div.section-header h3{border-bottom:1px solid #F92673}#side hr{background:#F92673;color:#F92673}ul.sidebar-menu li.loading a{background:#3F403A url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/spinner.gif) no-repeat 171px .5em!important}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/toggle_up_light.png) no-repeat center right!important}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/toggle_down_light.png) no-repeat center right!important}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/arrow_right_light.png) no-repeat left top}#side span.pipe{border-left:1px solid #F92673}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0}a.edit-list{border-right:1px solid #F92673!important}nav:hover{box-shadow:0 0 10px #66D8EF;-webkit-box-shadow:0 0 10px #66D8EF} \ No newline at end of file diff --git a/themes/3.css b/themes/3.css index d0c6b10..fb3308c 100644 --- a/themes/3.css +++ b/themes/3.css @@ -1,3 +1,3 @@ /*Twitter Classic*/ -body{background:#9AE4E8 url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/themes/theme16/bg.gif) fixed no-repeat top left;}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu li.active a,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#333;}#side_base{border-left:1px solid #BDDCAD;background-color:#DFC;}ul.sidebar-menu li.active a,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:#EDFFDC;}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover{background-color:#DFC!important;}#side .actions,#side .promo{border:1px solid #BDDCAD;}#side div.section-header h3{border-bottom:1px solid #BDDCAD;}#side hr{background:#BDDCAD;color:#BDDCAD;}ul.sidebar-menu li.loading a{background:#EDFFDC url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/spinner.gif) no-repeat 171px .5em!important;}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/toggle_up_dark.png) no-repeat center right!important;}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/toggle_down_dark.png) no-repeat center right!important;}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/arrow_right_dark.png) no-repeat left top;}#side span.pipe{border-left:1px solid #BDDCAD;}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0;}a.edit-list{border-right:1px solid #BDDCAD!important;}body#show #content .meta a.screen-name,#content .shared-content .screen-name,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover{color:#0084B4;} +body{background:#9AE4E8 url(http://s3.amazonaws.com/twitter_production/images/themes/theme16/bg.gif) fixed no-repeat top left}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu li.active a,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#333}#side_base{border-left:1px solid #BDDCAD;background-color:#DFC}ul.sidebar-menu li.active a,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:#EDFFDC}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover{background-color:#DFC!important}#side .actions,#side .promo{border:1px solid #BDDCAD}#side div.section-header h3{border-bottom:1px solid #BDDCAD}#side hr{background:#BDDCAD;color:#BDDCAD}ul.sidebar-menu li.loading a{background:#EDFFDC url(img/spinner.gif) no-repeat 171px .5em!important}#side .collapsible h2.sidebar-title{background:transparent url(img/toggle_up_dark.png) no-repeat center right!important}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(img/toggle_down_dark.png) no-repeat center right!important}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/arrow_right_dark.png) no-repeat left top}#side span.pipe{border-left:1px solid #BDDCAD}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0}a.edit-list{border-right:1px solid #BDDCAD!important}body#show #content .meta a.screen-name,#content .shared-content .screen-name,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#side_name{color:#0084B4}nav:hover{box-shadow:0 0 10px #0084B4;-webkit-box-shadow:0 0 10px #0084B4} /*Do you miss old times? XD*/ \ No newline at end of file diff --git a/themes/4.css b/themes/4.css index 99748de..0a60aea 100644 --- a/themes/4.css +++ b/themes/4.css @@ -1,2 +1,2 @@ /*Pink*/ -body{background:#F69 url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/themes/theme11/bg.gif) fixed repeat top left;}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#362720;}#side_base{border-left:1px solid #C36;background-color:#E5507E;}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:#FD6896;}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover{background-color:#E5507E!important;}#side .actions,#side .promo{border:1px solid #C36;}#side div.section-header h3{border-bottom:1px solid #C36;}#side hr{background:#C36;color:#C36;}ul.sidebar-menu li.loading a{background:#FD6896 url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/spinner.gif) no-repeat 171px .5em!important;}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/toggle_up_dark.png) no-repeat center right!important;}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/toggle_down_dark.png) no-repeat center right!important;}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/arrow_right_dark.png) no-repeat left top;}#side span.pipe{border-left:1px solid #C36;}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0;}a.edit-list{border-right:1px solid #C36!important;}body#show #content .meta a.screen-name,#content .shared-content .screen-name,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover{color:#B40B43;} \ No newline at end of file +body{background:#F69 url(http://s3.amazonaws.com/twitter_production/images/themes/theme11/bg.gif) fixed repeat top left}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#362720}#side_base{border-left:1px solid #C36;background-color:#E5507E}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:#FD6896}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover{background-color:#E5507E!important}#side .actions,#side .promo{border:1px solid #C36}#side div.section-header h3{border-bottom:1px solid #C36}#side hr{background:#C36;color:#C36}ul.sidebar-menu li.loading a{background:#FD6896 url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/spinner.gif) no-repeat 171px .5em!important}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/toggle_up_dark.png) no-repeat center right!important}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/toggle_down_dark.png) no-repeat center right!important}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/arrow_right_dark.png) no-repeat left top}#side span.pipe{border-left:1px solid #C36}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0}a.edit-list{border-right:1px solid #C36!important}body#show #content .meta a.screen-name,#content .shared-content .screen-name,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#side_name{color:#B40B43}nav:hover{box-shadow:0 0 10px #B40B43;-webkit-box-shadow:0 0 10px #B40B43} \ No newline at end of file diff --git a/themes/5.css b/themes/5.css index eb9ed52..a5251b6 100644 --- a/themes/5.css +++ b/themes/5.css @@ -1,2 +1,2 @@ /*by @lgsoltek*/ -body{background:#F7AD71}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#873800;}#side_base{border-left:1px solid #D4A72A;background-color:#D4A386;}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:#E8B79A;}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover{background-color:#D4A386!important;}#side .actions,#side .promo{border:1px solid #D4A72A;}#side div.section-header h3{border-bottom:1px solid #D4A72A;}#side hr{background:#D4A72A;color:#D4A72A;}ul.sidebar-menu li.loading a{background:#E8B79A url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/spinner.gif) no-repeat 171px .5em!important;}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/toggle_up_dark.png) no-repeat center right!important;}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/toggle_down_dark.png) no-repeat center right!important;}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/arrow_right_dark.png) no-repeat left top;}#side span.pipe{border-left:1px solid #D4A72A;}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0;}a.edit-list{border-right:1px solid #D4A72A!important;}body#show #content .meta a.screen-name,#content .shared-content .screen-name,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover{color:#D94100;} \ No newline at end of file +body{background:#F7AD71}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#873800}#side_base{border-left:1px solid #D4A72A;background-color:#D4A386}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:#E8B79A}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover{background-color:#D4A386!important}#side .actions,#side .promo{border:1px solid #D4A72A}#side div.section-header h3{border-bottom:1px solid #D4A72A}#side hr{background:#D4A72A;color:#D4A72A}ul.sidebar-menu li.loading a{background:#E8B79A url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/spinner.gif) no-repeat 171px .5em!important}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/toggle_up_dark.png) no-repeat center right!important}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/toggle_down_dark.png) no-repeat center right!important}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1258070043/images/arrow_right_dark.png) no-repeat left top}#side span.pipe{border-left:1px solid #D4A72A}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0}a.edit-list{border-right:1px solid #D4A72A!important}body#show #content .meta a.screen-name,#content .shared-content .screen-name,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#side_name{color:#D94100}nav:hover{box-shadow:0 0 10px #D94100;-webkit-box-shadow:0 0 10px #D94100} \ No newline at end of file diff --git a/themes/6.css b/themes/6.css index c3fbca2..dd002b6 100644 --- a/themes/6.css +++ b/themes/6.css @@ -1,2 +1,2 @@ /*by @lgsoltek*/ -body{background:#292945;background-position:0 0;padding-top:0!important;_padding-top:10px!important;}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#6F7194;}#side_base{border-left:1px solid #F9E6FC;background-color:#0E0F21;}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:#262739;}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#0E0F21!important;}#side .actions,#side .promo{border:1px solid #F9E6FC;}#side div.section-header h3{border-bottom:1px solid #F9E6FC;}#side p.sidebar-location{border-bottom:1px dotted #F9E6FC;}#side hr{background:#F9E6FC;color:#F9E6FC;}ul.sidebar-menu li.loading a{background:#262739 url(https://s3.amazonaws.com/twitter_production/a/1260817727/images/spinner.gif) no-repeat 171px .5em!important;}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1260817727/images/toggle_up_light.png) no-repeat center right!important;}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1260817727/images/toggle_down_light.png) no-repeat center right!important;}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1260817727/images/arrow_right_light.png) no-repeat left top;}#side span.pipe{border-left:1px solid #F9E6FC;}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0;}a.edit-list{border-right:1px solid #F9E6FC!important;}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug{color:#6B5B78;} \ No newline at end of file +body{background:#292945;background-position:0 0;padding-top:0!important;_padding-top:10px!important}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#6F7194}#side_base{border-left:1px solid #F9E6FC;background-color:#0E0F21}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:#262739}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#0E0F21!important}#side .actions,#side .promo{border:1px solid #F9E6FC}#side div.section-header h3{border-bottom:1px solid #F9E6FC}#side p.sidebar-location{border-bottom:1px dotted #F9E6FC}#side hr{background:#F9E6FC;color:#F9E6FC}ul.sidebar-menu li.loading a{background:#262739 url(https://s3.amazonaws.com/twitter_production/a/1260817727/images/spinner.gif) no-repeat 171px .5em!important}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1260817727/images/toggle_up_light.png) no-repeat center right!important}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1260817727/images/toggle_down_light.png) no-repeat center right!important}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1260817727/images/arrow_right_light.png) no-repeat left top}#side span.pipe{border-left:1px solid #F9E6FC}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0}a.edit-list{border-right:1px solid #F9E6FC!important}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug,#side_name{color:#6B5B78}nav:hover{box-shadow:0 0 10px #6B5B78;-webkit-box-shadow:0 0 10px #6B5B78} \ No newline at end of file diff --git a/themes/7.css b/themes/7.css index 0dc1f1c..0741332 100644 --- a/themes/7.css +++ b/themes/7.css @@ -1,2 +1,2 @@ /*theme 13 from twitter.com*/ -body{background:#B2DFDA url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/themes/theme13/bg.gif) fixed no-repeat;background-position:0 0;padding-top:0!important;_padding-top:10px!important;}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#333;}.unconfirmed-email-banner{border-bottom:solid 1px #eee;}#side_base{border-left:1px solid #eee;background-color:#fff;}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:transparent;}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#fff!important;}#side .actions,#side .promo{border:1px solid #eee;}#side div.section-header h3{border-bottom:1px solid #eee;}#side p.sidebar-location{border-bottom:1px dotted #eee;}#side hr{background:#eee;color:#eee;}ul.sidebar-menu li.loading a{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/spinner.gif) no-repeat 171px .5em!important;}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_up_dark.png) no-repeat center right!important;}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_down_dark.png) no-repeat center right!important;}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/arrow_right_dark.png) no-repeat left top;}#side span.pipe{border-left:1px solid #eee;}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0;}a.edit-list{border-right:1px solid #eee!important;}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug{color:#93A644;} \ No newline at end of file +body{background:#B2DFDA url(http://s3.amazonaws.com/twitter_production/images/themes/theme13/bg.gif) fixed no-repeat;background-position:0 0;padding-top:0!important;_padding-top:10px!important}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#333}.unconfirmed-email-banner{border-bottom:solid 1px #eee}#side_base{border-left:1px solid #eee;background-color:#fff}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:transparent}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#fff!important}#side .actions,#side .promo{border:1px solid #eee}#side div.section-header h3{border-bottom:1px solid #eee}#side p.sidebar-location{border-bottom:1px dotted #eee}#side hr{background:#eee;color:#eee}ul.sidebar-menu li.loading a{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/spinner.gif) no-repeat 171px .5em!important}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_up_dark.png) no-repeat center right!important}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_down_dark.png) no-repeat center right!important}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/arrow_right_dark.png) no-repeat left top}#side span.pipe{border-left:1px solid #eee}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0}a.edit-list{border-right:1px solid #eee!important}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug,#side_name{color:#93A644}nav:hover{box-shadow:0 0 10px #93A644;-webkit-box-shadow:0 0 10px #93A644} \ No newline at end of file diff --git a/themes/8.css b/themes/8.css index aade2fd..a256f31 100644 --- a/themes/8.css +++ b/themes/8.css @@ -1,2 +1,2 @@ /*theme 15 from twitter.com*/ -body{background:#022330 url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/themes/theme15/bg.png) fixed no-repeat;background-position:0 0;padding-top:0!important;_padding-top:10px!important;}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#333;}.unconfirmed-email-banner{border-bottom:solid 1px #a8c7f7;}#side_base{border-left:1px solid #a8c7f7;background-color:#C0DFEC;}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:transparent;}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#C0DFEC!important;}#side .actions,#side .promo{border:1px solid #a8c7f7;}#side div.section-header h3{border-bottom:1px solid #a8c7f7;}#side p.sidebar-location{border-bottom:1px dotted #a8c7f7;}#side hr{background:#a8c7f7;color:#a8c7f7;}ul.sidebar-menu li.loading a{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/spinner.gif) no-repeat 171px .5em!important;}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_up_dark.png) no-repeat center right!important;}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_down_dark.png) no-repeat center right!important;}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/arrow_right_dark.png) no-repeat left top;}#side span.pipe{border-left:1px solid #a8c7f7;}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0;}a.edit-list{border-right:1px solid #a8c7f7!important;}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug{color:#0084B4;} \ No newline at end of file +body{background:#022330 url(http://s3.amazonaws.com/twitter_production/images/themes/theme15/bg.png) fixed no-repeat;background-position:0 0;padding-top:0!important;_padding-top:10px!important}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#333}.unconfirmed-email-banner{border-bottom:solid 1px #a8c7f7}#side_base{border-left:1px solid #a8c7f7;background-color:#C0DFEC}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:transparent}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#C0DFEC!important}#side .actions,#side .promo{border:1px solid #a8c7f7}#side div.section-header h3{border-bottom:1px solid #a8c7f7}#side p.sidebar-location{border-bottom:1px dotted #a8c7f7}#side hr{background:#a8c7f7;color:#a8c7f7}ul.sidebar-menu li.loading a{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/spinner.gif) no-repeat 171px .5em!important}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_up_dark.png) no-repeat center right!important}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_down_dark.png) no-repeat center right!important}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/arrow_right_dark.png) no-repeat left top}#side span.pipe{border-left:1px solid #a8c7f7}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0}a.edit-list{border-right:1px solid #a8c7f7!important}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug,#side_name{color:#0084B4}nav:hover{box-shadow:0 0 10px #0084B4;-webkit-box-shadow:0 0 10px #0084B4} \ No newline at end of file diff --git a/themes/9.css b/themes/9.css index c2f6ef7..46944ff 100644 --- a/themes/9.css +++ b/themes/9.css @@ -1,2 +1,2 @@ /*theme 18 from twitter.com*/ -body{background:#ACDED6 url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/themes/theme18/bg.gif) fixed no-repeat;background-position:0 0;padding-top:0!important;_padding-top:10px!important;}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#333;}.unconfirmed-email-banner{border-bottom:solid 1px #EEE;}#side_base{border-left:1px solid #EEE;background-color:#F6F6F6;}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:transparent;}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#F6F6F6!important;}#side .actions,#side .promo{border:1px solid #EEE;}#side div.section-header h3{border-bottom:1px solid #EEE;}#side p.sidebar-location{border-bottom:1px dotted #EEE;}#side hr{background:#EEE;color:#EEE;}ul.sidebar-menu li.loading a{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/spinner.gif) no-repeat 171px .5em!important;}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_up_dark.png) no-repeat center right!important;}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_down_dark.png) no-repeat center right!important;}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/arrow_right_dark.png) no-repeat left top;}#side span.pipe{border-left:1px solid #EEE;}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0;}a.edit-list{border-right:1px solid #EEE!important;}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug{color:#038543;} \ No newline at end of file +body{background:#ACDED6 url(http://s3.amazonaws.com/twitter_production/images/themes/theme18/bg.gif) fixed no-repeat;background-position:0 0;padding-top:0!important;_padding-top:10px!important}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#333}.unconfirmed-email-banner{border-bottom:solid 1px #EEE}#side_base{border-left:1px solid #EEE;background-color:#F6F6F6}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:transparent}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover,.list-header-inner{background-color:#F6F6F6!important}#side .actions,#side .promo{border:1px solid #EEE}#side div.section-header h3{border-bottom:1px solid #EEE}#side p.sidebar-location{border-bottom:1px dotted #EEE}#side hr{background:#EEE;color:#EEE}ul.sidebar-menu li.loading a{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/spinner.gif) no-repeat 171px .5em!important}#side .collapsible h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_up_dark.png) no-repeat center right!important}#side .collapsible.collapsed h2.sidebar-title{background:transparent url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/toggle_down_dark.png) no-repeat center right!important}#side ul.lists-links li a em{background:url(https://s3.amazonaws.com/twitter_production/a/1265242857/images/arrow_right_dark.png) no-repeat left top}#side span.pipe{border-left:1px solid #EEE}#list_subscriptions span.view-all,#list_memberships span.view-all,#profile span.view-all,#profile_favorites span.view-all,#following span.view-all,#followers span.view-all{border-left:0}a.edit-list{border-right:1px solid #EEE!important}body#show #content .meta a.screen-name,#content .shared-content .screen-name,#content .meta .byline a,a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#local_trend_locations li a,.modal-content .list-slug,#side_name{color:#038543}nav:hover{box-shadow:0 0 10px #038543;-webkit-box-shadow:0 0 10px #038543} \ No newline at end of file diff --git a/themes/minimal.css b/themes/minimal.css index f6d0ce4..7834a04 100644 --- a/themes/minimal.css +++ b/themes/minimal.css @@ -1,2 +1,2 @@ /*Minimal Theme Inspired by @Ratoo*/ -body{background:#FFF}a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover{color:#000;}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#606060;}#side_base{border-left:1px solid gray;background-color:#FFF;}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:#F7F7F7;}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover{background-color:#FFF!important;}#side .actions,#side .promo{border:1px solid gray;}#side div.section-header h3{border-bottom:1px solid gray;}#side hr{background:gray;color:gray;} \ No newline at end of file +body{background:#FFF}a,#content tr.hentry:hover a,body#profile #content div.hentry:hover a,#side .stats a:hover span.stats_count,#side div.user_icon a:hover,li.verified-profile a:hover,#side .promotion .definition strong,p.list-numbers a:hover,#side div.user_icon a:hover span,#content .tabMenu li a,.translator-profile a:hover,#side_name{color:#000;}body,ul#tabMenu li a,#side .section h1,#side .stat a,#side .stats a span.stats_count,#side div.section-header h1,#side div.user_icon a,#side div.user_icon a:hover,#side div.section-header h3.faq-header,ul.sidebar-menu a.active,li.verified-profile a,#side .promotion a,body #content .list-header h2,p.list-numbers a,.bar h3 label,body.timeline #content h1,.list-header h2 a span,#content .tabMenu li.active a,body#direct_messages #content .tabMenu #inbox_tab a,body#inbox #content .tabMenu #inbox_tab a,body#sent #content .tabMenu #sent_tab a,body#direct_messages #content .tabMenu #inbox_tab a,body#retweets_by_others #content .tabMenu #retweets_by_others_tab a,body#retweets #content .tabMenu #retweets_tab a,body#retweeted_by_others #content .tabMenu #retweeted_by_others_tab a,body#retweeted_of_mine #content .tabMenu #retweeted_of_mine_tab a,.translator-profile a,#owners_lists h2 a{color:#606060;}#side_base{border-left:1px solid gray;background-color:#FFF;}ul.sidebar-menu a.active,ul.sidebar-menu li a:hover,#side div#custom_search.active,#side .promotion,.notify div{background-color:#F7F7F7;}.list-header,.list-controls,ul.sidebar-list li.active a,ul.sidebar-list li a:hover{background-color:#FFF!important;}#side .actions,#side .promo{border:1px solid gray;}#side div.section-header h3{border-bottom:1px solid gray;}#side hr{background:gray;color:gray;}nav:hover{box-shadow:0 0 1px gray;-webkit-box-shadow:0 0 1px gray} \ No newline at end of file diff --git a/user.php b/user.php index 002d64d..3e9b6cb 100644 --- a/user.php +++ b/user.php @@ -1,207 +1,193 @@ - - - - -
      -userTimeline($p, $userid); - - if ($statuses === false) { - header('location: error.php'); - } - $isProtected = $statuses == 'protected'; - $isFriend = $t->isFriend($t->username, $userid); - $isFollower = $t->isFriend($userid, $t->username); - $block_error = $t->isBlocked($userid)->error; - $isBlocked = !$block_error; - - if (!$isProtected) { - $userinfo = array(); - $userinfo['name'] = $statuses[0]->user->name; - $userinfo['screen_name'] = $statuses[0]->user->screen_name; - $userinfo['friends_count'] = $statuses[0]->user->friends_count; - $userinfo['statuses_count'] = $statuses[0]->user->statuses_count; - $userinfo['followers_count'] = $statuses[0]->user->followers_count; - $userinfo['url'] = $statuses[0]->user->url; - $userinfo['description'] = $statuses[0]->user->description; - $userinfo['location'] = $statuses[0]->user->location; - $userinfo['protected'] = $statuses[0]->user->url; - $userinfo['id'] = $statuses[0]->user->id; - $userinfo['image_url'] = getAvatar($statuses[0]->user->profile_image_url); - - -?> -
      - -
      - isFriend($userid, $t->username)) {?> - Following me -username){ -?> -
      - - Unfollow - - Follow - - - Send DM - - - Unblock - - Block - - Reply - Hide @ - Nexus -
      - -
      -
      -No tweet to display.
      "; - } else { - $output = '
        '; - - foreach ($statuses as $status) { - $user = $status->user; - $date = formatDate($status->created_at); - $text = formatText($status->text); - - $output .= " -
      1. - - $status->id - $text "; - if ($shorturl = unshortUrl($text)) $output .= "

        URL

        $shorturl
        "; - $output .= " - id\">Reply - id\">Retweet - New Retweet - id\">Favorite - Translate - - "; - if ($status->in_reply_to_status_id) $output .= " in_reply_to_status_id&uid=$user->id \">in reply to $status->in_reply_to_screen_name"; - - $output .= " - from $status->sourceid\">$date -
        -
      2. - "; - } - - $output .= "
      "; - - if ($p >1) $output .= "Back"; - if (!$empty) $output .= "Next"; - - - $output .= "
      "; - - echo $output; - } - }//end of if(!$isProtected) - else { -?> -
      -
      -
      - - Unfollow - - Follow - - - Send DM - - - Unblock - - Block - - Reply - Hide @ -
      -
      -
      -
      This user has been protected. You ought to follow before viewing this page.
      - - - - -
      - - - - -
      -
      - - -
      - -
      - -
      -
      - - - + + + + +
      +getFavorites($p, $userid); + } else { + $statuses = $t->userTimeline($p, $userid); + } + + if ($statuses === false) { + header('location: error.php');exit; + } + $user = $t->showUser($userid); + if (strcasecmp($userid,$t->username) == 0) {header('location: profile.php');exit();} + + $isProtected = ($statuses == 'protected') || ($statuses->error == 'Not authorized'); + $r = getRelationship($user->screen_name); + $isFriend = $r == 2 || $r == 1; + $isFollower = $r == 3 || $r == 1; + $isBlocked = $r == 4; + + if (!$isProtected) { + + $userinfo = array(); + $userinfo['name'] = $user->name; + $userinfo['screen_name'] = $user->screen_name; + $userinfo['friends_count'] = $user->friends_count; + $userinfo['statuses_count'] = $user->statuses_count; + $userinfo['followers_count'] = $user->followers_count; + $userinfo['url'] = $user->url; + $userinfo['description'] = formatText($user->description); + $userinfo['location'] = $user->location; + $userinfo['date_joined'] = date('Y-m-d', format_time($user->created_at)); //from dabr + $userinfo['protected'] = $user->url; + $userinfo['id'] = $user->id; + $userinfo['image_url'] = getAvatar($user->profile_image_url); + +?> +
      + +
      + + Following me + +
      + + Unfollow + + Follow + + + DM + + + Unblock + + Block + + Reply + Hide @ + Report Spam +
      +
      +
      +No tweet to display.
      "; + } else { + $output = '
        '; + foreach ($statuses as $status) { + if (isset($status->retweeted_status)) { + $output .= format_retweet($status); + } else { + $output .= format_timeline($status,$t->username); + } + } + $output .= "
      "; + if ($_GET['fav'] == true) { + if ($p >1) $output .= "Back"; + if (!$empty) $output .= "Next"; + } else { + if ($p >1) $output .= "Back"; + if (!$empty) $output .= "Next"; + } + $output .= "
      "; + echo $output; + } + }//end of if(!$isProtected) + else { +?> +
      +
      +
      + + Unfollow + + Follow + + + Send DM + + + Unblock + + Block + + Reply + Hide @ +
      +
      +
      +
      This user has been protected. You ought to follow before viewing this page.
      + + + + +
      + + + + +
      +
      +
        +
      • Name
      • + Location ' . $userinfo['location'] . ''; ?> + 20)) echo '
      • Web ' .substr($userinfo['url'], 0, 20). '...
      • '; else if (($userinfo['url']) and (strlen($userinfo['url'])<=20)) echo '
      • Web ' .$userinfo['url']. '
      • ';?> + Bio " . $userinfo['description'] . ""; ?> + Joined at " . $userinfo['date_joined'] . ""; ?> +
      + +
      + +
      + +
      +
      +