'.$title.'
@@ -66,9 +85,7 @@ class WidgetCommon extends WidgetBase {
'.prepareDate(strtotime($post->published)).'
- '.prepareString(html_entity_decode($post->content)).'
-
-
+ '.$content.'
'.$comments.'
'.$place.'
@@ -179,7 +196,7 @@ class WidgetCommon extends WidgetBase {
else
return false;
}
-
+ /*
protected function preparePost($message, $comments = false) {
$tmp = '
';
@@ -352,7 +369,7 @@ class WidgetCommon extends WidgetBase {
}
return $tmp;
- }
+ }*/
protected function prepareComments($comments) {
$tmp = false;
@@ -490,6 +507,22 @@ class WidgetCommon extends WidgetBase {
RPC::commit();
}
+ function ajaxPostFold($nodeid) {
+ $pd = new \modl\PostDAO();
+ $p = $pd->get($nodeid);
+
+ $public = $p->public;
+
+ if($public == 0) {
+ $p->public = 2;
+ $pd->set($p);
+ } elseif($public != 0) {
+ $p->public = 0;
+ $pd->set($p);
+ }
+
+ }
+
function onPostDelete($id) {
RPC::call('movim_delete', $id);
}
diff --git a/system/Widget/widgets/Config/Config.php b/system/Widget/widgets/Config/Config.php
index 494add27b..d9dc1b47e 100644
--- a/system/Widget/widgets/Config/Config.php
+++ b/system/Widget/widgets/Config/Config.php
@@ -59,7 +59,7 @@ class Config extends WidgetBase
$submit = $this->genCallAjax('ajaxSubmit', "movim_parse_form('general')")
. "this.className='button icon loading'; setTimeout(function() {location.reload(false)}, 2000);";
?>
-
diff --git a/system/Widget/widgets/ConfigData/ConfigData.php b/system/Widget/widgets/ConfigData/ConfigData.php
new file mode 100644
index 000000000..805274a38
--- /dev/null
+++ b/system/Widget/widgets/ConfigData/ConfigData.php
@@ -0,0 +1,104 @@
+
+ *
+ * @version 1.0
+ * @date 28 October 2010
+ *
+ * Copyright (C)2010 MOVIM project
+ *
+ * See COPYING for licensing information.
+ */
+
+class ConfigData extends WidgetBase
+{
+ function WidgetLoad()
+ {
+ $this->addcss('configdata.css');
+ }
+
+ function ajaxClearRosterLink() {
+ $rd = new \modl\RosterLinkDAO();
+ $rd->clearRosterLink();
+
+ $this->refresh();
+ }
+
+ function ajaxClearMessage() {
+ $md = new \modl\MessageDAO();
+ $md->clearMessage();
+
+ $this->refresh();
+ }
+
+ function ajaxClearPost() {
+ $pd = new \modl\PostDAO();
+ $pd->clearPost();
+
+ $this->refresh();
+ }
+
+ function refresh() {
+ $html = $this->prepareConfigData();
+ RPC::call('movim_fill', 'configdata', RPC::cdata($html));
+ RPC::commit();
+ }
+
+ function prepareConfigData() {
+ $cd = new \modl\ContactDAO();
+ $stats = $cd->getStatistics();
+
+ $clearrosterlink = $this->genCallAjax('ajaxClearRosterLink');
+ $clearmessage = $this->genCallAjax('ajaxClearMessage');
+ $clearpost = $this->genCallAjax('ajaxClearPost');
+
+ $html = '
+
';
+ return $html;
+ }
+
+ function build()
+ {
+ ?>
+
+ prepareConfigData(); ?>
+
+ registerEvent('comment', 'onComment');
$this->registerEvent('nocomment', 'onNoComment');
$this->registerEvent('nocommentstream', 'onNoCommentStream');
+ $this->registerEvent('commentpublisherror', 'onCommentPublishError');
$this->registerEvent('stream', 'onStream');
$this->registerEvent('postpublished', 'onPostPublished');
@@ -57,6 +58,14 @@ class Feed extends WidgetCommon {
RPC::call('movim_fill', 'feednotifs', RPC::cdata($html));
RPC::commit();
}
+
+ function onCommentPublishError() {
+ $html =
+ '
'.
+ t("Comment publication error").'
+
';
+ RPC::call('movim_fill', 'feednotifs', RPC::cdata($html));
+ }
function onPostPublished($post) {
$pd = new \modl\PostDAO();
@@ -200,7 +209,6 @@ class Feed extends WidgetCommon {
t("Your feed cannot be loaded.").'
';
RPC::call('movim_fill', 'feedcontent', RPC::cdata($html));
- RPC::commit();
}
function ajaxPublishItem($content)
diff --git a/system/Widget/widgets/Login/Login.php b/system/Widget/widgets/Login/Login.php
index b2ef03170..95b9c39fc 100644
--- a/system/Widget/widgets/Login/Login.php
+++ b/system/Widget/widgets/Login/Login.php
@@ -119,6 +119,11 @@ class Login extends WidgetBase {
'.t('Your XMPP server is unauthorized').'
';
+ case 'mecerror':
+ $warning = '
+
+ '.t('The server takes too much time to repond').'
+
';
break;
}
diff --git a/system/Widget/widgets/Logout/Logout.php b/system/Widget/widgets/Logout/Logout.php
index 937db5692..f14fc02c6 100644
--- a/system/Widget/widgets/Logout/Logout.php
+++ b/system/Widget/widgets/Logout/Logout.php
@@ -32,6 +32,7 @@ class Logout extends WidgetBase
{
$html = $this->preparePresence();
RPC::call('movim_fill', 'logout', RPC::cdata($html));
+ RPC::commit();
}
function onPostDisconnect($data)
diff --git a/system/Widget/widgets/Roster/Roster.php b/system/Widget/widgets/Roster/Roster.php
index 41dc608e7..2196389a6 100644
--- a/system/Widget/widgets/Roster/Roster.php
+++ b/system/Widget/widgets/Roster/Roster.php
@@ -198,12 +198,12 @@ class Roster extends WidgetBase
*/
function prepareRoster()
{
- $contactdao = new modl\ContactDAO();
+ $contactdao = new \modl\ContactDAO();
$contacts = $contactdao->getRoster();
$html = '';
- $rd = new modl\RosterLinkDAO();
+ $rd = new \modl\RosterLinkDAO();
$capsdao = new modl\CapsDAO();
$caps = $capsdao->getAll();
diff --git a/themes/movim/config.tpl b/themes/movim/config.tpl
index e0f73c3b6..f1fa239fe 100644
--- a/themes/movim/config.tpl
+++ b/themes/movim/config.tpl
@@ -14,13 +14,12 @@