New revs

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1830, on January 8th, 2013, 05:20 AM »
(7 files, 15KB)

Revision: 1830
Author: arantor
Date: 08 January 2013 04:18:25
Message:
! Update the manage-mail area to use a proper button in place of a bare link, fixes a side issue with event-overridden links, but also looks more consistent. (ManageMail.php, ManageMail.template.php)

! The is-email-banned checks now should be querying the new bans system rather than the old, and it seems to work for both soft and hard bans (soft bans just prevent registration and guest posting using them, hard bans properly ban the session and leave a nice little banned cookie around), for all kinds of crazy things (exact match, wildcarded, entire domains, including handling GMail style dot removal and label use, and entire TLDs or parts thereof). Of course, the big work is done in Security.php, but the other places had their calls updated; we don't differentiate between 'cannot register' and 'cannot guest post' in terms of bans these days, it's really not needed. There is still work to do with the ban system; IP addresses need filtering out too, and then I need to replace updateBanMembers() with a version that works in the new banned world, but it's getting there. Then it needs MOAR testing. (Activate.php, Post2.php, Report.php, Security.php, Subs-Members.php)
----
Modified : /trunk/Sources/Activate.php
Modified : /trunk/Sources/ManageMail.php
Modified : /trunk/Sources/Post2.php
Modified : /trunk/Sources/Report.php
Modified : /trunk/Sources/Security.php
Modified : /trunk/Sources/Subs-Members.php
Modified : /trunk/Themes/default/ManageMail.template.php


There is a lot left to do as I indicated, but most of the updateBanMembers calls were done in the admin panel where I can field it more easily; there's no need to call it when evaluating a ban for regular members as such - only need to evaluate the current user and fix their ban status.. ohcrap a typo I just realised.
Re: New revs
« Reply #1831, on January 8th, 2013, 05:21 AM »
(1 file, 1KB)

Revision: 1831
Author: arantor
Date: 08 January 2013 04:21:06
Message:
! Really not sure how I missed this one. The code isn't tested, that should be obvious, but mostly because to properly test it, I need to finish rewriting it >_> (Security.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,079
Re: New revs
« Reply #1832, on January 8th, 2013, 06:15 PM »
rev 1832
(7 files, 5kb)

* Saved more precious gzipped bytes off both HTML pages and included script files, by: (script.js, sbox.js, index.template.php, GenericMenu.template.php, ManageModeration.template.php)

  - Moving $('select').sb() to a DOMContentLoaded event instead of having it both in sbox.js and the HTML.
  - Moving bindEvents() to that same event, instead of having a separate function, and fixing index and ManageModeration templates not to use it.
  - Turning $.fn.wmenu() into a _b function, and calling it along with the rest. It's all cleaner this way...

! Fixed anchor links not properly working if associated with an ask() function. Unfortunately, this fix, however short it is, negates many of the bytes saved above. Well, not all, thankfully... (script.js)

! Draft removal 'delete all' form was using an onclick, instead of onsubmit, effectively making the entire horizontal area clickable... (Profile.template.php)

* Modified minimum menu ID value to 0 instead of 1... Only saves one addition at one moment. But I really didn't like it. (Subs-Menu.php, GenericMenu.template.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1833, on January 9th, 2013, 04:33 AM »
(3 files, 1KB)

Revision: 1833
Author: arantor
Date: 09 January 2013 03:32:36
Message:
! Renamed the spam_settings hook to settings_spam because other pages are going to be hookable and they should really have a consistent naming structure. (ManagePlugins.php, ManageSettings.php)

! Speaking of which, ban settings are also hookable, through the settings_bans hook. (ManageBans.php, ManagePlugins.php)
----
Modified : /trunk/Sources/ManageBans.php
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/Sources/ManageSettings.php
Re: New revs
« Reply #1834, on January 9th, 2013, 05:53 AM »
(3 files, 2KB)

Revision: 1834
Author: arantor
Date: 09 January 2013 04:51:49
Message:
! Supporting testing of IP addresses in ban system. Still not finished, but this is the next bit. (Security.php)

! First soft ban support, disabling search if the user is soft banned. Yes, even for IP addresses. Yes, that's right, I actually gave in and allowed Annoy User support for IP addresses. There. (Search.php, Search2.php, Security.php)
----
Modified : /trunk/Sources/Search.php
Modified : /trunk/Sources/Search2.php
Modified : /trunk/Sources/Security.php
Re: New revs
« Reply #1835, on January 9th, 2013, 09:48 PM »
(3 files, 2KB)

