CTA Featured Threads & Portal

CTA Featured Threads & Portal [Paid] 2.17.0

No permission to buy (£40.00)
Filter on 'cta_' and look for any modified templates with the word 'navigation' in them.

If there are none then I wouldn't know what you have done to remove the links.
 
@Mr Lucky can you test this fix for the problem you reported.

In library/CTA/featuredthreads/ControllerPublic/account.php, replace the bottom actionPreferencesSave function with this:
PHP:
    public function actionPreferencesSave()
    {
        $parent = parent::actionPreferencesSave();

        if ($parent instanceof XenForo_ControllerResponse_Redirect)
        {
            if ($this->_input->filterSingle('restore_featured_threads', XenForo_Input::BOOLEAN))
            {
                $this->getModelFromCache('CTA_FeaturedThreads_Model_Featured')->undismissFeaturedThreadsForUser();
                XenForo_Application::getSession()->set('dismissedFeaturedThreads', false);
            }          
        }
      
        return $parent;
    }

Let me know if that resolves it and I will patch the 2.16.1 release.
 


yes, solved that issue but caused this: (clash with Widget framework?)

[CODE]ErrorException: Undefined variable: forum - library/WidgetFramework/WidgetRenderer.php(482) : runtime-created function:1
Generated By: Pete Thomas, A moment ago
Stack Trace

#0 /home/caftest/public_html/library/WidgetFramework/WidgetRenderer.php(482) : runtime-created function(1): XenForo_Application::handlePhpError(8, 'Undefined varia...', '/home/caftest/p...', 1, Array)
#1 [internal function]: __lambda_func(Array)
#2 /home/caftest/public_html/library/WidgetFramework/WidgetRenderer.php(486): call_user_func('\x00lambda_2', Array)
#3 /home/caftest/public_html/library/WidgetFramework/WidgetRenderer.php(572): WidgetFramework_WidgetRenderer->_executeExpression('$forum['node_id...', Array)
#4 /home/caftest/public_html/library/WidgetFramework/Core.php(396): WidgetFramework_WidgetRenderer->render(Array, 'cta_featuredthr...', Array, Object(XenForo_Template_Public), '')
#5 /home/caftest/public_html/library/WidgetFramework/Core.php(313): WidgetFramework_Core->_renderWidgetsFor('cta_featuredthr...', Array, Object(XenForo_Template_Public), '\n\t\t\n\n\t\t\n\n\t\t\n\t\t\t...')
#6 /home/caftest/public_html/library/WidgetFramework/Listener.php(126): WidgetFramework_Core->renderWidgetsFor('cta_featuredthr...', Array, Object(XenForo_Template_Public), Array)
#7 [internal function]: WidgetFramework_Listener::template_post_render('cta_featuredthr...', '\n\n\n\t\n\n\t\n\n\t\n\n\n\n\t...', Array, Object(XenForo_Template_Public))
#8 /home/caftest/public_html/library/XenForo/CodeEvent.php(58): call_user_func_array(Array, Array)
#9 /home/caftest/public_html/library/XenForo/Template/Abstract.php(195): XenForo_CodeEvent::fire('template_post_r...', Array, 'cta_featuredthr...')
#10 /home/caftest/public_html/library/XenForo/Template/Public.php(110): XenForo_Template_Abstract->render()
#11 /home/caftest/public_html/library/XenForo/ViewRenderer/HtmlPublic.php(123): XenForo_Template_Public->render()
#12 /home/caftest/public_html/library/XenForo/FrontController.php(637): XenForo_ViewRenderer_HtmlPublic->renderContainer(Object(XenForo_Template_Public), Array)
#13 /home/caftest/public_html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#14 /home/caftest/public_html/index.php(13): XenForo_FrontController->run()
#15 {main}

Request State

array(3) {
["url"] => string(30) "http://test.cafesaxophone.com/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}[/CODE]
 
I installed this add-on with ease and it works great out of the box. Duh everyone knows it rocks. Anyways I'm wondering if anyone has adapted the add-on to display an avatar/image in the narrow responsive view? Is this possible? Anyone have a method that looks good? I have a lot of threads that have been automatically featured and on wider views looks great with a complimenting avatar/image. But on mobile it looks boring with pages and pages of text. I'm looking to get those users that don't like reading so much to read a thing or two!
 
You can show the avatar in the narrow responsive view by editing the various _list_item templates and removing the highlighted class:

upload_2015-11-5_20-36-22.webp
 
I commented out both of those entire div lines in cta_featuredthreads_featured_list_item
The avatar showed on narrow but it was in the box by itself above all of the other featured content of the thread.
 
I am certain I'm not communicating this clearly. Here is the code from above mentioned template. You said various templates, did I need to apply to more?

Code:
<xen:if is="{$featuredThread.avatar_icon} == 2">
               
                    <!-- <div class="hiddenResponsiveNarrow {xen:if "{$xenOptions.ctaFtIcon.enabled} AND ({$featuredThread.featured_icon_date} OR ({$featuredThread.default_icon} == 1 AND @ctaFtDefaultIconPath))", 'ctaFtIconPage ctaFtIconRightPage', 'ctaFtAvatarPage ctaFtAvatarRightPage'}">
                -->
                <xen:else />
                <!--    <div class="hiddenResponsiveNarrow {xen:if "{$xenOptions.ctaFtIcon.enabled} AND ({$featuredThread.featured_icon_date} OR ({$featuredThread.default_icon} == 1 AND @ctaFtDefaultIconPath))", 'ctaFtIconPage', 'ctaFtAvatarPage'}">
                -->
                </xen:if>
 
Which template(s) did you remove it from?

You need to remove it from all of the _list_item templates (four of them), as there are different templates for each page the blocks are displayed on.
 
cta_featuredthreads_featured_list_item

I'm just testing on featured threads page view right now, but what other templates do I need to remove from? Is my commenting correct?
 
That template is for the home page.
The other templates are forum_list, forum_view and find_new_wrapper.
 
Is my commenting correct?
Oh, I just noticed what you did.

No, you literally just remove/delete the hiddenResponsiveNarrow class, leaving the rest of the code intact.
Like so:
Code:
<xen:if is="{$featuredThread.avatar_icon} == 2">
    <div class="{xen:if "{$xenOptions.ctaFtIcon.enabled} AND ({$featuredThread.featured_icon_date} OR ({$featuredThread.default_icon} == 1 AND @ctaFtDefaultIconPath))", 'ctaFtIconPage ctaFtIconRightPage', 'ctaFtAvatarPage ctaFtAvatarRightPage'}">
<xen:else />
    <div class="{xen:if "{$xenOptions.ctaFtIcon.enabled} AND ({$featuredThread.featured_icon_date} OR ({$featuredThread.default_icon} == 1 AND @ctaFtDefaultIconPath))", 'ctaFtIconPage', 'ctaFtAvatarPage'}">
</xen:if>
 
Ok that worked! Yea don't trust my CSS skills, sorry. Speaking of which. Now it looks like it would be helpful if in responsive it showed the title above the avatar (to get more length) and then the text wrapped to the side. Is that a feasible change for a hack like me?
 
You would need to edit the template to move the title.
The text wrapping can be achieved by editing the style property to remove the hidden overflow and ellipsis.
 
Im thinking to move the title above avatar/image but for responsive style only. Would it be easier to make the title word wrap on responsive instead of "..."? You can see in your screenshot above that it looks good with the image, but the content of the title is almost completely lost.
 
Back
Top Bottom