New revs

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #2115, on May 14th, 2013, 07:04 PM »
rev 2115
(41 files, 15kb)

* Updated parse_bbc() params to look like this: message, then type, then options array. Among the options, 'parse_type' is thus removed, 'parse_tags' becomes 'tags', and 'owner' becomes 'user'. Both type and options are optional, the first will fall back to 'generic' (should it be 'post'..?), the second to the default options. (41 files)

! The Welcome parse_bbc calls had their user param set to 'id_member', rather than $row['id_member']. (Welcome.php)

* The Display parse_bbc, out of all parse_bbc calls, is one that 'missed' setting a 'post' type. Lulz. (Display.php)

! SSI had another missing type, as well as an incorrect option array (it just had a string, without a key.) (SSI.php)

! unparsed_equals handler didn't use the rewritten parse_bbc format. Hopefully I didn't mess it up. Wondering if it's worth transmitting the 'parent' parse type to children, but my guts say it is... (Subs-BBC.php)
Re: New revs
« Reply #2116, on May 15th, 2013, 05:42 PM »
rev 2116 -- just a couple of fixes; I'm working on improving Wireless for actual mobile devices, but it's not ready yet...
(2 files, 2kb)

! A site-breaking typo. Oops. Twice. And I didn't even use copy and paste... (Thoughts.php)

! I'm not exactly great at optimizing SQL queries so I'll leave that one up to Pete, but I fixed the stats query that retrieved 'most liked authors' (and I'm still a distant second, so I'm *definitely* leaving it up to him eheh). To be specific, on wedge.org there was a third 'empty' entry with 178 likes; it was actually the total number of thought likes. I decided to allow for the query to also take thought likes into account, dunno if it will kill performance, but what matters for now is that it works... I don't even know if we'll keep that stat entry around forever. (Stats.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #2117, on May 16th, 2013, 08:19 PM »
(19 files, 13KB)

Revision: 2117
Author: arantor
Date: 16 May 2013 19:18:38
Message:
! Forgot to commit this previously, more global variables not used in the templates. (ManagePaid.template.php)

! Oops, wrong variable. (ManageInfractions.php)

! Guests should never be shown infraction status of a user, no matter what. (Profile-View.php)

! Who's Online could return exciting and incorrect values for viewing in the profile. E.g. user 1 is viewing their own profile, user 2 is viewing user 1's profile, user 2 would see 'Viewing User 2's profile' because the user id is not otherwise available. (Profile-View.php, Who.php)

! No more of this 'enabling deny permissions'. They're always enabled now. $helptxt['permissions_deny'] might still be useful though, so leave it around for now. (wedge_api.php, Load.php, ManagePermissions.php, Reports.php, Subs-Post.php, ManagePermissions.template.php, ManagePermissions language file)

! Custom field data wasn't loaded for loadMemberData(...., 'userbox') but it's kind of important that it is. (Load.php)

! Custom fields now have controls for group visibility and editability. Note that the system is designed in a funky way in case people have funky needs like wanting to create a field that a user can edit but that won't be visible to them on their summary (owner + respective groups have "can edit", those who should be able to see it have "can see", so there's no magic greying out of textboxes) (install.sql, Load.php, ManageMemberOptions.php, Memberlist.php, Profile.php, Admin.template.php, ManageSettings language file)
----
Modified : /trunk/Sources/Load.php
Modified : /trunk/Sources/ManageInfractions.php
Modified : /trunk/Sources/ManageMemberOptions.php
Modified : /trunk/Sources/ManagePermissions.php
Modified : /trunk/Sources/Memberlist.php
Modified : /trunk/Sources/Profile-View.php
Modified : /trunk/Sources/Profile.php
Modified : /trunk/Sources/Reports.php
Modified : /trunk/Sources/Subs-Post.php
Modified : /trunk/Sources/Who.php
Modified : /trunk/Themes/default/Admin.template.php
Modified : /trunk/Themes/default/ManagePaid.template.php
Modified : /trunk/Themes/default/ManagePermissions.template.php
Modified : /trunk/Themes/default/languages/ManagePermissions.english.php
Modified : /trunk/Themes/default/languages/ManagePermissions.french.php
Modified : /trunk/Themes/default/languages/ManageSettings.english.php
Modified : /trunk/Themes/default/languages/ManageSettings.french.php
Modified : /trunk/other/tools/wedge_api.php
Modified : /trunk/root/install.sql
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 #2118, on May 16th, 2013, 11:37 PM »
A reasonably big update, with the introduction of the topic privacy UI and improvements on thought privacy. Hopefully everything works fine. I won't update the site to this today, because it's too late for me, and I don't want to break too many things. Notes to Pete:
- please, please double-check this update. As thoroughly as possible. I triple-checked my commit and made many changes, I'm *extremely* wary of the idea of having introduced any security issues. Topic privacy is a serious thing...!
- if you edit a topic here, you'll get an error in the log... No biggie, it's just something I forgot to update. It won't happen locally.

