New revs

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #435, on December 11th, 2010, 01:27 AM »
rev 365

* Moved storeCaret() to the footer, and made sure only IE runs it. Because only IE needs it... (Class-Editor.php)
* Made sure that the Quick Reply toggle text isn't selectable, and moved its JS call to the footer. (Display.template.php)
* Some tweaks in IE7... (ie7.css)
* ...And some other general CSS tweaks. (index.css)
- postAttachment3 doesn't exist... Does it? (index.css, rtl.css, Post.template.php)
* Replaced a few hardcoded input box sizes with CSS. Thanks live627! (Post.template.php)
* Missing capitals in a few entries. (Admin.english.php, Admin.french.php)
* Spacinazi. (Display.template.php, Post.template.php)
- What's the point in calling init() at the end of some object constructors, when we could just stay in these functions? (editor.js, topic.js)
+ Added animation effects in Quick Reply (opening, closing and switching to Wysiwyg), and started conversion to jQuery. (topic.js)
* The More Options area in the post template should be hidden immediately when collapsed, instead of triggering the relatively lengthy animation. (Post.template.php)
* Optimized spell-check JS and converted it to jQuery. (spellcheck.js)

Good luck for having a look at it all, Pete... My changes are sometimes a bit complicated -- but hopefully not buggy!!

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #436, on December 11th, 2010, 12:51 PM »
Revision: 366
Author: arantor
Date: 11:51:13, 11 December 2010
Message:
! Fix the bugs caused by trying to code something quickly when tired (SSI.php)
----
Modified : /trunk/SSI.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,082
Re: New revs
« Reply #437, on December 11th, 2010, 09:30 PM »
rev 367

- Removed all "old theme compatibility code" related to the session variable name. Seriously, we're not compatible with SMF1 themes. Get over it. A few sesc/sc lines are left in the overall codebase, because I'm unsure whether they should be touched. (topic.js, script.js)
* Pretty much finished converting topic.js to jQuery. XML tree manipulation is way cooler with it. (topic.js)
* Converted Post template's JS area to jQuery. (Post.template.php)
- Some of the XML parsing did strange things, like concatenating all children in a node to build the quote or body strings, when the XML template would always return a single child anyway...! (topic.js, Post.template.php)
- $context['quote']['text'] and $context['quote']['mozilla'] are never used anywhere... Are they? (QuoteFast.php)
* Moved smf_addButton() to topic.js, as it's only used over there. (theme.js, topic.js)
* Minor layout tweaks and spacinazi. (index.css, Xml.template.php)
* One extra DOM node to convert to jQuery... Gotta get'em all! (suggest.js)
* Updated generateDays() to jQuery. Whatever. (Calendar.template.php, ManageCalendar.template.php, ManagePaid.template.php, Post.template.php)
! Forgot to add a dummy link to the quick reply toggle. (Display.template.php)

I can't feel my legs... Help... Hours spent just to double-check my Post template and topic.js changes... Arghhh...
Re: New revs
« Reply #438, on December 11th, 2010, 11:19 PM »
rev 368

! Fixed BBC button layout in IE6. (ie6.css)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #439, on December 12th, 2010, 07:50 PM »
Revision: 369
Author: arantor
Date: 03:53:25, 12 December 2010
Message:
+ Added ability to recount member posts into Admin / Maintenance / Members (ManageMaintenance.php, ManageMaintenance.template.php, ManageMaintenance.english.php)
----
Modified : /trunk/Sources/ManageMaintenance.php
Modified : /trunk/Themes/default/ManageMaintenance.template.php
Modified : /trunk/Themes/default/languages/ManageMaintenance.english.php

Posted: December 12th, 2010, 04:53 AM

Revision: 370
Author: arantor
Date: 04:21:14, 12 December 2010
Message:
+ Scheduled tasks can now specify a file to load that contains the actual function to be called (install.sql, ScheduledTasks.php, ManageScheduledTasks.php)
----
Modified : /trunk/Sources/ManageScheduledTasks.php
Modified : /trunk/Sources/ScheduledTasks.php
Modified : /trunk/other/install.sql

Posted: December 12th, 2010, 05:21 AM

Revision: 371
Author: arantor
Date: 18:49:50, 12 December 2010
Message:
! Rewrote news fader to run in jQuery (BoardIndex.template.php, fader.js)
----
Modified : /trunk/Themes/default/BoardIndex.template.php
Modified : /trunk/Themes/default/scripts/fader.js

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #440, on December 13th, 2010, 01:13 PM »
rev 372

