Help Pages Wrapper Manager

Help Pages Wrapper Manager 1.2.3

No permission to download
Thanks , that didn't seem to work as I have more errors than just line 37:

An exception occurred: syntax error, unexpected 'if' (T_IF) in /home/xxe64uwuyua6/public_html/library/Sedo/HelpWrapperManager/Helper/Help.php on line 38
  1. XenForo_Autoloader->autoload()
  2. spl_autoload_call() in Sedo/HelpWrapperManager/ViewPublic/Help/Index.php at line 16
  3. Sedo_HelpWrapperManager_ViewPublic_Help_Index->renderHtml() in XenForo/ViewRenderer/Abstract.php at line 229
  4. XenForo_ViewRenderer_Abstract->renderViewObject() in XenForo/ViewRenderer/HtmlPublic.php at line 71
  5. XenForo_ViewRenderer_HtmlPublic->renderView() in XenForo/ViewRenderer/Abstract.php at line 251
  6. XenForo_ViewRenderer_Abstract->renderSubView() in XenForo/ViewRenderer/HtmlPublic.php at line 68
  7. XenForo_ViewRenderer_HtmlPublic->renderView() in XenForo/FrontController.php at line 606
  8. XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
  9. XenForo_FrontController->run() in /home/xxe64uwuyua6/public_html/index.php at line 13
If anyone can help me resolve this I'd appreciate it. Otherwise, I may need to disable the HelpWrapper unfortunately.
 
Unexpected 'if'? That's odd. AFAIK, it would generally output such error if the previous line wasn't properly closed (with ;) or something along that line.
Have you compared the entire file with the one in the git repository? There should be a button somewhere at the top right of the code preview to view the full file or something.
Also make sure you didn't write the plus signs (+) at the beginning of each lines. Those were merely indicators to describe that the lines were "added" in that particular git commit.
 
Oh well. It's been months since the last time I used the add-on, and previously that patch would work just fine so I'm not really sure.
 
All I can say is it should work with PHP 7.1 and XF 1.5.15a. Works over here with the small update from github.
You could post the complete help.php you are using so we can take a look?
 
Thanks. I enabled it just to get the code -this is without the previous patch:

<xen:require css="help_wrapper.css" />
<xen:edithint template="navigation_sidebar.css" />

<div class="container">
<div class="navigationSideBar ToggleTriggerAnchor">
<h4 class="heading ToggleTrigger" data-target="> ul">{xen:phrase help} <span></span></h4>
<ul data-toggle-class="menuVisible">
<li class="section">
<ul>
<xen:hook name="help_sidebar_links">
<li><a href="{xen:link help/smilies}" class="{xen:if "{$selected} == 'smilies'", 'secondaryContent', 'primaryContent'}">{xen:phrase smilies}</a></li>
<!-- slot: pre_bb_codes -->
<li><a href="{xen:link help/bb-codes}" class="{xen:if "{$selected} == 'bbCodes'", 'secondaryContent', 'primaryContent'}">{xen:phrase bb_codes}</a></li>
<!-- slot: pre_trophies -->
<xen:if is="{$xenOptions.enableTrophies}">
<li><a href="{xen:link help/trophies}" class="{xen:if "{$selected} == 'trophies'", 'secondaryContent', 'primaryContent'}">{xen:phrase trophies}</a></li>
</xen:if>
<!-- slot: pre_cookies -->
<li><a href="{xen:link help/cookies}" class="{xen:if "{$selected} == 'cookies'", 'secondaryContent', 'primaryContent'}">{xen:phrase cookie_usage}</a></li>
<!-- slot: pre_tos_url -->
<xen:if is="{$tosUrl}">
<li><a href="{$tosUrl}" class="{xen:if "{$selected} == 'terms'", 'secondaryContent', 'primaryContent'}">{xen:phrase terms_and_rules}</a></li>
</xen:if>
</xen:hook>
<xen:foreach loop="$pages" value="$page">
<li><a href="{xen:link help, $page}" class="{xen:if "{$selected} == {$page.page_name}", 'secondaryContent', 'primaryContent'}">{$page.title}</a></li>
</xen:foreach>
</ul>
</li>
</ul>
</div>

<div class="mainContentBlock section sectionMain">{xen:raw $_subView}</div>
</div>


Furthermore, this is error from the forum page:

An exception occurred: syntax error, unexpected 'if' (T_IF) in /home/xxe64uwuyua6/public_html/library/Sedo/HelpWrapperManager/Helper/Help.php on line 38
  1. XenForo_Autoloader->autoload()
  2. spl_autoload_call() in Sedo/HelpWrapperManager/ViewPublic/Help/Index.php at line 16
  3. Sedo_HelpWrapperManager_ViewPublic_Help_Index->renderHtml() in XenForo/ViewRenderer/Abstract.php at line 229
  4. XenForo_ViewRenderer_Abstract->renderViewObject() in XenForo/ViewRenderer/HtmlPublic.php at line 71
  5. XenForo_ViewRenderer_HtmlPublic->renderView() in XenForo/ViewRenderer/Abstract.php at line 251
  6. XenForo_ViewRenderer_Abstract->renderSubView() in XenForo/ViewRenderer/HtmlPublic.php at line 68
  7. XenForo_ViewRenderer_HtmlPublic->renderView() in XenForo/FrontController.php at line 606
  8. XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
  9. XenForo_FrontController->run() in /home/xxe64uwuyua6/public_html/index.php at line 13
 