Revision: 1835
Author: arantor
Date: 09 January 2013 20:45:49
Message:
! More soft ban goodness. Softbanned IP addresses now can be exempt from registration, and the occasional (intentional) blank screen won't go amiss either. (ManageBans.php, Security.php, ManageBans language file)
----
Modified : /trunk/Sources/ManageBans.php
Modified : /trunk/Sources/Security.php
Modified : /trunk/Themes/default/languages/ManageBans.english.php

@ I did warn you that Annoy User was back and coming to a Wedge near you :niark:

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: New revs
« Reply #1836, on January 10th, 2013, 06:11 PM »
rev 1836
(412 files, 20kb)

* Removed closing ?> from all files, this should calm down everyone who fears for their headers. Or whatever... (Hundreds of files.)

* Changed last copyright year to 2013. Do we even need to provide a 'latest' year..? (Hundreds of files.)

* Also fixed a few minor things, like a broken link, yeah, nothing fascinating... Oh, and a minor license change, to make it shorter. Have to finish discussing it with Pete though, but it's closer to the original SMF license. (A few files. Damn I don't even want to remember which ones.)
Re: New revs
« Reply #1837, on January 11th, 2013, 09:15 AM »
rev 1837
(10 files, 20kb)

* French translation. Hopefully didn't forget anything or screw up the translation work itself. There was a lot to do... (Admin, EmailTemplates, Help, Login, ManageBans, ManageMembers, ManagePermissions)

! Typo in English version. Also reworked e-mail templates for breathing space. (Help.english.php, EmailTemplates.english.php)

* Commenazi. I believe that when a comment is a sentence (e.g. has a comma in it), it should end with a period. Anyway, not very important and I'm sure I missed hundreds before... I just felt like it. (Security.php)
Re: New revs
« Reply #1838, on January 11th, 2013, 07:29 PM »
rev 1838
(22 files, 15kb)

* Turned $context['user']['is_logged'] into !we::$is_guest, $context['user'] into we::$user and optimized $context globaling on many files. (index.php, Subscriptions-Authorize.php, Subscriptions-twoCheckOut.php, smfinfo.php (uh?), Ajax.php (actually a comment that no longer makes much sense..), Class-System.php, Load.php, MessageIndex.php, Profile-Modify.php, Subs-Template.php, ViewQuery.php, SSI.php, TEMPLATES: Boards, index, ManagePermissions, MessageIndex, ModerationCenter, Profile)

* Converted a few more $scripturl calls to <URL>. (MessageIndex.template.php, Profile.template.php)

* Forgot to commit a couple of language files. French translation, but also another fix (a line that is no longer used AFAIK.) (Admin.english.php, Admin.french.php, ManagePlugins.french.php)

! Fixed Chrome and IE10 behaving oddly with the body transition when loading (IE10) or reloading (Chrome) pages. (index.css)

@ Only got started on $context['user'], as there are a lot, so please bear with me, I should fix Wedge, err... hopefully tonight. I'm watching the FF9 live speedrun for AGDQ at the same time... These are the limits of my multi-tasking abilities.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1839, on January 12th, 2013, 12:29 AM »
(17 modified, 2 deleted, 17KB)

Revision: 1839
Author: arantor
Date: 11 January 2013 23:28:24
Message:
! Typo in index template. (index.template.php)
! Removal of the crazy wesql::extend stuff. It should never have lingered. So, what was wedbExtra is now part of the packages stuff (which might be renamed yet), which makes sense as the packages stuff loaded it anyway. What was wedbSearch was just folded into the search code or flattened out, e.g. the test for 'supports fulltext'., and lastly, wedbPackages is no longer a singleton in the way it was set up. It made no sense to be, in hindsight, it's just a collection of static methods now. It's not had proper testing though so it might be all kinds of borked. (lots of files)
----
Modified : /trunk/Sources/Class-DB.php
Deleted : /trunk/Sources/Class-DBExtra.php
Modified : /trunk/Sources/Class-DBPackages.php
Deleted : /trunk/Sources/Class-DBSearch.php
Modified : /trunk/Sources/ManageMaintenance.php
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/Sources/ManagePosts.php
Modified : /trunk/Sources/ManageSearch.php
Modified : /trunk/Sources/ManageSearchEngines.php
Modified : /trunk/Sources/ManageSmileys.php
Modified : /trunk/Sources/Packages.php
Modified : /trunk/Sources/ScheduledTasks.php
Modified : /trunk/Sources/Search2.php
Modified : /trunk/Sources/Subs-Admin.php
Modified : /trunk/Sources/Subs-Plugins.php
Modified : /trunk/Themes/default/index.template.php
Modified : /trunk/other/tools/repair_settings.php
Modified : /trunk/other/xml/detailed-version.php
Modified : /trunk/root/install.php

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: New revs
« Reply #1840, on January 12th, 2013, 12:54 AM »
rev 1840
(27 files, 8kb)

