New revs

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #975, on August 31st, 2011, 11:21 PM »
rev 974
(4 files, 9kb)

* We're using jQuery for on* events, so the spoiler tag code could be simplified... (install.sql)

* Being bold, and disabling in-context video embedding by default. Will probably change my mind once we get lots of support requests... :P (install.sql)

- Removed copyright year from Settings.php. (Settings.php)

* There are only 4 valid metacharacters in a character class, so I figured I might as well clean up all of the useless escaping in the embedding code. (Aeva-Embed.php, Subs-Aeva-Sites.php)

! Fixed in-context video embedding. It seemed like center tags and similar were broken in this mode, so I decided to be a bit nicer and allow for most tags instead. (Aeva-Embed.php)

@ Pete and anyone else: I don't think it's very robust though, and should probably switch to an even nicer version where embedding is only disabled if the URL follows a space or some common punctuation like parenthesis. I'm starting to think it's best to make things simple here, and the whitespace/punctuation solution would be the way to go.
Re: New revs
« Reply #976, on September 1st, 2011, 11:14 PM »
rev 975
(2 files, 6kb)

! Fixed this annoying bug where Wedge wouldn't take non-numeric start variables into account when viewing a topic page. This was due to a conflict between board start and topic start, given that topic pages now also define $_REQUEST['board']. (QueryString.php)

- Removed support for .htm extensions in URLs -- don't remember ever seeing these used in SMF, probably a YaBB SE leftover. Keeping index.php/stuff URLs for compatibility with published URLs only. (QueryString.php)

! Parsing of hypothetical URLs like /do/viewjpeg (any pretty URL ending with 'jpeg') could have failed. (QueryString.php)

* Micro-optimization in loadSource(). (Load.php)
Re: New revs
« Reply #977, on September 3rd, 2011, 11:34 AM »
rev 976
(3 files, 12kb)

* If there is ONE single place in Wedge where micro-optimizations are going to make a difference, it's parse_bbc(). So that's what I did -- turned == into === where it made sense, cached strlen() when used several times, turned substr($str, $pos, 1) into $str[$pos], and so on... Probably only saves a couple of percents in the end, but guys, this is parse_bbc(). (Subs-BBC.php)

! Left and right bbc tags weren't using the proper classes. (install.sql)

* Curlynazi. (Display.php)
Posted: September 3rd, 2011, 11:06 AM

rev 977
(1 file, 1 line) <-- Now I'll try to just say the number of changed lines when there aren't more than a few...

! Oops. (Subs-BBC.php)
Re: New revs
« Reply #978, on September 3rd, 2011, 04:17 PM »Last edited on September 5th, 2011, 09:29 PM by Nao
rev 978
(11 files, 13kb)

! Locked sticky topics would only show their status as locked. (MessageIndex.template.php, Recent.template.php)

! Another oops. Someone has to tell me why PHP won't let me do that, though... (Subs-BBC.php)

- Removed 'image' parameter from all button strips, as they're remnants of SMF 1.x themes and aren't used for now. Also removed 'lang', as it can easily be achieved via CSS and the $language variable. Note: calendarpe.gif still exists in the SVN, not used anywhere though. (MessageIndex.php, TEMPLATES: BoardIndex, Calendar, Display, Media, Memberlist, PersonalMessage, Recent, Reports)
Re: New revs
« Reply #979, on September 4th, 2011, 08:22 PM »Last edited on September 5th, 2011, 09:30 PM by Nao
rev 979
(15 files, 20kb)

* Rewrote the skin selector to move it from an obscure profile page to the main menu's profile area. Introduced a 'skin' action in the process, and defaulted to the current user if no 'u' variable is set. (index.php, Profile-Modify.php, Profile.php, Subs.php, Themes.php, Profile.language.php, Themes.language.php, Profile.template.php, Themes.template.php)

* Renamed the 'theme' profile page to 'options', which probably makes more sense. Added a couple of workarounds for custom fields that were set to be in 'theme'. I'd rather we deal with these in the import tool, though... (ManageMemberOptions.php, Profile-Modify.php, Profile.php, Admin.template.php)

