New revs

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
New revs
« Reply #1665, on August 20th, 2012, 09:12 PM »
(9 files, 4KB)

Revision: 1665
Author: arantor
Date: 20 August 2012 20:11:13
Message:
! [SMF bug] XSS vulnerability in moderation log (thanks Anonchair) (Modlog.php)

! Since we're no longer escaping quotes in topic subjects to save space, we do at least need to do it in the topic view, mostly for the benefit of quick reply where there are quotes in the subject. (Display.php)

! Very primitive/limited page in admin for configuring likes. It is the plan to add other stuff, like thoughts, into the same page. It allows for enabling/disabling likes and limiting people from liking their own posts. (install.sql, Admin.php, Display.php, Like.php, ManageSettings.php, Display.template.php, Admin and ManageSettings language files)
----
Modified : /trunk/Sources/Admin.php
Modified : /trunk/Sources/Display.php
Modified : /trunk/Sources/Like.php
Modified : /trunk/Sources/ManageSettings.php
Modified : /trunk/Sources/Modlog.php
Modified : /trunk/Themes/default/Display.template.php
Modified : /trunk/Themes/default/languages/Admin.english.php
Modified : /trunk/Themes/default/languages/ManageSettings.english.php
Modified : /trunk/other/install.sql
New revs
« Reply #1666, on August 20th, 2012, 10:59 PM »
(5 files, 2KB)

Revision: 1666
Author: arantor
Date: 20 August 2012 21:58:28
Message:
! Updated BB implementation for 2.2.8 (or at least the bits I actually want) (Security.php)

! Don't limit the size of the mail queue items. It's possible that announcements/notifications could be larger than a text. (install.sql, Subs-Post.php)

! The subject should also be quote-protected in the split page area too. (Split.php)

! Merge topics dropdown was using old code. (Merge.template.php)

! Merge topics might also use the same dropdown style as other dropdowns, using optgroups for categories. (Merge.template.php)
----
Modified : /trunk/Sources/Security.php
Modified : /trunk/Sources/Split.php
Modified : /trunk/Sources/Subs-Post.php
Modified : /trunk/Themes/default/Merge.template.php
Modified : /trunk/other/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 #1667, on August 22nd, 2012, 10:02 AM »
rev 1667
(2 files, 3kb)

! Fixed some specific cases of cascaded selector inheritance (CSI?!) that simply failed. This was a purely logic error and one that took days to spot, and a few lines to fix. As usual with my bugs. The good news is, this should also speed up the extension code by a fair margin, as it reduces the size of the base list, and also drastically shortens the code path for deep inheritors. It's good now. Look at me I'm all weepy. (Class-CSS.php)

- Removed a few pass-by-reference optimizations that were only there for performance, when really with the copy-on-write mechanism it's more likely to make processing slower. By a nanosecond, of course. (Class-CSS.php)

- WeCSS no longer needs to look for prefixes in keyframes when it parses them. This is unrelated to the auto-prefix code itself. (Class-CSS.php)
! Forgot to commit my index CSS from a few commits ago. (index.css)
Re: New revs
« Reply #1668, on August 22nd, 2012, 10:54 AM »
rev 1668
(9 files, 2kb)

! The Opera hack for keyboard handling in select boxes no longer works in v12.5 because they rewrote and fixed their keyboard event code. Meaning I have to hack even more into it, ah ah... (sbox.js)

* I'm not sure why I kept using .filter(':first') instead of .first() in some place... The latter is faster, simpler and cleaner. Same for .last() and even .children(':first') is better off as .children().first(), thank-you-very-much. (sbox.js)

* Fixed a couple of remaining list() calls into list (), because of its non-function nature. (Class-UnitTest.php, Like.php, getid3)

* Translation. (Admin.french.php, ManageSettings.french.php)
Re: New revs
« Reply #1669, on August 22nd, 2012, 04:45 PM »
rev 1669
(5 files, 2kb)

! IE10 didn't actually get the unprefixed version of gradiant CSS. Oops. (Class-CSS.php)

- Shortened quick topic edit code. Can anyone tell me if there's any reason to believe $topic's topic ID or first post ID could be empty or non-numeric..? (MessageIndex.template.php)

* Replaced a couple of ID searches with $(this) in case of events called from within a named form item. Well, I could also remove the ID as a result, but I'm not sure it'd be for the best. Or, in French, "I don't have time to test for that, anyone up for it?" (ManageBoards.template.php, Merge.template.php, Profile.template.php)
Re: New revs
« Reply #1670, on August 23rd, 2012, 12:21 AM »
rev 1670
(5 files, 3kb)

