Show Posts

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.

Messages - Nao
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.
7367
Features / Re: New revs - Public comments
« on October 18th, 2011, 03:04 PM »
Quote from Arantor on October 18th, 2011, 09:25 AM
It's on my todo list :P
Then should I revert my changes...? Just to be sure. What about passing params? (I suspect you discuss it below...)
Quote
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.
And lMD is going to be slower...
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...
Quote
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.
Can you elaborate on this...?
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.
Quote
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...
I'm not sure... For instance, I quick-edited a post and the result had the proper group color, which was fine (and wouldn't have happened if XML didn't run it.) Obviously I've disabled it now, but basically I don't really see a reason to prevent any XML that shows a profile link, to actually show it in the proper color...
Quote
Works for me. Just something I wanted to be careful of, really.
I'm not entirely convinced it's the best way though. I mean, to me as a user, it would make sense to have my link show in red if I'm linking inside my post to an admin's profile... I don't know.
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...
Quote
It works like any other nesting, and for the most part it's pretty transparent.
Sorry, I don't mean that I don't understand them, I just mean that I don't get the point. To me, output buffers are nice if you're trying to 'catch' data output by something else, etc, but if you know the exact execution order, it's best to just put everything into the same OB...
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.
Quote
Quote
Well, we could simply turn these into sub-functions and call them all from ob_sessrewrite...
That would work and would probably be faster than using true buffers to pass back and forth.
Definitely... But I'm not in a hurry to do that either, though :lol:
Quote
Quote
Or 'custom', in my mind.
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?
What do you mean?
Quote
Memberlist is definitely a custom candidate. We need to decide what columns are actually needed.
Sure.......................... Who's up for it? :P
Quote
Quote
I think that's the only place you get it apart from the info center... A real bummer.
Yup, it either should be throughout or not at all.
(With the technicality of big user names (e.g. userbox authors) being potentially a problem. I'm thinking of fixing it by changing the default colors to pastel ones, like the group colors on wedge.org... #d2653a is definitely nicer than red for admins!)
Quote
Quote
You know, you COULD revert this and no one would blame you for that...
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.
Looking at the SMF2 code, it only checks for %p (lowercase), which generates uppercase AM and PM, and manually transforms them to time_am and time_pm, but they're not dealing with %P... Just so you know-- if you add a %P on a server that doesn't support it, it'll return an empty string... Not an empty am/pm; but an entirely empty string. (At least under Windows.) I don't think 'wrong' values are being filtered out if the user enters a custom time format...

(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.)
Quote
Also, why would you want to pass in parameters not related to the query itself, exactly?
<evil grin> "I don't know, but it's going to be a lot of fun finding out!" (Lister, epilogue, Red Dwarf 2x06)
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.
Quote
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.
I'm definitely leaving that one up to you ;)
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.)
7369
Features / Re: New revs - Public comments
« on October 18th, 2011, 09:13 AM »
Quote from live627 on October 18th, 2011, 12:54 AM
That looks familiar... :whistle:
I suspect that means something you offered before, sorry I can't remember.
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 »
Quote from Arantor on October 18th, 2011, 12:13 AM
Heh, that's really why I wanted your input since it would require converting queries and 'big' queries would need this treatment later.
Well, if you and Dragooon are into it, then you should do it... I don't have the perfect answer to everything ;)
Quote
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.
Yeah...
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... (?)
Quote
Works for me. But note that it's essentially the same query that I mentioned above, just run at a different time.
Sure... And in a cacheable fashion.
Quote
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.
Why? I can't think of an example where adding a class to an anchor would be detrimental to XML functionality...?
Quote
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.
Hmm yeah, I suppose... Although it's unlikely to happen.
But we could look through the entire anchor tag and reject it if it has bbc_ in it or something...
Quote
Also, I'm wondering whether it wouldn't be cleaner[1] to put the different replace processes in their own buffer, to be called at the appropriate time.
 1. It won't be faster, and it probably will use more memory, though.
Definitely cleaner. But easier to understand? I don't know, I've never been much into 'nested' output buffers, they never made much of a sense to me, I'd rather have it all in the same place...
Quote
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)
Well, we could simply turn these into sub-functions and call them all from ob_sessrewrite...
Quote
Feed - should be minimal, right?
Or 'custom', in my mind.
Quote
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)
Definitely a 'custom' candidate then...
Quote
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.
It only uses lMD when you're setting PM options in your profile...
Quote
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.
Looks interesting, though.
Quote
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.
I'll let you check the files independently... Yeah IIRC it's to find usernames for recipients that didn't go through the auto-suggest.
Quote
Yup, though it's nice having the member's name in the right colour there as it should currently be.
I think that's the only place you get it apart from the info center... A real bummer.
Quote
Hmm. The point I was getting at is that I didn't realise there was a %P for lowercase,
It's technically valid only in Linux. It doesn't work in Windows and Mac OS.
Quote
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...
You know, you COULD revert this and no one would blame you for that... ;)
7371
Off-topic / Re: The larger topic on your forum...
« on October 18th, 2011, 07:21 AM »
Link! :p
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...)
7373
Off-topic / Re: The larger topic on your forum...
« on October 17th, 2011, 11:24 PM »
Quote from poolhall on October 17th, 2011, 10:20 PM
72585
Was that the kind of topic with a title like "count to 1 million and then backwards"? ::)
7374
Plugins / Re: Plugin servers / getting plugins to a system
« on October 17th, 2011, 10:03 PM »
Quote from Arantor on October 17th, 2011, 05:25 PM
The other thing is preference. The majority of plugin authors are likely to be on Windows where making a .zip file is easier.
Upload zip -> Wedge server receives zip -> Wedge server repackages it as tgz -> Wedge server serves tgz when sending data across servers, and serves zip on request (manual download.)
Quote
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.
Just as I suggested, lol... ;)
Quote
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.
Isn't that what xhr is all about...? :P
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)
7376
Features / Re: New revs - Public comments
« on October 17th, 2011, 08:21 PM »
Quote from TE on October 17th, 2011, 07:38 PM
That's indeed a very important point. there is the password reminder, the admin-center password verification
I suspect that no one in their right mind would use Facebook to register/log into a forum they're administrating...
Quote
and the profile page (account settings: password verification while changing important account data & password change in general)
Password change would be disabled if no password is recorded in the first place. :)
Quote
I have some plans for a universal bridge  (webserver authentication, LDAP, external databases), thus I'd need a proper solution for these things...
Ah, LDAP... I've never understood what this is about ;)
7377
Features / Re: New revs - Public comments
« on October 17th, 2011, 06:53 PM »
Quote from Arantor on October 17th, 2011, 05:12 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.
Yeah... Makes sense. But considering the user won't have to choose a password (because all of this will be handled by OpenID or Facebook...), there are a few things that will still need to be added or removed... e.g. the password reminder won't work.
Quote
Quote
Yes/no. I have no idea, this hasn't been discussed in a while 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.
My opinion...? Too complicated. I read through the topic and then I forgot it all.
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.
Quote
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.
Yeah, I suppose you're right... I did notice the $row stuff, but I thought that plugins might wanna change some settings for the rest of lMD, such as removing users from $users (although I guess it could be done by adding an INNER JOIN to filter people out directly from within the query), or processing user names and changing the value of $is_name accordingly. Hmm... Yeah it's a bit overdone. So, no post-processing hook.
Quote
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,
An extra query are you sure? I have a feeling everything can be done with a LEFT JOIN on the membergroups table...
Quote
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.
Certainly something we should explore.