rev 2118
(11 files, 12kb)

+ Finally implemented the UI for topic privacy...! I spent months postponing this because I thought I had to do the query_see_topic implementation as well. Turned out that it was done in late February 2012, over 700 revisions ago... So, yes, it STILL needs a lot of testing. But it wasn't too hard to implement topic privacy at Noisen.com back in 2007, so I don't see why it should be much of an issue for me in 2012, damn it! (Post.php, Post2.php, Subs-Post.php, Post.template.php, index.member.css)

@ To-do: allow quick edits to change topic privacy, move privacy icons out of member CSS if it's possible for a guest to create a new topic... (Pete, what do you think..? I don't even remember if it's possible, but I think it is...)

+ Added proper support for contact lists in thought privacy, instead of that hacked version targeted for Wedge.org. (Class-System.php, Thoughts.php, Thoughts.template.php)

! A missing query_see_topic..? There are probably tons more. While accessing the topics table doesn't automatically guarantee adding a query_see_topic to it, there are still over 250 access to it, and only over 50 query_see_topic calls, but all of the 'natural' ones were already there. (JSModify.php)

- As inspired by Pete, removed unneeded $db_prefix and $scripturl globals. :D (Aeva-Gallery.php, SSI.php)

* Spacinazi, indenazi. (JSModify.php, Load.php)
Re: New revs
« Reply #2119, on May 16th, 2013, 11:40 PM »
rev 2119 -- oops.
(3 files, 3kb)

! Forgot to commit the Thoughts.template.php file mentioned in the last rev... (Thoughts.template.php)

! This also fixes a bug in thought threads, where the master thought doesn't have an action button. (Thoughts.template.php)

