From 496782e468fa206845b0baca8e91fb3a7d4278d4 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 11 May 2012 03:41:29 -0700 Subject: [PATCH] moderated comment templates --- boot.php | 4 ++ include/plugin.php | 11 ++++ view/head.tpl | 2 + view/moderated_comment.tpl | 34 +++++++++++ view/theme/duepuntozero/moderated_comment.tpl | 61 +++++++++++++++++++ 5 files changed, 112 insertions(+) create mode 100644 view/moderated_comment.tpl create mode 100755 view/theme/duepuntozero/moderated_comment.tpl diff --git a/boot.php b/boot.php index 6e3f8c0b5..dd4e31d4f 100644 --- a/boot.php +++ b/boot.php @@ -123,6 +123,8 @@ define ( 'NETWORK_XMPP', 'xmpp'); // XMPP define ( 'NETWORK_MYSPACE', 'mysp'); // MySpace define ( 'NETWORK_GPLUS', 'goog'); // Google+ +define ( 'NETWORK_PHANTOM', 'unkn'); // Place holder + /** * These numbers are used in stored permissions * and existing allocations MUST NEVER BE CHANGED @@ -142,6 +144,8 @@ $netgroup_ids = array( NETWORK_XMPP => (-10), NETWORK_MYSPACE => (-11), NETWORK_GPLUS => (-12), + + NETWORK_PHANTOM => (-127), ); diff --git a/include/plugin.php b/include/plugin.php index 4ff78a8b4..ae8eee78a 100644 --- a/include/plugin.php +++ b/include/plugin.php @@ -70,8 +70,10 @@ function reload_plugins() { $installed = array(); $parr = explode(',',$plugins); + if(count($parr)) { foreach($parr as $pl) { + $pl = trim($pl); $fname = 'addon/' . $pl . '/' . $pl . '.php'; @@ -101,6 +103,7 @@ function reload_plugins() { } } } + }} @@ -163,6 +166,14 @@ function call_hooks($name, &$data = null) { $func = $hook[HOOK_FUNCTION]; $func($a,$data); } + else { + // remove orphan hooks + q("delete from hook where hook = '%s' and file = '$s' and function = '%s' limit 1", + dbesc($hook[HOOK_HOOK]), + dbesc($hook[HOOK_FILE]), + dbesc($hook[HOOK_FUNCTION]) + ); + } } } } diff --git a/view/head.tpl b/view/head.tpl index 7638e56ca..dfb626ebc 100644 --- a/view/head.tpl +++ b/view/head.tpl @@ -36,6 +36,7 @@ obj.value = ''; $("#comment-edit-text-" + id).addClass("comment-edit-text-full"); $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty"); + $("#mod-cmnt-wrap-" + id).show(); openMenu("comment-edit-submit-wrapper-" + id); } } @@ -44,6 +45,7 @@ obj.value = '$comment'; $("#comment-edit-text-" + id).removeClass("comment-edit-text-full"); $("#comment-edit-text-" + id).addClass("comment-edit-text-empty"); + $("#mod-cmnt-wrap-" + id).hide(); closeMenu("comment-edit-submit-wrapper-" + id); } } diff --git a/view/moderated_comment.tpl b/view/moderated_comment.tpl new file mode 100644 index 000000000..911c35f33 --- /dev/null +++ b/view/moderated_comment.tpl @@ -0,0 +1,34 @@ +
+
+ + + + + + + +
+ $mytitle +
+
+ + + +
+ + +
+
+ +
diff --git a/view/theme/duepuntozero/moderated_comment.tpl b/view/theme/duepuntozero/moderated_comment.tpl new file mode 100755 index 000000000..b0451c8c6 --- /dev/null +++ b/view/theme/duepuntozero/moderated_comment.tpl @@ -0,0 +1,61 @@ +
+
+ + + + + + + +
+ $mytitle +
+
+ +
    +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
+
+ + +
+ + +
+
+ +