\\\\_\ · · \\) \____) · · · · · · · · Qvitter is free software: you can redistribute it and / or modify it · · under the terms of the GNU Affero General Public License as published by · · the Free Software Foundation, either version three of the License or (at · · your option) any later version. · · · · Qvitter is distributed in hope that it will be useful but WITHOUT ANY · · WARRANTY; without even the implied warranty of MERCHANTABILTY or FITNESS · · FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for · · more details. · · · · You should have received a copy of the GNU Affero General Public License · · along with Qvitter. If not, see . · · · · Contact h@nnesmannerhe.im if you have any questions. · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */ class QvitterAction extends ApiAction { function isReadOnly($args) { return true; } protected function prepare(array $args=array()) { parent::prepare($args); $user = common_current_user(); return true; } protected function handle() { parent::handle(); $this->showQvitter(); } function showQvitter() { $logged_in_user_nickname = ''; $logged_in_user_obj = false; $logged_in_user = common_current_user(); if($logged_in_user) { $logged_in_user_nickname = $logged_in_user->nickname; $logged_in_user_obj = ApiAction::twitterUserArray($logged_in_user->getProfile()); } $registrationsclosed = false; if(common_config('site','closed') == 1 || common_config('site','inviteonly') == 1) { $registrationsclosed = true; } // check if the client's ip address is blocked for registration if(is_array(QvitterPlugin::settings("blocked_ips"))) { $client_ip_is_blocked = in_array($_SERVER['REMOTE_ADDR'], QvitterPlugin::settings("blocked_ips")); } $sitetitle = common_config('site','name'); $siterootdomain = common_config('site','server'); $qvitterpath = Plugin::staticPath('Qvitter', ''); $apiroot = common_path('api/', StatusNet::isHTTPS()); $attachmentroot = common_path('attachment/', StatusNet::isHTTPS()); $instanceurl = common_path('', StatusNet::isHTTPS()); // user's browser's language setting $user_browser_language = 'en'; // use english if we can't find the browser language if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { $user_browser_language = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); } common_set_returnto(''); // forget this // if this is a profile we add a link header for LRDD Discovery (see WebfingerPlugin.php) if(substr_count($_SERVER['REQUEST_URI'], '/') == 1) { $nickname = substr($_SERVER['REQUEST_URI'],1); if(preg_match("/^[a-zA-Z0-9]+$/", $nickname) == 1) { $acct = 'acct:'. $nickname .'@'. common_config('site', 'server'); $url = common_local_url('webfinger') . '?resource='.$acct; foreach (array(Discovery::JRD_MIMETYPE, Discovery::XRD_MIMETYPE) as $type) { header('Link: <'.$url.'>; rel="'. Discovery::LRDD_REL.'"; type="'.$type.'"'); } } } ?> <?php print $sitetitle; ?> "> id)) { //error_log("QVITTER: Could not get user id for user with nickname: $nickname – REQUEST_URI: ".$_SERVER['REQUEST_URI']); } else { print ''."\n"; print ' '."\n"; print ' '."\n"; print ' '."\n"; print ' '."\n"; print ' '."\n"; // maybe openid if (array_key_exists('OpenID', StatusNet::getActivePlugins())) { print ' '."\n"; print ' '."\n"; print ' '."\n"; print ' '."\n"; } } } } elseif(substr($_SERVER['REQUEST_URI'],0,7) == '/group/') { $group_id_or_name = substr($_SERVER['REQUEST_URI'],7); if(stristr($group_id_or_name,'/id')) { $group_id_or_name = substr($group_id_or_name, 0, strpos($group_id_or_name,'/id')); $group = User_group::getKV('id', $group_id_or_name); if($group instanceof User_group) { $group_name = $group->nickname; $group_id = $group_id_or_name; } } else { $group = Local_group::getKV('nickname', $group_id_or_name); if($group instanceof Local_group) { $group_id = $group->group_id; $group_name = $group_id_or_name; } } if(preg_match("/^[a-zA-Z0-9]+$/", $group_id_or_name) == 1 && isset($group_name) && isset($group_id)) { ?> "> '; } ?>
Please enable javascript to use this site.
'.common_config('site', 'notice').'
'; } // welcome text, login and register container if logged out if($logged_in_user === null) { ?>
· OpenID'; } ?>

arg('notice')) { echo '
    '; $notice = Notice::getKV('id', $this->arg('notice')); if($notice instanceof Notice) { $widget = new NoticeListItem($notice, $this); $widget->show(); $this->flush(); } echo '
'; } Event::handle('QvitterHiddenHtml', array($this)); ?>
'.QvitterPlugin::settings('js').''; } ?>