rev 925 (and there it is... now we're talking.)
(11 files, 47kb)
* Rewrote the smiley handling system. Parsed smileys now use a div enclosing the actual smiley code. Benefit #1: copying and pasting text will retain smileys as text code in all browsers (SMF limits it to Firefox). Benefit #2: the most used smileys can now be encoded into the CSS, resulting in very fast loading times. As a note, the WYSIWYG editor will still use image tags to show smileys, otherwise navigating smileys through keyboards wouldn't work as well. (Class-Editor.php, ManageSmileys.php, Subs-BBC.php, editor.js, post.js)
+ Added aforementioned cache for BBC tag images. Should work across different smiley sets and browsers, using the same settings as the regular CSS cache. (Subs-BBC.php, Subs-Cache.php)
* Micro-optimized the editor JS code to take less space in the page (replacing objects with arrays, etc.) Because the editor code is unlikely to be changed (much) by mods, and because we now tend to add it even in topic pages, it makes sense to compact it, especially for uncompressed HTML pages where we save over 3 kilobytes. The js files also saved a kilobyte, and about 200 bytes once gzipped. (Class-Editor.php, editor.js, post.js)
- Removed smf_smileys_url (no longer used.) (Class-Editor.php)
- Removed some code that assumed $modSettings['smileys_dir'] and smileys_url weren't set... Probably some SMF1 compatibility code, because it's always set in Wedge. (ManageSmileys.php)
* Removed $txt['icon_laugh'] as it's not a 'default' smiley per the editor code. Added $txt['icon_edit'] because it is. (Subs-BBC.php, Class-Editor.php, index.language.php)
* Rewrote clean_cache to accept any kinds of extensions, instead of their 3 last characters. (Subs-Cache.php)
! clean_cache was broken when specifying extensions, as it used the wrong variable name. (Subs-Cache.php)
* Harmonized JS code for "Object.prototype.function = function ()". Oops, I mean 'spacinazi'. (editor.js, pm.js, post.js, suggest.js, topic.js)
* Moved the Delete button in File attachments to the left, for feng-shui reasons. Also fixed bevel in the button, although I have a feeling it'll break in Safari again... Also, did anyone notice that the input form button is never disabled, even when kindly asked to do so..? (post.js)
@ Note to Pete: maybe the file input should be hidden, as opposed to disabled....?
:edit: I updated Safari to v5.1, and the bug I mentioned is finally gone. So it's all good now... Only problem is, smileys don't show up in the editor :lol: Another bug I'll have to fix...
:edit: 2 - Postbox smileys are buggy in IE (all versions including 9), and Safari. They work well in Chrome, Firefox and Opera, the 'good guys'.
(11 files, 47kb)
* Rewrote the smiley handling system. Parsed smileys now use a div enclosing the actual smiley code. Benefit #1: copying and pasting text will retain smileys as text code in all browsers (SMF limits it to Firefox). Benefit #2: the most used smileys can now be encoded into the CSS, resulting in very fast loading times. As a note, the WYSIWYG editor will still use image tags to show smileys, otherwise navigating smileys through keyboards wouldn't work as well. (Class-Editor.php, ManageSmileys.php, Subs-BBC.php, editor.js, post.js)
+ Added aforementioned cache for BBC tag images. Should work across different smiley sets and browsers, using the same settings as the regular CSS cache. (Subs-BBC.php, Subs-Cache.php)
* Micro-optimized the editor JS code to take less space in the page (replacing objects with arrays, etc.) Because the editor code is unlikely to be changed (much) by mods, and because we now tend to add it even in topic pages, it makes sense to compact it, especially for uncompressed HTML pages where we save over 3 kilobytes. The js files also saved a kilobyte, and about 200 bytes once gzipped. (Class-Editor.php, editor.js, post.js)
- Removed smf_smileys_url (no longer used.) (Class-Editor.php)
- Removed some code that assumed $modSettings['smileys_dir'] and smileys_url weren't set... Probably some SMF1 compatibility code, because it's always set in Wedge. (ManageSmileys.php)
* Removed $txt['icon_laugh'] as it's not a 'default' smiley per the editor code. Added $txt['icon_edit'] because it is. (Subs-BBC.php, Class-Editor.php, index.language.php)
* Rewrote clean_cache to accept any kinds of extensions, instead of their 3 last characters. (Subs-Cache.php)
! clean_cache was broken when specifying extensions, as it used the wrong variable name. (Subs-Cache.php)
* Harmonized JS code for "Object.prototype.function = function ()". Oops, I mean 'spacinazi'. (editor.js, pm.js, post.js, suggest.js, topic.js)
* Moved the Delete button in File attachments to the left, for feng-shui reasons. Also fixed bevel in the button, although I have a feeling it'll break in Safari again... Also, did anyone notice that the input form button is never disabled, even when kindly asked to do so..? (post.js)
@ Note to Pete: maybe the file input should be hidden, as opposed to disabled....?
:edit: I updated Safari to v5.1, and the bug I mentioned is finally gone. So it's all good now... Only problem is, smileys don't show up in the editor :lol: Another bug I'll have to fix...
:edit: 2 - Postbox smileys are buggy in IE (all versions including 9), and Safari. They work well in Chrome, Firefox and Opera, the 'good guys'.


