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.
7366
The Pub / [Archive] Re: Logo Madness
« on October 18th, 2011, 03:08 PM »
@Pete> That one isn't in the list..?
@Jorin> I take it you mean simply-green? It's pretty close to the current one indeed, with a slightly redder red, and no drop shadow. I should try and make a version with a very subtle drop shadow, I don't know... It used to be important because the logo was shown on top of a complex background, but I chose to go for a flat background now, so even the slogan doesn't have to be bold to be readable, so I should look into that as well.
@Jorin> I take it you mean simply-green? It's pretty close to the current one indeed, with a slightly redder red, and no drop shadow. I should try and make a version with a very subtle drop shadow, I don't know... It used to be important because the logo was shown on top of a complex background, but I chose to go for a flat background now, so even the slogan doesn't have to be bold to be readable, so I should look into that as well.
7367
Features / Re: New revs - Public comments
« on October 18th, 2011, 03:04 PM »It's on my todo list :P
Yes, but it means doing that treatment everywhere where names are pulled directly. The alternatives are converting everything to a case of loadMemberData (minimal) or doing it in the post-replace phase, either way that's an extra query.
I have to admit I'm a sucker for dynamic replacements. Even on very text-heavy pages, it's still always super fast, and as long as it's done correctly... Well, there's nothing better :P
Right now, my color injection code, as slow and unoptimized as it is (preg_replace_callback...), only takes a millisecond to execute, and that includes loading the cached data. And with recaching, it takes 3ms, but OTOH I only have one custom group on my test site (admin), so it's bound to be fast overall...
Hmm. I'm thinking that we could do it better by querying and caching the member group colours on a longer term basis, and fetching user+group instead, as querying every user with their group is going to be quite expensive.
I've rewritten my code to store members+groups followed with a list of colors per group, to avoid repetition and thus generate a smaller cache file for bigger arrays. But I'm not sure what you're suggesting...?
The result is something like this: (let's say users 1, 2 and 5 are admins and user 3 is from group 7)
$member_colors = array(
'group' => array(
1 => 1,
2 => 1,
3 => 7,
5 => 1,
),
'color' => array(
1 => '#FF0000',
7 => '#FFCC99',
),
);
So, basically, we retrieve the color with $member_colors['color'][$member_colors['group'][$USER_ID]].
Of course, I'm also testing for 'bbc_link' inside the match, and it works well.
It depends how fussy the receiver is. A receiver expecting Atom and gets not-strictly-valid Atom might throw a wobbly. Besides, in XML modes, there's no point running that operation, might as well save a few CPU cycles...
Works for me. Just something I wanted to be careful of, really.
Of course, if I'm using PURLs, the link will show with the regular color because then Wedge has no way to (easily) figure out the target's group color...
It works like any other nesting, and for the most part it's pretty transparent.
For instance, link replacements have to happen after <URL> is transformed, but before pretty URLs are applied. I was thinking of using my replacement code right inside the purl filter file, to be able to both transform profile URLs and add a color at the same time, but... Err, one millisecond...? Who cares. Might as well make the code clearer and put everything in the same place.
That would work and would probably be faster than using true buffers to pass back and forth.Quote Well, we could simply turn these into sub-functions and call them all from ob_sessrewrite...
If you're sending out a feed of new members, there's really only so much you can put into it before you break Atom format, no?Quote Or 'custom', in my mind.
Memberlist is definitely a custom candidate. We need to decide what columns are actually needed.
Yup, it either should be throughout or not at all.Quote I think that's the only place you get it apart from the info center... A real bummer.
I could but it would feel wrong. The whole solution seems hacky and I don't like it but I just don't know a better one.Quote You know, you COULD revert this and no one would blame you for that...
(Heck, if it wasn't for the custom time format thing, I wouldn't have had to do the whole preg_match stuff to find the year.)
Also, why would you want to pass in parameters not related to the query itself, exactly?
Okay, forget it, once the query is converted, plugins will still have access to $users from within the query anyway... ;)
Oh... I just found out that my replacement code was also changing the color for links inside the profile area (showposts, etc.), ah ah... Well, easy to fix (just match against URLs with just a profile ID and nothing else...)
I could make the fix 'perfect' by storing user names in addition to groups in the cache. Then I would simply need to determine if the visible link matches the real_name, but... That would make for a bigger cache. I don't like the idea too much.
It wouldn't be too bad to provide somewhere that that value can be reset through a hook, and optionally a hook in the validatePassword subsystem to allow authentication plugins to safely handle admin-type security checks.
7368
The Pub / [Archive] Re: Logo Madness
« on October 18th, 2011, 01:35 PM »
I've updated post #722 with more logos.
- wedgelogof is the current sidebar logo (still my favorite)
- petal3 and petal4 are variations of an earlier logo, using green this time. I also changed the font to Segoe UI which is slightly taller (you'd have to look close, though.) And the slogan is no longer in italics.
- I removed the logos that didn't really cut it.
If you think the current logo is perfect, then all is good. Other than that, you can say if you prefer the slogan's regular font, or the Segoe UI version of the wedge text, or one of the alternative petal symbols (they're the same, it's just that one has a small drop shadow on it.)
- wedgelogof is the current sidebar logo (still my favorite)
- petal3 and petal4 are variations of an earlier logo, using green this time. I also changed the font to Segoe UI which is slightly taller (you'd have to look close, though.) And the slogan is no longer in italics.
- I removed the logos that didn't really cut it.
If you think the current logo is perfect, then all is good. Other than that, you can say if you prefer the slogan's regular font, or the Segoe UI version of the wedge text, or one of the alternative petal symbols (they're the same, it's just that one has a small drop shadow on it.)
7369
Features / Re: New revs - Public comments
« on October 18th, 2011, 09:13 AM »That looks familiar... :whistle:
I just looked at the huge query, remembered the hassle it was to plug some of AeMe's code into it (one of the biggest incompatibility generators out there), and wanted it gone, like, now.
Also, btw, I'm not sure wesqlQuery allows passing extra parameters not related to the query itself...?
Like, new wesqlQuery('hook_name', (query stuff), array($set, &$users, &$is_name))...?
7370
Features / Re: New revs - Public comments
« on October 18th, 2011, 09:10 AM »Heh, that's really why I wanted your input since it would require converting queries and 'big' queries would need this treatment later.
That's precisely my point. There are two routes: bolt on the left join on top of everything, every single place where member names are pulled directly (and trust me, there's a lot), or route it through loadMemberData which is an extra query.
Or, as I said: select m.id_member, g.online_color from members as m, membergroups as g where m.id_group = g.id_group
Something like that... (?)
Then get the entire list of people, push it into the cache for a few minutes, and use that cache internally to associate people with a color. It might represent a large cache file but if we ensure the option can be disabled, it's okay I guess... (?)
Works for me. But note that it's essentially the same query that I mentioned above, just run at a different time.
There are some interesting side-effects to doing that in the replace hook to beware of. Firstly, we'd have to disengage it if XML output is being used.
Secondly, if there's a link in the middle of a post or something to someone's profile, that's going to be hit too.
But we could look through the entire anchor tag and reject it if it has bbc_ in it or something...
Just for the sake of putting code together and making it easier to follow (as opposed to one monolith function that makes it harder to understand, especially since its original purpose is slowly being outweighed by all its extra work)
Feed - should be minimal, right?
Memberlist - it sort of depends what we put in the memberlist, and whether we add things like custom profile fields and avatars. (I've been meaning to add an option to CPFs to display in the memberlist, but I keep also meaning to think about doing something with its layout and making it less sterile)
PM - it uses lMD? I'm surprised, I'd actually thought there wasn't a use within PMs to do so, especially given how many other places within the PMs *don't* use it.
I once wrote a 'slash through banned members' mod, which naturally means extending the places where a user's name is used to pull is_activated, plus obviously changing the displayed name. I recall there being 20+ changes I had to make to PersonalMessage to achieve this.
Post I can understand for displaying the form back to users, but I don't remember it in drafts. There must have been a reason, very likely to find usernames, but I don't remember.
Yup, though it's nice having the member's name in the right colour there as it should currently be.
Hmm. The point I was getting at is that I didn't realise there was a %P for lowercase,
and that I assumed %p was the only one out there, so that if it were found and we wanted to use lowercase, we'd have to manually replace - as was originally done by SMF...
7372
Features / Re: New revs - Public comments
« on October 17th, 2011, 11:26 PM »
Pete, there's a long post above for you :P
(Okay, okay, I've got one waiting for me, too...)
(Okay, okay, I've got one waiting for me, too...)
7373
Off-topic / Re: The larger topic on your forum...
« on October 17th, 2011, 11:24 PM »72585
7374
Plugins / Re: Plugin servers / getting plugins to a system
« on October 17th, 2011, 10:03 PM »The other thing is preference. The majority of plugin authors are likely to be on Windows where making a .zip file is easier.
The alternative is forcing .tar.gz across the board, which is smaller generally. Our plugin server could unpack zip and repack as tar.gz on upload.
What that ultimately means is that the requester sends an HTTP POST with the body being a block of XML. (Or POST vars. Doesn't really matter. The key point is that you make a POST with one or more variables attached.) Then you get a block of XML back in some form.
7375
Features / Re: New revs
« on October 17th, 2011, 09:34 PM »
rev 1117
(8 files, 9kb)
+ Added a $txt['time_format_this_year'] string that contains the year-less time format string, for faster processing in timeformat(). (Subs.php, index.language.php)
- Removed the last remains of the OpenID code... Hopefully. (Class-UnitTest.php, Register.php, Subs-Members.php)
! It's AM/PM, not am/pm... As sad as it sounds. (Help.language.php)
(8 files, 9kb)
+ Added a $txt['time_format_this_year'] string that contains the year-less time format string, for faster processing in timeformat(). (Subs.php, index.language.php)
- Removed the last remains of the OpenID code... Hopefully. (Class-UnitTest.php, Register.php, Subs-Members.php)
! It's AM/PM, not am/pm... As sad as it sounds. (Help.language.php)
7376
Features / Re: New revs - Public comments
« on October 17th, 2011, 08:21 PM »That's indeed a very important point. there is the password reminder, the admin-center password verification
and the profile page (account settings: password verification while changing important account data & password change in general)
I have some plans for a universal bridge (webserver authentication, LDAP, external databases), thus I'd need a proper solution for these things...
7377
Features / Re: New revs - Public comments
« on October 17th, 2011, 06:53 PM »They can all go as far as I'm concerned. Even as a plugin I don't see OpenID as *replacing* the current login, but working alongside it. If FB Connect can be done as a plugin, so can OpenID, and FBC doesn't need the auth method setup AFAIK.
Well, for the most part I was pretty happy to use it, and I was curious to know what you thought of it because it would require rewriting the more important queries to make them hookable directly.Quote Yes/no. I have no idea, this hasn't been discussed in a while AFAIK.
I suppose that given we won't use this in all queries, it's okay to use it. But I'm not the one who'll implement it ;)
I simply did what I felt I needed to do with lMD while I was studying the changes after you removed OpenID... Now if you could just tell me whether you want me to commit it or not, I promise I won't mind either way. I'll just post my diff here for you to use if it inspires you.
What, exactly, is it for? That's the question to ask. If it's for pushing things into $user_profile, it shouldn't be needed because $user_profile just gets the entire row as-is so providing it's in the query, it's pulled into PHP-land.
I understand the logic of why it was done that way, it's primarily to avoid an extra query when that query (probably) isn't necessary,
but it doesn't make it flexible. I'd almost be inclined to add an option in the admin panel for 'use member group colours', and make everything actually use that (doing the relevant join(s) to the membergroups table as appropriate). If nothing else, it's one more that's highly desirable that really, to me, should be in core.
Other opinions on this...?
Now, if it were done thematically, you could really tighten up what's loaded when, though it would make bolting things into that query a lot more complicated.
I think figuring out where minimal and profile are used would be the first step,
- normal: used nowhere.
- minimal: used in ManageErrors to pull only the real_name. And... that's all. Sigh!!
- profile: used in PersonalMessages.php when editing PM settings in the profile area, for use in the subsequently called saveProfileFields(), and in Profile and Profile-Modify, as expected.
- no param (i.e. normal):
* used in SSI (ssi_queryMembers), Display (load post authors), Feed (getXmlProfile), Memberlist (load member list -- serious candidate for 'minimal'), PersonalMessage (used in MessageFolder to load PM authors, MessageSearch2 for the same, MessagePost, and drafts. Used in Aeva Media's admin page to list moderators (strong candidate for deletion.)
* Also used in Profile-Actions.php only to retrieve the list of groups of a member for use in subscriptions(). Candidate for 'minimal', or even 'custom' by specifying only the membergroup data...
* Used in Search2 to get authors for found posts. Used in Who.php for the Who's Online list. Another candidate for 'minimal'...
* Used in Aeva Media to get comment authors, and then immediately after that to get the item author's data... Woot, nice oversight. We definitely should merge the two of these...
minimal is DEFINITELY in dire need of being reused elsewhere. We can safely add more data (who cares about ManageErrors performance!), and do things like making sure we don't retrieve the signature, etc.
and making minimal a shade bigger to allow for things like member-group colour (and then making it used consistently!) would help
Seems like a very good idea to me. Plus, we can get rid of the existing custom colors, and we have an easy way to simply 'skip' the whole color thing (of course this option should be part of the option that allows to show membergroups in the info center... Or, we simply hardcode colors for these, and make sure ob_sessrewrite won't reparse them.)
I try to go through them, but I still miss stuff occasionally. Before our gold release, I'd like us to go through the language strings - at a minimum - to look for stray things that should have been removed.
Hrm. This smells like a partial reversion to me :/ If the format contains %p, I think we'll have to reinject am/pm instead.Quote Done in 1115, but what about %p..? We can't really transform AM to am magically... Unless we specifically try to do so...
7378
Plugins / Re: Plugin servers / getting plugins to a system
« on October 17th, 2011, 05:13 PM »OK, let's recap.
.zip vs .tar.gz.
There are more rugged solutions than read_zip_data() out there, one of which is ZipArchive. It's not the only solution, however, and it won't be that hard to find such a solution.
My theory of using only one file type in general just means that it simplifies the process and the code, and minimises the overall number of hassles people have, IMHO.
OTOH, the only argument I have against this -- the plugin server would see a significant bandwidth increase if it can't server gzipped content...
Should uploading plugins from your computer be a separate page to downloading from a plugin server?
Other than that... I don't really bother either way.
Should a plugin be able to list the plugin server or servers where it can be found?
It would have to be seen, first, if anyone creates 'independent' plugin servers that host plugins by multiple users.
Other than that, it'd be just simpler for us to provide RSS feeds on the Wedge plugin server with an author filter. i.e. people could be notified when their favorite authors release new plugins or new versions. Totally missing from the SMF customization site, eh...
(Just a quick note, I took a look today at how WP handles plugin updates on the fly. Interestingly, it's practically the same as I'd outlined Wedge would have to be doing, that the download occurs, the old plugin is disabled, the new one enabled, and the old plugin then deleted. I still think the user should perform those steps, though, rather than entirely automating it. I don't know. Might have to experiment with how well that works out for us.)
If it fails --> manual processing.
7379
Features / Re: New revs - Public comments
« on October 17th, 2011, 04:59 PM »Odd, I searched for 'authenticate' and 'auth_method' but I guess I somehow missed those :/
I thought we were going to use something like Dragooon's wesqlQuery structure to make those hookable?
Still, I'd like to know where I'm going to put the post-query hook :P
Right now it's set to just after the query...
Hmm. What I'd rather do is do the minimal stuff (user name/profile/group) and optionally then add extra stuff if needed, e.g. array('avatar', 'signature', 'custom fields'). Then I'd feel more comfortable extending loadMemberContext into general use (see in a moment).Quote I'm thinking we should be adding a param to the function, telling Wedge not to bother with the 'heavy' processing and just fill in the blanks. I mean, if you have 50 users in the Memberlist, that means we potentially parse 50 signatures... for nothing!
I've been wanting to add group colours for a while, just never got around to it. The real problem is that a surprising number of places do not reference loadMemberData/loadMemberContext for getting things like names, but do a raw join from whatever table into the members table to get the name. PMs is by far the worst offender for this from memory.
PM example: the PM sender's name is specified with the group color. The PM recipient list isn't. Hmm...
Oh, and PT Sans + red for admin group = terribly ugly. Need to do something about that... Red is suitable for small Verdana fonts, but as soon as you make it a big font, it tends to catch attention too much.
As I said above, it seems to me that making loadMemberContext more generally used would be advantageous, but at the same time that comes with an overhead in performance and memory.
If it were better able to be segmented (both in lMC and lMD), as to what information you're looking for, that can be avoided.
And then in lMC we test whether said field is present before we process it.
I'd tend to say that lMD and lMC are two of the most important functions in Wedge, and they should be handled with special care.
Works for me. Is there anywhere $txt['profile_of'] is used as a link description where it wouldn't have the name available to it (and so wouldn't make sense if used that way)?
Removed in 1116.
Crap, I thought I'd nailed all instances, guess I didn't search so thoroughly :/
'am' and 'pm' is probably nicer looking and more consistent with what everyone else seems to use.
Looks fine to me.Quote I've written a more 'accurate' hack for the year removal. Please review it and tell me if that's okay. ($year_shortcut is a static array, while $format is simply =& $user_info['time_format'])
I think I'm gonna go with the $txt solution where I provide the full year shortcut in the language files, and then if user doesn't use the default txt, we'll fall back to that test.
7380
Features / Re: New revs
« on October 17th, 2011, 04:52 PM »
rev 1116
(8 files, 9kb)
+ Added membergroup color to user links. Logic dictates that this should be done. (And that's when you begin to realize that red isn't such a great color for the admin group...) (Load.php)
- Replaced $txt['profile_of'] with $txt['view_profile'] to avoid stupid repetitions. There's no such thing as free bandwidth. (Load.php, MessageIndex.php, Search2.php, Unread.php, UnreadReplies.php, Who.template.php, index.language.php)
(8 files, 9kb)
+ Added membergroup color to user links. Logic dictates that this should be done. (And that's when you begin to realize that red isn't such a great color for the admin group...) (Load.php)
- Replaced $txt['profile_of'] with $txt['view_profile'] to avoid stupid repetitions. There's no such thing as free bandwidth. (Load.php, MessageIndex.php, Search2.php, Unread.php, UnreadReplies.php, Who.template.php, index.language.php)