* Converted the CSS variable code to accept the new hasBrowser system. I think it's all that was missing..? (Class-CSS.php)

! A bytesize optimization for IE resulted in select boxes being broken. Ah, where doeth my mind wander... (index.template.php)

! The .wrc class being so generic, should, I believe, or at least I should hope so, be setting its box-sizing to border-box so that its custom padding doesn't screw up any layout. Of course with my current luck, it'll probably end up breaking something else... As long as it's just a Ming vase, I'm fine with it. (index.css)

* Sometimes, I'll have a look at some code and think, 'what was that developer trying to do?'... And then I'll figure, 'okay, there's an easier way to do that...' One of these things happened today, with a bizarre substr test that could just be trimmed down to a '.indexOf(var) == 0'... SMF is like a gold mine. I always find something to dig into, and I'm ready to spend hours just to save a couple of gzipped bytes. My very own personal nuggets. (admin.js, script.js)
Re: New revs
« Reply #1671, on August 23rd, 2012, 09:46 AM »Last edited on August 23rd, 2012, 12:05 PM
rev 1671 (keyboard shortcuts & post preview tweaks. Could have been split into two commits, had I been more careful...)
(10 files, 9kb)

+ Post pages now implement keyboard shortcuts while editing *for all browsers*: Alt+D (draft), Ctrl+B (bold), Ctrl+I (italics) and Ctrl+U (underline), along with the previous Alt+P (preview) and Alt+S (submit). Up until now, and that was also the case in SMF, they were only supported in non-Wysiwyg in Firefox, or everywhere in Wysiwyg but undocumented. It just needed a bit more work to make all shortcuts usable everywhere in non-Wysiwyg, the first action being to remove the is_ff test, ah ah. And of course, using proper jQuery-powered events. (editor-func.js, editor.js)

* Simplified the JS code for shortcuts and Ajax parsing in the editor. A LOT. Close to an unzipped kilobyte of code was happily stripped away from the file (which I reckon sounded better than 'over 150 bytes of gzipped code'.) Optimized post-Ajax code by using jQuery instead of getElementsByTagName. Event bubbling is handled in a single instruction by jQuery. Also, SMF seemed intent on doing a lot of stuff (it even mentions it in a comment) to simulate a Submit button click, when it could just have, ahem... called .click() on the button itself. Plus it's a mandatory method in HTML5, it handles onsubmit as well, and is available for all browsers in jQuery anyway. (editor.js)

* Updated language strings to reflect the current state of keyboard shortcuts. Removed the Opera and Firefox special cases, and stopped bothering with the accesskey stuff. I'm not removing the accesskey (you never know), but I'm not going to document them. (PersonalMessage.template.php, Post.template.php, Post.language.php, editor.css)

! Fixed post preview not working in IE 6/7 because of some bad CSS property targeting: just using 'border' could return 'undefined' if not set specifically, while 'border-color' always returns something. I could have gotten away with doing an implicit string conversion, but let's do it properly instead. (post.js)

* Improved post preview styling. (Post.template.php, editor.css, extra.ie*.css)
Re: New revs
« Reply #1672, on August 23rd, 2012, 07:30 PM »
rev 1672
(3 files, 3kb)

+ The Skin Selector will now provide the number of users for each skin (in addition to the global number for their theme.) That wedge_get_skin function is short and sweet, but getting the reference return to work was a PITA... If someone could look into the logic of it and spot any superfluous ampersands, that would be swell... (Themes.php, Themes.template.php)

* Spacinazi. Just two bytes... For a file we'll end up removing. (upgrade.php)
Re: New revs
« Reply #1673, on August 23rd, 2012, 07:35 PM »
rev 1673
(4 files, 5kb)

+ Added a new section to the stats page, 'most liked posters', which does what it says: it shows the authors who got the most 'likes' on their body of work. Now if this is going to be a controversial move, please tell us so. As of now, if seems rather harmless and may encourage quality posts. (Stats.php, Stats.template.php, Stats.language.php)
Re: New revs
« Reply #1674, on August 23rd, 2012, 07:48 PM »
rev 1674
(2 files, 1kb)

* Modified board/message index behavior to only set the board icon to its 'new' state if it directly has new topics in it. Sub-boards already have their own 'new' badge anyway! Smallest commit in days. Size doesn't always matter. (Boards.template.php, MessageIndex.template.php)
Re: New revs
« Reply #1675, on August 24th, 2012, 04:54 PM »
rev 1675
(7 files, 4kb)

