[VersoBit] Badges [Deleted]

I am using the latest version. It did not appear in the default theme. When it was not in my theme, I removed it.
As I mentioned above, Support for XF2.2 is limited; There will be an update coming out later this week that will add support.

Hi,
Any REST API support?. eg. To reward member a specific badge!
Thanks!
I'll add this to the roadmap, thanks for the suggestion!

Edit: I've added a wiki page outlining the planned endpoints, https://github.com/VersoBit/XF-Badges/wiki/API
Any feedback?
 
Last edited:
Quick question. I was under the impression that, when awarding badges based on criteria (e.g. being part of a usergroup), the badge should be revoked once that criteria is no longer met. Our installation doesn't appear to be revoking badges however. Is this working as intended, and if so, is there any way for us to manually revoke badges at all?
 
Quick question. I was under the impression that, when awarding badges based on criteria (e.g. being part of a usergroup), the badge should be revoked once that criteria is no longer met. Our installation doesn't appear to be revoking badges however. Is this working as intended, and if so, is there any way for us to manually revoke badges at all?
I’ll admit, I haven’t looked to heavily into the code that awards badges to users yet; however I did just do a quick experiment to confirm this issue.

Currently Badges does not support removing badges automatically based on criteria; It also will not assign a badge immediately to someone if the criteria is based on values that are cached into XenForo; User Cache needed a rebuild during test to have the cron assign the badge.

I will add this as an issue (#24) on GitHub and put it into the next release that supports XF2.2; I will add this as a togglable option though considering some badges may not want to be removed when the criteria changes....

I will also investigate an option that allows Forum Admins to run a cache rebuild when this cron runs (#25)

--

You can revoke badges manually by going to a users profile and accessing the moderator tools:
1606522500039.png
You will also be provided the same option to manually assign a badge to a user.
 
Last edited:
You can revoke badges manually by going to a users profile and accessing the moderator tools:
View attachment 240713
You will also be provided the same option to manually assign a badge to a user.

Hmmm. I'm not seeing that option in my Moderator tools menu. I've confirmed in the Admin CP using the permissions analyzer that both of the badge moderator permissions show up as "Yes" for me. Possible conflict with another addon?
 
Hmmm. I'm not seeing that option in my Moderator tools menu. I've confirmed in the Admin CP using the permissions analyzer that both of the badge moderator permissions show up as "Yes" for me. Possible conflict with another addon?
Very good chance it could be another addon; Could you confirm how many addons you have modifying member_macros?
If you also don't mind; please DM me your XF version, domain, and list of installed addons and we can dig deeper!

Do the options show on the default XenForo theme?
 
Very good chance it could be another addon; Could you confirm how many addons you have modifying member_macros?
If you also don't mind; please DM me your XF version, domain, and list of installed addons and we can dig deeper!

Do the options show on the default XenForo theme?
The options don't show on the default XenForo theme, no.

While we've got a lot of installed addons, there's only two other addons besides this one modifying member_macros, so I suppose that at least narrows down the possible culprits. I'll DM you.
 
Hi @VersoBit - Are you still aiming for a release at this end of the week, or is it likely to be later? Fantastic work. Thank you.

I'm eagerly awaiting postbit and user card support. Will we be able to stack badges within the postbit like this?

1606672773771.webp
 
Hi @VersoBit - Are you still aiming for a release at this end of the week, or is it likely to be later? Fantastic work. Thank you.

I'm eagerly awaiting postbit and user card support. Will we be able to stack badges within the postbit like this?

View attachment 240827
The postbit should be displaying badges; If you are using a custom theme, the source could differ slightly causing them not to display (see below xf2.2 default theme example). I am happy to debug this with you via DM if you need a hand :)

1606691483287.webp

memberTooltip fixes are included in the next update, along with various improvements to displaying badges when features arent used.

I am planning to have something released this week but I am working on preparing things for additional functionality I intend to add, you can keep an eye on the project status here!
 
The postbit should be displaying badges; If you are using a custom theme, the source could differ slightly causing them not to display (see below xf2.2 default theme example). I am happy to debug this with you via DM if you need a hand :)

View attachment 240867

memberTooltip fixes are included in the next update, along with various improvements to displaying badges when features arent used.

I am planning to have something released this week but I am working on preparing things for additional functionality I intend to add, you can keep an eye on the project status here!
Cool. I'll pm you later today if that's OK :)
 
Thanks for updating this. I love it!

I'm wondering if it is possible to addan option to show badges on mobile postbit.

Thanks for all the great job!
 
Thanks for updating this. I love it!

I'm wondering if it is possible to addan option to show badges on mobile postbit.

Thanks for all the great job!
I thought the same, but I think it might look too cluttered. I'd there'd too much going on, I think the user will be disinterested. Just my opinion of course. Options are always good.
 
Thanks for updating this. I love it!

I'm wondering if it is possible to addan option to show badges on mobile postbit.

Thanks for all the great job!
I thought the same, but I think it might look too cluttered. I'd there'd too much going on, I think the user will be disinterested. Just my opinion of course. Options are always good.
I was thinking about this the other night and came to a similar conclusion as @btmgreg

Doesn't mean we couldn't add it and give you the option to enable or disable it in the style properties (or by turning a modification off).
I'll add it to the list and see if it makes the cut on a future update!
 
I was thinking about this the other night and came to a similar conclusion as @btmgreg

Doesn't mean we couldn't add it and give you the option to enable or disable it in the style properties (or by turning a modification off).
I'll add it to the list and see if it makes the cut on a future update!
Amazing. Thanks!
 