+ Added automatic minification and gzipping of *all* Javascript files. Yay. (Class-Editor.php, QueryString.php, Spellcheck.php, Subs-Editor.php, Subs.php, TEMPLATES: Admin, BoardIndex, index, Login, ManageBans/Boards/Maintenance/Membergroups/News/Paid/Smileys, MessageIndex, ModerationCenter, Packages, PersonalMessage, Post, Profile, Register, Reminder, Stats, Themes)
+ Put cached JS timestamps inside the filename to help with caching, and added automatic removal of earlier cached versions. (Subs.php)
* Spent some quality time with JSLint, the infamous Javascript validator, and applied a good chunk of its hints. Thanks, man. (pm.js, TEMPLATES: Display, ManagePermissions, Packages, PersonalMessage, Post, SplitTopics)
* Replaced time_format's default day handler with %e, because I don't see why we have to cope with extra zero padding just because Windows servers can't do it... Also, SMF kept warning people against using it, but the help file was outdated (implying there was no hack to make it work), and said hack was definitely not up to date either. Anyway... Rewrote all of that. (upgrade.php, Help language, Install language)
- Did we actually ever use wedge_add_js? No? That's what I thought. Also optimized wedge_add_css(). (Load.php, Subs.php)
! Quick Reply didn't return false. Oops. (Display.template.php)
! Error box always showed up when previewing a message, even if empty. (Post.template.php)
* Spacinazi. (ManageMaintenance.php, PersonalMessage.template.php)
* Removed "min" from jquery-1.4.4.min.js because it's already long enough as it as, and renamed PersonalMessage.js to pm.js, for consistency within the scripts folder. (pm.js)
+ Added French translation for new Recount maintenance task. Also made a few tweaks to various translations. We use Cookie in French. Not Témoin. Stop with the silly French words. (Admin, Help, ManageMaintenance, Post, Themes languages)
* Fix for 'More Options' animation overflow in IE6. (ie6.css)
@ todo: add support for $modSettings['obfuscateFilenames'], add a switch for JSMin/Packer use, and make sure to always save cache in the current theme. Also, the spellcheck window is currently broken because it doesn't show anything. Needs rewriting.

(Also need to commit the rest of the JS files. Oh my, and I want to eat! And play DeathSpank!)
Posted: December 13th, 2010, 12:55 PM

rev 373

- Uh... Wrong copy/paste manipulation. (index.template.php)
Re: New revs
« Reply #441, on December 13th, 2010, 04:37 PM »
rev 374

+ Added support for topic subscriptions to the RSS feed feature. (Feed.php)
* Save some time on each request by caching the value of $_REQUEST['action']. (index.php)
! A preg_replace's second parameter is a proper PHP string, it doesn't follow the regex engine's twisted rules. ;) (Class-String.php)
- SMF bug: A few queries are overly complicated, because $board is already taken into account in $query_this, and they're still testing for it. (Feed.php)
! SMF bug: cdata_parse() is a byte-aware function, as opposed to char-aware, so westr::substr would find full entities instead of just an ampersang, resulting in an infinite loop. (Feed.php)

A few things to note:
- Is it a SMF bug or a Class-String.php bug? I'm thinking SMF bug, very strongly, because $smcFunc['substr'] does indeed attempt to get full entities as a single character, but I'm not fluent on the conversion work and maybe they use an alternate codepath in some cases and these cases weren't taken into account properly? I don't know. Warrants another check!
- Seriously, why didn't anyone cache the $_REQUEST['action'] in all these years...? :lol:
- The per-topic RSS feed doesn't take unapproved posts into account. Could you look into that, Pete? After implementing that feature AND fixing the cdata_parse() function, let's just say I'm not too excited to look into Feed.php even for an extra minute ;)
- The $board optimization in queries is a last-minute fix. I tested it on my local install, but I don't have "hidden" boards or anything, but I don't think they'd be related to that anyway. Seriously, another waste of CPU cycles to me...
Posted: December 13th, 2010, 04:01 PM

rev 375

! SMF bug: using PHP syntax to add a string (w00t!), and making that string an unknown variable... Assuming they mean this.opt.sUniqueId. It's a wonder this doesn't even throw an error, but it's still a nasty one. (editor.js)
! Nao bug: unknown variable in smfSelectText(). Oops. (editor.js)
- We don't need to deal with window.event in events that are initialized through jQuery. (script.js)
* Finishing the JSLint-induced changes. Most notably, adding semicolons at the end of prototype definitions. This should make it possible to compress files through Packer without the need for an extra pass of semicolon checks (see QueryString.php). Also, I didn't bother with the ==/=== suggested changes. Not confident enough in SMF's code strictness in that particular area. Finally, removed many unused variables. (admin.js, captcha.js, editor.js, profile.js, register.js, script.js, sha1.js, spellcheck.js, stats.js, suggest.js, topic.js)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #442, on December 14th, 2010, 12:17 PM »
Revision: 376
Author: arantor
Date: 10:44:30, 14 December 2010
Message:
! More documentation (Activate.php, Buddy.php)
! Add a hook to the buddy action in case we want to do something interesting with the new buddy. (Buddy.php)
----
Modified : /trunk/Sources/Activate.php
Modified : /trunk/Sources/Buddy.php

Posted: December 14th, 2010, 11:44 AM

Revision: 377
Author: arantor
Date: 11:17:25, 14 December 2010
Message:
! More documentation (CoppaForm.php, Credits.php, Dlattach.php)
----
Modified : /trunk/Sources/CoppaForm.php
Modified : /trunk/Sources/Credits.php
Modified : /trunk/Sources/Dlattach.php

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #443, on December 15th, 2010, 12:12 PM »
rev 378