Other opinions on this...?
Quote
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.
(Hence my custom query to make it easier to add elements according to a variable test.)
Quote
I think figuring out where minimal and profile are used would be the first step,
From a quick look...
- 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.
Quote
and making minimal a shade bigger to allow for things like member-group colour (and then making it used consistently!) would help
I was thinking... Maybe, *maybe* we could 'simply' have ob_sessrewrite look through the list of links and color them accordingly... i.e. it gets the profile ID from the link, then fetches a list of users and groups. We'd just need to get a (cacheable!) list of membergroups and associated IDs. Then we can build a list of colors associated with member IDs. And voilà. We simply inject the needed CSS at rewrite time... :)

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.)
Quote
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.
I think there will be some, yeah... It's bound to happen. But I'd rather have too many strings than not enough :P
Quote
Quote
Done in 1115, but what about %p..? We can't really transform AM to am magically... Unless we specifically try to do so...
Hrm. This smells like a partial reversion to me :/ If the format contains %p, I think we'll have to reinject am/pm instead.
I'm not sure I understand. AFAIK SMF has always used %p to show the am/pm bit... Even Wedge uses %H:%I %p everywhere (in English). Maybe you mixed it up with %P, which shows a *lowercase* version, but isn't Mac OS-compatible... (I would have used that instead, otherwise. Heck...)
7378
Plugins / Re: Plugin servers / getting plugins to a system
« on October 17th, 2011, 05:13 PM »
Quote from Arantor on October 14th, 2011, 01:24 AM
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.
Sure.
OTOH, the only argument I have against this -- the plugin server would see a significant bandwidth increase if it can't server gzipped content...
Quote
Should uploading plugins from your computer be a separate page to downloading from a plugin server?
I'd tend to put everything into the same page, but really that's because it's already the case in SMF.
Other than that... I don't really bother either way.
Quote
Should a plugin be able to list the plugin server or servers where it can be found?
Hmm... I don't know :^^;:
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...
Quote
(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.)
We could add a 'noob-friendly' option to do everything automatically.
If it fails --> manual processing.
7379
Features / Re: New revs - Public comments
« on October 17th, 2011, 04:59 PM »
Quote from Arantor on October 17th, 2011, 03:52 PM
Odd, I searched for 'authenticate' and 'auth_method' but I guess I somehow missed those :/
Do you want to remove them, or me?
Quote
I thought we were going to use something like Dragooon's wesqlQuery structure to make those hookable?
Yes/no. I have no idea, this hasn't been discussed in a while AFAIK. I'm not well up to date on what Dragooon is up to -- sorry. What I know, though, is that we can always change it later... but if we don't implement a generic hook for queries by the first release, at least we'll have a hookable member query. It's not particularly hard to retool into something generic anyway...

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...
Quote
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!
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'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.
Not a big problem, I mean, we can always update them later... Or just don't bother.

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.
Quote
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.
Definitely...
Quote
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.
You mean, like specifying the list of fields we want...? Or maybe a 'thematic' load or something? Like, $set is too restrictive... It'd probably benefit from being turned into one big array where items are added individually after tests are performed (if (isset($set['sig']) $select_columns[] = 'mem.signature'...?)
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.
Quote
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)?
Nope... It's always the same. <a title="View profile of Arantor">Arantor</a>. (Plus, as you can see, it's perfectly natural English... ::))
Removed in 1116.
Quote
Crap, I thought I'd nailed all instances, guess I didn't search so thoroughly :/
Don't sweat it, that's what I'm here for...! It may take me a long time to go through your code changes but I always try to catch this kind of stuff... And I hope you do the same for me :P Even though I tend to triple-check my commits, I'm never sure I'm doing the right thing.
Quote
'am' and 'pm' is probably nicer looking and more consistent with what everyone else seems to use.
Done in 1115, but what about %p..? We can't really transform AM to am magically... Unless we specifically try to do so...
Quote
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'])
Looks fine to me.
Changed it a bit in the meantime, but the idea stays the same.

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)