* Also committing index language updates for the privacy select box... Heck, I forgot to hit F5 before compiling my list of files to commit. (index.english.php, index.french.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #2120, on May 17th, 2013, 04:54 AM »
(5 modified, 2KB)

Revision: 2120
Author: arantor
Date: 17 May 2013 03:54:02
Message:
! Indentinazi (ManageMemberOptions.php)

! Don't do the permissions check on custom field visibility on memberlist if you're an admin, because there's no need. (Memberlist.php)

! DIE OLD SIDEBAR CODE. (Subs-Menu.php, ManageMemberOptions.php, Profile language file)
----
Modified : /trunk/Sources/ManageMemberOptions.php
Modified : /trunk/Sources/Memberlist.php
Modified : /trunk/Sources/Subs-Menu.php
Modified : /trunk/Themes/default/languages/Profile.english.php
Modified : /trunk/Themes/default/languages/Profile.french.php

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #2121, on May 18th, 2013, 05:11 PM »
rev 21+21 = 42 -- am bored of not committing this old stuff... :P
(7 files, 6kb)

* A bit of allowedTo/isAllowedTo refactoring. Not much, really... Just wanted to make it clearer that isAllowedTo supports multiple permission requests; more importantly, rewrote allowedTo for multiple permissions, speeding it up by potentially hundreds of times... (Security.php)

* arraydefinitionazi. (Security.php)

+ Added a 'Privacy' title when applicable in Post page, and reworked layout to allow for the post title input to take all remaining width. Along with a media query for smaller widths... (Post.template.php, index.english.php, index.french.php, editor.css, extra.ie6.css, extra.rtl.css)
Re: New revs
« Reply #2122, on May 19th, 2013, 10:10 AM »
rev 2122 -- minor commit, sorry...
(6 files, 2kb)

! Non-topic edits gave an undefined index error. (Post.template.php)

* Tweaked editor CSS to prevent the contact list from breaking its layout too easily. Also moved #contactlist code to editor.css, along with a member test. Makes more sense. (editor.css, index.member.css)

* Spacinazi. (ManageMemberOptions.php, Security.php, Subs-BBC.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #2123, on May 21st, 2013, 04:24 AM »
(14 modified, 1 deleted, crap I forgot one as Packages-Get should have died too, I'm blaming the rum, 3KB)

Revision: 2123
Author: arantor
Date: 21 May 2013 03:23:14
Message:
! Unnecessary extra globals. (Subs-Cache.php, Subs-Captcha.php)

! There's no need for the admin inclusion when in short order we proceed to run a hook which can actually *do* something anyway. (Admin.php)

! We have loadSource, let's use it. And just for kicks, since a bunch of array('file', 'function') had the same things, I made it into just array('file'). Could even have gone really mad and made it a string but that seemed like one step too far, you know? After all, I only wanted to get shot of the use of $sourcedir, everything else just sort of 'happened'. (index.php)

! I finally realised that there really was no need to keep the random stuff around for the old package manager, if I wanted it, I had SVN but really there wasn't much I thought I might have found useful, so removed a bunch of stuff. There are still tendrils elsewhere that haven't been cleaned up yet, but I'm getting to it. (Admin.php, PackageGet.php, Security.php, Subs-Package.php, Packages.template.php, language files: Admin, Errors, Packages, Who)
----
Modified : /trunk/Sources/Admin.php
Modified : /trunk/Sources/Security.php
Modified : /trunk/Sources/Subs-Cache.php
Modified : /trunk/Sources/Subs-Captcha.php
Modified : /trunk/Sources/Subs-Package.php
Deleted : /trunk/Themes/default/Packages.template.php
Modified : /trunk/Themes/default/languages/Admin.english.php
Modified : /trunk/Themes/default/languages/Admin.french.php
Modified : /trunk/Themes/default/languages/Errors.english.php
Modified : /trunk/Themes/default/languages/Errors.french.php
Modified : /trunk/Themes/default/languages/Packages.english.php
Modified : /trunk/Themes/default/languages/Packages.french.php
Modified : /trunk/Themes/default/languages/Who.english.php
Modified : /trunk/Themes/default/languages/Who.french.php
Modified : /trunk/index.php

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #2124, on May 21st, 2013, 05:42 PM »
rev 2124 -- feel free to revert if not to your taste..? I just felt like doing that, and liked it enough to commit...
(11 files, 7kb)

* Refactored action array a bit more, inspired by Pete's work... Aligned all entries to make them more readable (well, if your tab size is 4 spaces, as should be...), converted all array('Function') to just 'Function' (it only takes an extra line to account for this, and is probably faster due to not having to create the array structures), shortened verificationcode action name to fit the tab rewrite, converted Boards and Logout actions to strings (they didn't need to be in an array in the first place), and renamed several functions to match their container file when it made sense. Phew... Saves nearly 500 bytes out of the total index file size, so it's all good. (index.php, Admin.php, Groups.php, Mailer.php, ManageSettings.php, ModerationCenter.php, PersonalMessage.php, PostModeration.php, Subs-Editor.php, Themes.php, VerificationCode.php)

! Commenazi -- fixed a file containing a comment an accent encoded in ISO-8859-1. (ManageSettings.php)
Re: New revs
« Reply #2125, on May 21st, 2013, 06:05 PM »
rev 2125 -- all of the rest...
(8 files, 5kb)

* Made the Chrome for Mobile fix more generic, by applying it to the universal selector. All elements need it really, even though 99% of the issues stem from table cells (which is also why 99% of all problematic websites in Chrome 25+ are forums... Eh.) (index.css)

+ Added ability to easily restyle mini-menu fonts. (index.css)

! Fixed PM contact list box breaking layout in smaller screens. (editor.css)

* Refactored CSS filename generation, to something more acceptable. To me, at least... It basically calls array_filter twice instead of once (to deal with 0's, see below), and avoids doing a useless preg_replace. Plus, the code is shorter this way. (Subs-Cache.php)

! Fixed the odd '0-guest' CSS filenames generated when serving content to a bot, or any client that doesn't provide an actual browser or OS name. (Subs-Cache.php)

! Fixed hardcoded text in the custom profile area. And other things. (ManageMemberOptions.php, Admin.template.php, ManageSettings.language.php)

* Translation. Changed "entrée" to "saisie" as translation for "input", as it suddenly sounded better to me... (ManageSettings.french.php)

* No biggie, but I think that an strpos() is faster than a substr_count()... (Subs-Template.php)
Re: New revs
« Reply #2126, on May 21st, 2013, 09:05 PM »
rev 2126
(6 files, 2kb)

* Considering that thoughts are the only thing in Wedge that currently use parse_bbc_inline, and I've wanted to use the long list for them for a long time, I've decided to disable $short_list by default. (Subs-BBC.php)

! The me tag has no reason (that I can think of) to be a block-type. Made it an inline object. (install.sql)

! Fixed an error that showed up when viewing a page from a mobile browser, a regression from last commit. (Subs-Cache.php)

* Tweaked layout for custom field management. No biggie... (Admin.template.php)

* Minor language tweaks. Plus, ahem, forgot to translate the very same string I added to ManageSettings... (Admin.language.php, ManageSettings.french.php)
Re: New revs
« Reply #2127, on May 21st, 2013, 10:01 PM »
rev 2127 -- and that'll be all for tonight... I hope!!
(3 files, 2kb)

! Forgot to include Subs-Cache fix to last commit... Oops. (Subs-Cache.php)

! Fixed error when quick-editing a post during the grace period. In fact, parse_bbc() should always set posts as coming from the original author, rather than the one who edited it. Also rewrote something to make it shorter and execute faster. (JSModify.php)

* Did some more work to improve Wireless on Android. Unfortunately, this means I had to add a few odd fixes here and there, due to Android not actually showing stuff as expected. See the Recent Posts page... Brr. Well, better than nothing. I probably broke some other mobile browser in the process, but I can't test them all... (Wireless/extra.css)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #2128, on May 21st, 2013, 11:33 PM »
(9 modified, 4 deleted, 3KB)

Revision: 2128
Author: arantor
Date: 21 May 2013 22:33:05
Message:
! Meant to commit this deletion yesterday. (PackageGet.php)

! Streamlined the language editing area, there's no need for the settings page when it's all on the main languages page, including now setting which languages are selectable by users. This will need to be set on wedge.org. (Admin.php, Load.php, ManageLanguages.php, Admin and Help language files)

! Removed the 'add language' area. Languages tend to be a one-time thing, so it's OK to not have a super friendly interface. Allows decluttering of a bunch of code that would have needed a total rewrite anyway. (ManageLanguages.php, ManageLanguages.template.php, ManageSettings and Packages language files)
----
Modified : /trunk/Sources/Admin.php
Modified : /trunk/Sources/Load.php
Modified : /trunk/Sources/ManageLanguages.php
Deleted : /trunk/Sources/PackageGet.php
Modified : /trunk/Themes/default/ManageLanguages.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/ManageSettings.english.php
Modified : /trunk/Themes/default/languages/ManageSettings.french.php
Deleted : /trunk/Themes/default/languages/Packages.english-uk.php
Deleted : /trunk/Themes/default/languages/Packages.english.php
Deleted : /trunk/Themes/default/languages/Packages.french.php
Re: New revs
« Reply #2129, on May 22nd, 2013, 04:06 AM »
(2 files, 3KB)

Revision: 2129
Author: arantor
Date: 22 May 2013 03:06:15
Message:
! Moderation centre function needed to be updated to tie in with index.php changes. (ModerationCenter.php)

! Fixing the privacy checking code on custom fields. (Profile-Modify.php)
----
Modified : /trunk/Sources/ModerationCenter.php
Modified : /trunk/Sources/Profile-Modify.php