* In the main menu, if we're browsing a board, show a popup menu under 'Home' giving a link to both the forum homepage and the current board's homepage. (Subs.php)
+ Added switch for Javascript filename obfuscation. (ManageServer.php, QueryString.php, Help language, ManageSettings language)
+ Added Minify UI in Manage Server. (install.sql, ManageServer.php, Subs.php, Help language, ManageSettings language)
+ Added switch to choose jQuery server. (install.sql, Load.php, ManageServer.php, index.template.php, Help language, ManageSettings language)
+ Proceed to delete all JS from cache when JS-related options are set, and CSS as well when 'compressed data' option is set. (ManageServer.php)
* Make sure to always create cached files in the current theme's folder. (Subs.php)
Posted: December 15th, 2010, 12:04 PM

rev 379

* Replaced cdata_parse() function with a single-line thingy that should take care of it all. Revert if it doesn't work. (That's why I'm committing this apart from the rest.) (Feed.php)
Posted: December 15th, 2010, 12:12 PM

rev 380

+ Added RSS link for current board in board index, and RSS link for current topic in the button strip. There's no rss.gif file for now but I'll try to think of something to add icons. (MessageIndex.template.php, Display.template.php)
* Renamed 'RSS feed' to RSS for the reason above. I don't know if it's a good idea though, for non-techies... (index language)
+ Added a subtle shadow under help iframes. (index.css)
! Fixed spellcheck window... Err, actually, committing a proposed fix. I have no way to test it for now, ahah. I'm a funny guy. (Post.template.php)
! Minor typos. (Activate.php, Buddy.php, Credits.php)
* Replaced sizes with classes. Not that it's important at all. (SendTopic.template.php)
Re: New revs
« Reply #444, on December 15th, 2010, 02:06 PM »
rev 381

* Modified the php bbcode to use a proper html tag (code), and applied the same styling as with the code bbcode. The only thing missing is the "select" text, but it's not like anyone complained about its lack so far. (install.sql, index.css)

Forgot to add to the changelog that I've also changed the font size from "x-small" (which is apparently 7.5pt) to "8pt"... I don't know what "x-small" is supposed to fix, but I know that it's very small in Opera and makes it hard to read proper code. If you don't want to make it readable -- attach it as a zip file or something :lol:
Re: New revs
« Reply #445, on December 15th, 2010, 07:41 PM »
rev 382

* Replaced the help popup's iframe with an Ajax popup, shown with style and in pure jQuery fashion. (Help.template.php, script.js)

(The animation is a simple fadeIn effect... I tried with toggle() and it reflows the text as it enlarges. Is there a way to prevent text reflowing in this kind of animation?)

📎 popup.png - 20.89 kB, 578x290, viewed 333 times.


Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #446, on December 15th, 2010, 11:15 PM »
Nice!
Quote
(The animation is a simple fadeIn effect... I tried with toggle() and it reflows the text as it enlarges. Is there a way to prevent text reflowing in this kind of animation?)
I don't believe so due to the techniques used in toggle(), which IIRC is resizing as well as other things, as opposed to fadeIn being purely an opacity change.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #447, on December 17th, 2010, 04:25 PM »
rev 383

! The cache manager didn't properly delete earlier Javascript cached files. (Subs.php)
! In Quick Reply mode, the spellcheck form was declared twice (once in the Display template, once in Class-Editor.php), causing browsers to fail finding the proper window. Sorry for the poor hack, this needs better fixing. (Display.template.php)
* script.js all alone won't work without jQuery... Will need to do this on all files that call it directly. And obfuscate the links, too. And add an .htaccess rule to prevent viewing the files from within the scripts folder. Is it me who's being paranoid here? (install.php)
* If an error is found when launching the spellcheck window, just close it automatically, instead of showing a blank page. (Spellcheck.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #448, on December 18th, 2010, 03:41 AM »
Revision: 384
Author: arantor
Date: 02:40:44, 18 December 2010
Message:
! Remove the white, black, blue, red, green bbcodes from installer - these are all removed during preparsecode anyway. (install.sql)
----
Modified : /trunk/other/install.sql

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #449, on December 18th, 2010, 12:41 PM »
rev 385

* When forcing loading of an uncached jQuery, get it from the jQuery CDN. (install.php, repair_settings.php, upgrade.php)
! Fixed repair_settings.php to, err... At least run. (repair_settings.php)
* Rewrote some JS to add animations. (ssi_examples.php)
+ Added Aeva Media helpers (I'm working on integrating it... Even if I'm doing it outside the SVN, it has to creep into the main codebase at some point.) (Class-DB.php)
+ Implemented theme_base_js() and theme_base_css() helpers, and added them wherever I could. sphinx_config and ssi_examples will now use the current theme rather than the default one I believe, so maybe it's not a good idea for these. (sphinx_config.php, ssi_examples.php, Load.php, Subs.php, ViewQuery.php, TEMPLATES: Errors, Help, index, ModerationCenter, Packages, Post, Register)
* Commenazi and French collaborator. (ManageMaintenance.php, Install.french.php)