+ Added commented out language strings for Ignore Topics in the English version. Yes, I know it's not implemented yet... But it was already in the French version and I'd rather we implement that before 1.0 Gold... (Profile.language.php)
Posted: September 4th, 2011, 08:21 PM

rev 980
(5 files, 8kb)

! Fixed a minor bug with profile user IDs, introduced over 500 commits ago... Oops? Also avoided setting $_REQUEST early on, when it's going to be set in a batch a few lines later... (QueryString.php)

* Shortened declarations for the mandatory JS variables (we_default_theme_url, ajax_notification_*), because we can. Also optimized parent.clientWidth (called 3 times in the menu code) into a local var. (index.template.php, script.js)

! Safari Mobile for iOS didn't correctly position smileys. (index.iphone.css)

! Menu positioning issue in Wuthering skin. (Wuthering/index.css)
Re: New revs
« Reply #980, on September 5th, 2011, 08:33 PM »Last edited on September 6th, 2011, 07:43 PM by Nao
rev 981 -- this freaking commit took me a week of work!! Just for one feature nobody uses :(
(2 files, 20kb)

* Rewrote the 'Enable embedding in sentences' feature for Aeva, because it really wasn't solid enough. Since the new method is a tad slower, I've optimized the embedding process to compensate. See below. (Aeva-Embed.php)

    ! Local site checks were being done for all sites, and on each parse_bbc() call. Waste of time...

    ! A lot of code was being tested regardless of case. URLs should be case-sensitive, including the protocol, so don't bother with it. Come to me if you're experiencing trouble with special URLs. Also, parsed links should be on a single line, no need for the 's' modifier. Note for later: add support for local embedding on the https protocol...?

    * Updated SWFObject version to 2.2... Yes, I know, if it ain't broke don't fix it. Also converted the JS embed code to postponed jQyery, saving us an extra buffer replacement operation (these are really expensive.)

    ! The express installer setting was inverted from the start. No one ever complained about it though, so it's probably not even worth using that...

    ! Don't force a font family on titles below videos. Only a font size.

    ! Oops, a count() was used in a for() loop...

    - Removed an extra strlen() test that was already pretty much done, and a http:// conversion that probably shouldn't even happen in the first place...

    * Merged the two aeva_protect_recursive*() functions together.

    * Don't call aeva_parse_bbc2() if no link was found. (also Subs-BBC.php)

PS: I re-numbered the 3 previous revisions. I had an extra 977 which was really 978 :P Sorry Pete!
Re: New revs
« Reply #981, on September 5th, 2011, 09:40 PM »
rev 982
(7 files, 17kb)

* Updated copyright header. (Aeva-Sites-Custom-Example.php)

* Simplified dozens of Aeva site list entries, mostly removed unused non-capturing groups. Gosh, I'm sure 90% of these sites are dead or changed their embed code, or are just completely ignored anyway... (Subs-Aeva-Sites.php)

! Streetfire embedding was broken. Well, maybe it still is, I haven't tested. But at least the regex is no longer broken. (Subs-Aeva-Sites.php)

* It's site list, not sitelist. (Admin.english.php)

! SMF bug? In the error log, sessions were output as such, without any 'Session' text. Even I wasn't sure what these characters were about... (Errors.template.php)

- Too much styling is too much. Removed dotted line between options in admin media settings. (Media.template.php)

- Too much styling is me going crazy. Got rid of button list's custom font. Ever since mini-menus were introduced, post button font became a moot point anyway. (sections.css)

- Removed today (US Labor day) from calendar_holidays. (install.sql)
Re: New revs
« Reply #982, on September 6th, 2011, 12:24 PM »
rev 983
(7 files, 12kb)

* Given that it makes more sense (to me) to use the Go Up and Go Down button to go to the actual beginning and end of a page, rewrote these links to actually do it, with a nice little animation. Thank you jQuery. (Display.template.php)

* Rewrote topic index and unread posts to link topics to the new posts, just like the New icon does. Of course, if a topic has no new posts, it'll link to its start page as usual. (MessageIndex.template.php, Recent.template.php)

* Renamed css_generic_files to css_suffixes for logical reasons. (install.php, Class-CSS.php, Load.php, Subs-Cache.php)

@ Note: re: up/down, I've read that doing an animation on $('html, body') wasn't a good idea because it did it twice in Opera. It works perfectly in Opera 12 so I decided not to bother... Opera users are early adopters so even if earlier versions had a problem, I'd rather not complicate the code. I've also read that animating $(window) would work, but not for me when I tested.
Re: New revs
« Reply #983, on September 6th, 2011, 07:42 PM »
rev 984
(2 files, 5kb)

* Small extra jQuery conversion. (ManageServer.php)

! Syntax error. (Aeva-Embed.php)

(It's not much, but I modified many files for the templating stuff and I'm trying to keep the 'other' files out of my way...)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #984, on September 8th, 2011, 12:23 PM »
Revision: 985
Author: arantor
Date: 11:22:43, 08 September 2011
Message:
! Allow the richedit component to style individual buttons if they so desire, not just the post button. (Class-Editor.php)
----
Modified : /trunk/Sources/Class-Editor.php


@ Something out of WedgeDesk, really. Where we're styling buttons in various places, I have a richedit control that has both a save and a delete button, and wanted to style the delete button like all the others. Really not a big thing but something I wanted to do :)
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 #985, on September 8th, 2011, 04:07 PM »
(Another 'cleaning up my local install' commit...)

rev 986
(7 files, 10kb)

! Not sure where (I'm busy!), but it looks like the editor class may be called at different points in time during rendering, making it necessary to use $context['header'] as well. Also micro-optimizations. (Class-Editor.php)

! Fixed syntax error in a comment... Well, it does suggest to uncomment it after all. (ssi_examples.php)

! A few lines of code needed to be turned into loadSubTemplate(). (unittest/index.php)

! Just because the theme hasn't finished loading doesn't mean the text strings aren't already loaded... Well, at least I met such a case during testing. (Errors.php)

* Commenazi and other boring changes. (ManageSmileys.php, Reports.php, index.english.php)
Re: New revs
« Reply #986, on September 9th, 2011, 12:55 AM »
rev 987 (the big layer rewrite.)
(27 files, 77kb 8-))

+ Rewrote the template layer/subtemplate system from scratch and implemented a new 'skeleton' system, where the theme defines the desired layer/subtemplate structure with pseudo-HTML, and skins can freely change the order of the blocks. Layer functions are no longer mandatory, as layers can now be used simply as easy ways to keep multiple subtemplates in the same place. (Load.php, Subs-Cache.php)

+ Added loadLayer() function, which handles adding layers to the skeleton. Two positioning options are allowed for now (parent and child), but more will come in time. I'm also listing various files affected by layer changes. (Load.php, ManageAttachments.php, ManageMedia.php, ManageMedia3.php, PersonalMessage.php, Profile.php, Security.php, SSI.php, ManageAttachments.template.php, Profile.template.php)

* As a note; the main layer is now next to the top layer, when it used to be the top layer's parent. A new layer was added on top of them, anyway. (Subs.php)

* Rewrote hideChrome() to the new system. Its parameter now accepts three variations: empty means that the template will handle everything, from HTML headers to content. 'html' means that we only want the HTML headers, the body tag and the content. Specifying another string will behave like 'html' but will add an extra layer right before the content. (Subs.php, unittest/index.php, Aeva-Gallery.php, ManageBans.php)

* Split the wedge_cache_css() function into two different functions, so that skin options can be retrieved early on, and actually CSS caching is still performed at the last minute. May actually be a bit faster, because Wedge will no longer try to load parent CSS when a child is a replace-type skin. (Subs-Cache.php)

* Changed the Warm layout through a skeleton override, to allow for the sidebar to be shown on the left side of the screen, rather than to the left side of the content area (below the header). (Warm/skin.xml, Warm/index.css)

* Always define WIRELESS_PROTOCOL to wap2 when WIRELESS is defined, because it's the only one we have. Unless we start implementing support for iMode again (ah ah), I'd suggest we rename all of these subtemplates to get rid of the prefix... (index.php)

- Deleted the theme_layers feature because, you guessed it, it's useless now we have the skeleton code. (upgrade.sql, JSOption.php, Load.php, Subs-Members.php, Themes.php)

* Saved a few bytes off the noi_resize() function. Does it look like I'm obfuscating it? (index.template.php)

! Syntax error. Another one of the 'last minute commits'. (Class-Editor.php)

! $modSettings wasn't globaled in a function, causing OpenID to always fail. (index.template.php)

! Media upload page wouldn't validate, because an <input file> had a size parameter, which is no longer valid in HTML5. (Media.template.php)

* Shortened the PHP code in files when using the filesystem cache. It only saves a few bytes, but I see no reason to waste these bytes when you're never going to read them. Also no longer calling die() when WEDGE is not defined: it just won't load the cached data. (Subs-Cache.php)

* Renamed theme_linktree() to template_linktree(), and on the contrary, template_header() to start_output(), and removed template_footer(), because we really should avoid using template_* for anything other than an actual template function, and theme_* for anything that is a real subtemplate. (SSI.php, Subs.php, Xml.template.php)

* Split start_output() into two functions. The first initializes the output as expected, and the second is called if we're going through the top layer rendering process, instead of the previous method (done when iterating the _above list). This is totally untested, unlike the rest of this huge commit. It'll probably be the first thing to break. Used the opportunity to add import.php to the list of security files. (Subs.php)
Re: New revs
« Reply #987, on September 9th, 2011, 10:15 AM »
Lol, I just realized that the post number (the thing next to the post date) is exactly the rev number, off by one... It wouldn't even be off by one if I hadn't recently merged two small commit changelogs together :P

So I'm posting this totally unrelated post to make them match exactly... :niark:
Re: New revs
« Reply #988, on September 9th, 2011, 10:15 AM »
rev 988
(12 files, ??kb -- not too big)

* Renamed template blocks to 'macros', i.e. from a generic term to a description of what they can actually do. (Load.php, Subs-Cache.php, Subs.php, index.template.php)

* If the quick reply box is collapsed by default, increase its textarea height to 150px. Because we can. (Display.php)

* Cleaned up a bit of the quick reply area: got rid of the empty anchor and moved it to the quickreplybox div (now renamed quickreply), shortened a few of the other IDs, removed a useless div... (Display.template.php, Media.template.php, index.ie6.css, sections.css, Warm/index.css)

* Tweaked and improved category title fonts. Or more specifically, removed the tweak that was only for the quick reply bar, and moved it over there. (index.css, Warm/index.css)

! Fixed a stupid bug where topic pages wouldn't display at all... Hmm, not exactly smart of me to name both the main layer and main sub-templates 'main', but it works for now... Until I get to improve this. (index.template.php, Warm/skin.xml)
Re: New revs
« Reply #989, on September 9th, 2011, 11:25 AM »
rev 989
(13 files, 15kb)

+ Added a semantic definition feature for skeletons. When defining a layer, you can specify a layer type next to it (position on the page, navigation role...), for instance <layer:side,left,top> means that this layer wants to receive data sent to ':side' (the main sidebar), ':left' (the left of the page) and ':top' (top of the page). Have a seen a greedier layer in your life? I haven't. Should I apply the same system to sub-templates? (Load.php, index.template.php, Warm/skin.xml)

* Turned 'sidebar' and 'top' into array(':side', 'sidebar') and array(':top', 'top') in loadSubTemplates calls. And no, you don't have to do the same, it's just that I'm trying to give a good example. (index.php, Admin.php, Calendar.php, Display.php, Aeva-Gallery.php, MessageIndex.php, Profile.php, Subs-Menu.php, Unread.php, UnreadReplies.php)