This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
9091
Features: Forward thinking / Re: jQuery versions of JavaScript files
« on May 6th, 2011, 05:22 PM »
Ah yes, that's the bug you fixed, I remember :)
9092
Features: Forward thinking / Code clean-up
« on May 6th, 2011, 05:20 PM »
Feature: Code clean-up
Developer: Nao
Target: modders, geeks
Status: 80% (I fix stuff when it hurts my eyes. Most of it is done though.)
Comment:
They say beauty is in the eye of the beholder. Let's be clear, the SMF codebase would already enchant any given geeky beholder. Really. Just have a look at any other popular forum/blog platforms. Their PHP, HTML, CSS and JS are often at best acceptable, at worst unreadable. Wordpress says that coding is art. Well, if you looked into their code, you'd swear they meant talking about modern art.
SMF doesn't have this problem, because it's been mostly maintained by anal-retentive genius coders. Only problem -- I'm even more anal-retentive than they are. So, every time I find some code that I feel is sub-standard, I'll just rewrite it. Sometimes the code is micro-optimized in the process, mostly it's just prettified.
Some changes are project-wide (making sure that all files are saved in LF format as opposed to CRLF, removing useless {} or extra tabs in empty lines or at the end of lines), most are way more specific. Let's not delve into that too much. You might find I'm a bit crazy in that area. I changed thousands of lines just because they looked ugly to me.
(And that concludes this feature set -- for now!)
Developer: Nao
Target: modders, geeks
Status: 80% (I fix stuff when it hurts my eyes. Most of it is done though.)
Comment:
They say beauty is in the eye of the beholder. Let's be clear, the SMF codebase would already enchant any given geeky beholder. Really. Just have a look at any other popular forum/blog platforms. Their PHP, HTML, CSS and JS are often at best acceptable, at worst unreadable. Wordpress says that coding is art. Well, if you looked into their code, you'd swear they meant talking about modern art.
SMF doesn't have this problem, because it's been mostly maintained by anal-retentive genius coders. Only problem -- I'm even more anal-retentive than they are. So, every time I find some code that I feel is sub-standard, I'll just rewrite it. Sometimes the code is micro-optimized in the process, mostly it's just prettified.
Some changes are project-wide (making sure that all files are saved in LF format as opposed to CRLF, removing useless {} or extra tabs in empty lines or at the end of lines), most are way more specific. Let's not delve into that too much. You might find I'm a bit crazy in that area. I changed thousands of lines just because they looked ugly to me.
(And that concludes this feature set -- for now!)
9093
Features: Forward thinking / JavaScript manipulation
« on May 6th, 2011, 05:13 PM »
Feature: JavaScript manipulation
Developer: Nao
Target: modders, themers, users, geeks
Status: 100% (complete.)
Comment:
Wedge makes life easier for JavaScript developers. First of all, you can put inline events into your markup (even better, you can use < > & without escaping them), they'll be delayed automatically to the end, and grouped together. That is, even if you call onclick="return something();" on several elements, that event will be stored only once in the HTML. This helps separate presentation from code.
You may also use jQuery inside your events. Also, Wedge allows you to add JS code simply by calling the add_js() function, and JS files with add_js_file(). Conversion of existing code in templates is made easier by the fact that commas are accepted within the add_js() calls, e.g. add_js('alert("', $txt['hello'], '");').
And because all code is postponed to the end of the page, you don't have to run anything in a DOMContentLoaded/DOMReady event, because the DOM is effectively built and ready to use by the time your code is run.
If you don't need jQuery or need your code to be executed before everything else, call add_js_inline(). The full DOM is still available at this point, but no jQuery, and no common Wedge functions. If you desperately want to run your code to be run in the middle of the DOM, don't bother with our functions and just use a script tag. We won't judge you.
Developer: Nao
Target: modders, themers, users, geeks
Status: 100% (complete.)
Comment:
Wedge makes life easier for JavaScript developers. First of all, you can put inline events into your markup (even better, you can use < > & without escaping them), they'll be delayed automatically to the end, and grouped together. That is, even if you call onclick="return something();" on several elements, that event will be stored only once in the HTML. This helps separate presentation from code.
You may also use jQuery inside your events. Also, Wedge allows you to add JS code simply by calling the add_js() function, and JS files with add_js_file(). Conversion of existing code in templates is made easier by the fact that commas are accepted within the add_js() calls, e.g. add_js('alert("', $txt['hello'], '");').
And because all code is postponed to the end of the page, you don't have to run anything in a DOMContentLoaded/DOMReady event, because the DOM is effectively built and ready to use by the time your code is run.
If you don't need jQuery or need your code to be executed before everything else, call add_js_inline(). The full DOM is still available at this point, but no jQuery, and no common Wedge functions. If you desperately want to run your code to be run in the middle of the DOM, don't bother with our functions and just use a script tag. We won't judge you.
9094
Features: Forward thinking / jQuery versions of JavaScript files
« on May 6th, 2011, 05:12 PM »
Feature: jQuery versions of JavaScript files
Developer: Nao
Target: modders, themers, users, geeks
Status: 100% (believed to be complete and bug-free.)
Comment:
jQuery adds about 31kb to your content the first time you load it. But you may not even realize it: we load jQuery from Google by default, and if another website does the same, chances are the file is already in your browser cache and doesn't need to be loaded.
Still, I'd rather take the worst situation into account and say you're on a 56kbps modem and your browser cache is disabled. You have a right to be silly, we're not judging. So, I solved this problem by saving space everywhere else, optimizing every single bit of SMF's JavaScript code, and using jQuery everywhere it made sense to use it.
For instance, the script.js file in SMF is about 47kb, while the Wedge version clocks in at 27kb. All of the JS files were optimized in a similar fashion, resulting in smaller files, even with jQuery thrown into the process. See the code that applies CSS to the WYSIWYG editor in SMF2? 74 lines. In Wedge? 2 lines. Two.
One of the better aspects of using jQuery in the JS files is that we can also take advantage of its superior capabilities. Sometimes, it will simply replace advantageously an existing feature. The news fader script is 6.6kb in SMF, and 1.6kb in Wedge, with the same outcome.
Other times, I added some nice bits to the SMF formula. The infamous toggler is now much shorter and adds a nice animation effect. We also have the reqWin function. It's called whenever you click a help icon to show a popup with some help text. The Wedge version of reqWin actually opens a div popup with fixed position, with the ability to move it around the page. It works just as well as the SMF version, is non-modal, has some nice subtle visual effects, and frankly, did you ever like SMF's window popups anyway?
There are plenty more examples of the advantages of using jQuery in the JS files, but you'll have to find out for yourself...
Developer: Nao
Target: modders, themers, users, geeks
Status: 100% (believed to be complete and bug-free.)
Comment:
jQuery adds about 31kb to your content the first time you load it. But you may not even realize it: we load jQuery from Google by default, and if another website does the same, chances are the file is already in your browser cache and doesn't need to be loaded.
Still, I'd rather take the worst situation into account and say you're on a 56kbps modem and your browser cache is disabled. You have a right to be silly, we're not judging. So, I solved this problem by saving space everywhere else, optimizing every single bit of SMF's JavaScript code, and using jQuery everywhere it made sense to use it.
For instance, the script.js file in SMF is about 47kb, while the Wedge version clocks in at 27kb. All of the JS files were optimized in a similar fashion, resulting in smaller files, even with jQuery thrown into the process. See the code that applies CSS to the WYSIWYG editor in SMF2? 74 lines. In Wedge? 2 lines. Two.
One of the better aspects of using jQuery in the JS files is that we can also take advantage of its superior capabilities. Sometimes, it will simply replace advantageously an existing feature. The news fader script is 6.6kb in SMF, and 1.6kb in Wedge, with the same outcome.
Other times, I added some nice bits to the SMF formula. The infamous toggler is now much shorter and adds a nice animation effect. We also have the reqWin function. It's called whenever you click a help icon to show a popup with some help text. The Wedge version of reqWin actually opens a div popup with fixed position, with the ability to move it around the page. It works just as well as the SMF version, is non-modal, has some nice subtle visual effects, and frankly, did you ever like SMF's window popups anyway?
There are plenty more examples of the advantages of using jQuery in the JS files, but you'll have to find out for yourself...
9095
Features: Forward thinking / jQuery support
« on May 6th, 2011, 05:12 PM »
Feature: jQuery support
Developer: Nao
Target: modders, themers, users, geeks
Status: 100% (believed to be complete.)
Comment:
Many SMF mods tend to add jQuery headers to ease their work in the JavaScript department. They would tend to conflict with each other. Add to this various mods that make use of other librairies, and it's become clear that Wedge really needed to have jQuery by default, so as to provide a standard library for all modders.
Wedge offers to load the jQuery library from three different sources: local (if you want to use your own server to provide it and don't mind the extra load on your bandwidth), jQuery CDN or Google CDN. We recommend the Google CDN, which is the most reliable source for providing jQuery. In addition, it always loads fast, and chances are that the library will already be cached on your computer if you tend to visit other websites that also include jQuery from the Google CDN.
We strive to make Wedge compatible with the latest jQuery, but we're currently staying on the 1.5 branch, until they do something about their oversized library. ;)
:edit: They did -- so we're now following the latest branches.
Developer: Nao
Target: modders, themers, users, geeks
Status: 100% (believed to be complete.)
Comment:
Many SMF mods tend to add jQuery headers to ease their work in the JavaScript department. They would tend to conflict with each other. Add to this various mods that make use of other librairies, and it's become clear that Wedge really needed to have jQuery by default, so as to provide a standard library for all modders.
Wedge offers to load the jQuery library from three different sources: local (if you want to use your own server to provide it and don't mind the extra load on your bandwidth), jQuery CDN or Google CDN. We recommend the Google CDN, which is the most reliable source for providing jQuery. In addition, it always loads fast, and chances are that the library will already be cached on your computer if you tend to visit other websites that also include jQuery from the Google CDN.
We strive to make Wedge compatible with the latest jQuery, but we're currently staying on the 1.5 branch, until they do something about their oversized library. ;)
:edit: They did -- so we're now following the latest branches.
9096
Features: Forward thinking / CSS3 support
« on May 6th, 2011, 05:12 PM »
Feature: CSS3 support
Developer: Nao
Target: themers, modders, users
Status: 100% (technically complete.)
Comment:
With HTML5 always comes support for CSS3... Although it isn't a big deal in itself, it's likely to impact some of your users. SMF2's default theme fully supports IE6 (which was the dominant browser at the time of its first alpha versions.)
Wedge's simply doesn't. Welcome to 'progressive enhancement' (or 'graceful degradation', whatever crap professionals decide to call it.) Meaning it looks alright in IE6 (and somehow IE7 and IE8), and great in modern browsers. Wedge removes all of the SMF hacks and extra markup for IE6 ('topslice' and empty spans anyone?), although it's still possible to create themes that work perfectly in it. It's just a question of philosophy, I guess.
If you're afraid of losing your audience, don't forget the current penetration rates of IE6. The only country where it remains relatively popular is China. If most of your users are not Chinese, then don't bother with IE6 support, embrace full CSS3 support and actual good-looking themes. Oh yes, and support for IE4 and IE5 is entirely dropped, as their market shares are totally negligible. Last I heard, IE4 was now only used by a man called Gon Dongong, he's living in a Mormon community in Kazakhstan and even all of his friends laugh at him for being such a retard. I'm not judging, but I'll suggest that he keeps visiting SMF 1.0 forums. Or maybe YaBB.
Developer: Nao
Target: themers, modders, users
Status: 100% (technically complete.)
Comment:
With HTML5 always comes support for CSS3... Although it isn't a big deal in itself, it's likely to impact some of your users. SMF2's default theme fully supports IE6 (which was the dominant browser at the time of its first alpha versions.)
Wedge's simply doesn't. Welcome to 'progressive enhancement' (or 'graceful degradation', whatever crap professionals decide to call it.) Meaning it looks alright in IE6 (and somehow IE7 and IE8), and great in modern browsers. Wedge removes all of the SMF hacks and extra markup for IE6 ('topslice' and empty spans anyone?), although it's still possible to create themes that work perfectly in it. It's just a question of philosophy, I guess.
If you're afraid of losing your audience, don't forget the current penetration rates of IE6. The only country where it remains relatively popular is China. If most of your users are not Chinese, then don't bother with IE6 support, embrace full CSS3 support and actual good-looking themes. Oh yes, and support for IE4 and IE5 is entirely dropped, as their market shares are totally negligible. Last I heard, IE4 was now only used by a man called Gon Dongong, he's living in a Mormon community in Kazakhstan and even all of his friends laugh at him for being such a retard. I'm not judging, but I'll suggest that he keeps visiting SMF 1.0 forums. Or maybe YaBB.
9097
Features: Forward thinking / HTML5 support
« on May 6th, 2011, 05:12 PM »
Feature: HTML5 support
Developer: Nao
Target: themers, modders, users
Status: 95% (complete, but by definition this will never be finished. Also, support in progress in media area.)
Comment:
Adds full support for the HTML5 specs in Wedge (except where XML compatibility is required: XML queries, wireless, etc.)
Most notably, IE 6/7/8 users automatically get the 'html5shiv' shim which enables styling the new tags. The default theme uses some of these tags as well.
To save bandwidth, all self-closing tags were updated to use the simplified syntax (<br> instead of <br />, etc), deprecated attributes (type=text/css, type=text/javascript...) were deleted, and valueless attributes had their XHTML value removed.
All pages fully validate the experimental HTML5 validator at validator.w3.org. If you ever find a page that doesn't validate, make sure to tell us -- we will promptly fix it.
Developer: Nao
Target: themers, modders, users
Status: 95% (complete, but by definition this will never be finished. Also, support in progress in media area.)
Comment:
Adds full support for the HTML5 specs in Wedge (except where XML compatibility is required: XML queries, wireless, etc.)
Most notably, IE 6/7/8 users automatically get the 'html5shiv' shim which enables styling the new tags. The default theme uses some of these tags as well.
To save bandwidth, all self-closing tags were updated to use the simplified syntax (<br> instead of <br />, etc), deprecated attributes (type=text/css, type=text/javascript...) were deleted, and valueless attributes had their XHTML value removed.
All pages fully validate the experimental HTML5 validator at validator.w3.org. If you ever find a page that doesn't validate, make sure to tell us -- we will promptly fix it.
9098
Features: Forward thinking / IPv6 support
« on May 6th, 2011, 05:11 PM »
Feature: IPv6 support
Developer: Arantor
Target: users
Status: 99% (complete, banning supported; needs large scale testing.)
Comment:
This adds full support for IPv6 to Wedge. It's a new version of the IPv4 protocol designed to account for billions of IP addresses. Because SMF 2 only supports IPv4, it may encounter issues in the future with IP manipulation (logging, banning, etc.)
Developer: Arantor
Target: users
Status: 99% (complete, banning supported; needs large scale testing.)
Comment:
This adds full support for IPv6 to Wedge. It's a new version of the IPv4 protocol designed to account for billions of IP addresses. Because SMF 2 only supports IPv4, it may encounter issues in the future with IP manipulation (logging, banning, etc.)
9099
Features: Forward thinking / Objects
« on May 6th, 2011, 05:11 PM »
Feature: Objects
Developer: Arantor (main), Nao
Target: modders, themers
Status: 95% (believed to be complete; there's always room for more objects though.)
Comment:
SMF uses the infamous $smcFunc array structure to store pretty much anything that should be dynamic functions.
Wedge replaces this with object structures, mostly of the singleton/static types. Basically, Wedge objects start with the 'we' keyword, generally followed by a three-letter code representing whatever feature it's about.
Some of the objects include: we (holds system and user variables such as we::$id for the user ID), wesql (database abstraction, e.g. wesql::query), westr (string functions, e.g. westr::substr), wecss (CSS pre-parsing), wedit (the WYSIWYG editor), and wetem (the main template skeleton).
Developer: Arantor (main), Nao
Target: modders, themers
Status: 95% (believed to be complete; there's always room for more objects though.)
Comment:
SMF uses the infamous $smcFunc array structure to store pretty much anything that should be dynamic functions.
Wedge replaces this with object structures, mostly of the singleton/static types. Basically, Wedge objects start with the 'we' keyword, generally followed by a three-letter code representing whatever feature it's about.
Some of the objects include: we (holds system and user variables such as we::$id for the user ID), wesql (database abstraction, e.g. wesql::query), westr (string functions, e.g. westr::substr), wecss (CSS pre-parsing), wedit (the WYSIWYG editor), and wetem (the main template skeleton).
9100
Features: Forward thinking / UTF8 only!
« on May 6th, 2011, 05:10 PM »
Feature: UTF8 only!
Developer: Arantor & Nao
Target: modders, translators, admins
Status: 99% (believed to be complete.)
Comment:
SMF was celebrated for supporting all possible charsets in its codebase. This was back in 2003. Work on SMF2 was started in 2005. Six years later, UTF8 is supported everywhere, and text string size is not really a problem anymore.
We decided to drop support for all charsets and force the use of UTF8 everywhere. Ultimately, this will be a blessing to modders who always had to make sure their string manipulation routines was using the correct charset path.
Also, $smcFunc functions were slow, we worked on their performance when moving them over to the westr object. Generally speaking, everything should be made easier with this move. It's time to say goodbye to ISO-8859-1.
Developer: Arantor & Nao
Target: modders, translators, admins
Status: 99% (believed to be complete.)
Comment:
SMF was celebrated for supporting all possible charsets in its codebase. This was back in 2003. Work on SMF2 was started in 2005. Six years later, UTF8 is supported everywhere, and text string size is not really a problem anymore.
We decided to drop support for all charsets and force the use of UTF8 everywhere. Ultimately, this will be a blessing to modders who always had to make sure their string manipulation routines was using the correct charset path.
Also, $smcFunc functions were slow, we worked on their performance when moving them over to the westr object. Generally speaking, everything should be made easier with this move. It's time to say goodbye to ISO-8859-1.
9101
Features: Forward thinking / MySQL only!
« on May 6th, 2011, 05:10 PM »
Feature: MySQL only!
Developer: Arantor
Target: modders, themers, admins
Status: 100% (complete.)
Comment:
PostgreSQL and SQlite are great database systems. But they just aren't used that much, and they add more complexity to database development in SMF. Wedge continues abstracting database queries, but doesn't attempt to convert them to another SQL language.
From our experience, users with PGSQL or SQlite installed on their server always have MySQL installed as well. If you really don't, Wedge just isn't for you, but we won't go back to applying patches for systems that no one really ever uses. It makes development tedious, longer, and probably insecure.
Developer: Arantor
Target: modders, themers, admins
Status: 100% (complete.)
Comment:
PostgreSQL and SQlite are great database systems. But they just aren't used that much, and they add more complexity to database development in SMF. Wedge continues abstracting database queries, but doesn't attempt to convert them to another SQL language.
From our experience, users with PGSQL or SQlite installed on their server always have MySQL installed as well. If you really don't, Wedge just isn't for you, but we won't go back to applying patches for systems that no one really ever uses. It makes development tedious, longer, and probably insecure.
9102
Features: Forward thinking / Removing deprecated code
« on May 6th, 2011, 05:09 PM »
Feature: Removing deprecated code
Developer: Arantor & Nao
Target: admins, modders, themers
Status: 99% (believed to be complete, but it's a never-ending feature implementation because of its very nature.)
Comment:
We believe that software should live in the present, not in the past. Libraries that were deprecated years ago should not be supported anymore, because they mean overhead, bloat, and usually prevent developers from using new features, for fear of breaking something on older platforms. Because some people are too afraid of "fixing what isn't broken", they're still using PHP 4.x and MySQL 4.0 these days.
They shouldn't be afraid.
So we removed support for PHP < 5.1.2, MySQL < 4.1.2, and are requiring support for the GD2 graphics library (which shouldn't be a problem in 99% of the cases.)
Dozens of other minor libraries, functions and programming methods that didn't belong in this age were also deprecated, such as support for the Wap, Wap2 and iMode wireless modes, the boardmod installation system for add-ons, or older SMF1 compatibility code.
Developer: Arantor & Nao
Target: admins, modders, themers
Status: 99% (believed to be complete, but it's a never-ending feature implementation because of its very nature.)
Comment:
We believe that software should live in the present, not in the past. Libraries that were deprecated years ago should not be supported anymore, because they mean overhead, bloat, and usually prevent developers from using new features, for fear of breaking something on older platforms. Because some people are too afraid of "fixing what isn't broken", they're still using PHP 4.x and MySQL 4.0 these days.
They shouldn't be afraid.
So we removed support for PHP < 5.1.2, MySQL < 4.1.2, and are requiring support for the GD2 graphics library (which shouldn't be a problem in 99% of the cases.)
Dozens of other minor libraries, functions and programming methods that didn't belong in this age were also deprecated, such as support for the Wap, Wap2 and iMode wireless modes, the boardmod installation system for add-ons, or older SMF1 compatibility code.
9103
FAQs / [FAQ] Re: Why are there so many features? / Isn't that bloated?
« on May 6th, 2011, 11:40 AM »
Hey there.
9104
Other software / Re: SMF 2.0 final THIS MONTH?
« on May 6th, 2011, 11:18 AM »
I thought I didn't, and then I realized I did. You know, all it takes is a bold attempt at doing it. The confidence builds up by itself after a while.
SMF3 will either take 5 years to come out, or just be a minor update. It seems to have become a trend these days, what with Chrome skipping a version number everytime they add a menu item... Pff. (I had a very aggressive release cycle with Kyodai Mahjongg, with 21 major versions in 9 years, but I *did* add an awful lot of visible changes in every major version. Chrome, not so much. At version 12 I don't see a difference with version 6 or so.)
Firefox wants to release version 5 by June and 6 by this summer or so, they certainly understood the 'spirit'.
As for us -- I suspect we should be able to go public alpha this summer. With a gold release set to 2011 of course. When exactly will depend on when Pete gets back to work on Wedge. (There are many elements in Wedge that I can't/wouldn't implement without Pete's consent/help.)
Re: the ability of the SMF team to release in May? Well yeah, sure, they can do it. Only if they don't fix more than a couple of bugs, of course. Not that it matters that much -- seriously, what's the issue with post-gold incremental bug fixes anyway? Every major software package has bugs on release day. What matters is that these bugs don't bother more than 1-2% of your codebase. (Unlike jQuery 1.6 and their .attr() feature changes which forced me to rewrite a couple dozen lines to remain compatible >_<)
Oh, just for fun...
http://dev.simplemachines.org/mantis/view.php?id=4714
Seriously Ante, you're STILL at that point for SMF 2.1? That's what makes you vomit in SMF2? GIFs? How about animated GIFs? How about small GIFs that are smaller than their PNG counterpoint? (Yes, there are.) How about you get to work on the real stuff that makes any designer vomit when looking at the SMF files? (There are plenty to choose from. GIF overuse is certainly not at the top of the list...)
SMF3 will either take 5 years to come out, or just be a minor update. It seems to have become a trend these days, what with Chrome skipping a version number everytime they add a menu item... Pff. (I had a very aggressive release cycle with Kyodai Mahjongg, with 21 major versions in 9 years, but I *did* add an awful lot of visible changes in every major version. Chrome, not so much. At version 12 I don't see a difference with version 6 or so.)
Firefox wants to release version 5 by June and 6 by this summer or so, they certainly understood the 'spirit'.
As for us -- I suspect we should be able to go public alpha this summer. With a gold release set to 2011 of course. When exactly will depend on when Pete gets back to work on Wedge. (There are many elements in Wedge that I can't/wouldn't implement without Pete's consent/help.)
Re: the ability of the SMF team to release in May? Well yeah, sure, they can do it. Only if they don't fix more than a couple of bugs, of course. Not that it matters that much -- seriously, what's the issue with post-gold incremental bug fixes anyway? Every major software package has bugs on release day. What matters is that these bugs don't bother more than 1-2% of your codebase. (Unlike jQuery 1.6 and their .attr() feature changes which forced me to rewrite a couple dozen lines to remain compatible >_<)
Oh, just for fun...
http://dev.simplemachines.org/mantis/view.php?id=4714
Seriously Ante, you're STILL at that point for SMF 2.1? That's what makes you vomit in SMF2? GIFs? How about animated GIFs? How about small GIFs that are smaller than their PNG counterpoint? (Yes, there are.) How about you get to work on the real stuff that makes any designer vomit when looking at the SMF files? (There are plenty to choose from. GIF overuse is certainly not at the top of the list...)
9105
Features / Re: New revs
« on May 6th, 2011, 12:08 AM »
rev 761
(2 files, 7kb)
! It's show_load_time, not show_page_load... (Subs.php)
* Minor optimizations on the uploader JS. (up.js)
(2 files, 7kb)
! It's show_load_time, not show_page_load... (Subs.php)
* Minor optimizations on the uploader JS. (up.js)