New revs

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1545, on April 6th, 2012, 10:36 PM »
(2 files, 1KB)

Revision: 1545
Author: arantor
Date: 06 April 2012 21:35:52
Message:
! Use the definitive Host header instead of any we may have manipulated. Should fix spurious errors with splitting topics and BB external form tests. (QueryString.php, Security.php)
----
Modified : /trunk/Sources/QueryString.php
Modified : /trunk/Sources/Security.php
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #1546, on April 7th, 2012, 11:59 PM »
rev 1546
(3 files, 5kb) (yeah, definitely not my most impressive commit... For people who don't care about bytesize :P)

* Saved another 300 gzipped bytes, this time in topic.js, by doing a quasi-complete rewrite of InTopicModeration() (which also fixes a few minor issues). The Display template should also be slightly lighter. Hey, a saved byte is a byte saved. Or the other way around. (Display.template.php, topic.js)

* Spacinazi. (ManageErrors.php)
Re: New revs
« Reply #1547, on April 10th, 2012, 10:43 AM »
rev 1547
(1 file, 3kb) (very old DB changes that I kept postponing...)

! Fixed spoiler tag adding extra double quotes on double-quoted strings. For instance, if you want to add a custom string in your Spoiler button, use [spoiler="Hello world"] (or just [spoiler=foobar] if there are no spaces), but this would generate extra double quotes in the final HTML. (install.sql)

! Added white-space trimming around quotes. Have yet to determine whether this actually works though... It's not like in the Noisen codebase where I was doing it manually with a couple of regexes, ah ah. (Why am I laughing?) (install.sql)

* Added a few new default settings: disable_rss (0) (media area should show feed links by default), and for other areas: max_urlLength (50) (any URLs longer than 50 chars should be cut off), and display_who_viewing (2) (Wedge should show user names viewing a topic by default since it's already shown in the stats area). (install.sql)

* Harmonized value insertion queries. (install.sql)
Re: New revs
« Reply #1548, on April 14th, 2012, 12:22 AM »
rev 1548 (Too many things to finish before I can commit them...)
(5 files, 3kb)

+ Added a custom time format string, "%@", which you may use to add something after the day number, e.g. "31st", "3rd", etc, and using it by default in English and French. Used a custom array in $txt, translators should set $txt['day_suffix'] to array('n' => '%d') if they have no specific suffixes to add for their language. (Load.php, Subs.php, index.language.php)

! Fixed board ordering in category pages. (Subs-BoardIndex.php)
Re: New revs
« Reply #1549, on April 16th, 2012, 02:45 PM »
rev 1549
(4 files, 4kb) (forgot to report it, did it this morning actually...)

+ Added enableError404Logging option (disabled by default), to determine whether the admin really wants to log all Error 404 messages. Probably needs some kind of help text but I'm not even sure my English for the option itself is proper... (ManageSettings.php, ManageSettings.language.php, QueryString.php)

* Some minor optimizations, and starter code for /board/do/action support (will still work as always in the current SVN, it just needs some extra code from the PURL filters which I can't commit until I'm done with the tons of things I've been working on this week... -_-) (QueryString.php)
Re: New revs
« Reply #1550, on April 16th, 2012, 07:53 PM »
rev 1550
(7 files, 7kb -- and PLENTY of potential bugs for you guys to find :P)

* Extensively rewrote Pretty URLs to be easier to tweak (not that you can actually easily add new keywords to transform right now, but it will come...) Basically, you no longer need to provide two pattern strings, the search pattern will be reused for replacements as well. The regex is easier to grasp (even though it uses a lookahead assertion... Learn to love it.) There are WAY too many changes to document them all, just trust me that overall my optimizations made the entire process about twice faster. Your server will thank you (and me) for that. Hopefully didn't break any of the patterns with my rewrite. (Subs-Template.php, Subs.php, PrettyUrls-Filters.php, Ajax.php, Feed.php, Aeva-Foxy.php)

* A few speed optimizations for the topic filter, and general optimizations based on the use of references. I know, one is not supposed to use references for optimizations... Except when it makes it three times faster, right? (PrettyUrls-Filters.php)

* Moved session ID injection code a bit further down the output buffer rewriter, to catch as many URLs as possible. Untested. (Subs-Template.php)

* Moved category URL replacement to the board filter, rather than the action filter -- makes more sense. (PrettyUrls-Filters.php)

+ Added support for /do/action even inside a topic or board. (PrettyUrls-Filters.php)

! Feeds were sending session IDs to feed fetchers. Baaaaad! (Feed.php, Subs-Template.php)

! Last-minute typo in error 404 logging... A classic of mine. (QueryString.php)
Re: New revs
« Reply #1551, on April 19th, 2012, 08:26 PM »
rev 1551
(5 files, 5kb)

! Split timezones into continent optgroups in the admin area. Added Africa back into the list... I've seen countless PHP samples about timezones, and over half of them forget Africa as well. Innnn...teresting. (ManageServer.php)

- Removed a hack that was no longer needed after my changes to the pretty URL system. (Display.php)

+ Added support for optgroups in admin-generated select boxes. (Admin.template.php)

* Rewrote the split topics feature to accept a topic parameter (instead of 'from'), so that we can prettify it alongside the other moderator links in topic pages. (Display.php, SplitTopics.php)

! Fixed maximum length for user titles. (Profile-Modify.php)

+ Added a Europe/Paris timezone in user profiles. Hey, what did you expect from me? (Profile-Modify.php)
Re: New revs
« Reply #1552, on April 19th, 2012, 08:28 PM »
rev 1552
(4 files, 5kb)

* A tiny fix for French. Note to self and Pete: seriously, 30+KB is too large for the index language... It should only hold the most commonly used text strings, and certainly not things like a merge topic feature description... If anything, index.english.php should be short and easy to translate, so that we can have obscure translations that deal with at least the most common strings. (index.french.php)

- Removed script remover from pretty URL code -- as far as I know, it's no longer needed. Note to self: if anyone finds a bug related to this, just revert this revision of the file... :) (Subs-Template.php)

+ Added support for 'admin' and 'mod' suffixes in CSS files. For instance, index.admin.css is loaded on all pages for admins (as opposed to 'admin.css' which is loaded on admin pages for everyone). I'm sure it'll end up being useful at some point... (Load.php)

+ Added support for the 'local' suffix in CSS files (index.local.css is basically index.custom.css but it won't be included if a sub-skin is selected.) (Subs-Cache.php)

! Fixed cache hash support for slashes (/), and did some micro-tweaking to save a few cycles... I'm desperate for cycles. (Subs-Cache.php)
Re: New revs
« Reply #1553, on April 20th, 2012, 12:08 AM »
rev 1553
(1 file, 2kb)

! Fixed broken page index system in topic merging. I'm not exactly sure why having a board ID in the URL automatically brings out the message index instead of the action page... We should look into this, but this fix is rather elegant anyway. (SplitTopics.php)

! Fixed incorrect topic count calculation in page index system... yeah, in topic merging, how did you guess? This is probably a SMF bug: the count also takes the current topic into account, even though it's never shown in the list, resulting in an empty last page in one case out of 15. (SplitTopics.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1554, on April 20th, 2012, 04:35 PM »
(5 files, 6KB)

Revision: 1554
Author: arantor
Date: 20 April 2012 15:34:33
Message:
! When viewing a category on its own, don't collapse it if it would be collapsed on the board index. (Subs-BoardIndex.php)

! Add 'the number of links in a post' as a moderation filters criteria, meaning you can moderate or refuse a post based on links in it (e.g. moderate if links is 1 or more and user has under 10 posts) (ManageModeration.php, Subs-Moderation.php, ManageModeration.template.php, ManageSettings language file)
----
Modified : /trunk/Sources/ManageModeration.php
Modified : /trunk/Sources/Subs-BoardIndex.php
Modified : /trunk/Sources/Subs-Moderation.php
Modified : /trunk/Themes/default/ManageModeration.template.php
Modified : /trunk/Themes/default/languages/ManageSettings.english.php
Re: New revs
« Reply #1555, on April 20th, 2012, 09:59 PM »
(6 modified, 2 added, 11KB)

Revision: 1555
Author: arantor
Date: 20 April 2012 20:58:49
Message:
! Moving some strings out of the main index file. (MoveTopic.php, SplitTopics.php, index and ManageTopics language files)
! Making one string out of two hybrids. (SSI.php, Boards.template.php, index language file)
----
Modified : /trunk/SSI.php
Modified : /trunk/Sources/MoveTopic.php
Modified : /trunk/Sources/SplitTopics.php
Modified : /trunk/Themes/default/Boards.template.php
Added : /trunk/Themes/default/languages/ManageTopics.english.php
Added : /trunk/Themes/default/languages/ManageTopics.french.php
Modified : /trunk/Themes/default/languages/index.english.php
Modified : /trunk/Themes/default/languages/index.french.php

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #1556, on April 21st, 2012, 09:26 PM »
rev 1556
(21 files, 12kb) (hopefully I didn't break anything...)

* Translation. (ManageSettings.french.php)

* Continued moving barely used strings from index to satellite language files, and removed outdated or deprecated entries such as 'message_lowercase' or 'search_end_results'. I'm surprised that 'no_matches' doesn't seem to be used anywhere though...! (Reminder.php, Subs-Auth.php, LANGUAGES: Admin, index, Login, ManageTopics, Profile)

* Made media permissions help text into a proper popup. (ManageMedia.template.php, LANGUAGES: Media, Help)

+ Added micro-documentation for the new %@ time format. (Help.language.php)

* French version doesn't use periods at the end of post options, so removed it from a couple of entries. Maybe this should be done for English too...? (Post.french.php)

- Removed a colon and a line-break that bothered me. (ManageMedia.php, Profile.template.php)
Re: New revs
« Reply #1557, 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)
Re: New revs
« Reply #1558, 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)
Re: New revs
« Reply #1559, 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)