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 - Arantor
1546
Bug reports / Re: Cannot read the CSS - Alpha 2
« on February 20th, 2013, 12:07 AM »
I should add, after my experimentation in recent times on a shared host, I'm strongly motivated to set this hard-core caching to off (leave parsing etc. running, but not gzipping the files on the server by default)

It was not a particularly exciting test run to start with.
1547
Archived fixes / Re: Per language caching is broken
« on February 20th, 2013, 12:05 AM »
Need to sit and retest whether this is the case. I have a feeling it is working as expected now.
1548
Archived fixes / Re: Undefined index, Subs.php
« on February 20th, 2013, 12:05 AM »
No longer an issue, though create_button has been mutated today, heh.
1549
Archived fixes / Re: Thoughts don't handle entity content properly
« on February 20th, 2013, 12:02 AM »
Can't reproduce now.
1550
Bug reports / Re: SMF bug 3009 (duplicate meta information)
« on February 20th, 2013, 12:00 AM »
Bumping to put this nearer the top of my todo list. Any idea how short the meta description should be?
1551
Archived fixes / Re: Codes appearing while viewing some topics.
« on February 19th, 2013, 11:56 PM »
I take it this one is solved?
1552
Features / Re: Guess the Feature
« on February 19th, 2013, 09:53 PM »
Quote
It's one of the most frightening language files there are.......
And it's much nicer now. Or it will be when it's committed. I ripped out the secondary layer of arrays, plus all the random documentation blocks and it's looking much friendlier (bad news: there's an extra line of language per email template as the one-line description, sorry about that)

But that's sort of the point of this feature - so that people who want to customise it never have to touch the file manually.
Quote
Oh, can't bother to find the proper topic for this quick one: I'm currently reviewing the various icon files for Wedge, and noticed there's still msntalk.gif in there... Shouldn't we move it to a skype.gif icon..? Also update ManageMemberOptions.php for that, I guess..? I don't know much about MSN, but I heard they'd switched over completely to Skype...
Removing it is easy enough. Switching over, not so much. I couldn't find out with any reliability what the Skype user name would be or what the rules are, or for that matter what to put as the link (with any reliability) so it sort of fizzled out on that score.
1553
Features / Re: Guess the Feature
« on February 19th, 2013, 09:38 PM »
For those wondering what the 'doing it properly' comment was all about... hopefully this will explain it, when I mention that there are something like 48 email templates (including 1 I removed today because I cannot find anywhere in the code it is triggered)

Yes, I did go through every email template (including in some cases tracing back through the code) to figure out what variables could be used in that template. The result is worth it, though. Don't ask me why some of those variables are present, I have no idea.
1554
Features / Guess the Feature
« on February 19th, 2013, 06:05 AM »
So I'm working on a new feature and as ever this means new UI, and I suck at UI.

But here's the WIP as it stands. I'm sure you'll have no difficulty guessing what feature this is (first picture is older than second, it's still evolving and nothing is set yet)
1555
Features / Re: New revs
« on February 19th, 2013, 12:12 AM »
(5 files, 42KB!)[1]

Revision: 1931
Author: arantor
Date: 18 February 2013 23:11:23
Message:
! Tell the user their changes have been saved when they have edited something. (ManageRegistration.php, Register.template.php)

! Reformat the email templates stuff into something saner. This seems to work as intended and as a side benefit will definitely allow for proper change setup (which means changing email templates from the admin panel cleanly). I have a lot of plans for this and they all rely upon the language caching system that now exists, heh. (Subs-Post.php, EmailTemplates language files, I did both of them)
----
Modified : /trunk/Sources/ManageRegistration.php
Modified : /trunk/Sources/Subs-Post.php
Modified : /trunk/Themes/default/Register.template.php
Modified : /trunk/Themes/default/languages/EmailTemplates.english.php
Modified : /trunk/Themes/default/languages/EmailTemplates.french.php
 1. I have no idea why it's so big. But the changes are quite 'bitty' I guess.
1556
Bug reports / Re: Mini-menu implementation
« on February 18th, 2013, 10:49 PM »
Quote
Actually, no, since the date is taken from the latest file, so it'll just reuse the same date...
Most FTP clients seem to use current system date when uploading...
Quote
Hmm yeah then I probably did that by myself...
It was complicated. And I'm thinking I should get rid of .top_likes as it is right now. Dunno.
Hmm.
Quote
Heck I'm drowning in complexity...
Then break it down and deal with it in stages. Especially with optimisation. Do that last.
Quote
For instance, one of my most trivial issues is that I noticed that the mini-menu's .remove_button uses delete.gif, while the thought system's remove button uses delete.png, which is a different (and better looking!) icon... I'm considering dropping delete.gif and replacing it either with delete.png, or a smaller version of it. Again: dunno... :-/
Use what looks best. Something that's a few bytes more but looks better would be better appreciated by the users.
Quote
And one of my most annoying ones is that I don't know where to place the Actions button in the thought list... To the very left? Looks strange. Right after the date? Not aligned. Right before the thought author? Looks strange, again... At the end, aligned in a new column? This makes the thought much shorter... Not cool.
The very right would be better. I don't know that it would be 'much' shorter. But it's where it should go, IMO.
Quote
I also had tons of bugs with my mini-menu rewrite. Ended up having to revert a few lines I was quite proud of... And losing another 20 bytes. I *knew* this stupid extra code was there for a reason... Yet, I attempted to remove it. My loss.
Yeah, that sort of thing sucks :( This is why I don't do optimisation until late in the day, if at all. I tend to hammer it out, iterate it, fix the bugs in it and then (and only then) worry about making it smaller. Like the change in r1930 about fixing the ternary, IIRC there wasn't even that if to start with, it only came about as a bugfix, and even though there's currently a missing space by the :, I would personally have been happy with it how it was - ternaries make it smaller, yes, but they do make it harder to follow again later :/ It's all good, though.
1557
Features / Re: Rewriting the skin file parser...
« on February 18th, 2013, 10:44 PM »
I would argue it should be in skin.xml rather than indicating it in the filename.
1558
The Pub / Re: Language editing inside Wedge
« on February 18th, 2013, 10:43 PM »
Quote
Okay... I don't really understand what you've been doing with language caching exactly... Not sure what it means for arrays like number_context things, etc...
Everything still seems to work with respect to number_context anyway ;)

