Help Pages Wrapper Manager

Help Pages Wrapper Manager 1.2.3

No permission to download

cclaerhout

Well-known member
cclaerhout submitted a new resource:

Help Pages Wrapper Manager - Control your Help Pages structure

Help Pages Wrapper Manager

Addon presentation
This extension adds a layer to control your Help pages including the default ones. With it you can:
  • Set their display order
    With the XenForo default system you could already but not for the default ones: Bb Codes, Terms, Cookies, etc.
  • You can hide them globally or by usergroups
    They will be only hidden, with the direct url, they still can be accessed
  • You can make some of them...

Read more about this resource...
 
  • Like
Reactions: Xon
  • Like
Reactions: Xon
cclaerhout updated Help Pages Wrapper Manager with a new update entry:

Version 1.2.0 released

Version 1.2.0 released
Help pages can now embed posts using this code replacement:
Code:
{post:postId}

As you can see you need the postId. You can also delete some parts of the post. The deletion is working by lines. Ie:
Code:
{post=123, delete-firstlines:3, delete-lastlines:2}
The first three lines and the last two lines of the post 123 will be deleted.
You can also select to hide pictures&attachments:
{post=1, delete-firstlines:3, delete-lastlines:2, no-picture}

Read the rest of this update entry...
 
Hi @cclaerhout
I have an issue when clicking the add-on in the options menu;


Code:
An exception occurred: Invalid model 'Sedo_HelpWrapperManager_Model_GetUsergroups' specified in mysite//public/library/XenForo/Model.php on line 192

    XenForo_Model::create() in Sedo/HelpWrapperManager/Listener.php at line 110
    Sedo_HelpWrapperManager_Listener::helpWrapper_settings()
    call_user_func() in XenForo/ViewAdmin/Helper/Option.php at line 345
    XenForo_ViewAdmin_Helper_Option::_renderCallbackOptionHtml() in XenForo/ViewAdmin/Helper/Option.php at line 72
    XenForo_ViewAdmin_Helper_Option::renderPreparedOptionHtml() in XenForo/ViewAdmin/Helper/Option.php at line 33
    XenForo_ViewAdmin_Helper_Option::renderPreparedOptionsHtml() in XenForo/ViewAdmin/Option/ListOptions.php at line 30
    XenForo_ViewAdmin_Option_ListOptions->renderHtml() in XenForo/ViewRenderer/Abstract.php at line 227
    XenForo_ViewRenderer_Abstract->renderViewObject() in XenForo/ViewRenderer/HtmlAdmin.php at line 78
    XenForo_ViewRenderer_HtmlAdmin->renderView() in XenForo/FrontController.php at line 607
    XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
    XenForo_FrontController->run() in /home/nginx/domains/mysite.com/public/admin.php at line 13
Hope you can help?
Thank you. :)
 
Thanks for the update Cedric.
Just trying this out, when embedding posts as help pages videos render properly as embeds, but images just show as text inline:

View Attachment x

Is there any way to have them show as full size embedded images? :)
 
Is this add-on still being maintained? It was working fine with PHP 7.0.x, but I'm getting this error with PHP 7.1.0:
ErrorException: Illegal string offset 'hasChildren' - library/Sedo/HelpWrapperManager/Helper/Help.php:37
Generated By: Unknown Account, 47 minutes ago
Stack info:
#0 /library/Sedo/HelpWrapperManager/Helper/Help.php(37): XenForo_Application::handlePhpError(2, 'Illegal string ...', '/home/nginx/dom...', 37, Array)
#1 /library/Sedo/HelpWrapperManager/ViewPublic/Help/Index.php(16): Sedo_HelpWrapperManager_Helper_Help::manageHelpPages(Array)
#2 /library/XenForo/ViewRenderer/Abstract.php(227): Sedo_HelpWrapperManager_ViewPublic_Help_Index->renderHtml()
#3 /library/XenForo/ViewRenderer/HtmlPublic.php(71): XenForo_ViewRenderer_Abstract->renderViewObject('Sedo_HelpWrappe...', 'Html', Array, 'help_index')
#4 /library/XenForo/ViewRenderer/Abstract.php(249): XenForo_ViewRenderer_HtmlPublic->renderView('XenForo_ViewPub...', Array, 'help_index', NULL)
#5 /library/XenForo/ViewRenderer/HtmlPublic.php(68): XenForo_ViewRenderer_Abstract->renderSubView(Object(XenForo_ControllerResponse_View))
#6 /library/XenForo/FrontController.php(606): XenForo_ViewRenderer_HtmlPublic->renderView('XenForo_ViewPub...', Array, 'help_wrapper', Object(XenForo_ControllerResponse_View))
#7 /library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#8 /index.php(13): XenForo_FrontController->run()
#9 {main}
 
Is this add-on still being maintained?
Did you try to propose a fix on Github? I can look for it, but people can do it also. That's the idea of open source.
The problem is certainly that the pageData is not an array (a string) and php 7.1.0 now wants the variable to be declared as an array to add it values. I will push a fix on Github, but really for such an easy error, admins should give an help.

Edit: done (ref).
 
Last edited:
I guess the function in page.php is responsible for rendering a forum post in the help menu.
viewAttachments is set to true, but it only shows a text link to the attachment and no
thumbnail/image.

I think the answer is in this post:
https://xenforo.com/community/threads/unable-to-render-attachments.117519/#post-1076594

..but I don't know exactly how to adjust this and make it work.
Anyone want to take a look at this? (maybe @HeadHodge ?)

PHP:
$bbCodeParser = XenForo_BbCode_Parser::create(XenForo_BbCode_Formatter_Base::create('Base', array('view' => $this)));
                $bbCodeOptions = array(
                    'states' => array(
                        'viewAttachments' => true
                    ),
                    'contentType' => 'post',
                    'contentIdKey' => 'post_id'
                );

                if($trimFirstLines || $trimLastLines)
                {
                    $message = &$post['message'];
                  
                    if($trimFirstLines)
                    {
                        $message = preg_replace('#^(.*?\n){'.$trimFirstLines.'}#sui', '', $message);
                    }
                  
                    if($trimLastLines)
                    {
                        $messageByLines = explode("\n", $message);
                        $messageByLines = array_slice($messageByLines, 0, count($messageByLines)-$trimLastLines);
                        $message = implode("\n", $messageByLines);
                    }
                }

                if($noPicture)
                {
                    $message = preg_replace('#[\r\n]?\[(img|bimg|attach).*?\[/\1][\r\n]?#iu', '', $message);
                }

                $messageHtml = XenForo_ViewPublic_Helper_Message::getBbCodeWrapper($post, $bbCodeParser, $bbCodeOptions);
                $replace[] = $messageHtml;
 
Last edited:
Back
Top Bottom