! Wuthering was a bit broken in modern browsers by my IE fixes. I know, known song -- should try everything thoroughly before I commit... Decided to simplify the code and use the IE code everywhere instead. It looks just the same and is shorter. (Wuthering/extra.css, Wuthering/extra.ie[-9].css)

! Fixed blockquote backgrounds in Warm. (Warm/extra.css)

! Fixed background in topic lists in Wine, Warm and Wuthering. A disappointing little oversight that pretty much broke these pages entirely... Not sure why no one reported it in the first place. (Wine/extra.css)

* Don't waste time trying to analyze CSS suffixes when there's none in the first place! (Subs-Cache.php)

* Simplified variables in editor CSS. (editor.css)

* Added a todo note to myself... (Class-CSS.php)
Re: New revs
« Reply #1676, on August 25th, 2012, 12:03 AM »
rev 1676
(1 file, 2kb)

* This is the annual fix list for Aeva, yay... Well, just kidding, I've only done some work on YouTube. Arguably the most important one... (media/Subs-Aeva-Sites.php)
  On today's menu:
  - Now using the iframe version of YouTube embeds (for single videos and playlists), which should at last allow smartphones to view videos.
  - Fixed support for YouTube playlists, including the new URL type.
  - Wedge will no longer attempt to load and show titles for YouTube and Vimeo -- YT started showing them in the thumbnail around the time the feature made its way into Aeva, and it was heartbreaking for me... But you've got to live with your time.
Re: New revs
« Reply #1677, on August 26th, 2012, 12:34 AM »
rev 1677
(6 files +1-1, 3kb)

* YouTube Playlist embedding should be more forgiving of odd URLs. (Subs-Aeva-Sites.php)

* Now that all browsers can target a specific version in CSS, renamed extra.gecko.css to reflect the fact that the hack in question is for Firefox 2 and below! (extra.gecko.css, extra.firefox[-2].css)

! Fixed mini-menus in IE7 and iOS, like I did for IE6 last week. I just didn't realize the same issue was there... Also saved some space in IE6 CSS and Warm. (extra.ie*.css, extra.iphone.css, Warm/extra.css)

! Fixed code blocks being broken by a known bug in IE8. (extra.ie8.css)
Re: New revs
« Reply #1678, on August 29th, 2012, 04:18 PM »
rev 1678
(3 files, 2kb)

! SSI was broken since a commit made a year ago... Interesting. Well, not that much broken, you just need to change your starter code to just this: require_once('SSI.php'); ssi_run();[1], where ssi_run() is the new (more telling) name of ssi_shutdown(). So, this is effectively easier, but you also need to wrap your actual page code inside a template_main() function. Also removed $ssi_layers as using the wetem object is more flexible. (SSI.php)

! Fixed a missing default 'checked' when creating a new poll. (Post.template.php)

- Minor class cleanup. (Wuthering/extra.ie[-9].css)
 1. For instance, the license page for Wedge has this...
Code: [Select]
<?php
error_reporting
(0);
require_once(
'SSI.php');
ssi_run();

function 
template_main() {
?>


Your HTML code...

<?php
}
?>
Re: New revs
« Reply #1679, on September 1st, 2012, 12:25 AM »
rev 1679
(3 files +1-1, 9kb)

* Modified database structure to help future developments to custom boards and membergroups. id_board and id_group both went from smallint(5) to mediumint(8) (unsigned for boards, signed for groups.) Contact lists are now unsigned. Cleaned up more fields like UNIX timestamps that were often recorded as int(11) signed instead of int(10) unsigned. Added a few 'default 0' where needed. The media tables now get more realistic, with unsigned fields where needed, less int fields where not needed, etc. (install.sql)

+ Added default support for a few more file types in media documents: diff/patch (for developers), mht (generic cached HTML), torrent (it doesn't have to be illegal), and srt/ssa (for fansubbers etc.) I'm not adding ass to the list. People may think the forum admin is dirty. (install.sql)

+ Added default support for a few more file types in attachments: diff/patch, rtf, rar, 7z, docx, and removed mpg files (usually too large anyway.) (install.sql)

* As requested, replaced the classic YouTube embed link with the no-cookie version. Untested, though. (Subs-Aeva-Sites.php)

+ Added animations to MoveTopic pages. (MoveTopic.template.php)

* Renamed extra.gecko.css to extra.firefox[-3.6].css, to avoid processing an old CSS hack on recent Firefox versions. (extra.firefox[-3.6].css)