OK, here's the deal. We have a mostly functional language editor in the admin panel. But it relies on directly editing language files which is a bad idea, not just from a security standpoint but it's not entirely survivable through upgrades and so on.

For months I've wanted to replace it with it being held in the DB, so that users can change it with impunity, without having to worry about the language files being changed in permissions. It's friendlier to the user too. (Or at least it will be once I finish the rest of it.)
Quote
Did you do any benchmarking? What are the performance gains exactly...?
I rarely, if ever, do anything primarily for performance. Performance is not my greatest concern, if I'm honest. This one is primarily a usability/security feature. The caching changes are to preserve existing performance without compromising the benefits of having the language changes table, since the hit of having another query every call to loadLanguage would be huge. Or even another query per page (to scoop up everything) wouldn't be much better.

The caching is to prevent DB queries, not to deal with perceived slowdowns of loading files. From a straight performance standpoint, once a cache file is actually built it should be near enough the same performance as loading language files was before. There is some slight overhead for a given file, but that's offset by the fact that it will invariably be only checking for one file and rebuilding the cache if it does not exist.

Already there is an advantage of this - the new registration agreement area, which no longer requires changing agreement.txt (or agreement_french.txt as was, which also had side issues potentially related to incorrect encodings) is now fully editable from the admin panel without having to navigate FTP permissions.
Quote
It all seems very complicated to me... Still wondering if it was worth all that work..?
Oh yes. This is a means to an end, not an end in itself. Consider the updated registration agreement page. While that was technically possible before (the editor aspect), the file permissions part wasn't.

It also simplifies language pack distribution too by only having one folder to put everything in.
Quote
But it's always the same thing: what happens when the admin uploads a new file? Do they have to manually go to the admin and empty some cache? That sucks...
No, it doesn't.

When, exactly, is the admin going to upload new language files? I will say it again: if they're going to manually mess with the files, that's their lookout. There will be no need for them to mess with the files directly as there will be a better interface available from the ACP which will deal with the caching aspect itself.
Quote
It never was in there because I never was translated it. It was translated, though... But I don't know its quality. Attaching the file. I'll read through it another day... There was a discussion about it 2 years ago about updating its translation so it was probably bad to begin with (like easily 10% of the SMF French translation), but I'd already stepped down from my French translation manager position, so didn't care about it at all.
Well, if it's suitable from your perspective, it just needs to preparsecode'd (or do as I did, post it into a post, then copy the content back out the DB after) and put into Agreement.french.php.
Quote
Speaking of primary keys... I remember you added an entry recently to another table, custom fields I think, and noticed you didn't add a key for it although you did some extra ORDER BY queries on it... Was it voluntary, or something you forgot?
I didn't add a key on it (and yes, it was the custom fields table) because I couldn't validate that adding an index would make it any faster. The field is simply for ordering the entries of custom fields. A certain amount of that is cached elsewhere inside the core anyway meaning that adding an index is almost counter productive.
1559
Features / Re: Purging users pending approval, and some other stuff
« on February 18th, 2013, 07:20 PM »
Also, http://wedge.org/pub/feats/6108/new-revs/msg286044/#msg286044 shows the shiny updated UI for the registration agreement. It doesn't yet have the re-agreement part but it's much easier to engineer now.
1560
Features / Re: New revs
« on February 18th, 2013, 07:17 PM »
(11 modified, 1 removed, 18KB)

Revision: 1929
Author: arantor
Date: 18 February 2013 18:15:56
Message:
! Updated installer SQL with correct primary key. (install.sql)

! Don't show the warning status about bans to a given user if they themselves are softbanned. (Load.php)

! Bug fix - after the debug strings were moved to Stats lang file, the query viewer got upset. (ViewQuery.php)

+ First commit of magic new language entry cache thingy. NOTE: Language files are cached now. If you change a language file remember to dump the relevant cache of it. This is only for developers; regular users will be able to use the admin panel in future to do this. (Load.php)

! Registration code now uses the proper language string entry. (Register.php)

+ Manage registration now has spiffy new interface that interacts with the DB to update things. Juggled a few things about, gave it proper editing facilities. (ManageRegistration.php, Register.template.php, Admin language file)

! Some subsidiary stuff: don't let the current language file editor touch the agreement file and strip remaining entries of agreement.txt. (ManageServer.php, Packages.php, upgrade.php)

- Don't need scratty old agreement file any more. (agreement.txt)
----
Modified : /trunk/Sources/Load.php
Modified : /trunk/Sources/ManageRegistration.php
Modified : /trunk/Sources/ManageServer.php
Modified : /trunk/Sources/Packages.php
Modified : /trunk/Sources/Register.php
Modified : /trunk/Sources/ViewQuery.php
Modified : /trunk/Themes/default/Register.template.php
Modified : /trunk/Themes/default/languages/Admin.english.php
Modified : /trunk/Themes/default/languages/Admin.french.php
Deleted : /trunk/agreement.txt
Modified : /trunk/other/upgrade.php
Modified : /trunk/root/install.sql


@ I can attach files. Why shouldn't I? It might get people to look in this topic more often? ;)