[TH] Library [Deleted]

Do these have a discussion thread attached like the RM?
Yes, but it does it in a really awful way so it was removed as a core feature. To add it back, you have to have Custom Fields installed and then you need to import the custom thread field that is included in the zip folder: field-waindigo_select_library.xml.
 
I tried to use the variable $articlePage.user to try and get custom user fields from user's contact page but didn't work. What other variable can I use within library to access user custom fields (not your addon custom fields)
 
I tried to use the variable $articlePage.user to try and get custom user fields from user's contact page but didn't work. What other variable can I use within library to access user custom fields (not your addon custom fields)
There is no such variable.
 
Can you suggest me a way to get $user into waindigo_article_container_library.
In library/Waindigo/Library/ControllerPublic/Article.php replace line 71:
PHP:
       $articlePage['user'] = $userModel->getUserById($articlePage['user_id']);
with:
PHP:
        $articlePage['user'] = $userModel->prepareUser($userModel->getUserById($articlePage['user_id']),
            array(
                'join' => XenForo_Model_User::FETCH_USER_PROFILE
            ));
 
Last edited:
In library/Waindigo/Library/ControllerPublic/Article.php replace line 71:
PHP:
       $articlePage['user'] = $userModel->getUserById($articlePage['user_id']);
with:
PHP:
        $articlePage['user'] = $userModel->prepareUser($userModel->getUserById($articlePage['user_id']),
            array(
                'join' => XenForo_Model_User::FETCH_USER_PROFILE
            ));
Used it still no luck in getting $user.aboutHtml to display

customFields array has nothing in it
{xen:helper dump, $articlePage.user.customFields}

result
array(0) { }
 
Last edited:
Used it still no luck in getting $user.aboutHtml to display

customFields array has nothing in it
{xen:helper dump, $articlePage.user.customFields}

result
array(0) { }
There's a typo in Waindigo's code.
Try this instead:
PHP:
        $articlePage['user'] = $userModel->prepareUser($userModel->getUserById($articlePage['user_id'],
            array(
                'join' => XenForo_Model_User::FETCH_USER_PROFILE
            )));
 
Can Library be integrated into RSS feed? Also think comments from hotspot should be included in library too.
 
Last edited:
With rebuild cash:

enForo_Exception: Invalid cache builder Library specified. - library/XenForo/CacheRebuilder/Abstract.php:110
Сгенерирована пользователем: админ, 2 мин. назад

stack:

#0 /home/s/sm42/forum.agniyoga.ru/public_html/library/XenForo/ControllerHelper/CacheRebuild.php(54): XenForo_CacheRebuilder_Abstract::getCacheRebuilder('Library')
#1 /home/s/sm42/forum.agniyoga.ru/public_html/library/XenForo/ControllerAdmin/Tools.php(82): XenForo_ControllerHelper_CacheRebuild->rebuildCache(Array, 'http://forum.ag...', 'admin.php?tools...', false)
#2 /home/s/sm42/forum.agniyoga.ru/public_html/library/XenForo/FrontController.php(337): XenForo_ControllerAdmin_Tools->actionCacheRebuild()
#3 /home/s/sm42/forum.agniyoga.ru/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#4 /home/s/sm42/forum.agniyoga.ru/public_html/admin.php(13): XenForo_FrontController->run()
#5 {main}

query:

array(3) {
["url"] => string(54) "http://forum.agniyoga.ru/admin.php?tools/cache-rebuild"
["_GET"] => array(1) {
["tools/cache-rebuild"] => string(0) ""
}
["_POST"] => array(3) {
["options"] => array(1) {
["batch"] => string(3) "250"
}
["cache"] => string(7) "Library"
["_xfToken"] => string(8) "********"
}
}
 
Top Bottom