* Finished converting $context['user'] to we::$user. Hopefully, it'll work without changes... (Display.php, Login.php, ManageMembergroups.php, PackageGet.php, PersonalMessage.php, Aeva-Gallery.php, ManageMedia2.php, Post.php, Profile.php, Profile-*.php, Register.php, Search2.php, Security.php, Subs-Cache.php, Subs-Template.php, ViewQuery.php, TEMPLATES: Admin, Boards, Display, index, InfoCenter, Login, Mailer, ManageMembergroups, MAnagePaid)

@ Note to Pete: lulz, commit conflict ;) I'd actually fixed the index template typo ready for this rev (hence the rev conflict), but it's good that you saw it as well!

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1841, on January 12th, 2013, 03:33 AM »
(1 file, 1KB)

Revision: 1841
Author: arantor
Date: 12 January 2013 02:32:48
Message:
! There was a collision between what used to be $context['user']['avatar'] and $user_info['avatar']. Hopefully fixed now. Haven't found any other such collisions, but it's always possible. (Subs.php)
----
Modified : /trunk/Sources/Subs.php

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: New revs
« Reply #1842, on January 12th, 2013, 07:06 PM »
rev 1842 -- heavy CSS work I had to commit for the last few months... Hopefully won't break anything, please test! -_-
(10 files -13, 9kb)

! Various Wuthering fixes, such as blog titles, fixing the sidebar, removing the gradient on the header (grew tired of it!), or rewriting the breadcrumb for better results and cross-browser compatibility. (Wuthering/extra.css)

* Moved plenty of browser hack CSS files into their parents, using @if and @is instructions. Not all children files were removed, I'm still trying to determine if it's worth it for big files like main IE hacks. (common.css, common.firefox[-2].css, extra.chrome.css, extra.firefox.css, extra.ie[-8].css, index.css, index.member.css, media.css, media.ie[-7].css, zoom.css, zoom.webkit.css, WINE: extra.css, extra.ie.css, extra.ie6.css, extra.ie8.css, WARM: extra.css, extra.ie[-9].css, extra.ios.css, WUTHERING: extra.css, extra.ie[-9].css, WIRELESS: extra.css, extra.ios.css)

- Removed a safety on Chrome. It didn't have the opacity animation on menus, perhaps it used to kill performance? Please report if you have any problems with this, seems to work fine in Chrome v26. (extra.chrome.css)

* Giving a max to a random input value somewhere, because its input size bothered me. You know me... (ManageSettings.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1843, on January 13th, 2013, 04:18 AM »
(1 file, 5KB)

Revision: 1843
Author: arantor
Date: 13 January 2013 03:17:25
Message:
! Added another interesting nasty that's crossed my radar to the block list. Seems to be an XRumer knock-off that's doing the rounds. (Security.php)

! Removal of the old ban trigger hit updater. We're not logging ban trigger hits any more, because it wasn't used much if at all by most users, and when you have users who are a pain, it's best to not spend any more time on them than you have to. (Security.php)

! Ban system can now apply bans to hostnames if hostname lookups are enabled. (Security.php)
----
Modified : /trunk/Sources/Security.php

@ I know it's all one file but they're thematically separate commits, just packaged for better value and Wedgey goodness. Think I might treat myself to a cupcake for this one.
Re: New revs
« Reply #1844, on January 13th, 2013, 05:58 AM »
(3 files, 2KB)

Revision: 1844
Author: arantor
Date: 13 January 2013 04:55:24
Message:
! OK, Nao, I'm sorry, but I couldn't let this one go on any more. Yes, it adds 140 bytes or thereabouts to the MAIN CSS file, but I couldn't figure out a shorter way of doing it (didn't bench it with gzip) and it does add 4 bytes per link affected (which is not ALL links, but only links with bare URLs). I was getting fed up of the side bugs this left behind with respect to URLs in posts being copy/pasted and subsequently broken, and the fact that email notifications of posts or PMs would be broken by the stripping of the tags, so now we shorten URLs with CSS3 instead. There is a minor optimisation of the parse loop and a little other reduced code. Personally I think it's worth it (especially as I actually prefer the way the layout puts the ellipsis at the end rather than in the middle) (install.sql, Subs-BBC.php, index.css)
----
Modified : /trunk/Sources/Subs-BBC.php
Modified : /trunk/Themes/default/skins/index.css
Modified : /trunk/root/install.sql

@ I don't *really* mind if this is reverted but I'd rather have CSS behaviour than hard-coded behaviour that is otherwise unalterable. Also note that iurl and url behaviours are now back in step (it would have been possible to post a long URL with iurl tags that wouldn't get shortened for display)