Resource icon

[bd] Widget Framework 2.6.6

No permission to download
Well, I released a beta version of the [bd] Widget Framework add-on here https://xfrocks.com/widget-framework/threads/bd-widget-framework-2-3-3.78/, you can install it and use $_WidgetFramework_positionCode as expected ;)
So meaning, from:
Code:
in_array($forum['node_id'], array(23,26,68,69,70,71,72,74,75,76,77,78,79,80,83,84,85,86,87,89,90,91,92,93,94,95,98,106,108,159,160,161,162,198,200,210)) == false AND !in_array($viewName, array(
'XenForo_ViewPublic_Register_Form',
'XenForo_ViewPublic_Login_Login',
'XenForo_ViewPublic_Misc_Contact',
'XenForo_ViewPublic_Error_RegistrationRequired',
'XenForo_ViewPublic_Login',
))

What's the new code to be use?
 
So meaning, from:
Code:
in_array($forum['node_id'], array(23,26,68,69,70,71,72,74,75,76,77,78,79,80,83,84,85,86,87,89,90,91,92,93,94,95,98,106,108,159,160,161,162,198,200,210)) == false AND !in_array($viewName, array(
'XenForo_ViewPublic_Register_Form',
'XenForo_ViewPublic_Login_Login',
'XenForo_ViewPublic_Misc_Contact',
'XenForo_ViewPublic_Error_RegistrationRequired',
'XenForo_ViewPublic_Login',
))

What's the new code to be use?
Something like...

PHP:
in_array($forum['node_id'], array(23,26,68,69,70,71,72,74,75,76,77,78,79,80,83,84,85,86,87,89,90,91,92,93,94,95,98,106,108,159,160,161,162,198,200,210)) == false AND !in_array($_WidgetFramework_positionCode, array(
'register_form',
'login',
'contact',
'XenForo_ViewPublic_Error_RegistrationRequired',
'error_with_login',
))
 
  • Like
Reactions: rdn
Please take a look at my final code if it's fine :)

PHP:
in_array($forum['node_id'], array(23,26,68,69,70,71,72,74,75,76,77,78,79,80,83,84,85,86,87,89,90,91,92,93,94,95,98,106,108,159,160,161,162,198,200,210)) == false AND !in_array($_WidgetFramework_positionCode, array(
'register_form',
'login',
'contact',
'XenForo_ViewPublic_Error_RegistrationRequired',
'error_with_login',
'forum_list',
'thread_view',
))
 
Please take a look at my final code if it's fine :)

PHP:
in_array($forum['node_id'], array(23,26,68,69,70,71,72,74,75,76,77,78,79,80,83,84,85,86,87,89,90,91,92,93,94,95,98,106,108,159,160,161,162,198,200,210)) == false AND !in_array($_WidgetFramework_positionCode, array(
'register_form',
'login',
'contact',
'XenForo_ViewPublic_Error_RegistrationRequired',
'error_with_login',
'forum_list',
'thread_view',
))

You don't need "XenForo_ViewPublic_Error_RegistrationRequired" anymore, should drop that line.
 
Add "XenForo_ViewPublic_Error_RegistrationRequired" and "XenForo_ViewPublic_Login" to the mix.

PHP:
!in_array($viewName, array(
'XenForo_ViewPublic_Register_Form',
'XenForo_ViewPublic_Login_Login',
'XenForo_ViewPublic_Misc_Contact',
'XenForo_ViewPublic_Error_RegistrationRequired',
'XenForo_ViewPublic_Login',
))
Using the latest version on your site, Is it ok and still safe using this syntax?
 
Please take a look at my final code if it's fine :)

PHP:
in_array($forum['node_id'], array(23,26,68,69,70,71,72,74,75,76,77,78,79,80,83,84,85,86,87,89,90,91,92,93,94,95,98,106,108,159,160,161,162,198,200,210)) == false AND !in_array($_WidgetFramework_positionCode, array(
'register_form',
'login',
'contact',
'error_with_login',
'forum_list',
'thread_view',
))
I just use this but didn't work on latest version :(
 
1. When deleting a thread permanently receiving this error. This is after selecting a thread via the checkbox and delete. Using the pop-up box to select the option for permanent delete.
Server Error
Argument 1 passed to WidgetFramework_Extend_DataWriter_Discussion_Thread::_discussionPostDelete() must be an array, none given, called in /home/myscifio/public_html/library/XenForo/DataWriter/Discussion.php on line 750 and defined
1. XenForo_Application::handlePhpError() in WidgetFramework/Extend/DataWriter/Discussion/Thread.php at line 12
2. WidgetFramework_Extend_DataWriter_Discussion_Thread->_discussionPostDelete() in XenForo/DataWriter/Discussion.php at line 750
3. XenForo_DataWriter_Discussion->_postDelete() in XenForo/DataWriter.php at line 1767
4. XenForo_DataWriter->delete() in XenForo/Model/InlineMod/Thread.php at line 216
5. XenForo_Model_InlineMod_Thread->deleteThreads() in XenForo/ControllerPublic/InlineMod/Thread.php at line 44
6. XenForo_ControllerPublic_InlineMod_Thread->actionDelete() in XenForo/FrontController.php at line 337
7. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
8. XenForo_FrontController->run() in /home/myscifio/public_html/index.php at line 13
 
1. When deleting a thread permanently receiving this error. This is after selecting a thread via the checkbox and delete. Using the pop-up box to select the option for permanent delete.
Server Error
Argument 1 passed to WidgetFramework_Extend_DataWriter_Discussion_Thread::_discussionPostDelete() must be an array, none given, called in /home/myscifio/public_html/library/XenForo/DataWriter/Discussion.php on line 750 and defined
1. XenForo_Application::handlePhpError() in WidgetFramework/Extend/DataWriter/Discussion/Thread.php at line 12
2. WidgetFramework_Extend_DataWriter_Discussion_Thread->_discussionPostDelete() in XenForo/DataWriter/Discussion.php at line 750
3. XenForo_DataWriter_Discussion->_postDelete() in XenForo/DataWriter.php at line 1767
4. XenForo_DataWriter->delete() in XenForo/Model/InlineMod/Thread.php at line 216
5. XenForo_Model_InlineMod_Thread->deleteThreads() in XenForo/ControllerPublic/InlineMod/Thread.php at line 44
6. XenForo_ControllerPublic_InlineMod_Thread->actionDelete() in XenForo/FrontController.php at line 337
7. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
8. XenForo_FrontController->run() in /home/myscifio/public_html/index.php at line 13
Xf version?
 
If I show a widget to a specific category, I'll be using this:
$forum['parent_node_id'] == 159

it works, However hiding on that category, using this:
$forum['parent_node_id'] != 159

Is not working, Why?
 
hook:ad_below_top_breadcrumb
That hook location is in PAGE_CONTAINER template therefore it doesn't have the variable `$forum` to check against.

However, you can workaround that by using something like

PHP:
$bodyClasses != 'node159'

Please note that the above expression may not work, depending on your node tree. To get the correct value to use, view source the page and look for something like this...

PHP:
<body class="node72 node60 node71">

Just copy the whole string "node72 node60 node71" and put it in the expression, like this:

PHP:
$bodyClasses != 'node72 node60 node71'
 
  • Like
Reactions: rdn
I'm having a slight issue with the status updates widget. I've modified it to refresh every 5 minutes, which was working fine for a while. But it suddenly got stuck and hasn't updated since last night.
 
Top Bottom