Browse Source
- Add a "Discover" page for the public profiles
- Add a "Discover" page for the public profiles
- Little CSS fixes - Little Route fixespull/16/head
10 changed files with 109 additions and 4 deletions
-
18app/controllers/ControllerMain.php
-
9app/widgets/Blog/Blog.php
-
64app/widgets/Discover/Discover.php
-
1system/Route.php
-
1themes/movim/conf.tpl
-
4themes/movim/css/style.css
-
13themes/movim/discover.tpl
-
1themes/movim/help.tpl
-
1themes/movim/media.tpl
-
1themes/movim/profile.tpl
@ -0,0 +1,64 @@ |
|||
<?php |
|||
|
|||
class Discover extends WidgetCommon { |
|||
function WidgetLoad() |
|||
{ |
|||
|
|||
} |
|||
|
|||
function prepareContacts() { |
|||
$html = ''; |
|||
|
|||
$cd = new \modl\ContactDAO(); |
|||
$users = array_reverse($cd->getAllPublic()); |
|||
|
|||
$gender = getGender(); |
|||
$marital = getMarital(); |
|||
|
|||
foreach($users as $user) { |
|||
$html .= ' |
|||
<div class="post"> |
|||
<a href="'.Route::urlize('blog', array($user->jid, false)).'"> |
|||
<img class="avatar" src="'.$user->getPhoto('m').'"/> |
|||
<div class="postbubble"> |
|||
<span class="name">'. |
|||
$user->getTrueName().' |
|||
</span> |
|||
<span class="asv">'. |
|||
$user->getAge().' '. |
|||
$gender[$user->gender].' '. |
|||
$marital[$user->marital].' |
|||
</span> |
|||
<div |
|||
class="content" |
|||
style="
|
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
white-space: nowrap; |
|||
height: 1.5em; |
|||
"
|
|||
>'.prepareString($user->desc).'</div> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
'; |
|||
} |
|||
|
|||
return $html; |
|||
} |
|||
|
|||
function build() |
|||
{ |
|||
?>
|
|||
<div id="discover"> |
|||
<div class="paddedtopbottom"> |
|||
<h2><?php echo t('Last registered'); ?></h2>
|
|||
</div> |
|||
<div id="contactsresult"> |
|||
<?php echo $this->prepareContacts(); ?>
|
|||
</div> |
|||
</div> |
|||
<?php |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
<?php /* -*- mode: html -*- */ |
|||
?> |
|||
<div id="head"> |
|||
</div> |
|||
|
|||
<div id="main" style="margin-top: 0px;"> |
|||
<div id="left"> |
|||
</div> |
|||
|
|||
<div id="center"> |
|||
<?php $this->widget('Discover');?> |
|||
</div> |
|||
</div> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue