New revs

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #1800, on December 16th, 2012, 03:43 PM »
rev 1800
(15 files, 27kb)

@ This is the 'revolutionary' update I'd hoped to commit as r1789, ah ah, but it wasn't ready yet.

* Rewrote much of the detectBrowser() function. (Load.php, Home.php, Aeva-Gallery.php, Post2.php, Welcome.php, Xml.template.php, editor.js, script.js, index.css, Wuthering/skin.xml, attic/Unused-dynPrefixed.php)

  Wedge will no longer return 'iphone' and 'tablet' entries -- these should be addressed through media queries primarily, and/or analysis of the user agent string.
  Browser and OS are now stored in two different variables -- $context['browser']['agent'] and $context['browser']['os']
  Browser and OS versions are also stored in 'version' and 'os_version' variables. Minor updates like the '5' in '4.1.5' aren't stored, to save space.
  Likewise, old OS versions aren't stored (Windows < XP, iOS < 4, Android < 2).

* Rewrote much of the hasBrowser() function as well... (Load.php, Wine/extra.css)

  Added support for OS names, now a test against 'windows' will work. Supported: windows, ios, android, mobile.
  Added support for OS versions, e.g. 'windows[6.1-]'.
  Added support for negative statements, e.g. '!chrome' will return a positive if you're not using Chrome.
  Added support for logical AND & or && (whatever suits you best). 'windows, !android && firefox' means 'using Windows, or Firefox but not in Android.'

! Fixed ambiguity with browser/OS versions in Wess's prefix handler. $android should now only be set for the Android stock browser, $iphone is replaced with $ios, and $safari should no longer be set in iOS, for the purpose of these tests of course. (Class-CSS.php)

+ Non-Android, non-iOS mobile devices will now show a regular wireless icon. (Post2.php)

* French Translation. (Errors, ManageSettings)
Re: New revs
« Reply #1801, on December 17th, 2012, 03:10 PM »
rev 1801
(11 files + 3 renames, 7kb)

* Renamed the Help template to GenericPopup, which makes more sense. Renamed $context['help_text'] to 'popup_contents'. Best way to hide a hack is to have it in plain view. Ha. (Help.php, Like.php, ManageErrors.php, ManageModeration.php, ManagePlugins.php, ViewQuery.php, GenericPopup.template.php, script.js, extra.ie6.css, extra.ios.css, index.css)

! Forgot to rename a few iphone CSS files to ios. Until I get to rewriting the feature... (extra.ios.css in Weaving, Warm and Wireless)
Re: New revs
« Reply #1802, on December 21st, 2012, 06:42 PM »
rev 1802
(42 files, 36kb)

+ Implemented 'we' object, which is the system class containing the equivalent of $context['browser'], and soon $user_info or at least part of it.

(index.php, attic/*, Sphinx/sphinx_config.php, install.php, install.sql, Announce.php, Class-CSS.php, Class-Editor.php, Class-System.php, CoppaForm.php, Dlattach.php, Home.php, Load.php, Aeva-*.php, ManageMedia.php, Subs-Media.php, PersonalMessage.php, Post2.php, Subs-BBC.php, Subs-Cache.php, Subs-Template.php, Welcome.php, TEMPLATES: Admin, Display, GenericMenu, index, Mailer, ManageBoards, ManageMembergroups, ManageNews, ModerationCenter, Packages, PersonalMessage, Post, Profile, Register, Themes, Xml)
Re: New revs
« Reply #1803, on December 22nd, 2012, 05:17 PM »
rev 1803
(87 files, 90kb) (sigh... most everything done by hand!)

+ Moved $user_info to the system object, so that you no longer have to declare it as a global. Still tons of entries to modify, will come later. From now on, use those instead of these:
  $user_info => we::$user
  $user_info['id'] => we::$id
  $user_info['is_guest'] => we::$is_guest
  $user_info['is_admin'] => we::$is_admin
  Alternatively, you can use we::is('admin') or we::is('guest') but it's 5 times slower (still lightning fast though, but not to use in a million loops.)
  (87 files, not listing them all.)

- Removed $context['user']['is_mod'], never used... As a prelude to removing $context['user'] entirely anyway.
Re: New revs
« Reply #1804, on December 22nd, 2012, 06:00 PM »
rev 1804
(99 files, 2.75MB...)

* Finished replacing all $user_info occurrences with we::$user and removing all $user_info globals. Nice new little search & replace program I just found... Should we optimize setupMenuContent and setupThemeContext in Subs.php...? (99 files)

@ Okay, not such a nice program... It didn't allow me to save with Linux newlines. I'll just need an extra commit to get rid of those... F'n great.
Re: New revs
« Reply #1805, on December 22nd, 2012, 06:13 PM »
rev 1805
(96 files, 2.64MB) (For some reason, some of the modified files weren't changed to CRLF: Subs-BBC, Subs-MessageIndex and the Home template.)

! Oops, CRLF fix. (96 files)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1806, on December 22nd, 2012, 07:39 PM »
(11 files, 2KB)

Revision: 1806
Author: arantor
Date: 22 December 2012 18:37:58
Message:
! Bits and pieces for the changes to banning. Just so that I have everything in sync with how it all works now and that I don't have *everything* to commit all at once. Remember: is_activated is going to be more than 20 for bans now, not more than 10. (wedge_api.php, Class-System.php, ManageMembers.php, Profile-Actions.php, Profile-View.php, Security.php, Subs-Auth.php, Subs-Login.php, Subs-Members.php, Subs-Post.php, Suggest.php)
----
Modified : /trunk/Sources/Class-System.php
Modified : /trunk/Sources/ManageMembers.php
Modified : /trunk/Sources/Profile-Actions.php
Modified : /trunk/Sources/Profile-View.php
Modified : /trunk/Sources/Security.php
Modified : /trunk/Sources/Subs-Auth.php
Modified : /trunk/Sources/Subs-Login.php
Modified : /trunk/Sources/Subs-Members.php
Modified : /trunk/Sources/Subs-Post.php
Modified : /trunk/Sources/Suggest.php
Modified : /trunk/other/tools/wedge_api.php
Re: New revs
« Reply #1807, on December 22nd, 2012, 10:21 PM »
(4 files, 2KB)

Revision: 1807
Author: arantor
Date: 22 December 2012 21:21:07
Message:
! Actually declare functions to their correct scope, and we::analyze is called statically so indicate it is. (Class-System.php)

! No need for the loadUserSettings function any more, might as well just do it where it needs to be done. (Load.php, index.php, SSI.php)
----
Modified : /trunk/SSI.php
Modified : /trunk/Sources/Class-System.php
Modified : /trunk/Sources/Load.php
Modified : /trunk/index.php
Re: New revs
« Reply #1808, on December 24th, 2012, 12:00 AM »
(5 files, 23KB)

Revision: 1808
Author: arantor
Date: 23 December 2012 22:59:36
Message:
! Yeah, so it's been annoying me that the mod buttons in topic didn't all have icons. Move topic still doesn't, because I haven't found a suitable icon, but merge does have an icon, so make a suitably sized version and use it. (index.member.css, small_merge.gif)

! Some more of the ban stuff, just to make it more digestible to manage, including the fairly complete language file for ban management. (mana.css, ban_items.png, ManageBans.english.php)
----
Modified : /trunk/Themes/default/images/admin/ban_items.png
Added : /trunk/Themes/default/images/small_merge.gif
Added : /trunk/Themes/default/languages/ManageBans.english.php
Modified : /trunk/Themes/default/skins/index.member.css
Modified : /trunk/Themes/default/skins/mana.css
Re: New revs
« Reply #1809, on December 24th, 2012, 04:33 PM »
(3 files, 3KB)

Revision: 1809
Author: arantor
Date: 24 December 2012 15:32:28
Message:
! The installer *needs* the we object to *only* set up detect browser, not the entire user stuff, when for half the installer, the user won't even exist. (Class-System.php, install.php)

! Typo in one of the bbcodes. I really must make an editor for this. (install.sql)

! Some changes to the installer SQL, mostly that tie in to the ban changes. One new table, one new column in the members table, a couple of blank lines for consistency, and moving some of the settings into the new ban table as that's where the functionality will be driven from in due course. (install.php, install.sql)
----
Modified : /trunk/Sources/Class-System.php
Modified : /trunk/root/install.php
Modified : /trunk/root/install.sql

@ The new column is not related to the ban stuff but to a new feature I've talked about recently. Right now it's not a big deal, but it will be in the future, so best that we put it in now while we're doing other changes to the file.
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 #1810, on December 24th, 2012, 06:24 PM »
rev 1810
(12 files +1, 19kb)

+ Added browser version limiter on CSS filenames, to avoid having too many files for just a couple of guests. Opera v10 and earlier are less than 5% of Opera's share, so I set the minimum version to 11. Minimum versions for Chrome: 20, Safari: 4, IE: 6, and Firefox is a special case because v3-4 are still a bit popular, so I'm keeping v3.x, v4.x and v16 and above. (Class-System.php, Class-CSS.php)

* Various changes to the user object. Some functions are now protected. (Class-System.php)

* we::is('mobile') being a bit slower and being often called on pages, I'm changing that to we::$user['is_mobile']. Feel free to use we::is('mobile') in plugins or whatever, of course. (Load.php)

* Translation. Hmm... There's plenty of other files to clean up... I should have done that first, and re-used the original translations... Whatever. Also fixed English version typo. (ManageBans)

- Removed PREG_PATTERN_ORDER optional param from a few loose preg_match_all calls. (Class-Editor.php, Class-Packer.php, ManageMemberOptions.php, PersonalMessage.php, Profile-Modify.php, Search2.php, Subs-BBC.php, Subs-Template.php)

@ Woohoo, yet another commit conflict... I'm telling you Pete, I was far from done with the we object! Oh, and sorry for the install.php/sql bugs. And I fully agree for the editor :P

Merry Christmas everyone :)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1811, on December 30th, 2012, 06:19 PM »
(Trying not to leave it too long between commits.)

(4 file, 2KB)

Revision: 1811
Author: arantor
Date: 30 December 2012 17:18:29
Message:
! Silly typo in the installer was not consistent with how everything else worked. (install.php)

! Disallow the new bans table from being dropped. (Class-DBPackages.php)

+ FTP class now has an upload facility that directly accepts a string rather than just demanding a local file. (Class-FTP.php)

! More updates of the manage-bans language file ready for translation. It is still a WIP though... (ManageBans.english.php)
----
Modified : /trunk/Sources/Class-DBPackages.php
Modified : /trunk/Sources/Class-FTP.php
Modified : /trunk/Themes/default/languages/ManageBans.english.php
Modified : /trunk/root/install.php
Re: New revs
« Reply #1812, on December 31st, 2012, 01:18 AM »
(1 file, 1KB)

Revision: 1812
Author: arantor
Date: 31 December 2012 00:18:09
Message:
! Stop the file cache from using a core Wedge file as the seed for cache hashes, use a separate file in the cache directory. This file should remain empty, but it means the *core* files are to be left alone. This means we can safely have a maintenance task or something to check file dates. (Subs-Cache.php)
----
Modified : /trunk/Sources/Subs-Cache.php
Re: New revs
« Reply #1813, on December 31st, 2012, 02:09 AM »
(14 files, 42KB)

Revision: 1813
Author: arantor
Date: 31 December 2012 01:02:16
Message:
Doing something I don't normally do, commit something that's completely a WIP, but mostly because I'm fed up with it right now and want to do a few other things that this would conflict with.

! Spacinazi. (Admin.php)

! Strip the old reserved names code and use the new one. (Class-UnitTest_tidyhtml.php, Admin.php, ManageRegistration.php, Subs-Members.php, Who.php, Register.template.php, language files: Admin, Help, Who)

! Part of the new ban system. Enough to be able to display any bans in the system, and the ban system is quite happy to filter out reserved names now. (Admin.php, ManageBans.php, ManageBans.template.php, language files: Admin, Help)

@ The ban system isn't remotely usable yet. It also has the unfortunate side effect of breaking the ban-user dialog which also uses the same base system, another thing to be rewritten. I'm just fed up of trying to figure out this stuff right now and would rather get it committed so that I can do more fun stuff and then come back to it when I'm a little more fresh of mind.
----
Modified : /trunk/Sources/Admin.php
Modified : /trunk/Sources/ManageBans.php
Modified : /trunk/Sources/ManageRegistration.php
Modified : /trunk/Sources/Subs-Members.php
Modified : /trunk/Sources/Who.php
Modified : /trunk/Themes/default/ManageBans.template.php
Modified : /trunk/Themes/default/Register.template.php
Modified : /trunk/Themes/default/languages/Admin.english.php
Modified : /trunk/Themes/default/languages/Admin.french.php
Modified : /trunk/Themes/default/languages/Help.english.php
Modified : /trunk/Themes/default/languages/Help.french.php
Modified : /trunk/Themes/default/languages/Who.english.php
Modified : /trunk/Themes/default/languages/Who.french.php
Modified : /trunk/other/unittest/tests/Class-UnitTest_tidyhtml.php
Re: New revs
« Reply #1814, on December 31st, 2012, 02:59 AM »
(12 files, 6KB)

Revision: 1814
Author: arantor
Date: 31 December 2012 01:59:15
Message:
! Don't show IP addresses to anyone unless they can ban - not even a user's own one. There's really no need to show it anywhere. As far as I can tell this gets everything. (install.sql, Display.php, ManageErrors.php, ManageMembers.php, ManagePermissions.php, Modlog.php, Profile-View.php, Profile.php, Who.php, ManageMembers.template.php, language files: ManagePermissions)
----
Modified : /trunk/Sources/Display.php
Modified : /trunk/Sources/ManageErrors.php
Modified : /trunk/Sources/ManageMembers.php
Modified : /trunk/Sources/ManagePermissions.php
Modified : /trunk/Sources/Modlog.php
Modified : /trunk/Sources/Profile-View.php
Modified : /trunk/Sources/Profile.php
Modified : /trunk/Sources/Who.php
Modified : /trunk/Themes/default/ManageMembers.template.php
Modified : /trunk/Themes/default/languages/ManagePermissions.english.php
Modified : /trunk/Themes/default/languages/ManagePermissions.french.php
Modified : /trunk/root/install.sql