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.
5386
Features / Re: New revs
« on April 23rd, 2012, 04:17 PM »
rev 1560
(3 files, 2kb)
! Fixed attach_downloaded being parsed with the actual string rather than the $txt index. Maybe I should allow for a string to be sent directly, though...? It's just an extra isset()... (Display.template.php)
! Fixed autolinking triggering itself a bit too happily in non-quick-edit mode... Should I reuse the exact same code as in parse_bbc()? (Aeva-Embed.php)
! Applied SMF 2.1 fix 8d54b5b by Spuds for cleanXml (PCRE v8.3 no longer accepting range D800-DFFF in regexes.) I never look into their fixes but when it comes to regex I must have a radar of sorts... (Subs.php)
(3 files, 2kb)
! Fixed attach_downloaded being parsed with the actual string rather than the $txt index. Maybe I should allow for a string to be sent directly, though...? It's just an extra isset()... (Display.template.php)
! Fixed autolinking triggering itself a bit too happily in non-quick-edit mode... Should I reuse the exact same code as in parse_bbc()? (Aeva-Embed.php)
! Applied SMF 2.1 fix 8d54b5b by Spuds for cleanXml (PCRE v8.3 no longer accepting range D800-DFFF in regexes.) I never look into their fixes but when it comes to regex I must have a radar of sorts... (Subs.php)
5387
Off-topic / Re: French election
« on April 23rd, 2012, 04:03 PM »
I may be mad enough, but I don't have enough ambition to do that :P
I'd rather lead a quiet life somewhere... Like, uh, now!
Anyway... So I voted for Bayrou, who ended up with 9.13% which is half of his 2007 score. Meh.
Mélenchon did a bad score as well -- which rejoices me because I never liked him... At all :lol:
Le Pen... Well, let's be positive and imagine that people who voted for her are just fools, rather than plain and simple racists.
Nobody gives Sarkozy a chance for round 2. Really. 56%/44% for Hollande in most polls is a hard score to beat...
Heck, even I will vote for Hollande. I just want the world to be finally rid of Sarko... I don't have an opinion about the man himself, but as president, he was -- and still is -- our own little Dubya.
I'd rather lead a quiet life somewhere... Like, uh, now!
Anyway... So I voted for Bayrou, who ended up with 9.13% which is half of his 2007 score. Meh.
Mélenchon did a bad score as well -- which rejoices me because I never liked him... At all :lol:
Le Pen... Well, let's be positive and imagine that people who voted for her are just fools, rather than plain and simple racists.
Nobody gives Sarkozy a chance for round 2. Really. 56%/44% for Hollande in most polls is a hard score to beat...
Heck, even I will vote for Hollande. I just want the world to be finally rid of Sarko... I don't have an opinion about the man himself, but as president, he was -- and still is -- our own little Dubya.
5388
Features / Re: New revs
« on April 23rd, 2012, 03:48 PM »
rev 1559
(4 files, 2kb)
* Forgot to hit F5 and refresh my list of updated files... Hmm. Another classic of mine. All of these files are related to the number_context() changes. (Subs.php, Boards.template.php, Display.template.php, MessageIndex.template.php)
(4 files, 2kb)
* Forgot to hit F5 and refresh my list of updated files... Hmm. Another classic of mine. All of these files are related to the number_context() changes. (Subs.php, Boards.template.php, Display.template.php, MessageIndex.template.php)
5389
Features / Re: New revs
« on April 23rd, 2012, 03:43 PM »
rev 1558
(20 files, 14kb) (I think I'm done with most of my language overhaul...)
* More index language string moves. (ManageNews.php, LANGUAGES: index, Login, ManageTopics, Post)
* Rewrote number_context to use an array. This should make it easier for foreign languages to get rid of the English files' legacy. See 'day_suffix' and 'attach_downloaded' in index.french.php for smooth examples. (Load.php, Subs.php, LANGUAGES: index, ManageTopics, PersonalMessage, Profile, Themes, Who)
* Harmonized all number-context strings to use %s instead of %d or %1$d or whatever. The logic is that (1) this system is complicated as it is, no need to use numbered replacements when the system only supports one replacement per string anyway, (2) %d won't do because of potential comma formatting. I'd rather we use a standard here. (LANGUAGES: index, PersonalMessage, Profile, Themes)
* Disambiguated $txt['status']. (Memberlist.php, Profile.template.php, index.language.php)
(20 files, 14kb) (I think I'm done with most of my language overhaul...)
* More index language string moves. (ManageNews.php, LANGUAGES: index, Login, ManageTopics, Post)
* Rewrote number_context to use an array. This should make it easier for foreign languages to get rid of the English files' legacy. See 'day_suffix' and 'attach_downloaded' in index.french.php for smooth examples. (Load.php, Subs.php, LANGUAGES: index, ManageTopics, PersonalMessage, Profile, Themes, Who)
* Harmonized all number-context strings to use %s instead of %d or %1$d or whatever. The logic is that (1) this system is complicated as it is, no need to use numbered replacements when the system only supports one replacement per string anyway, (2) %d won't do because of potential comma formatting. I'd rather we use a standard here. (LANGUAGES: index, PersonalMessage, Profile, Themes)
* Disambiguated $txt['status']. (Memberlist.php, Profile.template.php, index.language.php)
5390
Features / Re: New revs
« on April 23rd, 2012, 02:14 PM »
rev 1557
(26 files, 38kb) (huge commit... Hopefully everything still works. I'll keep an eye on the error log...)
* Moved more index language strings to satellite files. More to come later but I think the bulk is done. Original size was 33.6KB, current size if 27.3KB... Not bad, because this makes it more enticing for translators to start a 'basic' translation of Wedge by doing just the index file. Note that most debug strings are now a single long string (a tad slower to manage but should save time for non-admins.) (Class-DB.php, MoveTopic.php, Register.php, Report.php, SendTopic.php, Subs-Post.php, Subs-Template.php, SSI.php, LANGUAGES: Errors, index, Login, ManageTopics, Post, Profile)
* Rewrote loadLanguage to load an array of language files, rather than an exploded string of filenames, effectively harmonizing it with loadSource etc. (Admin.php, ManageErrors.php, ManagePermissions.php, Report.php, Subs-Post.php)
! Fixed loadLanguage not properly caching some files when some are loaded in batches. (Load.php)
! Fixed buffer hooks not executing. (Thanks live627!) (Subs-Template.php)
* Number of downloads/views per attachment is now a context number. (Display.template.php, index.language.php)
* Clean-up à la Nao. (SplitTopics.template.php)
(26 files, 38kb) (huge commit... Hopefully everything still works. I'll keep an eye on the error log...)
* Moved more index language strings to satellite files. More to come later but I think the bulk is done. Original size was 33.6KB, current size if 27.3KB... Not bad, because this makes it more enticing for translators to start a 'basic' translation of Wedge by doing just the index file. Note that most debug strings are now a single long string (a tad slower to manage but should save time for non-admins.) (Class-DB.php, MoveTopic.php, Register.php, Report.php, SendTopic.php, Subs-Post.php, Subs-Template.php, SSI.php, LANGUAGES: Errors, index, Login, ManageTopics, Post, Profile)
* Rewrote loadLanguage to load an array of language files, rather than an exploded string of filenames, effectively harmonizing it with loadSource etc. (Admin.php, ManageErrors.php, ManagePermissions.php, Report.php, Subs-Post.php)
! Fixed loadLanguage not properly caching some files when some are loaded in batches. (Load.php)
! Fixed buffer hooks not executing. (Thanks live627!) (Subs-Template.php)
* Number of downloads/views per attachment is now a context number. (Display.template.php, index.language.php)
* Clean-up à la Nao. (SplitTopics.template.php)
5391
Features / Re: Things to do before the Mayan apocalypse: general
« on April 23rd, 2012, 07:58 AM »
See floating boards :)
I pretty much want to do it by default but it's gonna be hard. Especially when it comes to permissions...
I pretty much want to do it by default but it's gonna be hard. Especially when it comes to permissions...
5392
Archived fixes / Re: Buffer hook never called
« on April 22nd, 2012, 07:25 PM »
I think itll be good dont worry :P
5393
The Pub / Re: The Cookie Law (in the UK at least)
« on April 22nd, 2012, 04:03 PM »
I haven't read the entire topic or whatever, but I just wanted to share this -- it is probably a known issue but whatever -- I noticed that if I remove the SID cookie and then hit Refresh, it is regenerated again -- even though I'm logged in to begin with... :-/
5394
Features / Re: New revs - Public comments
« on April 22nd, 2012, 04:00 PM »Oh, sorry, yeah, this is a mostly new install of Notepad++ which I forgot to reconfigure for LF only.
Thing is, it's totally related to managing topics, rather than topics in general, hence the name.
and the biggest thing is tackling these awkward composite strings where a single line is made out of $txt['something'], $variable, $txt['something_else'], because that causes so many problems!
BTW, you didn't tell me whether you thought it'd be best to rewrite number_context to use an array directly?
Oh and we could for instance put a string instead of an array, and that would mean 'no special treatment' (i.e. always '_n'), meaning that instead of doing sprintf() on strings, we could directly call number_context even if we don't have special treatment for them in French or English -- because it doesn't mean other languages won't need it...
Also -- I looked into loadLanguage and it has an oddity.
loadLanguage('index+Errors') would be an acceptable call. It will explode the string and deal with both language files.
However:
- it could benefit from being turned into an array parameter, like loadSource etc...
- currently, $already_loaded stores the entire string in its cache. Meaning that if we did loadLanguage('index') and then someone did loadLanguage('index+Errors'), the index file would be loaded a second time. It can be fixed by moving the caching operations to within the foreach, and using a continue; instead of a return $lang, but I don't know if it's acceptable to you...?
I am aware though that some of my moderation filters UI won't work properly in RTL because of the way it builds certain strings but I figure to a point we'll deal with that when there are people around who actually use an RTL language and can be best placed to tell us how it has to work.
e.g. $txt['members_normative'] and $txt['members_declarative'] which in English would be the same string but would be different strings in other languages, I think it was talking about German.
But instead of doing that, I figured it's simply cleaner and easier (if very slightly slower) to create the complete string so you always have the term in relevant context.
Still, it's not like XenForo or other systems where we put it all in the DB...
I'm not convinced that performance-wise, it's a good idea to put into the DB whatever you're simply going to retrieve later without any sorting work... I mean, SMF/Wedge has the settings table to load entirely, but even that is cached to file, as you kindly reminded me a few days ago... :lol:
Posted: April 22nd, 2012, 02:25 PM
Something else... MoveTopic.php does, in a few occasions, load the default language for a file, just to retrieve a string in particular, and then reverts to the user's preference.
However, it 'simply' reloads the file without a second thought about the static cache.
I think it should reload by doing loadLanguage('File', '', false, true) (i.e. $force_reload = true and $fatal = false), don't you agree?
:edit: Forget what I said -- since it stores the latest language loaded in the static cache, then it will automatically continue loading the file. :)
Posted: April 22nd, 2012, 02:46 PM
BTW-- index.english.php went from 32KB to 27KB in size... And I'm not even finished!
An incredible amount of data really shouldn't have been in there in the first place ;)
5395
Archived fixes / Re: Buffer hook never called
« on April 22nd, 2012, 03:56 PM »
Okay, since Pete remained silent on this, I added the code myself but I'll warn you, I have no knowledge on this part of the code... ;)
5396
The Pub / Re: Number of 'online users'
« on April 22nd, 2012, 03:51 PM »
Okay...
- I would also encourage getting rid of guest counting in the stats -- *except* in the Who's online / Info center areas where you can easily sort between guests and online members, and determine that 90% of the 'guests' are actually bots, etc... This kind of thing is interesting, but recording numbers on the long run is pointless because you can't know whether you got a bot swarm or simply an actual surge in interest.
- I think that even if we don't start a session for guests, we should still record whatever page they're on and store it somewhere for the next 15 minutes (by IP.) I really like being able to know what a guest is doing... Not only that, but some people are adamant on knowing it, for security purposes. I'd suggest maybe only showing this data to admins, and showing it in a way that's different from the Who's online section -- for instance, we could store the query string and $_SERVER and show that in a subsection of the Who's online page, or something... Because bots will often try to reach URLs that you never considered, it's nice to be able to spot the oddities in there.
- So, getting rid of PHPSESSID for guests, I'm good with that. I'm sure it'll be beneficial for everyone. We will of course need to ensure that the login and registration links lead us to a proper cookie being set, *or* or a SID param in the URL.
- @Star: you're wrong about awstats and such. But even if you weren't -- it's no reason to get into a fight with Pete. Here you are, waiting for the release of a free software package that will frankly make all others look bad, and you're pretty much insulting half of its authors.
- @Pete: don't bother, again... You don't owe anyone anything (even me, eh.) If you want to ban people (temp or perm), feel free to do it. I'd rather have a forum where people you ban people who piss you off, than a forum where you aren't at all. :P
- I would also encourage getting rid of guest counting in the stats -- *except* in the Who's online / Info center areas where you can easily sort between guests and online members, and determine that 90% of the 'guests' are actually bots, etc... This kind of thing is interesting, but recording numbers on the long run is pointless because you can't know whether you got a bot swarm or simply an actual surge in interest.
- I think that even if we don't start a session for guests, we should still record whatever page they're on and store it somewhere for the next 15 minutes (by IP.) I really like being able to know what a guest is doing... Not only that, but some people are adamant on knowing it, for security purposes. I'd suggest maybe only showing this data to admins, and showing it in a way that's different from the Who's online section -- for instance, we could store the query string and $_SERVER and show that in a subsection of the Who's online page, or something... Because bots will often try to reach URLs that you never considered, it's nice to be able to spot the oddities in there.
- So, getting rid of PHPSESSID for guests, I'm good with that. I'm sure it'll be beneficial for everyone. We will of course need to ensure that the login and registration links lead us to a proper cookie being set, *or* or a SID param in the URL.
- @Star: you're wrong about awstats and such. But even if you weren't -- it's no reason to get into a fight with Pete. Here you are, waiting for the release of a free software package that will frankly make all others look bad, and you're pretty much insulting half of its authors.
- @Pete: don't bother, again... You don't owe anyone anything (even me, eh.) If you want to ban people (temp or perm), feel free to do it. I'd rather have a forum where people you ban people who piss you off, than a forum where you aren't at all. :P
5397
Off-topic / Re: French election
« on April 22nd, 2012, 11:24 AM »Did you vote? Who did you vote for? Who do you think will win?
I'm a centrist... Basically I hate politics because it's always about getting power and trying to keep it. Because you don't become president without ambition, and thus you need ambition (self-centered quality) more than care. Back in '07 I voted for Bayrou and in the final round I just didn't vote at all because I hated both finalists. Today I don't know... I'll probably vote Bayrou again but I don't feel connected to his programme like I was back then. Still, he's the least incapable of all, I'd say. He has a strong following from geeks. We already know who'll be in the final round -- Hollande and Sarko. I'll go and vote for Hollande, even if that means paying more taxes. I know it'll cost me money. I just know I'm ready to pay just to see Sarko ousted and finally brought to justice. He may be a 'funny' guy, but he's done so many abject things in his 5 years, and even before that... It's not like the French are going to forget.
What are the main politics surrounding the elections? Presumably a big topic is the Euro crisis?
Doesn't matter, though... Hollande has so much more public support that he's bound to win the election either way.
How are both sides trying to capitalise on that? What are the other main topics and are there any topics that are uniquely French?
As a shift worker I would not be able to vote as I am at work all day and the polls close at 8pm. Does this give the result a right-wing bias?
The polls close at 6pm in most areas, 7pm in big cities and 8pm in major cities and most of the Paris region.
5398
Features / Re: New revs - Public comments
« on April 22nd, 2012, 12:27 AM »
(BTW, your ManageTopics files were in Windows CRLF format. I tend to double-check for new files so I caught it and fixed it. Try and have your notepad app generate LF files by default :))
(Also, maybe it should be renamed to Topics.language.php?)
Oh and thanks Aaron. Pete is all the more commendable for this because by definition his native language doesn't require any work :P
I'm still lazy enough that I only deal with stuff that makes Wedge better in French. Just like Spip (my fave French CMS which I used back in 2003) had excellent French support.
(Also, maybe it should be renamed to Topics.language.php?)
Posted: April 22nd, 2012, 12:14 AM
Oh and thanks Aaron. Pete is all the more commendable for this because by definition his native language doesn't require any work :P
I'm still lazy enough that I only deal with stuff that makes Wedge better in French. Just like Spip (my fave French CMS which I used back in 2003) had excellent French support.
5399
Features / Re: New revs - Public comments
« on April 22nd, 2012, 12:01 AM »
Yup... And there are even more useless entries in index. You have no idea the number of crap that should be in Login.language.php for instance... :^^;:
Oh, and this $txt['times'] thing... Another generic thingy that isn't used anywhere, to my surprise. (Feel free to double-check.)
It also has a $txt['attach_times'] entry that has the same content. (Very smart...)
So I removed both 'times', and made a single string for both attach_downloaded and attach_viewed or whatever.
Then I figured, okay what about adapting it for "Viewed 1 time"... Instead of "Viewed 1 times"...
So I changed it to attach_viewed_n and attach_viewed_1. But in French, times is 'fois', which is both singular and plural, and I don't want to have to set a dummy attach_viewed_1 for it just because it'll show the English version instead...
Reminds you of the month days, doesn't it...?
I think maybe there's an issue in how we're handling number_context. Maybe we should use an array for every single entry... I know, doesn't sound great, and it may actually slow down Wedge (by a few microseconds), but I don't know how to do it otherwise.
Oh, and this $txt['times'] thing... Another generic thingy that isn't used anywhere, to my surprise. (Feel free to double-check.)
It also has a $txt['attach_times'] entry that has the same content. (Very smart...)
So I removed both 'times', and made a single string for both attach_downloaded and attach_viewed or whatever.
Then I figured, okay what about adapting it for "Viewed 1 time"... Instead of "Viewed 1 times"...
So I changed it to attach_viewed_n and attach_viewed_1. But in French, times is 'fois', which is both singular and plural, and I don't want to have to set a dummy attach_viewed_1 for it just because it'll show the English version instead...
Reminds you of the month days, doesn't it...?
I think maybe there's an issue in how we're handling number_context. Maybe we should use an array for every single entry... I know, doesn't sound great, and it may actually slow down Wedge (by a few microseconds), but I don't know how to do it otherwise.
5400
Archived fixes / Re: Thoughts not display @ on initial post
« on April 21st, 2012, 11:45 PM »
Let's be clear. The thought system is not 100% finished. It still has a few bugs (try to post a new thought from the sidebar, then try to 'Modify' it immediately without reloading the page... It won't show you the current thought, even though there's one.)
I just don't think it's a huge priority right now. Priorities should basically be whatever will be hard to modify *after* we go live...
For instance, the work I'm doing now on the language files... It's something that's going to be annoying to translators if it's done *after* the first public release.
I just don't think it's a huge priority right now. Priorities should basically be whatever will be hard to modify *after* we go live...
For instance, the work I'm doing now on the language files... It's something that's going to be annoying to translators if it's done *after* the first public release.