Badges and the displaying thereof

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Badges and the displaying thereof
« Reply #75, on June 5th, 2012, 11:57 PM »
This feature implementation is starting to get on my nerves...
It means a lot more rewrites than I hoped for. Well, I hoped, but I had little confidence, because I knew I was going to bump into problems with Wedge assuming that the 'group' entry in the context array is a string rather than an array...

As for performance, I don't think it has much influence though.

What about the show_when field? Right now I have these settings: 0 = never, 1 = always, 2 = only when no other badge is shown. Also, groups are sorted by ID so that admin and moderator groups have priority over the rest... I don't know if it's for the better?

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Badges and the displaying thereof
« Reply #76, on June 6th, 2012, 12:05 AM »
The show_when field makes sense, and ordering by id will give priority to admin, global moderator, then moderator, then all the post count groups >_> May not be ideal, which is why I suggested an explicit ordering in the table.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Badges and the displaying thereof
« Reply #77, on June 6th, 2012, 12:26 AM »
Quote from Arantor on June 6th, 2012, 12:05 AM
The show_when field makes sense, and ordering by id will give priority to admin, global moderator, then moderator, then all the post count groups >_> May not be ideal, which is why I suggested an explicit ordering in the table.
Actually I did it that way:
- get all groups (id_group + additional_groups)
- sort them
- test against them
- then finally, test against the id_post_group

Which effectively makes id_post_group the lowest priority one...
Anyway -- it works overall, but it's really geared towards making badges...
For instance, in my local install, which has the default groups, my account is showing the Admin badge (which is 3 rank images), then the Junior badge (which is 1 rank image).
It should have been showing instead an 'Admin' badge and then the lone star...
I'm stuck on this. Couldn't figure out a way to properly do it.

Also, as stupid as it may sound, I totally forgot to deal with textual group names... Means a further rewrite ahead for me... Ah, well.

I also added a 'userbox' type for LMD, will probably become 'display' or 'topic' later. It allows me to get rid of several entries that aren't used in Display.php and take some processing time, such as member_ip... (Well, member_ip is normally used, but I don't know if it's worth it, for instance...)
Of course, the final generated page isn't any faster than the earlier ones. NO KIDDIN'. Well, at least it doesn't seem slower either...
Re: Badges and the displaying thereof
« Reply #78, on June 6th, 2012, 11:52 AM »
Anyone?
Posted: June 6th, 2012, 10:16 AM