VersoBit updated [VersoBit] Badges with a new update entry:

v2.0.0
  • Display number of awarded badges on profile and memberTooltip (#27)
  • Add option to enable badges to be displayed on the mobile post bit (#26)
  • Implement alt descriptions for badges (#22)
  • Add High-Resolution Options (#21)
  • Change database limits to allow bigger url strings [and icon names] (#23)
  • Fix standards of some recent changes in v1.0.7 [for those upgrading] (#20)
  • Template Regex changes for badges not displaying (#13)
  • Made changes to template modifications to provide better third-party theme integration [ui.x targeted, should improve for everyone] (#1)
  • Add options to display latest, oldest, and no badges if a user has not selected any badges to feature (#16)

Hope you're all having a good weekend!
 
Last edited:
Just upgraded this add-on and getting these server errors

Code:
ErrorException: Template error: [E_USER_WARNING] Cannot call method getFeaturedBadges on a non-object (NULL) src/XF/Template/Templater.php:1151
Generated by: Unknown account Dec 6, 2020 at 10:19 AM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/allbhhrc/...', 1151, Array)
#1 src/XF/Template/Templater.php(1151): trigger_error('Cannot call met...', 512)
#2 internal_data/code_cache/templates/l1/s32/public/CMTV_Badges_featured_badges_macros.php(17): XF\Template\Templater->method(NULL, 'getFeaturedBadg...', Array)
#3 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#4 internal_data/code_cache/templates/l1/s32/public/message_macros.php(80): XF\Template\Templater->callMacro('CMTV_Badges_fea...', 'featured_badges', Array, Array)
#5 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#6 internal_data/code_cache/templates/l1/s32/public/post_macros.php(25): XF\Template\Templater->callMacro('message_macros', 'user_info', Array, Array)
#7 src/XF/Template/Templater.php(962): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#8 src/XF/Template/Templater.php(898): XF\Template\Templater->renderExtensionInternal('user_cell', Array, Array, Object(XF\Template\ExtensionSet))
#9 internal_data/code_cache/templates/l1/s32/public/post_macros.php(160): XF\Template\Templater->renderExtension('user_cell', Array, Object(XF\Template\ExtensionSet))
#10 src/XF/Template/Templater.php(962): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#11 src/XF/Template/Templater.php(898): XF\Template\Templater->renderExtensionInternal('full_body', Array, Array, Object(XF\Template\ExtensionSet))
#12 internal_data/code_cache/templates/l1/s32/public/post_macros.php(201): XF\Template\Templater->renderExtension('full_body', Array, Object(XF\Template\ExtensionSet))
#13 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#14 internal_data/code_cache/templates/l1/s32/public/thread_view.php(828): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array)
#15 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#16 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#17 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#18 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#19 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#20 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#21 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#22 src/XF/App.php(2300): XF\Mvc\Dispatcher->run()
#23 src/XF.php(488): XF\App->run()
#24 index.php(20): XF::runApp('XF\\Pub\\App')
#25 {main}
Request state
array(4) {
  ["url"] => string(57) "/threads/what-is-the-easiest-coding-language-to-learn.56/"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
Delete
 
Just upgraded this add-on and getting these server errors

Code:
ErrorException: Template error: [E_USER_WARNING] Cannot call method getFeaturedBadges on a non-object (NULL) src/XF/Template/Templater.php:1151
Generated by: Unknown account Dec 6, 2020 at 10:19 AM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/allbhhrc/...', 1151, Array)
#1 src/XF/Template/Templater.php(1151): trigger_error('Cannot call met...', 512)
#2 internal_data/code_cache/templates/l1/s32/public/CMTV_Badges_featured_badges_macros.php(17): XF\Template\Templater->method(NULL, 'getFeaturedBadg...', Array)
#3 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#4 internal_data/code_cache/templates/l1/s32/public/message_macros.php(80): XF\Template\Templater->callMacro('CMTV_Badges_fea...', 'featured_badges', Array, Array)
#5 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#6 internal_data/code_cache/templates/l1/s32/public/post_macros.php(25): XF\Template\Templater->callMacro('message_macros', 'user_info', Array, Array)
#7 src/XF/Template/Templater.php(962): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#8 src/XF/Template/Templater.php(898): XF\Template\Templater->renderExtensionInternal('user_cell', Array, Array, Object(XF\Template\ExtensionSet))
#9 internal_data/code_cache/templates/l1/s32/public/post_macros.php(160): XF\Template\Templater->renderExtension('user_cell', Array, Object(XF\Template\ExtensionSet))
#10 src/XF/Template/Templater.php(962): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#11 src/XF/Template/Templater.php(898): XF\Template\Templater->renderExtensionInternal('full_body', Array, Array, Object(XF\Template\ExtensionSet))
#12 internal_data/code_cache/templates/l1/s32/public/post_macros.php(201): XF\Template\Templater->renderExtension('full_body', Array, Object(XF\Template\ExtensionSet))
#13 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#14 internal_data/code_cache/templates/l1/s32/public/thread_view.php(828): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array)
#15 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#16 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#17 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#18 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#19 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#20 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#21 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#22 src/XF/App.php(2300): XF\Mvc\Dispatcher->run()
#23 src/XF.php(488): XF\App->run()
#24 index.php(20): XF::runApp('XF\\Pub\\App')
#25 {main}
Request state
array(4) {
  ["url"] => string(57) "/threads/what-is-the-easiest-coding-language-to-learn.56/"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
Delete
DM’ing you for more info
 
Top Bottom