This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
4982
The Pub / Re: Improvement to drafts (and posting, actually) I need to do
« on June 5th, 2012, 07:41 AM »
Eh? Its not insert ignore material..?
4983
The Pub / Re: Improvement to drafts (and posting, actually) I need to do
« on June 4th, 2012, 11:43 PM »
Another...?!!
Or maybe the infamous issue with drafts being saved after clicking the submit button?
Okay time for bed really... I hope you find some time to look into the membergroup caching stuff! okthxbye
Or maybe the infamous issue with drafts being saved after clicking the submit button?
Okay time for bed really... I hope you find some time to look into the membergroup caching stuff! okthxbye
4984
The Pub / Re: Improvement to drafts (and posting, actually) I need to do
« on June 4th, 2012, 11:31 PM »
Went into my general draft section...
I have several drafts <= June 1st, but let's see for today:
1
Off-topic / Re: MySQL query optimization
« Today at 11:14 PM »
EXPLAIN is one of those things that make possibly the only thing that is more confusing to me than regexps... Actually the
2
Off-topic / Re: Old layout vs new layout?
« Today at 09:32 PM »
Looking good!
Footer needs extra top padding!
---> The second one was made on my iPod. The first one on Opera Desktop. In both cases, I posted these messages without any further trouble... So there still is a small issue with ghost drafts.
I have several drafts <= June 1st, but let's see for today:
1
Off-topic / Re: MySQL query optimization
« Today at 11:14 PM »
EXPLAIN is one of those things that make possibly the only thing that is more confusing to me than regexps... Actually the
2
Off-topic / Re: Old layout vs new layout?
« Today at 09:32 PM »
Looking good!
Footer needs extra top padding!
---> The second one was made on my iPod. The first one on Opera Desktop. In both cases, I posted these messages without any further trouble... So there still is a small issue with ghost drafts.
4985
Off-topic / Re: MySQL query optimization
« on June 4th, 2012, 11:14 PM »
EXPLAIN is one of those things that make even less sense than a complex regex to me :P
4986
Features / Re: Badges and the displaying thereof
« on June 4th, 2012, 11:10 PM »
I don't know, I've thought it over and basically -- the badge stuff is not used in a lot of places. I might as well add a sub function that loads the membergroups where show_when (or whatever name the field will have) is !=0. This will/would save extra bytes being loaded on every page when we're on a page where only the membergroup colors are required.
I've already started implementing it that way, but I don't know, maybe I'm wrong...?
Here's the sample...
Code: [Select]
An array_diff can then be pushed to $user_info['groups'] (or the equivalent thing loaded through LMD or LMC or whatever), to build a list of badges that could be shown. Then we can go iteratively over the group list and keep the badge if show_when is set to 'always show', and delete it if set to 'only show when nothing else is shown' and there's at least one badge already being shown in the list. (Primary group being first priority in the list...)
Well, that's how I'm seeing it done at least. But I'm tired and may be wrong on all accounts.
Going to bed, so you can take time to think about this and tell me what you think is best...
Maybe cache_put_data should be a singleton... wecac::put() :P
Too bad that 'cac' sounds odd in French... (Our equivalent to the Dow Jones.)
I've already started implementing it that way, but I don't know, maybe I'm wrong...?
Here's the sample...
// Load cached membergroup badges (or rank images) and when to show them.
if (($member_badges = cache_get_data('member-badges', 5000)) === null)
{
$member_badges = array();
$request = wesql::query('
SELECT g.id_group, g.stars, g.show_when
FROM {db_prefix}membergroups AS g ON g.show_when != {int:never}',
array(
'never' => 0,
)
);
while ($row = wesql::fetch_assoc($request))
$member_badges[$row['id_group']] = array($row['show_when'], $row['stars']);
wesql::free_result($request);
cache_put_data('member-badges', $member_badges, 5000);
}An array_diff can then be pushed to $user_info['groups'] (or the equivalent thing loaded through LMD or LMC or whatever), to build a list of badges that could be shown. Then we can go iteratively over the group list and keep the badge if show_when is set to 'always show', and delete it if set to 'only show when nothing else is shown' and there's at least one badge already being shown in the list. (Primary group being first priority in the list...)
Well, that's how I'm seeing it done at least. But I'm tired and may be wrong on all accounts.
Going to bed, so you can take time to think about this and tell me what you think is best...
Maybe cache_put_data should be a singleton... wecac::put() :P
Too bad that 'cac' sounds odd in French... (Our equivalent to the Dow Jones.)
4987
Features / Re: Badges and the displaying thereof
« on June 4th, 2012, 10:48 PM »
There's plenty of work left to do on likes... If anything: (1) add a permission to like own posts, (2) add the mini-menu I painstakingly rewrote to help with deploying on like buttons... (Heck, it still needs quite some work.)
Re: membergroup caching, I just realized that only groups with an actual color are cached -- I don't know if it's best to just cache all of them, making the coloring possibly slower, or just have two group caches: one for groups that have colors, and one for groups that have a badge to be shown.
Hmm... Probably two separate cache files... :-/
Re: membergroup caching, I just realized that only groups with an actual color are cached -- I don't know if it's best to just cache all of them, making the coloring possibly slower, or just have two group caches: one for groups that have colors, and one for groups that have a badge to be shown.
Hmm... Probably two separate cache files... :-/
4988
Plugins / Re: Lazy Load Inages
« on June 4th, 2012, 10:27 PM »
I'm pretty much anti-laziness myself when it comes to images. It has its uses but mostly in an infinitely scrolling page.
4989
Off-topic / Re: Old layout vs new layout?
« on June 4th, 2012, 09:32 PM »
Looking good!
Footer needs extra top padding!
Footer needs extra top padding!
4990
Features / Re: Badges and the displaying thereof
« on June 4th, 2012, 06:49 PM »
Same for colors?
4991
Features / Re: Badges and the displaying thereof
« on June 4th, 2012, 06:45 PM »
One of my concerns is that user groups *could* use custom colors and badges, but only in boards belonging to the user group owner. perhaps we should also cache a membergroup list per board...?
4992
The Pub / Re: Improvement to drafts (and posting, actually) I need to do
« on June 4th, 2012, 06:36 PM »
For it to work, we'd need to have a flawless draft system ie no ghost drafts as happen from time to time.
I'd rather see Wedge fill in empty textareas with drafts if they're available. Although that would conflict with browser plugins that do just that.
I'd rather see Wedge fill in empty textareas with drafts if they're available. Although that would conflict with browser plugins that do just that.
4993
Features / Re: Badges and the displaying thereof
« on June 4th, 2012, 05:19 PM »
Hmmm... That's doable I suppose.
Maybe we could even mix the cache for membergroup colors (used in username links) with the one for badge stars...?
Maybe we could even mix the cache for membergroup colors (used in username links) with the one for badge stars...?
4994
Features / Re: Badges and the displaying thereof
« on June 4th, 2012, 02:11 PM »
So... I was trying to find inspiration, so I looked into sm.org and found a very old mod (multiple badges) that did a similar thing. I was wondering how it could 'optimize' the database request for these.
Well, it doesn't... It's even worse than what I had in mind -- it does a query per badge, lol.
At this point, I have only two solutions:
- either I insert a FIND_IN_SET(additional_groups) in the LMD function when it comes to the 'mg' table, and then I turn the group entry into an array with membergroup settings for each...
- or I simply give up, and use the code I wrote weeks ago and that I always stop myself from committing. i.e. the global setting in the membergroup settings page, determining whether to show the main group badge, the post group badge, or both, or none.
I'm wary of using FIND_IN_SET(), but OTOH it's also likely that we'll rewrite the additional_groups field to only contain 'public' groups, meaning we'll need to join with a new table to get a proper list of all groups one belongs to, so that would be less of an issue in this case.. (Except that I don't know that there's a point in offering users the ability to create a badge for a user group....?!)
'm a bit lost -- as usual... Hard to get back into the game after this hectic week.
Well, it doesn't... It's even worse than what I had in mind -- it does a query per badge, lol.
At this point, I have only two solutions:
- either I insert a FIND_IN_SET(additional_groups) in the LMD function when it comes to the 'mg' table, and then I turn the group entry into an array with membergroup settings for each...
- or I simply give up, and use the code I wrote weeks ago and that I always stop myself from committing. i.e. the global setting in the membergroup settings page, determining whether to show the main group badge, the post group badge, or both, or none.
I'm wary of using FIND_IN_SET(), but OTOH it's also likely that we'll rewrite the additional_groups field to only contain 'public' groups, meaning we'll need to join with a new table to get a proper list of all groups one belongs to, so that would be less of an issue in this case.. (Except that I don't know that there's a point in offering users the ability to create a badge for a user group....?!)
'm a bit lost -- as usual... Hard to get back into the game after this hectic week.
4995
Features: Upcoming / Re: Q&A enhancement: multiple answers and multiple languages
« on June 4th, 2012, 10:47 AM »
Star Trek (and to a lesser extent Firefly), apparently... Not as much fun as my answers. :P
About Q&A, my main issue with the redesign is that it isn't responsive. Try shrinking the window and behold... a scrollbar!
About Q&A, my main issue with the redesign is that it isn't responsive. Try shrinking the window and behold... a scrollbar!