Browse Source

- Re-enable Explore page

- Fix some minor issues
pull/16/head
Jaussoin Timothée 13 years ago
parent
commit
31e2e83c32
  1. 3
      system/Widget/widgets/Admin/Admin.php
  2. 32
      system/Widget/widgets/Explore/Explore.php
  3. 2
      system/Widget/widgets/Feed/Feed.php
  4. 8
      system/Widget/widgets/Vcard/Vcard.php
  5. 2
      themes/movim/explore.tpl

3
system/Widget/widgets/Admin/Admin.php

@ -181,6 +181,9 @@ class Admin extends WidgetBase {
$cd = new \modl\SubscriptionDAO();
$cd->create();
$pr = new \modl\PrivacyDAO();
$pr->create();
}
private function prepareAdmin()

32
system/Widget/widgets/Explore/Explore.php

@ -22,7 +22,7 @@ class Explore extends WidgetCommon {
}
function prepareContacts($form = false) {
if(!$form){
/*if(!$form){
$where = array('public' => 1);
}
else{
@ -55,21 +55,26 @@ class Explore extends WidgetCommon {
</ul>-->
<div class="clear"></div>
</div>';
</div>';*/
$cd = new \modl\ContactDAO();
$users = $cd->getAllPublic();
$gender = getGender();
$marital = getMarital();
foreach($users as $user) {
$html .= '
<a href="?q=friend&f='.$user->getData('jid').'">
<div class="post">
<div class="post">
<a href="?q=friend&f='.$user->jid.'">
<img class="avatar" src="'.$user->getPhoto('m').'"/>
<div class="postbubble">
<span class="name">'.
$this->colorSearch($form['search'], $user->getTrueName()).'
$user->getTrueName().'
</span>
<span class="asv">'.
$user->getAge().' '.
$gender[$user->getData('gender')].' '.
$marital[$user->getData('marital')].'
$gender[$user->gender].' '.
$marital[$user->marital].'
</span>
<div
class="content"
@ -79,11 +84,10 @@ class Explore extends WidgetCommon {
white-space: nowrap;
height: 1.5em;
"
>'.prepareString($user->getData('desc')).'</div>
>'.prepareString($user->desc).'</div>
</div>
</div>
</a>
</a>
</div>
';
}
@ -94,7 +98,7 @@ class Explore extends WidgetCommon {
{
?>
<div id="explore">
<form name="searchform" style="margin: 1em 1.5em;" onsubmit="event.preventDefault();">
<!--<form name="searchform" style="margin: 1em 1.5em;" onsubmit="event.preventDefault();">
<div class="element" style="min-height: 0em;">
<input
id="addjid"
@ -113,7 +117,7 @@ class Explore extends WidgetCommon {
<?php echo t('Search'); ?>
</a>
</div>
</form>
</form>-->
<div id="contactsresult">
<?php echo $this->prepareContacts(); ?>

2
system/Widget/widgets/Feed/Feed.php

@ -66,7 +66,7 @@ class Feed extends WidgetCommon {
}
function onPostPublished($post) {
$pd = new \modl\PostDAO();
$pd = new \modl\PostnDAO();
$pl = $pd->getFeed(-1, 10);
$html = $this->preparePosts($pl);

8
system/Widget/widgets/Vcard/Vcard.php

@ -76,9 +76,9 @@ class Vcard extends WidgetBase
$c->desc = trim($vcard['desc']);
if($vcard['public'] == 'true')
$c->public = 1;
\modl\Privacy::set($c->jid, 1);
else
$c->public = 0;
\modl\Privacy::set($c->jid, 0);
$cd = new modl\ContactDAO();
$cd->set($c);
@ -93,7 +93,7 @@ class Vcard extends WidgetBase
$cd = new \modl\ContactDAO();
$me = $cd->get($this->user->getLogin());
$submit = $this->genCallAjax('ajaxVcardSubmit', "movim_parse_form('vcard')");
if(!isset($me)) {
@ -277,7 +277,7 @@ class Vcard extends WidgetBase
$html .= '<fieldset>
<legend>'.t('Privacy Level').'</legend>';
if($me->public == '1')
if($me->value == 1)
$checked = 'checked="true"';
else
$checked = '';

2
themes/movim/explore.tpl

@ -16,7 +16,7 @@
</div>
<div id="center" class="protect black">
<h1><?php echo t('Explore'); ?></h1>
<?php //$this->widget('Explore');?>
<?php $this->widget('Explore');?>
</div>
</div>

Loading…
Cancel
Save