And finally from server log:

Error Info ParseError: syntax error, unexpected 'if' (T_IF) - library/Sedo/HelpWrapperManager/Helper/Help.php:38
Generated By: Steven Glassman, 3 minutes ago
Stack Trace #0 [internal function]: XenForo_Autoloader->autoload('Sedo_HelpWrappe...') #1 /home/xxe64uwuyua6/public_html/library/Sedo/HelpWrapperManager/ViewPublic/Help/Index.php(16): spl_autoload_call('Sedo_HelpWrappe...') #2 /home/xxe64uwuyua6/public_html/library/XenForo/ViewRenderer/Abstract.php(229): Sedo_HelpWrapperManager_ViewPublic_Help_Index->renderHtml() #3 /home/xxe64uwuyua6/public_html/library/XenForo/ViewRenderer/HtmlPublic.php(71): XenForo_ViewRenderer_Abstract->renderViewObject('Sedo_HelpWrappe...', 'Html', Array, 'help_index') #4 /home/xxe64uwuyua6/public_html/library/XenForo/ViewRenderer/Abstract.php(251): XenForo_ViewRenderer_HtmlPublic->renderView('XenForo_ViewPub...', Array, 'help_index', NULL) #5 /home/xxe64uwuyua6/public_html/library/XenForo/ViewRenderer/HtmlPublic.php(68): XenForo_ViewRenderer_Abstract->renderSubView(Object(XenForo_ControllerResponse_View)) #6 /home/xxe64uwuyua6/public_html/library/XenForo/FrontController.php(606): XenForo_ViewRenderer_HtmlPublic->renderView('XenForo_ViewPub...', Array, 'help_wrapper', Object(XenForo_ControllerResponse_View)) #7 /home/xxe64uwuyua6/public_html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array) #8 /home/xxe64uwuyua6/public_html/index.php(13): XenForo_FrontController->run() #9 {main}Request State array(3) { ["url"] => string(26) "http://pcskiclub.com/help/" ["_GET"] => array(0) { } ["_POST"] => array(0) { } }
 
No, that is not the right file. You have posted a template.

You installed the addon and then applied this patch right?
Because the error is in ibrary/Sedo/HelpWrapperManager/Helper/Help.php (that is the file you patched), you should post it here.
Or at least the first 50 lines of it.

ps: use [ CODE ] ... [ /CODE ] if you place code in your message.
 
Thanks. I must be missing one character or so that I can't spot. Here is the code:

Code:
<?php
class Sedo_HelpWrapperManager_Helper_Help
{
    public static function manageHelpPages(array $pagesSource)
    {
        $xenPages = array('smilies' => '', 'bbCodes' => array(), 'trophies' => array(), 'cookies' => array(), 'terms' => array());
        $reorderedPages = array();

        $settings = XenForo_Application::get('options')->get('sedo_helpwrapper_settings');
        $visitor = XenForo_Visitor::getInstance();
        $visitorUserGroupIds = array_merge(array((string)$visitor['user_group_id']), (explode(',', $visitor['secondary_group_ids'])));
        $childrenRef = array();
        $alwaysHidden = array();
        
        foreach($settings as $pageId => $pageSettings)
        {
            if(!isset($xenPages[$pageId]) && !isset($pagesSource[$pageId]))
            {
                continue;
            }

            if(!empty($pageSettings['alwaysHidden']))
            {
                $alwaysHidden[$pageId] = $pageSettings;
                continue;
            }

            if(!empty($pageSettings['disableUsergroups']))
            {
                if(!array_intersect($visitorUserGroupIds, $pageSettings['disableUsergroups']))
                {
                    continue;
                }
            }
            
            $pageData = (isset($xenPages[$pageId])) ? $xenPages[$pageId] : $pagesSource[$pageId];
            
            if(!is_array($pageData))
            {
                $pageData = array();
            }
            
                //The parent page might be hidden
                $alwaysHidden[$pageId] = $pageData;
                continue;
            }

            if($pageData['isChild'] && isset($reorderedPages[$pageData['parentId']]))
            {
                $reorderedPages[$pageData['parentId']]['hasChildren'][$pageId] = $pageData;
                $childrenRef[$pageId] = $pageData;
                continue;        
            }

            $reorderedPages[$pageId] = $pageData;
        }

        $catchupNewpages = array_diff_key($pagesSource, $reorderedPages+$childrenRef);
        $catchupNewpages = array_diff_key($catchupNewpages, $alwaysHidden);
        
        if($catchupNewpages)
        {
            $reorderedPages+=$catchupNewpages;
        }

        return $reorderedPages;
    }
}
//Zend_Debug::dump($parent);
 
You didn't apply the patch correctly. It is missing some of the original code now.
You should only add those lines from the patch, not replace.
 
Top Bottom