That's the problem these days. I'll start a larger project under suggestion from others, and then I'm on my own to finish it... :(

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Badges and the displaying thereof
« Reply #79, on June 7th, 2012, 02:55 AM »
Quote
Which effectively makes id_post_group the lowest priority one...
Works for me.
Quote
Also, as stupid as it may sound, I totally forgot to deal with textual group names... Means a further rewrite ahead for me... Ah, well.
I'd consider showing just the very first group's name, no point showing all the group names, but only the primary group's name - or post count group name if there isn't a primary group name, and nothing more than that.
Quote
It should have been showing instead an 'Admin' badge and then the lone star...
I'm stuck on this. Couldn't figure out a way to properly do it.
Got something I can see of the code?
Quote
I also added a 'userbox' type for LMD, will probably become 'display' or 'topic' later. It allows me to get rid of several entries that aren't used in Display.php and take some processing time, such as member_ip... (Well, member_ip is normally used, but I don't know if it's worth it, for instance...)
Of course, the final generated page isn't any faster than the earlier ones. NO KIDDIN'. Well, at least it doesn't seem slower either...
Certain things aren't about speed, especially as you still have to do the extra query to get board moderators to be able to add the board moderator badge into the mix yet.
Posted: June 7th, 2012, 12:47 AM
Quote from Nao on June 6th, 2012, 11:52 AM
That's the problem these days. I'll start a larger project under suggestion from others, and then I'm on my own to finish it... :(
My problem is, I just see so much stuff there is to do and I have no idea where to pitch in to do any of it :(

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Badges and the displaying thereof
« Reply #80, on June 12th, 2012, 03:33 PM »
Ah...HA! Finally proper support for multiple badges...
Example:
http://wedge.org/pub/off/7213/the-browser-you-loved-to-hate/msg275170/#msg275170

The admin can also determine whether the Moderator badge will show. Selecting to have it "never show", or "show only if there are no other badges" or "show only if it's a primary group" (which never is the case here) will hide it.
Well, the UI has yet to be written... But it's in progress locally.

Also, I'm not 100% sure I'm doing it right -- I'm actually adding id_group #3 to the list of additional_groups in the $user_profile variable at this point. I don't think that SMF did that at all. It makes sense to me that at least one area has a record of it for the duration of the page...
Quote from Arantor on June 7th, 2012, 02:55 AM
I'd consider showing just the very first group's name, no point showing all the group names, but only the primary group's name - or post count group name if there isn't a primary group name, and nothing more than that.
I elected to keep both of the systems I wrote.
- Badge system: set it up per-badge (per-group), on individual group pages.
- Group titles: Wedge will only show the primary group's name (if it exists), and/or the post-based group's name (if it exists), and then will determine which to show according to a setting in the Manage Membergroups > Settings page.

My only concern is that it ends up being too complicated for some admins... But OTOH, once they have it set up, they don't have to touch it again. And the default setup should be good enough. (Group title's default is the same as in SMF.)
Quote
Got something I can see of the code?
Soon, soon :P
Quote
Certain things aren't about speed, especially as you still have to do the extra query to get board moderators to be able to add the board moderator badge into the mix yet.
Well, it's cached most of the time. Uh, let me look... The TTL is 480 seconds. That's not much... Maybe we should increase that. And ensure the cache is emptied for that item when moderators are set up. I don't know... I can see a huge TTL for that kind of thing, personally.
Quote
My problem is, I just see so much stuff there is to do and I have no idea where to pitch in to do any of it :(
Personally, I've decided to focus, as soon as I'm finished with my current crap, on three items: custom groups, floating boards (which include adding support for board icons), and topic privacy. Gonna have fun though... It's a lot to swallow. -_-
Re: Badges and the displaying thereof
« Reply #81, on June 20th, 2012, 01:13 PM »
So... What about these? Anyone happy or unhappy with them?
(Of course, to test these you need to touch the database manually... Sorry about that.)

garou

  • I really love the new system so far and can not wait to try it out for myself.
  • Posts: 17
Re: Badges and the displaying thereof
« Reply #82, on December 20th, 2012, 10:04 AM »
Wow Im waybehind, I mentioned this in another recent topic, Ive used Johny B's Stars and badges mod on several sites and I'm glad to see the function implemented in Wedge.

Nao

  • Dadman with a boy
  • Posts: 16,082

garou

  • I really love the new system so far and can not wait to try it out for myself.
  • Posts: 17

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Badges and the displaying thereof
« Reply #85, on December 21st, 2012, 07:20 PM »
Oh... Well, I didn't even know there was already a mod for that...

Anything I write is my own code, not some idea I got somewhere else. Usually :P (There's UltimateProfile which I wanted to totally rip, but never got around to doing that...)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Badges and the displaying thereof
« Reply #86, on December 21st, 2012, 07:35 PM »
Yeah, there's a mod for it but it's not particularly nice and long since unsupported by its author.

garou

  • I really love the new system so far and can not wait to try it out for myself.
  • Posts: 17
Re: Badges and the displaying thereof
« Reply #87, on December 22nd, 2012, 10:10 PM »
Yeah the SMF mod has been abandoned for a long time, really sad with how popular it was. Not to mention how the community has been supporting the thread with tricks to keep it working.

I am glad to see it native in Wedge, it saves me from having to rip it and I'm sure its much cleaner then anything I can write. :)

I'm sure there are many in the Wedge community that would love to see many of the features from Ultimate Profile in Wedge too.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Badges and the displaying thereof
« Reply #88, on December 22nd, 2012, 10:16 PM »
Well, it was abandoned because of the author having personal issues to deal with and he just disappeared after that.

I'm not sure that what we have right now is exactly the equal of Stars and Badges, but I'm not sure that's necessarily a bad thing. You don't have quite the flexibility that S&B gives, but there is enough for most cases.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Badges and the displaying thereof
« Reply #89, on December 22nd, 2012, 11:12 PM »
Since I don't know about S&B at all, I only implemented the features *I* needed for wedge.org actually.
That's the difference between adding what you want, and adding what people tell you to add. ;)

As for U.P., I wouldn't know where to start.

Which is strange, considering that my original plan for Wedge was to have a "stock SMF that would have Aeva Media, Ultimate Profile and a blog system by default."
In the end, there's only a hint of a blog system, no UP at all, and AeMe is only there as a memento, I never added any features to it, except for the occasional code refactoring and addition of Foxy! features for free...