Resource icon

Extra Portal 1.2.4

No permission to download
Finally got it working. Had to use the "clear contents" widget to do it.

I found the option in Extra Portal Style-Settings :eek:

I'm still searching why the page is loading so slow. :oops:
Aaand I just noticed that the CODE EVENT
PHP:
load_class_route_prefix('SimplePortal_Route_public_Lpmanage', array)
is taking a while. Anything possible to speed it up?:cautious:
 
This is great product, very well coded, nice looking, functional, and easy to use and customize. Thank You very much for your great work.

Here are few small bugs I found which you may want to fix:

1. Wrong phrase name
TEMPLATE: el_portal_inline_mod_thread_promote
THIS: {xen:phrase promote}
--TO: {xen:phrase el_portal_promote}

2. Hardcoded phrase
TEMPLATE: el_portal_create_new
THIS: <h3 class="primaryContent">Thread</h3>
--TO: <h3 class="primaryContent">{xen:phrase thread}</h3>

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')
 
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')

Well in Extra Portal you can order the Items by portalitem-publish-date and thats the "display_order". Sorting by creation date makes only sense by automatic use in forums.
 
What I would like to see here is an option to promote posts to Portal. This would, however require custom titles for posts but will add nice feature to threads promotion too - ability to use custom titles.

Promote THREAD:

VXF3Mc1.png


Promote POST:

MooUreB.png


I'll be very thankfull if you can make this. Thanks in advance.
 
@Dan.. @NixFifty

I would love the ability to Auto Promote threads to a specific Category.. To allow Sticky threads scenario for the Portal..

i.e. in News Mode.. Auto promote to a category thats set at 10 so anything manually assigned to a Category set at 0 will appear above it..

and the ability to go to first unread post, when clicking comments would also be a very useful addition
 
Last edited:
Is it possible to add the categories to the portal top navigation?

I tried inserting this in the elportal_navbar template, but no result...

Code:
                    <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>
 
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;
     }
 }
 
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 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.
 
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.
I am sorry. I forgot responding you until now.

Okay, steps to reproduce:

  1. Go to search, "Search Threads and Posts".
  2. Enter a search query.
  3. Select "Display results as threads".
  4. Hit "Search".
You should now see this:
Screenshot 2016-12-19 21.38.13.webp

The bug occurs even when the value is false because of the following code in "XenForo_Model_Thread":
Code:
$thread['canInlineMod'] = (count($modOptions) > 0);

You have this code:
Code:
$parentReturn['promote'] = //both when true and false

Which even though it is false, still results in the count() being greater than 0. XenForo explicitly does this:
Code:
if (/* $viewingUser has permission to X */)
{
    $modOptions['somePermission'] = true;
}
Which only adds to the array if the user has permission. If he has not, it will not be added.
 
Last edited:
Glad to help. I use your portal on my website. It's nice and simple.

Do you plan on updating it for the flexible widget system and navigation of XF 2.0?
 
Top Bottom