Brett Peters
Well-known member
This is insanely awesome
I'm having problems creating own widgets!
1. i've created my file
2. i'm injectingPHP:<?php class WidgetFramework_WidgetRenderer_Addons extends WidgetFramework_WidgetRenderer_Threads { protected function _getConfiguration() { return array( 'name' => 'Addons', 'options' => array( 'type' => XenForo_Input::STRING, 'cutoff' => XenForo_Input::UINT, 'limit' => XenForo_Input::UINT, ), 'useCache' => true, 'useWrapper' => false, ); } protected function _render(array $widget, $templateName, array $params, XenForo_Template_Abstract $renderTemplateObject) { $threadModel = XenForo_Model::create('XenForo_Model_Thread'); $nodeModel = XenForo_Model::create('XenForo_Model_Node'); $new = $threadModel->getThreads( array( 'forum_ids' => $forumId = XenForo_Application::get('options')->ragtek_AddonForumId, ) ,array( 'order' => 'post_date', 'orderDirection' => 'desc', 'join' => XenForo_Model_Thread::FETCH_AVATAR, // 'readUserId' => XenForo_Visitor::getUserId(), // 'includeForumReadDate' => true, 'limit' => $widget['options']['limit'], ) ); $renderTemplateObject->setParam('new', $new); $renderTemplateObject->setParam('useTabs', $tabs > 0); return $renderTemplateObject->render(); } }
at event "widget_framework_ready"PHP:$renderers[] = 'WidgetFramework_WidgetRenderer_Addons';
It seems that it's working, because i can create a new add-on widget, when i save it, i don't get an error message, it shows "widget saved successfully" but i can't see it on the widget list and it's also not saved in the xf_widget table.
Hence it's called "Advanced"holly **** this is really a nice one!!!!wow
I have only two suggestion: use phrases for widget titles and the positioning (conditionals & display order) could be more userfriendly^^ (drag & drop and
could be "hard" for the avarage users here
)
Does it work correctly in the default style? Which style is this, exactly?
You probably using the threads widgets, it won't follow the cache rule if you are logged in. Permission issueAre you sure that this works?
ATM i have 30 queries on the index page
when i deactive the addon => 25 queries
so there are 5 new queries![]()
Sorry, it's not possible. Please please please other developers adopt this frameworkThis looks really interesting. However, will this also take care of other addons which have placed things in the side bar before? If not, could there be a way to somehow be able to manage where they are located as well? Because I really like the idea, but if it only works with side bar things that are specifically created as a widget for your addon, it wouldn't be nearly as useful..
Actually you can enable and disable with the checkbox. If it doesn't work for you, hmm... check if you uploaded js/widget_framework/functions.js?Hi
Only a question. Why are checkboxes on the "List Widgets"-page? You are only able to see the status on this page but your not able to change the status there.
My badok i've found the problem
The message "widget saved successfully" is shown always, even if there's a error!
If i save & exit, i see the error, if i only save it, i see the successfully message, event there was a problem
There's a small template bug
it should be "delete widget" and not delete template![]()
I have just written a widget for TaigaChat for 5 minutes. It's working nowThis is one of the best addons I've seen on any platform. And I'm going to use it. But it doesn't like Taiga Chat. If I could get the chatbox to work it would be perfect.
It works great with IE 8, but it doesn't work with FF 3.6.13Actually you can enable and disable with the checkbox. If it doesn't work for you, hmm... check if you uploaded js/widget_framework/functions.js?
We use essential cookies to make this site work, and optional cookies to enhance your experience.