D.C Style - Widgets

D.C Style - Widgets 1.1.5 Patch Level 1

No permission to download
So I installed it and after that I have noticed that another addon is missing - [DC Style] – Thumbnail, so I installed it. After that I have noticed again, that there is a need to install another addon to get the others working... What is the point of it? :rolleyes:
Maybe if you read those add-ons description you’ll get it.
 
So where can I find info that Thumbnail requires Attachment view (except this one from acp)?

On (again) another page. This is confusing, isn't?

But nevermind. It didn't meet my expectations.
 
Last edited:
D.C.,.. Thank you for this addon for the widgets.

I used the regular new thread list widget before, and had it call a custom macro for newthreads so I could modify the results layout.

Where can I edit the addon template to call to my custom entry in thread_list_macros?

Or which template may I edit in order to change the layout of the thread results of the random widget.
 
Last edited:
@D.C Style can you add promote and unpromote thread logs please? I wanna check who promote threads but I can't see. I think it's important.
Sure! Will be added in the upcoming version.

D.C.,.. Thank you for this addon for the widgets.

I used the regular new thread list widget before, and had it call a custom macro for newthreads so I could modify the results layout.

Where can I edit the addon template to call to my custom entry in thread_list_macros?

Or which template may I edit in order to change the layout of the thread results of the random widget.
Forgot to add: I am using the default layout setting for the widget.
I think you might want to choose custom template in the "Widget type" section
1715016137059.webp

Then you create your named custom template, for example, "custom_widget_type_sidebar". In that template, you can try something like this
Code:
<xf:if is="$threads is not empty">
    <div class="block"{{ widget_data($widget) }}>
        <div class="block-container">
            <h3 class="block-minorHeader">
                <a href="{$link}" rel="nofollow">{$title}</a>
            </h3>
            
            <ul class="block-body">
                <xf:foreach loop="$threads" value="$thread">
                    <li class="block-row">
                        <xf:macro name="thread_list_macros::item_new_threads"
                            arg-thread="{$thread}" />
                    </li>
                </xf:foreach>
            </ul>
        </div>
    </div>
</xf:if>

Replace thread_list_macros with your macro template.
 
D.C Style updated D.C Style - Widgets with a new update entry:

Version 1.1.5

New Feature Updates
This version contains some significant feature updates as detailed below. Please read carefully to understand how they work!
(Refer to suggestion of @Enes3078 here: https://xenforo.com/community/threads/d-c-style-widgets.185181/post-1680820)

Individual Widget Promotion
From this version, each widget can be set to be promotable by specific user groups. This adds more flexibility for you to control how each widget...

Read the rest of this update entry...
 
@D.C Style you can check this I think:

Code:
TypeError: Extension public:thread_view :: thread_action_buttons() error: in_array(): Argument #2 ($haystack) must be of type array, string given src/addons/DC/Widgets/Repository/Threads.php:49

#0 src/addons/DC/Widgets/Repository/Threads.php(49): in_array(0, 'custom')
#1 src/addons/DC/Widgets/XF/Entity/Thread.php(48): DC\Widgets\Repository\Threads->findThreadPromotableWidgetList(Object(SV\ReportImprovements\XF\Entity\User), Object(SV\SearchImprovements\XF\Entity\ThreadCollab))
#2 src/XF/Template/Templater.php(1195): DC\Widgets\XF\Entity\Thread->canWidgetPromote()
#3 internal_data/code_cache/templates/l2/s9/public/thread_view.php(44): XF\Template\Templater->method(Object(SV\SearchImprovements\XF\Entity\ThreadCollab), 'canWidgetPromot...', Array)
#4 src/XF/Template/Templater.php(991): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#5 src/XF/Template/Templater.php(927): XF\Template\Templater->renderExtensionInternal('thread_action_b...', Array, Array, Object(XF\Template\ExtensionSet))
#6 internal_data/code_cache/templates/l2/s9/public/thread_view.php(422): XF\Template\Templater->renderExtension('thread_action_b...', Array, Object(XF\Template\ExtensionSet))
#7 src/XF/Template/Templater.php(991): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#8 src/XF/Template/Templater.php(927): XF\Template\Templater->renderExtensionInternal('thread_actions', Array, Array, Object(XF\Template\ExtensionSet))
#9 internal_data/code_cache/templates/l2/s9/public/thread_view.php(958): XF\Template\Templater->renderExtension('thread_actions', Array, Object(XF\Template\ExtensionSet))
#10 src/XF/Template/Templater.php(1655): XF\Template\Templater->{closure}(Object(SV\LazyImageLoader\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#11 src/addons/MaZ/AUN/XF/Template/Templater.php(39): XF\Template\Templater->renderTemplate('thread_view', Array, true, NULL)
#12 src/XF/Template/Template.php(24): MaZ\AUN\XF\Template\Templater->renderTemplate('public:thread_v...', Array)
#13 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#14 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#15 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#16 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#17 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#18 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#19 src/XF.php(524): XF\App->run()
#20 index.php(20): XF::runApp('XF\\Pub\\App')
#21 {main}
 
Top Bottom