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.
5836
Features / Re: New revs
« on October 18th, 2011, 04:13 PM »
(303KB[1], added 2, modified 4)
Revision: 1118
Author: arantor
Date: 15:10:30, 18 October 2011
Message:
! Fix for QueryString not urldecoding as it should (thanks TE) (QueryString.php)
! Missing hooks should have been declared in plugin manager (ManagePlugins.php)
! Part of the works for supporting file permission changes in the plugin manager. It's horribly unfinished right now but I want to commit it because even right now it's actually an improvement on where we were - for cases where FTP/SFTP is not required, it actually works properly in being able to recursively delete things, and it has been built in such a way that extending it to FTP/SFTP shouldn't be a slog; I've actually designed it around having file-changing classes that it should be able to interchangably use, Class-FileWritable for locally writable cases (though it doesn't use that as thoroughly as it should, it should be checking the entire permissions of every file/dir under consideration, not just the first level!), Class-FTP or Class-SFTP for where S/FTP connectivity is needed. Class-SFTP has not been tested since I made my changes to phpseclib, so it's probably broken too - or it might be, if I actually put in the relevant dialogue, which I haven't yet. Just wanted to get something committed where it actually works in a meaningful way compared to what it was before! This is, then, very much still a WIP. (Don't worry about reviewing Class-SFTP at this stage...) (ManagePlugins.php, Subs-Plugins.php, ManagePlugins language file, ManagePlugins.template.php, Class-FileWritable.php, Class-SFTP.php)
----
Added : /trunk/Sources/Class-FileWritable.php
Added : /trunk/Sources/Class-SFTP.php
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/Sources/QueryString.php
Modified : /trunk/Themes/default/ManagePlugins.template.php
Modified : /trunk/Themes/default/languages/ManagePlugins.english.php
@ Yeah, this is probably a bit earlier than it should have been, but a few notes on the design of it. The idea is that getWritableObject() is essentially the same construct as create_chmod_control but without having to be so formal about it. Either it'll return you a usable object with which you can do file operations, or it'll take you to a dialogue to enter S/FTP connection details. Or it would if the dialogue was any more than a placeholder.
It is still incredibly raw but it's getting there.
Revision: 1118
Author: arantor
Date: 15:10:30, 18 October 2011
Message:
! Fix for QueryString not urldecoding as it should (thanks TE) (QueryString.php)
! Missing hooks should have been declared in plugin manager (ManagePlugins.php)
! Part of the works for supporting file permission changes in the plugin manager. It's horribly unfinished right now but I want to commit it because even right now it's actually an improvement on where we were - for cases where FTP/SFTP is not required, it actually works properly in being able to recursively delete things, and it has been built in such a way that extending it to FTP/SFTP shouldn't be a slog; I've actually designed it around having file-changing classes that it should be able to interchangably use, Class-FileWritable for locally writable cases (though it doesn't use that as thoroughly as it should, it should be checking the entire permissions of every file/dir under consideration, not just the first level!), Class-FTP or Class-SFTP for where S/FTP connectivity is needed. Class-SFTP has not been tested since I made my changes to phpseclib, so it's probably broken too - or it might be, if I actually put in the relevant dialogue, which I haven't yet. Just wanted to get something committed where it actually works in a meaningful way compared to what it was before! This is, then, very much still a WIP. (Don't worry about reviewing Class-SFTP at this stage...) (ManagePlugins.php, Subs-Plugins.php, ManagePlugins language file, ManagePlugins.template.php, Class-FileWritable.php, Class-SFTP.php)
----
Added : /trunk/Sources/Class-FileWritable.php
Added : /trunk/Sources/Class-SFTP.php
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/Sources/QueryString.php
Modified : /trunk/Themes/default/ManagePlugins.template.php
Modified : /trunk/Themes/default/languages/ManagePlugins.english.php
@ Yeah, this is probably a bit earlier than it should have been, but a few notes on the design of it. The idea is that getWritableObject() is essentially the same construct as create_chmod_control but without having to be so formal about it. Either it'll return you a usable object with which you can do file operations, or it'll take you to a dialogue to enter S/FTP connection details. Or it would if the dialogue was any more than a placeholder.
It is still incredibly raw but it's getting there.
| 1. | As noted in the changelog the vast bulk of this is Class-SFTP, which doesn't need reviewing at this time unless you're feeling very, very brave. It's probably slightly broken anyway. |
5837
The Pub / [Archive] Re: Logo Madness
« on October 18th, 2011, 03:23 PM »The sidebar logo is wedgelevelf, not wedgelogof ;)
I've updated post #722 with more logos.
- wedgelogof is the current sidebar logo (still my favorite)...
Sorry for all the silly filenames... My FTP connection usually logs me out after like 20 seconds of inactivity and it's very slow to navigate the top-level folder (because of the hundreds of files it has), so when I get to upload new files, I usually think of renaming them at the last moment and there you go, I can only think of stupid names in a few seconds ;)
5838
Plugins / Re: Personal plugin showcase (yes, I'm an attention grabbing git)
« on October 18th, 2011, 03:20 PM »
Yeah, that's something I meant to do but the starting list was generated by doing a search on call_hook and going through the results. I must have missed a couple as I went.
5839
Features / Re: New revs - Public comments
« on October 18th, 2011, 03:19 PM »Then should I revert my changes...? Just to be sure. What about passing params? (I suspect you discuss it below...)
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 idea is to save either the extra join or the extra query, since if we're already doing the join to members, there's no need to do any further joining or querying if we already have the list of membergroups and their colours available to us.
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.
Sure.......................... Who's up for it?
What do you mean?
Some XML consumers won't care and will totally ignore that attribute. Some will care a great deal and write the XML feed off as invalid. So yeah, it's kind of important not to just randomly mess with set XML formats unless you're the only one using it and can afford not to be too picky about it come consumption time. For example, the plugin manager doesn't ever expressly validate the plugin-info.xml files against the schema. It *can* but it doesn't. It only validates the content to make sure it makes sense and is understandable, not that it's strictly legal. (I figure we'll do that on plugin upload, you see)
(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!)
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.)
<evil grin> "I don't know, but it's going to be a lot of fun finding out!"
| 1. | But I'd code it from scratch anyway, not only to avoid claims of copying but simply because we'd have to do it differently. |
5840
The Pub / [Archive] Re: Logo Madness
« on October 18th, 2011, 03:08 PM »@Pete> That one isn't in the list..?
5841
Plugins / Re: Personal plugin showcase (yes, I'm an attention grabbing git)
« on October 18th, 2011, 02:34 PM »
Yeah, it's a fairly simple enough test: get all the hooks we know and see if a plugin requests any we don't know :P But that doesn't help if not all the ones actually in Wedge aren't listed. Guess I'll have to check that again :/
5842
The Pub / [Archive] Re: Logo Madness
« on October 18th, 2011, 01:59 PM »* Arantor is still rooting for wedgelogof to be honest...
5843
Plugins / Re: Personal plugin showcase (yes, I'm an attention grabbing git)
« on October 18th, 2011, 01:18 PM »
Hrm. It seems I missed adding both hooks to the list of known hooks for some reason.
At the end of ManagePlugins.php is a list of what is supposed to be all the hooks in Wedge's core. just add those two to the list and it'll allow you to use them.
I'll fix my local copy so it can be committed in future.
At the end of ManagePlugins.php is a list of what is supposed to be all the hooks in Wedge's core. just add those two to the list and it'll allow you to use them.
I'll fix my local copy so it can be committed in future.
5844
Features / Re: New revs - Public comments
« on October 18th, 2011, 09:25 AM »Well, if you and Dragooon are into it, then you should do it... I don't have the perfect answer to everything
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... (?)
Why? I can't think of an example where adding a class to an anchor would be detrimental to XML functionality...?
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...
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...
Well, we could simply turn these into sub-functions and call them all from ob_sessrewrite...
Or 'custom', in my mind.
Definitely a 'custom' candidate then...
It only uses lMD when you're setting PM options in your profile...
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.
I think that's the only place you get it apart from the info center... A real bummer.
It's technically valid only in Linux. It doesn't work in Windows and Mac OS.
You know, you COULD revert this and no one would blame you for that...
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))...?
Also, why would you want to pass in parameters not related to the query itself, exactly?
yep, that's a perfect solution regarding admin security but there would still be an issue with the profile account data (can't be updated because I don't know my password). Maybe I can set that field as a hidden form field with a pre-filled password or something similar.. I currently have no clue to work around that issue with a proper solution.. Any ideas?
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.
5845
Features / Re: New revs - Public comments
« on October 18th, 2011, 08:56 AM »
Authenticating to a specific third party under your control is one thing, authenticating to a separate third party that you have absolutely no control over is something else.
The former is one place where I can see the logic, though surely all that's needed in that case is to turn over authentication over to the separate backend and if authenticated through that method, silently turn on 'disable admin security' (but only for the life of that page)?
The former is one place where I can see the logic, though surely all that's needed in that case is to turn over authentication over to the separate backend and if authenticated through that method, silently turn on 'disable admin security' (but only for the life of that page)?
5846
Features / Re: New revs - Public comments
« on October 18th, 2011, 01:34 AM »That looks familiar...
5847
Features / Re: New revs - Public comments
« on October 18th, 2011, 12:13 AM »
OK, so for the rest of the stuff...Quote See above. The reminder functionality should be rediverted to however the plugin wants to support it.Quote Heh, that's really why I wanted your input since it would require converting queries and 'big' queries would need this treatment later.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.
Ideally everything should have gone through lMD/lMC for consistency but it's not done that way for performance.Quote 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.
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. 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)Quote *nods* Profiles do actually need everything.Quote SSI use makes sense, though it could become a 'minimal' use without too much effort IIRC.
Display - naturally needs to be pretty thorough given what's displayed.
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.[2]
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.Quote Yup, though it's nice having the member's name in the right colour there as it should currently be.Quote Sure, but I'd rather have the *right* strings for the job, even if that means adding or stripping some.Quote 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...
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.
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
An extra query are you sure? I have a feeling everything can be done with a LEFT JOIN on the membergroups table...
Ideally everything should have gone through lMD/lMC for consistency but it's not done that way for performance.
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...
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.
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. 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)
- 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.
* 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.)
Display - naturally needs to be pretty thorough given what's displayed.
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.[2]
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.
* Used in Search2 to get authors for found posts. Used in Who.php for the Who's Online list. Another candidate for 'minimal'...
I think there will be some, yeah... It's bound to happen. But I'd rather have too many strings than not enough
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...)
| 1. | It won't be faster, and it probably will use more memory, though. |
| 2. | 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. |
5848
Plugins / Re: Plugin servers / getting plugins to a system
« on October 17th, 2011, 11:58 PM »
OK, so I've thought about this a bit more, after taking some time to review fetch_web_data a little bit, since that's quite a neat little function.[1]
I can't quite make up my mind whether to use HTTP headers as part of the request (and make it a GET) or put the contents in a POST body, either should be doable, though I guess using a GET is more semantically accurate.[2]
In other news I'm thinking of expanding fetch_web_data to support getting an arbitrary number of bytes at the start of a file and making it use the Range headers. The reason? Oversized, non attached images. When someone posts using those, the URL is fetched, the entire image is loaded into memory and its size established with the GD image info functions... but that means downloading the entire image. For the purposes of getting its size, getting the first 1.5K should be sufficient and we can do it ourselves from the file headers.
I can't quite make up my mind whether to use HTTP headers as part of the request (and make it a GET) or put the contents in a POST body, either should be doable, though I guess using a GET is more semantically accurate.[2]
In other news I'm thinking of expanding fetch_web_data to support getting an arbitrary number of bytes at the start of a file and making it use the Range headers. The reason? Oversized, non attached images. When someone posts using those, the URL is fetched, the entire image is loaded into memory and its size established with the GD image info functions... but that means downloading the entire image. For the purposes of getting its size, getting the first 1.5K should be sufficient and we can do it ourselves from the file headers.
| 1. | I mean, in an ideal world, it would be using cURL and no hosts would be putting stupid restrictions in that necessitate such measures, but in a cURL-less, stupid-host-filled world, it's pretty neat. |
| 2. | Especially as GET methods are supposed to be idempotent. |
5849
Off-topic / Re: The larger topic on your forum...
« on October 17th, 2011, 10:29 PM »
Public forum... about 400 posts in the largest thread.
Testing... 100,000 posts in a single thread.
Testing... 100,000 posts in a single thread.
5850
Plugins / Re: Plugin servers / getting plugins to a system
« on October 17th, 2011, 10:10 PM »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.)
Isn't that what xhr is all about