[8WR] XenPorta (Portal)

[8WR] XenPorta (Portal) 1.6.0

No permission to download
I'm attaching an updated RecentThreads.php file that eliminates unnecessary queries if you use the RecentThreads block with XenPorta.

Note: We've only tested it with XenForo 1.3

Instructions (again, only been tested with XF 1.3):
1. Make a backup copy of <xenforo install folder>/library/EWRporta/Block/RecentThreads.php
2. Extract the attached ZIP and copy the RecentThreads.php in the zip to <xenforo install folder>/library/EWRporta/Block/, overwriting the existing RecentThreads.php


Details


We use XenPorta's RecentThreads block on our site to show the last xx updated threads. We noticed a huge amount of added queries that this block was adding to the query count, compared to what XF's built in "New Posts" was adding. We found the issue and fixed it. Our front page queries have dropped equal to the number of threads we have set RecentThreads to show (eg. RecentThreads set to show 20 threads, queries dropped by 20 with this file).

Turns out the original RecentThreads.php included XenPorta 1.6 was calling the canViewThreadAndContainer function (which verifies whether the visitor can view a thread) without specifying the node permissions, which made that function call getContentPermissionsForItem down the stack, forcing an additional query. This was happening for each thread processed in the main RecentThreads loop. Fortunately one of the columns included with the main thread query is 'node_permission_cache', which gives us the permissions to pass to canViewThreadAndContainer, eliminating the need for that extra query per thread.

I'm guessing the ability to pass permissions to canViewThreadAndContainer may not have been implemented in XenForo when @Jaxel originally wrote this add-on, otherwise he would have implemented it at the time, so this is a just a little housekeeping to the file.

See this post for how to enable debug mode just for your IP, and check your query count (bottom of the each page, once you enable debug mode).
 

Attachments

An exception occurred: Mysqli statement execute error : Incorrect arguments to mysqld_stmt_execute in /library/Zend/Db/Statement/Mysqli.php on line 214

PHP:
   Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
    Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
    Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 734
    Zend_Db_Adapter_Abstract->fetchAll() in EWRporta/Block/RecentNews.php at line 38
    EWRporta_Block_RecentNews->getModule() in EWRporta/Model/Blocks.php at line 116
    EWRporta_Model_Blocks->getBlockParams() in EWRporta/ViewPublic/Custom.php at line 71
    EWRporta_ViewPublic_Custom->renderHtml() in XenForo/ViewRenderer/Abstract.php at line 227
    XenForo_ViewRenderer_Abstract->renderViewObject() in XenForo/ViewRenderer/HtmlPublic.php at line 67
    XenForo_ViewRenderer_HtmlPublic->renderView() in XenForo/FrontController.php at line 572
    XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
    XenForo_FrontController->run() in /community/index.php at line 13

This is never fun :(
 
Hello,

Is it possible to add a blank page block? I'd like to add some text and a few youtube videos with html codes above the Recent News. Can anyone help me?
 
For some reason the lower part of the date on the Recent News post is transparent. The theme I am using is UI.X.
Any way to fix this?
Screen%20Shot%202014-04-18%20at%209.52.18%20AM.png
 
Is there a way to ignore the bbcodes from the snippet which shows on the portal home. The big images and rediculous formatting makes the snippet look weird and amateur.
 
Jaxel doesn't seem to care about this addon since he got money to do a new one. Makes me leery to purchase the new version whenever it's done.
 
PLEASE SOMEONE HELP (sorry for all cap, but third attempt for help :cry:)

How do I make it so that only threads promoted from certain forums are put into article view while when threads from certain other forums are promoted they don't get put into article view.

I've tried enabling "Forum" in "Globalized Custom Layouts" and creating a custom layout for certain forums but they don't seem to have an effect.
 
That cured a part of the problem. It is still loading the attached images in full size. :(
Thanks for the tip though.

Seems I will have to keep waiting for a better portal for now. :sleep:

Dig around in that recent news block... message_user_info.css - has image controls.
 
yes it works fine for 1.3.1 the only bug i see so far is the recent news thread is add this to your extra css.

.recentNews .sectionFooter
{
padding: 0px 10px;
overflow: visible;
}

you may have to change it to
.recentNews .sectionFooter
{
overflow: visible;
}

depending on your style that fixes the facebook bug not poping out like it should this fix ix credited to @Russ anymore questions feel free to ask.
 
Top Bottom