You can already closed by default the categories you want (see the options).First off, thanks for a great add-on. My users love being able to collapse the forum lists. The one thing they keep asking about is keeping the collapsed state. Is it possible to make the cookie persist past log out, or is ToggleMe using the an xf cookie that is destroyed?
I don't have really time to do something I will not use, but you can easily tweak this addon using the XenForo visitor objectMay I make a request please?
This addon is lovely on AVForums. I'm using it on category strips and the postbit.
The default state of the postbit is closed as this is neater when viewing threads.
However, the moderators have requested that the default state for them is open so they can see users' details without clicking each toggle.
Could it be possible to define the default state for each usergroup? Open/closed?
Thanks
$visitor = XenForo_Visitor::getInstance();
Thank you. I replaced line 13 with this code:I don't have really time to do something I will not use, but you can easily tweak this addon using the XenForo visitor object
to modify the $state variable (line 13) of this file.PHP:$visitor = XenForo_Visitor::getInstance();
$visitor = XenForo_Visitor::getInstance();
$visitorUserGroupIds = array_merge(array((string)$visitor['user_group_id']), (explode(',', $visitor['secondary_group_ids'])));
if (in_array(4,$visitorUserGroupIds)) {
$state = 1;
} else {
$state = ($options->toggleME_Usergroups_Postbit_State == 'opened') ? 1 : 0;
}
Version 2.2 released
- Add an option to select the postbit toggle button position
- Add an option to force the postbit user extra information to be visible for some usergroups
- Include an old fix previously released on Github
Was it during the installation or even after that? The second argument of the function is a XenForo option (type: array). I will add anyway a line of code to avoid this.I have a problem with 2.2 version. Give me a error:
Code:ErrorException: array_intersect() [<a href='function.array-intersect'>function.array-intersect</a>]: Argument #2 is not an array - library/Sedo/ToggleME/Listener.php:465
Version 2.2.1 released
- Add an array check to avoid an error message in the log probably only during install.
If you don't have this error or if you have already upgraded the addon, I don't think this update will be useful for you.
/* replace ToggleMe images with fontawesome */
.tglWchild.active:before, .tglPosbit.active:before {
content: "\f147 ";
font-family: fontawesome;
font-size: 18px;
line-height: 18px;
opacity: 0.3;
}
.tglWchild.inactive:before, .tglPosbit.inactive:before {
content: "\f196 ";
font-family: fontawesome;
font-size: 18px;
line-height: 18px;
opacity: 0.3;
}
background-image: url('@imagePath/xenforo/widgets/toggle-sprite.png');
background-position: 0px -16px;
width: 16px;
height: 16px;
ErrorException: Undefined index: visitorUserGroupIds - library/Sedo/ToggleME/Listener.php:304
Generated By: Unknown Account, 16 minutes ago
Stack Trace
#0 /home/harpoong/public_html/forum/library/Sedo/ToggleME/Listener.php(304): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/harpoong/...', 304, Array)
#1 [internal function]: Sedo_ToggleME_Listener::template_postrender('thread_view', '???????????????...', Array, Object(XenForo_Template_Public))
#2 /home/harpoong/public_html/forum/library/XenForo/CodeEvent.php(58): call_user_func_array(Array, Array)
#3 /home/harpoong/public_html/forum/library/XenForo/Template/Abstract.php(195): XenForo_CodeEvent::fire('template_post_r...', Array, 'thread_view')
#4 /home/harpoong/public_html/forum/library/XenForo/Template/Public.php(110): XenForo_Template_Abstract->render()
#5 /home/harpoong/public_html/forum/library/XenForo/ViewRenderer/HtmlPublic.php(119): XenForo_Template_Public->render()
#6 /home/harpoong/public_html/forum/library/XenForo/FrontController.php(604): XenForo_ViewRenderer_HtmlPublic->renderContainer(Object(XenForo_Template_Public), Array)
#7 /home/harpoong/public_html/forum/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#8 /home/harpoong/public_html/forum/index.php(13): XenForo_FrontController->run()
#9 {main}
Getting the same problem. Xenforo 1.2.324 pages of error logs.
Version 2.2.2 released
- Fix a bug (array key)
Version 2.2.3 released
- Restore the array check in the conditionnal
array_intersect(): Argument #1 is not an array
2 dakika önce - library/Sedo/ToggleME/Listener.php:477
Sil...
array_intersect(): Argument #1 is not an array
2 dakika önce - library/Sedo/ToggleME/Listener.php:477
Sil...
array_intersect(): Argument #1 is not an array
5 dakika önce - library/Sedo/ToggleME/Listener.php:477
Sil...
array_intersect(): Argument #1 is not an array
5 dakika önce - library/Sedo/ToggleME/Listener.php:477
Sil...
array_intersect(): Argument #1 is not an array
10 dakika önce - library/Sedo/ToggleME/Listener.php:477
Sil...
array_intersect(): Argument #1 is not an array
11 dakika önce - library/Sedo/ToggleME/Listener.php:477
Sil...
array_intersect(): Argument #1 is not an array
22 dakika önce - library/Sedo/ToggleME/Listener.php:477
Sil...
Error Info
ErrorException: array_intersect(): Argument #1 is not an array - library/Sedo/ToggleME/Listener.php:477
Generated By: kemalsen1999, 3 dakika önce
Stack Trace
#0 [internal function]: XenForo_Application::handlePhpError(2, 'array_intersect...', '/home/xxx/p...', 477, Array)
#1 /home/xxxx/public_html/forum/library/Sedo/ToggleME/Listener.php(477): array_intersect(false, Array)
#2 /home/xxxx/public_html/forum/library/Sedo/ToggleME/Listener.php(304): Sedo_ToggleME_Listener::forcePostbitExtraInfoDisplay(Array)
#3 [internal function]: Sedo_ToggleME_Listener::template_postrender('thread_view', '???????????????...', Array, Object(XenForo_Template_Public))
#4 /home/xxxx/public_html/forum/library/XenForo/CodeEvent.php(58): call_user_func_array(Array, Array)
#5 /home/xxxx/public_html/forum/library/XenForo/Template/Abstract.php(195): XenForo_CodeEvent::fire('template_post_r...', Array, 'thread_view')
#6 /home/xxxx/public_html/forum/library/XenForo/Template/Public.php(110): XenForo_Template_Abstract->render()
#7 /home/xxxx/public_html/forum/library/XenForo/ViewRenderer/HtmlPublic.php(119): XenForo_Template_Public->render()
#8 /home/xxxx/public_html/forum/library/XenForo/FrontController.php(604): XenForo_ViewRenderer_HtmlPublic->renderContainer(Object(XenForo_Template_Public), Array)
#9 /home/xxxx/public_html/forum/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#10 /home/xxxx/public_html/forum/index.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
["url"] => string(91) "http://www.xxxx.com/forum/threads/xxxx.844525/page-11"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.