diff --git a/database.php b/database.php new file mode 100644 index 000000000..ed2fb5bc2 --- /dev/null +++ b/database.php @@ -0,0 +1,24 @@ +create(); + + $nd = new \modl\NodeDAO(); + $nd->create(); + + $cd = new \modl\ContactDAO(); + $cd->create(); + + $cad = new \modl\CapsDAO(); + $cad->create(); + + $prd = new \modl\PresenceDAO(); + $prd->create(); + + $rd = new \modl\RosterLinkDAO(); + $rd->create(); + + $sd = new \modl\SessionDAO(); + $sd->create(); + +echo 'Recreate database... done !'; diff --git a/image.php b/image.php index 3bc7c6337..c38aa9765 100644 --- a/image.php +++ b/image.php @@ -73,9 +73,7 @@ if (!function_exists('getallheaders')) { exit; } elseif($_GET['c'] == '' || $_GET['c'] == 'default') { display_default(); - } - - else { + } else { $user = new User(); if($user->isLogged()) $where = array('jid' => $_GET['c']); diff --git a/loader.php b/loader.php index 8a5b3cf50..c0f6d4de4 100644 --- a/loader.php +++ b/loader.php @@ -8,8 +8,8 @@ define('PROPERTIES_PATH', BASE_PATH.'page/properties/'); define('THEMES_PATH', BASE_PATH . 'themes/'); define('USERS_PATH', BASE_PATH . 'user/'); -define('DB_DEBUG', true); -define('DB_LOGFILE', BASE_PATH . 'log/queries.log'); +//define('DB_DEBUG', true); +//define('DB_LOGFILE', BASE_PATH . 'log/queries.log'); @@ -30,6 +30,7 @@ require_once(LIB_PATH . "Datas/RosterLink.php"); require_once(LIB_PATH . "Session.php"); require_once(LIB_PATH . "Utils.php"); require_once(LIB_PATH . "UtilsString.php"); +require_once(LIB_PATH . "UtilsPicture.php"); require_once(LIB_PATH . "Cache.php"); require_once(LIB_PATH . "Conf.php"); require_once(LIB_PATH . "Event.php"); @@ -58,13 +59,6 @@ require_once(LIB_PATH . "Widget/WidgetBase.php"); require_once(LIB_PATH . "Widget/WidgetCommon.php"); require_once(LIB_PATH . "Widget/WidgetWrapper.php"); -/* Jaxl Configuration */ - -define('JAXL_LOG_PATH', BASE_PATH . 'log/jaxl.log'); -define('JAXL_LOG_EVENT', true); -define('JAXL_LOG_LEVEL', 4); -define('JAXL_LOG_ROTATE', false); - // We set the default timezone to the server timezone date_default_timezone_set(getLocalTimezone()); diff --git a/system/Cache.php b/system/Cache.php index 894259f16..ad48191d8 100644 --- a/system/Cache.php +++ b/system/Cache.php @@ -108,7 +108,12 @@ class Cache $md5 = md5($data); $time = time(); - $var = new CacheVar(); + $cd = new \modl\CacheDAO(); + //$var = $cd->get($cache_key) + + $c = new \modl\Cache(); + + /*$var = new CacheVar(); $query = CacheVar::query()->select() ->where(array( @@ -119,14 +124,16 @@ class Cache if($result) { $var = $result[0]; - } + }*/ - $var->key = $cache_key; - $var->data = $data; - $var->checksum = $md5; - $var->timestamp = $time; + $c->key = $cache_key; + $c->data = $data; + $c->checksum = $md5; + $c->timestamp = $time; + + $cd->set($c); - $var->run_query($var->query()->save($var)); + //$var->run_query($var->query()->save($var)); } /** @@ -135,9 +142,13 @@ class Cache private function read_cache($key) { $cache_key = $this->login.':'.$key; + + $cd = new \modl\CacheDAO(); + $var = $cd->get($cache_key); - $var = new CacheVar(); - if($var->load(array('key' => $cache_key))) { + //$var = new CacheVar(); + //if($var->load(array('key' => $cache_key))) { + if(isset($var)) { return unserialize(gzuncompress(base64_decode(str_replace("\\'", "'", $var->data)))); } else { @@ -148,4 +159,3 @@ class Cache ?> - diff --git a/system/RPC.php b/system/RPC.php index 2b18c611c..c5873b1d5 100644 --- a/system/RPC.php +++ b/system/RPC.php @@ -87,9 +87,6 @@ class RPC public function handle() { if(isset($_GET['do']) && $_GET['do'] == 'poll') { - /*$user = new User(); - $xmppSession = Jabber::getInstance($user->getLogin()); - $xmppSession->pingServer();*/ moxl\ping(); } else { $xml = file_get_contents('php://input'); diff --git a/system/Session.php b/system/Session.php index 1b7c37a2f..eac58b823 100644 --- a/system/Session.php +++ b/system/Session.php @@ -65,7 +65,6 @@ class Session } $this->container = $name; - Logger::log(1, "Session: Starting session ".self::$sid); } protected function regenerate() diff --git a/system/Utils.php b/system/Utils.php index ec228a2c4..1bba9888a 100644 --- a/system/Utils.php +++ b/system/Utils.php @@ -206,7 +206,8 @@ function prepareDate($time, $hours = true) { if($hours) $date .= ' - '. date('H:i', $time); - return $date; + if($time) + return $date; } /** diff --git a/system/UtilsPicture.php b/system/UtilsPicture.php new file mode 100644 index 000000000..fcb1285b8 --- /dev/null +++ b/system/UtilsPicture.php @@ -0,0 +1,42 @@ += $height) { + // For landscape images + $x_offset = ($width - $height) / 2; + $y_offset = 0; + $square_size = $width - ($x_offset * 2); + } else { + // For portrait and square images + $x_offset = 0; + $y_offset = ($height - $width) / 2; + $square_size = $height - ($y_offset * 2); + } + + if($source) { + imagecopyresampled($thumb, $source, 0, 0, $x_offset, $y_offset, $size, $size, $square_size, $square_size); + + //display_image($hash, "image/jpeg"); + imagejpeg($thumb, $path, 95); + } +} diff --git a/system/Widget/WidgetCommon.php b/system/Widget/WidgetCommon.php index 5d1b72698..398cc6466 100644 --- a/system/Widget/WidgetCommon.php +++ b/system/Widget/WidgetCommon.php @@ -16,6 +16,37 @@ */ class WidgetCommon extends WidgetBase { + protected function printPost($post) { + if($post->title) + $title = ' + + '.$post->title.' +
'; + + $html = ' +
+ + + + +
+ '.$title.' + + '.$post->getContact()->getTrueName().' + + + '.prepareDate(strtotime($post->published)).' + +
+ '.prepareString(html_entity_decode($post->content)).' +
+
+
+
+ '; + return $html; + } + /* * @desc Prepare a group of messages * @param array of messages diff --git a/system/Widget/widgets/Chat/Chat.php b/system/Widget/widgets/Chat/Chat.php index 0ebe62b08..c5bd9ac13 100644 --- a/system/Widget/widgets/Chat/Chat.php +++ b/system/Widget/widgets/Chat/Chat.php @@ -61,12 +61,12 @@ class Chat extends WidgetBase function onMessage($message) { - if($message->getData('key') == $message->getData('from')) { - $key = $message->getData('from'); - $jid = $message->getData('to'); + if($message->key == $message->from) { + $key = $message->from; + $jid = $message->to; } else { - $key = $message->getData('to'); - $jid = $message->getData('from'); + $key = $message->to; + $jid = $message->from; } $query = RosterLink::query()->select() @@ -86,7 +86,7 @@ class Chat extends WidgetBase 'chats', RPC::cdata($this->prepareChat($contact))); RPC::call('scrollAllTalks'); - } else if(isset($contact) && $message->getData('body') != '') { + } else if(isset($contact) && $message->body != '') { $html = $this->prepareMessage($message); @@ -203,18 +203,21 @@ class Chat extends WidgetBase { $m = new \Message(); - $m->key->setval($this->user->getLogin()); - $m->to->setval(echapJid($to)); - $m->from->setval($this->user->getLogin()); + $m = new \modl\Message(); - $m->type->setval("chat"); + $m->key = $this->user->getLogin(); + $m->to = echapJid($to); + $m->from = $this->user->getLogin(); - $m->body->setval(rawurldecode($message)); + $m->type = 'chat'; - $m->published->setval(date('Y-m-d H:i:s')); - $m->delivered->setval(date('Y-m-d H:i:s')); + $m->body = rawurldecode($message); + + $m->published = date('Y-m-d H:i:s'); + $m->delivered = date('Y-m-d H:i:s'); - $m->run_query($m->query()->save($m)); + $md = new \modl\MessageDAO(); + $md->set($m); $this->onMessage($m); @@ -268,19 +271,19 @@ class Chat extends WidgetBase } function prepareMessage($message) { - if($message->getData('body') != '') { + if($message->body != '') { $html = '
getData('body'))) { + if(preg_match("#^/me#", $message->body)) { $html .= " own "; - $content = "** ".substr($message->getData('body'), 4); + $content = "** ".substr($message->body, 4); } - $html .= '">'.date('H:i', strtotime($message->getData('published'))).''; + $html .= '">'.date('H:i', strtotime($message->published)).''; $html.= prepareString(htmlentities($content, ENT_COMPAT, "UTF-8")).'
'; return $html; } else { @@ -290,24 +293,15 @@ class Chat extends WidgetBase function prepareChat($contact) { - $query = Message::query() - ->where( - array( - 'key' => $this->user->getLogin(), - array('to' => $contact->getData('jid') , '|from' => $contact->getData('jid')) - ) - ) - ->orderby('published', true) - ->limit(0, 20); - $messages = Message::run_query($query); + $md = new \modl\MessageDAO(); + $messages = $md->getContact($contact->getData('jid')); if(!empty($messages)) { - $messages = array_reverse($messages); $day = ''; foreach($messages as $m) { - if($day != date('d',strtotime($m->getData('published')))) { - $messageshtml .= '
'.prepareDate(strtotime($m->getData('published')), false).'
'; - $day = date('d',strtotime($m->getData('published'))); + if($day != date('d',strtotime($m->published))) { + $messageshtml .= '
'.prepareDate(strtotime($m->published), false).'
'; + $day = date('d',strtotime($m->published)); } $messageshtml .= $this->prepareMessage($m); } diff --git a/system/Widget/widgets/ContactCard/ContactCard.php b/system/Widget/widgets/ContactCard/ContactCard.php index aeb0aaa6e..ef92bbba0 100644 --- a/system/Widget/widgets/ContactCard/ContactCard.php +++ b/system/Widget/widgets/ContactCard/ContactCard.php @@ -44,81 +44,81 @@ class ContactCard extends WidgetCommon
'.t('General Informations').''; - if($this->testIsSet($contact->getData('fn'))) + if($this->testIsSet($contact->fn)) $html .= '
- '.$contact->getData('fn').' + '.$contact->fn.'
'; - if($this->testIsSet($contact->getData('name'))) + if($this->testIsSet($contact->name)) $html .= '
- '.$contact->getData('name').' + '.$contact->name.'
'; - if($contact->getData('date') != '0000-00-00' && $this->testIsSet($contact->getData('date'))) + if($contact->date != '0000-00-00' && $this->testIsSet($contact->date)) $html .= '
- '.date('j M Y',strtotime($contact->getData('date'))).' + '.date('j M Y',strtotime($contact->date)).'
'; - if($contact->getData('gender') != 'N' && $this->testIsSet($contact->getData('gender'))) + if($contact->gender != 'N' && $this->testIsSet($contact->gender)) $html .= '
- '.$gender[$contact->getData('gender')].' + '.$gender[$contact->gender].'
'; - if($contact->getData('marital') != 'none' && $this->testIsSet($contact->getData('marital'))) + if($contact->marital != 'none' && $this->testIsSet($contact->marital)) $html .= '
- '.$marital[$contact->getData('marital')].' + '.$marital[$contact->marital].'
'; - if($this->testIsSet($contact->getData('email'))) + if($this->testIsSet($contact->email)) $html .= '
- '.$contact->getData('email').' + '.$contact->email.'
'; - if($this->testIsSet($contact->getData('url'))) + if($this->testIsSet($contact->url)) $html .= '
- '.$contact->getData('url').' + '.$contact->url.'
'; - if($this->testIsSet($contact->getData('desc')) && prepareString($contact->getData('desc')) != '') + if($this->testIsSet($contact->desc) && prepareString($contact->desc) != '') $html .= '
- '.prepareString($contact->getData('desc')).' + '.prepareString($contact->desc).'
'; - if($this->testIsSet($contact->getData('adrlocality')) || - $this->testIsSet($contact->getData('adrcountry'))) { + if($this->testIsSet($contact->adrlocality) || + $this->testIsSet($contact->adrcountry)) { $html .= '

'.t('Geographic Position').''; - if($this->testIsSet($contact->getData('adrlocality'))) { + if($this->testIsSet($contact->adrlocality)) { $locality .= '
- '.$contact->getData('adrlocality'); - if($contact->getData('adrpostalcode') != 0) - $locality .= ' ('.$contact->getData('adrpostalcode').')'; + '.$contact->adrlocality; + if($contact->adrpostalcode != 0) + $locality .= ' ('.$contact->adrpostalcode.')'; $locality .= '
'; $html .= $locality; } - if($this->testIsSet($contact->getData('adrcountry'))) + if($this->testIsSet($contact->adrcountry)) $html .= '
- '.$contact->getData('adrcountry').' + '.$contact->adrcountry.'
'; } $html .= '
-
getData('jid')."'").'">
+
jid."'").'">
'; return $html; @@ -126,15 +126,13 @@ class ContactCard extends WidgetCommon function build() { - $query = Contact::query()->select() - ->where(array( - 'jid' => $_GET['f'])); - $contact = Contact::run_query($query); + $cd = new modl\ContactDAO(); + $contact = $cd->get($_GET['f']); ?>
prepareContactCard($contact[0]); + if(isset($contact)) + echo $this->prepareContactCard($contact); ?>
join('Presence', - array('Contact.jid' => - 'Presence.jid')) - ->where(array( - 'Contact`.`jid' => $_GET['f'])); - $user = Contact::run_query($query); - - $query = RosterLink::query() - ->where(array( - 'key' => $this->user->getLogin(), - 'jid' => $_GET['f'])); - $r = RosterLink::run_query($query); + $cd = new \modl\ContactDAO(); + $c = $cd->getRosterItem($_GET['f']); $html = ''; - if(isset($user) && isset($user[0][1]) && isset($r[0]->jid) && $r[0]->jid->getval() != '') { - $contact = $user[0][0]; - - $presence = $user[0][1]->getPresence(); - + if(isset($c)) { // Mood - if($contact->mood->getval() != '') { + if($c->mood) { $moodarray = getMood(); $mood = ''; - foreach(unserialize($contact->mood->getval()) as $m) + foreach(unserialize($c->mood) as $m) $mood .= $moodarray[$m].','; $html .= t("I'm ").substr($mood, 0, -1).'
'; } + if($c->tuneartist) { + $html .= '

'.t('Listening').'

'; + $html .= $c->tuneartist. ' - '.$c->tunetitle.' '.t('on').$c->tunesource; + } + // Last seen - if($user[0][1]->delay->getval() != '0000-00-00 00:00:00' && $this->testIsSet($user[0][1]->delay->getval())) { + if($c->delay) { $html .= '

'.t('Last seen').'

'; - $html .= ''.date('j M Y - H:i',strtotime($user[0][1]->delay->getval())).'
'; + $html .= prepareDate(strtotime($c->delay)).'
'; } - // Location - if(($contact->loclatitude->getval() != '' && - $contact->loclongitude->getval() != '') || $contact->getPlace() != '' - ) { + if($c->loclatitude != '' && $c->loclongitude != '' + || $c->getPlace() != '') { + $html .= '

'.t('Location').'

'; - $html .= prepareDate(strtotime($contact->loctimestamp->getval())).'

'; - if($contact->getPlace() != '') - $html .= $contact->getPlace().'

'; + $html .= prepareDate(strtotime($c->loctimestamp)).'

'; + if($c->getPlace() != '') + $html .= $c->getPlace().'

'; - if($contact->loclatitude->getval() != '' && - $contact->loclongitude->getval() != '') + if(isset($c->loclatitude) && isset($c->loclongitude)) $html .= '
+ select() ->where($where) - ->orderby('id', true) + //s->orderby('id', true) ->limit(0, $users_limit); $users = Contact::run_query($query); diff --git a/system/Widget/widgets/Feed/Feed.php b/system/Widget/widgets/Feed/Feed.php index f5fa790d8..369621db6 100644 --- a/system/Widget/widgets/Feed/Feed.php +++ b/system/Widget/widgets/Feed/Feed.php @@ -168,53 +168,18 @@ class Feed extends WidgetCommon { } function prepareFeed($start) { - $query = RosterLink::query()->where( - array( - 'RosterLink`.`key' => $this->user->getLogin(), - array( - 'RosterLink`.`rostersubscription!' => 'none', - 'RosterLink`.`rostersubscription!' => '', - 'RosterLink`.`rostersubscription!' => 'vcard', - '|RosterLink`.`rosterask' => 'subscribe'))) - ->orderby('RosterLink.group', true); - - $contacts = RosterLink::run_query($query); - - $rosterc = array(); - - $commentid = array(); - - array_push($rosterc, $this->user->getLogin()); - - foreach($contacts as $c) { - array_push($rosterc, '|'.$c->getData('jid')); - } - + $pd = new \modl\PostDAO(); + $pl = $pd->getFeed($start+1, 10); - if(empty($rosterc)) - $where = array( - 'Post`.`parentid' => '', - 'Post`.`key' => $this->user->getLogin()); - else - $where = array( - 'Post`.`parentid' => '', - 'Post`.`key' => $this->user->getLogin(), - array('Post`.`jid' => $rosterc)); - - // We query the last messages - $query = Post::query() - ->join('Contact', array('Post.jid' => 'Contact.jid')) - ->where($where) - ->orderby('Post.updated', true) - ->limit($start+1, '10'); - $messages = Post::run_query($query); + foreach($pl as $post) { + $html .= $this->printPost($post); + } // We ask for the HTML of all the posts - $html = $this->preparePosts($messages); $next = $start + 10; - if(sizeof($messages) > 9 && $html != '') { + if(sizeof($pl) > 9 && $html != '') { $html .= '
'; } + return $html; } @@ -237,7 +203,10 @@ class Feed extends WidgetCommon { $html = $this->prepareFeed(-1); if($html == '') - $html = t("Your feed cannot be loaded."); + $html = ' +
'. + t("Your feed cannot be loaded.").' +
'; RPC::call('movim_fill', 'feedcontent', RPC::cdata($html)); RPC::commit(); } diff --git a/system/Widget/widgets/Login/Login.php b/system/Widget/widgets/Login/Login.php index 7c1af6a8c..b2ef03170 100644 --- a/system/Widget/widgets/Login/Login.php +++ b/system/Widget/widgets/Login/Login.php @@ -280,9 +280,10 @@ class Login extends WidgetBase {
where(); - $contacts = CacheVar::run_query($query); - echo t('Population').' '.ceil(count($contacts)/2).' • '; + $rd = new \modl\RosterLinkDAO(); + $pop = $rd->countAccounts(); + + echo t('Population').' '.$pop[0].' • '; ?> diff --git a/system/Widget/widgets/Logout/Logout.php b/system/Widget/widgets/Logout/Logout.php index b3c98b79a..34b96210a 100644 --- a/system/Widget/widgets/Logout/Logout.php +++ b/system/Widget/widgets/Logout/Logout.php @@ -92,6 +92,7 @@ class Logout extends WidgetBase $txt = getPresences(); global $session; + $query = Presence::query()->select() ->where(array( 'key' => $this->user->getLogin(), diff --git a/system/Widget/widgets/Node/Node.php b/system/Widget/widgets/Node/Node.php index 66118bea8..a2e62d8fe 100644 --- a/system/Widget/widgets/Node/Node.php +++ b/system/Widget/widgets/Node/Node.php @@ -22,6 +22,16 @@ class Node extends WidgetCommon { function WidgetLoad() { + $this->registerEvent('stream', 'onStream'); + } + + function onStream($id) { + $html = $this->prepareGroup($id[0], $id[1]); + + if($html == '') + $html = t("Your feed cannot be loaded."); + RPC::call('movim_fill', 'node', RPC::cdata($html)); + RPC::commit(); } function ajaxGetItems($server, $node) @@ -31,11 +41,33 @@ class Node extends WidgetCommon ->setNode($node) ->request(); } + + function prepareGroup($serverid, $groupid) { + $title = ' + + '.$serverid.' + > + + '.$groupid.' + > + '.t('Posts'); + + $pd = new modl\PostDAO(); + $posts = $pd->getGroup($serverid, $groupid); + + $html = $title; + foreach($posts as $post) { + $html .= $this->printPost($post); + } + + return $html; + } function build() { ?> -
+
+ prepareGroup($_GET['s'], $_GET['n']); ?>
select() - ->where(array( - 'jid' => $this->user->getLogin())); - $contact = Contact::run_query($query); + $cd = new modl\ContactDAO(); + $contact = $cd->get($this->user->getLogin()); $presence = Cache::c('presence'); - if(isset($contact[0])) { - $me = $contact[0]; + if(isset($contact)) { + $me = $contact; // My avatar $html .= ' @@ -105,13 +102,13 @@ class Profile extends WidgetCommon

'.$me->getTrueName().'


'; - if($this->testIsSet($me->getData('name'))) - $html .= $me->getData('name').' '; + if($this->testIsSet($me->name)) + $html .= $me->name.' '; else $html .= $me->getTrueName().' '; - if($this->testIsSet($me->getData('url'))) - $html .= '
'.$me->getData('url').''; + if($this->testIsSet($me->url)) + $html .= '
'.$me->url.''; $html .= '

diff --git a/system/Widget/widgets/ProfileData/ProfileData.php b/system/Widget/widgets/ProfileData/ProfileData.php index 20d4e95e3..56564e9fc 100644 --- a/system/Widget/widgets/ProfileData/ProfileData.php +++ b/system/Widget/widgets/ProfileData/ProfileData.php @@ -64,7 +64,7 @@ class ProfileData extends WidgetBase RPC::call('movim_fill', 'mapdata', RPC::cdata($html)); $html = ' -
'.t('Location updated').'
'; +
'.t('Location updated').'

'; RPC::call('movim_fill', 'maperror', RPC::cdata($html)); RPC::call('movim_delete', 'mapdiv'); RPC::commit(); @@ -84,16 +84,11 @@ class ProfileData extends WidgetBase { $submit = $this->genCallAjax('ajaxLocationPublish', "getMyPositionData()"); - $query = Contact::query() - ->select() - ->where( - array('jid' => $this->user->getLogin()) - ); - $c = Contact::run_query($query); - - if($c) { - $c = $c[0]; - $data = prepareDate(strtotime($c->loctimestamp->getval())).'

'; + $cd = new modl\ContactDAO(); + $c = $cd->get($this->user->getLogin()); + + if($c->loctimestamp) { + $data = prepareDate(strtotime($c->loctimestamp)).'

'; $data .= $c->getPlace(); } else { $data = ''; @@ -107,6 +102,7 @@ class ProfileData extends WidgetBase
'.$data.'
+
'. @@ -117,7 +113,7 @@ class ProfileData extends WidgetBase style="display: none;" class="button tiny icon yes merged left" onclick="'.$submit.' hidePositionChoice();">'.t('Accept').' diff --git a/system/Widget/widgets/Roster/Roster.php b/system/Widget/widgets/Roster/Roster.php index a7b57414e..d7848a195 100644 --- a/system/Widget/widgets/Roster/Roster.php +++ b/system/Widget/widgets/Roster/Roster.php @@ -86,7 +86,7 @@ class Roster extends WidgetBase * * */ - function prepareRosterElement($contact, $inner = false) + function prepareRosterElement($contact, $caps = false) { $html = ''; @@ -106,9 +106,32 @@ class Roster extends WidgetBase $html .= ' id="roster'.$contact->jid.'" >'; + + $type = ''; + + if($caps) { + foreach($caps as $c) { + if($c->node == $contact->node.'#'.$contact->ver) { + $type = $c->type; + } + } + } + + $html .= '
jid."'").'">
'; - $html .= '
jid."'").'">
- tuneartist) && $contact->tuneartist != '') + $html .= '
'; + + $html .= '
setTimeout(\''.$this->genCallAjax('ajaxRefreshRoster').'\', 1500);'; diff --git a/system/Widget/widgets/Roster/img/earth.png b/system/Widget/widgets/Roster/img/earth.png new file mode 100644 index 000000000..53dc9869b Binary files /dev/null and b/system/Widget/widgets/Roster/img/earth.png differ diff --git a/system/Widget/widgets/Roster/img/mobile.png b/system/Widget/widgets/Roster/img/mobile.png new file mode 100644 index 000000000..76496277a Binary files /dev/null and b/system/Widget/widgets/Roster/img/mobile.png differ diff --git a/system/Widget/widgets/Roster/img/music.png b/system/Widget/widgets/Roster/img/music.png new file mode 100644 index 000000000..7d2359b3c Binary files /dev/null and b/system/Widget/widgets/Roster/img/music.png differ diff --git a/system/Widget/widgets/Roster/img/robot.png b/system/Widget/widgets/Roster/img/robot.png new file mode 100644 index 000000000..7290d2341 Binary files /dev/null and b/system/Widget/widgets/Roster/img/robot.png differ diff --git a/system/Widget/widgets/Roster/roster.css b/system/Widget/widgets/Roster/roster.css index a70e0aaf3..15444814b 100644 --- a/system/Widget/widgets/Roster/roster.css +++ b/system/Widget/widgets/Roster/roster.css @@ -239,3 +239,27 @@ border-bottom: 1px solid rgba(20, 20, 30, 1); } +#roster li .infoicon { + width: 18px; + height: 18px; + background-repeat: no-repeat; + float: right; + margin-top: 6px; + margin-right: 2px; +} + +#roster li .mobile { + background-image: url('img/mobile.png'); +} + +#roster li .web { + background-image: url('img/earth.png'); +} + +#roster li .bot { + background-image: url('img/robot.png'); +} + +#roster li .tune { + background-image: url('img/music.png'); +} diff --git a/system/Widget/widgets/ServerNodes/ServerNodes.php b/system/Widget/widgets/ServerNodes/ServerNodes.php index b79cc2741..8f6f26db1 100644 --- a/system/Widget/widgets/ServerNodes/ServerNodes.php +++ b/system/Widget/widgets/ServerNodes/ServerNodes.php @@ -28,7 +28,7 @@ class ServerNodes extends WidgetCommon function onDiscoNodes($items) { - $html = '