New revs

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #135, on September 22nd, 2010, 07:39 PM »
I'll commit today's changes ASAP. I'm not sure I'm done yet but my time for today is up.
I've also internally updated to the SMF rev 10127... Norv has started documenting the files! Well, by "documenting", I mean "replacing the "// !!!" with single-line descriptions of the functions ;)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #136, on September 22nd, 2010, 07:45 PM »
Quote
Norv has started documenting the files! Well, by "documenting", I mean "replacing the "// !!!" with single-line descriptions of the functions
I wouldn't really call that documentation. I would, however, call the awesomeness in Post.php documentation :P
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 #137, on September 22nd, 2010, 10:05 PM »
Indeed! At last, you found a place to express the endlessly-fuelled creativity of your talkativeness. :eheh:

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #138, on September 22nd, 2010, 10:08 PM »
Quote from Nao/Gilles on September 22nd, 2010, 10:05 PM
Indeed! At last, you found a place to express the caffeine-fuelled creativity of your talkativeness. :eheh:
Fixed that for you :P But yes, yes I did.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #139, on September 22nd, 2010, 11:42 PM »
Eheh.

http://dev.simplemachines.org/mantis/view.php?id=4471
This is an incomplete report, and it's been fixed in an incomplete manner... There are dozens of places where the icon class isn't applied. I noticed that while removing the ie6_header... And then I thought, "what's the point of that anyway? I never see more than one icon per header... So we can just as well access it with .cat_bar img, .title_bar img, it'll save a few bytes each time...
Anyway, I started removing icon classes earlier today. Do you think it's okay if I keep doing it? I really don't see a reason for keeping these in... (And I can't reopen reports to tell them. Which is why I was complaining originally that I was put into a minor group on the tracker...)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #140, on September 23rd, 2010, 04:33 AM »
Quote
This is an incomplete report, and it's been fixed in an incomplete manner
Status normal, captain.
Quote
I never see more than one icon per header
That's because it never happens. Many headings don't even have one. That said I'm not sure off the top of my head if cat_bg that is collapsible with a left icon, might not use icon for the upshrink (if that makes sense)? Either way, those cases will be pretty few and far between, and can be fixed if we find them - I'd say you're completely good to clear yet more cruft.
Posted: September 22nd, 2010, 11:45 PM

Revision: 132
Author: arantor
Date: 23:32:18, 22 September 2010
Message:
! Fix for editor generating extra divs when using custom div mode. (Class-Editor.php)
----
Modified : /trunk/Sources/Class-Editor.php

Posted: September 23rd, 2010, 12:33 AM

Revision: 133
Author: arantor
Date: 23:35:04, 22 September 2010
Message:
! Fix error in SQL installer, with forgotten parameter (install_2-0.sql)
----
Modified : /trunk/other/install_2-0.sql


This one was stupid. I missed the 4th parameter in the insert query.
Posted: September 23rd, 2010, 12:35 AM

Revision: 134
Author: arantor
Date: 03:32:35, 23 September 2010
Message:
+ Code documentation (QueryString.php)
----
Modified : /trunk/Sources/QueryString.php

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #141, on September 23rd, 2010, 11:55 AM »
(Just getting rid of the quick update... Take note of my outrageous way to diminish the SMF team in a passive-aggressive way :P Interesting that it's happening on post #666 for me... Hmm.)

rev 135
* Updated to SMF rev 10127. Just a fix I reported, a minor security issue with word censorship, and some documentation which Pete will be rewriting from scratch anyway. (changelog.txt, install.php, create_backup.php, restore_backup.php, Admin.php, Class-Package.php, DbExtra.php, DbPackages.php, DbSearch.php, Display.php, Groups.php, LogInOut.php, ManageSearch.php, PackageGet.php, Subs-Database.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #142, on September 23rd, 2010, 01:13 PM »
Well, I was curious to see what documentation he'd done.
Quote
string function smf_db_get_version()
      - get the version number.
No shit! Still one line of description is better than none.
Quote
void QuickInTopicModeration()
      - in-topic quick moderation.
Or not, maybe. Literally taking the function name and re-ordering it to make a different phrase sort of isn't the plan.

And when you have a load of functions in one file, generally it's best to document everything, or at least put placeholders in (not like Subs-Database.php where only the first function has a description)


The security change... hmm, why does that look familiar? I guess he listened to what I proposed :)

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #143, on September 23rd, 2010, 02:35 PM »
Y'know, there are people who hate documenting more than anything... ;)
I made my Kyodai Mahjongg help files under WordPad (sic), in RTF format (sic), and had to do both English and French versions at the same time (as for everything I do really), and didn't have a diff compare tool at the time... Oh, what fun it was!

Anyway... Finally!!

rev 136
@ The patch equivalent weighs in at 92KB... Yay.
@ This is only about templates, so add ".template.php" to the filenames.
- Replaced these horrible ie6_header/floatleft hacks with some actual common sense. Needs testing on all browsers! (Admin, BoardIndex, Display, GenericList, GenericMenu, Login, ManageMaintenance, ManageMembers, ManageNews, ManagePermissions, Memberlist, ModerationCenter, Notify, Packages, PersonalMessage, Profile, Recent, Search, SendTopic, Stats, Themes, index.css, ie6.css)
- Deleted png_fix and newupshrink classes/ids, which were not even used in a vanilla SMF2... (Admin, index.css)
- Deleted all img.icon classes, as they're all used within a title_bar/cat_bar and were replaced with contextual styling. (BoardIndex, Display, GenericMenu, Login, ManageNews, Memberlist, Notify, Packages, Profile, Recent, Search, SendTopic, Stats, Themes, index.css, admin.css, index.css, ie6.css, rtl.css)
* Added cellspacing="0" to table_grid declarations missing a cellspacing, and reverted table_grid border-collapse to separate, so that table headers can be properly rounded in a standards-compliant fashion. Also deleted border="0" declarations, as borders are set to 0 by default. (Admin, Errors, ManageBans, ManageMembergroups, ManageMembers, ManageNews, ManagePaid, ManagePermissions, Memberlist, ModerationCenter, Packages, PersonalMessage, Profile, Reports, SplitTopics, Stats, Themes, index.css)
! Fixed isset($config_var['postinput']) into !empty, as it was always set and would thus generate an extra tab in the HTML code. (Admin)
* Moved menu/sidebar toggle to the left... I say it's a matter of logic. Now if you'll stop bothering me, I'm busy writing this changelog... (index.css)
* Renamed generic menu classes, from their adm* and admin equivalents, as generic menus are supposed to be... generic. (GenericMenu, index.css, rtl.css)
* Spacing. (ManageBoards, Packages, PersonalMessage, Search)
* Moved profile summary's boxes a bit lower. Ideally, I should be doing this for every box that touches any dual-colspan cat_bar/title_bar... (index.css)
* Gave more padding to the hosted avatar selector. Seriously, were they asleep or something when they designed this? (index.css)
* Improved overall design. I'm actually starting to like it... I said started. Got rid of min-height in header (a leftover from the earlier frame). (index.css)
Re: New revs
« Reply #144, on September 23rd, 2010, 07:53 PM »
Quote from Nao/Gilles on September 23rd, 2010, 02:35 PM
* Moved menu/sidebar toggle to the left... I say it's a matter of logic. Now if you'll stop bothering me, I'm busy writing this changelog... (index.css)
Well, I was busy a lot... So much that I forgot that I'd put it back to the right of the screen after I noticed it didn't play well with most browsers :P
Will have to fix this at some point...
Re: New revs
« Reply #145, on September 23rd, 2010, 11:35 PM »
rev 137
! Fixed a good part of the RTL issues. Missing button strips, have yet to check more specific areas. (index.css, rtl.css)
! Fixed submenu positions in RTL mode. (script.js)
* Moved extra stylesheets to the top of the header, too. (index.template.php)
Re: New revs
« Reply #146, on September 24th, 2010, 11:43 AM »
rev 138
! Fixed capacity bar in PM area. (index.css)
! Added an overflow hack to cat_bar/title_bar to avoid any annoying float glitches in the future. I'd rather not use it, though. (index.css)
* Renamed 'MSN Messenger' to 'Live Messenger' in the language files. (Internally, it's still the same old horrible MSN Messenger.) (index.english.php, Profile.english.php)

Re: the overflow hack, this is a simple one I've been advocating to the SMF team and they always say "it doesn't work everywhere" (even though it does...) and they wouldn't use it (even if they use it in their own title_bar/cat_bar definition, albeit not in the best way.) The most logical way to avoid float glitches is really to avoid having ONLY floated elements inside a div... But in some cases it's hard to find the right balance. For instance, in the PM box, I tried deleting one of the capacity bar floats, and it didn't look good. So I came back to an all-float thingy, and added a   (!!) at the end, and guess what, it worked... Uh. Well, it's still a hack, and I don't know if it's nice. Ideally, I would check all of the floated areas in the source code and fix them all manually.
Then again, maybe the overflow hack is best.

What do you think?
Re: New revs
« Reply #147, on September 24th, 2010, 12:09 PM »
rev 139
! Damn IE6's Javascript engine! (Class-Editor.php)
! Fixed Javascript error when viewing a post with no reply permission. (Display.template.php)

(Please don't forget to discuss the post above, though :P In another topic if you'd like...)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #148, on September 24th, 2010, 12:17 PM »
OK, I'm going to keep this one short and sweet.

Part of the layout issues SMF has is because of tag soup - so many floated things, so many divs and so on, that you so much as breathe on some bits and it falls apart on you.

There isn't really a best solution as a result - only a collection of least-worst alternatives, and none of them are particularly compelling. What you've got there is probably the least worst of the least worst solutions, without doing something drastic like ripping it all out and using tables everywhere.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #149, on September 24th, 2010, 05:07 PM »
I don't know. I don't like having to make so many compromises... Here's another one:

rev 140
! A mystic fix for IE's overflow issues in topic pages... .wrc { width: 100% }. Take that! (ie6.css)
* Replaced bars.png with yet another gradient in my arsenal, grad40.png -- this should allow themers to change cat_bar and title_bg background colors on a whim. (index.css)
- Removed theme graphics that were no longer used... :) (backdrop.png, bars.png, frame_repeat.png, main_block.png, menu.png)

I'm not happy with the new cat_bar/title_bar color. And believe me I spent my entire afternoon setting it up. I want to have only one gradient file for both bars. In the end I'll probably change the colors anyway, but I want to have a 'Curve' CSS variant and would like it to be as vibrant as the original. Feel free to change the gradient if you can come up with anything better.