there exist serval options/plugins:How can I remove the visitor panel on the portal?
Neither one of those work to remove it.here exist serval options/plugins:
AndyB's Plugin https://xenforo.com/community/resources/remove-visitor-panel.3281/
Or you use the Widget Framework: https://xenforo.com/community/resources/bd-widget-framework.297/
Finally got it working. Had to use the "clear contents" widget to do it.there exist serval options/plugins:
Finally got it working. Had to use the "clear contents" widget to do it.
load_class_route_prefix('SimplePortal_Route_public_Lpmanage', array)
3. We should sort items by thread creation date
FILE: PortalItem.php
THIS: public function prepareItemOrderOptions(array &$fetchOptions, $defaultOrderSql = 'portalItem.display_order')
--TO: public function prepareItemOrderOptions(array &$fetchOptions, $defaultOrderSql = 'portalItem.content_id DESC')
Is it possible to add the categories to the portal top navigation?
<xen:foreach loop="$categories" value="$category">
<li>
<a href="{xen:link portal/categories, $category}"
class="{xen:if "{$current_category.category_id} == {$category.category_id}",
'selected', ''}">{$category.title}</a>
{$category.item_count}
</li>
</xen:foreach>
diff --git a/addons/library/SimplePortal/Extend/Model/Thread.php b/addons/library/SimplePortal/Extend/Model/Thread.php
index 1aea9b7..4790a59 100644
--- a/addons/library/SimplePortal/Extend/Model/Thread.php
+++ b/addons/library/SimplePortal/Extend/Model/Thread.php
@@ -11,7 +11,12 @@ class SimplePortal_Extend_Model_Thread extends
public function addInlineModOptionToThread(array &$thread, array $forum, array $nodePermissions = null, array $viewingUser = null)
{
$parentReturn = parent::addInlineModOptionToThread($thread, $forum, $nodePermissions, $viewingUser);
- $parentReturn['promote'] = SimplePortal_Static::getItemModel()->canPromoteItem('thread', $thread);
+ // Bug fix by Ralle to prevent inline moderation tools from showing up when not a moderator
+ if (SimplePortal_Static::getItemModel()->canPromoteItem('thread', $thread))
+ {
+ $parentReturn['promote'] = true;
+ }
+ // End fix
return $parentReturn;
}
}
When this addon is enabled, Thread Moderation is visible for all users when searching.
This is because of the file 'SimplePortal_Extend_Model_Thread. I have made the following patch:
Code:diff --git a/addons/library/SimplePortal/Extend/Model/Thread.php b/addons/library/SimplePortal/Extend/Model/Thread.php index 1aea9b7..4790a59 100644 --- a/addons/library/SimplePortal/Extend/Model/Thread.php +++ b/addons/library/SimplePortal/Extend/Model/Thread.php @@ -11,7 +11,12 @@ class SimplePortal_Extend_Model_Thread extends public function addInlineModOptionToThread(array &$thread, array $forum, array $nodePermissions = null, array $viewingUser = null) { $parentReturn = parent::addInlineModOptionToThread($thread, $forum, $nodePermissions, $viewingUser); - $parentReturn['promote'] = SimplePortal_Static::getItemModel()->canPromoteItem('thread', $thread); + // Bug fix by Ralle to prevent inline moderation tools from showing up when not a moderator + if (SimplePortal_Static::getItemModel()->canPromoteItem('thread', $thread)) + { + $parentReturn['promote'] = true; + } + // End fix return $parentReturn; } }
I am sorry. I forgot responding you until now.I can't see Thread Moderation when logged in as non-admin member. Can you please elaborate, don't want my users to see Thread Moderation.
$thread['canInlineMod'] = (count($modOptions) > 0);
$parentReturn['promote'] = //both when true and false
if (/* $viewingUser has permission to X */)
{
$modOptions['somePermission'] = true;
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.