New revs

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #210, on October 6th, 2010, 09:47 PM »
There's a lot of fields that fall into the same category of being tinyint when they logically should be bool.

Trouble is, even on more modern MySQL I'm not sure it's any faster and in some cases it will be slower as it messes round fixing up part bytes (especially in fields with variable width columns that implicitly force everything else as bytes).

There's also a lot of fields whose use is never stated anywhere... yay for undocumented schemas.
Posted: October 6th, 2010, 08:45 PM

OK, took a look at script.js.

All the stuff with == null vs ! should work, and seems to.

There's only two things I'm wary of.

Code: [Select]
doForm.passwrd.value = is_ff != -1 ? '' : doForm.passwrd.value = doForm.passwrd.value.replace(/./g, '*');

Surely that should be:
Code: [Select]
doForm.passwrd.value = is_ff != -1 ? '' : doForm.passwrd.value.replace(/./g, '*');


And also,
Code: [Select]
bInit = typeof(bInit) == 'undefined' ? false : true;

vs
Code: [Select]
bInit = bInit ? true : false;

Seems a bit redundant logically, not to mention inaccurate.

I'd suggest:
Code: [Select]
bInit = typeof(bInit) != 'undefined';
and just be done with it.
Posted: October 6th, 2010, 09:37 PM

Revision: 182
Author: arantor
Date: 20:46:32, 06 October 2010
Message:
! Missed a closedir that should have been removed before (Subs-Post.php)
----
Modified : /trunk/Sources/Subs-Post.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 #211, on October 7th, 2010, 12:14 AM »
rev 183
! Fixed wrong cat_bar color in IE6. (ie6.css)
* Optimized wedgelogo.png to save a kilobyte in size.
! Oops moment, thanks Pete. (script.js)

Really sorry that I screwed the doForm line. Of course it was simply a bad manipulation on my part.
As for bInit, I don't see how it would be inaccurate?
I turned it into "bInit = !!bInit", which is even shorter and less readable. :P
's that okay?

Re: BOOL sizes, I'd say once again, feel free to reinitalize the field to TINYINT(4)!
Re: New revs
« Reply #212, on October 8th, 2010, 12:16 AM »
rev 184
+ Added on_timeformat function (and somehow documented it), for use in quotes. (Subs.php)
- Deleted FixLanguage.php, as well as template and language upgrade systems, as they should never be needed in Wedge. (upgrade.php, detailed-version.js)
- Deleted login_to_post language string (ghost entry.) (Errors.english.php)
! Spacinazi. (Admin.english.php, Subs.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #213, on October 8th, 2010, 01:29 AM »
Revision: 185
Author: arantor
Date: 00:28:20, 08 October 2010
Message:
! Make $context['sub_template'] accept an array as a list of subtemplates to call (Subs.php)
! Separate the board index templates as they should have been originally (BoardIndex.php, BoardIndex.template.php)
----
Modified : /trunk/Sources/BoardIndex.php
Modified : /trunk/Sources/Subs.php
Modified : /trunk/Themes/default/BoardIndex.template.php

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #214, on October 8th, 2010, 09:30 AM »
Ah, just noticed your new rev... Will check in a minute.

rev 186
+ Added support for icons in main menu's top level. Can be improved. Provided a sample set of sprited icons. (Subs.php, index.css, index.template.php, sprite.png)
* Changed menu highlighting color to something more sober. (index.css)
+ Added language string for 'Simple search'... Just in case? (index.english.php)

--> I don't know if it's good to have icons in the main menu. I mean... Wedge's implementation has dropdown arrows next to the titles. Now there's an icon, then the title, then the arrow. Maybe be a little... crowded? Please give your opinion on this. Also, icons can be sprited or stand-alone. Just look into index.template.php for how it's done. This is a slightly modified version of Noisen's code. ONLY TESTED IN OPERA! May fail in Firefox & co...

:edit: You made a very small change... But a very smart one :) This was something that bothered the hell for me several times in the past!

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #215, on October 8th, 2010, 09:56 AM »
Modularity is awesome :)

Now, we could trivially have it so that the info centre can be disabled cleanly without resorting to putting changes in the template... but that's only the beginning.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #216, on October 8th, 2010, 11:07 AM »
Yeah. Modularity, that's the word... I guess it's got something to do with portal blocks.

(Can you give me your opinion on adding icons to the main menu, still?)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #217, on October 8th, 2010, 11:15 AM »
I like the idea of icons, haven't looked at the implementation yet.

It does add something and I know full well that icons can make or break a UI, but often if they're meaningful icons, they add to it :)

If it's anything like here, it works for me.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #218, on October 8th, 2010, 03:56 PM »
rev 187
* Once again, sobriety... Replaced existing icon sprite with a Diagona set. (sprite.png, index.css, Subs.php)
+ Added Login icon, and an alternative PM icon when you've got mail. (sprite.png, Subs.php)
- IE6 sucks at showing sprited icons, so removed icons for it. (index.template.php, ie6.css)
* Retooled index.css to show brackets next to class names. This saves about 600 lines and is easier to navigate. (index.css)
* The forumtitle id sucked... Changed it for a better font and styling. (index.css)

*NOW* I'm happier with the icons... I just needed to use icons from a single set. No matter what the set. What matters is that they're all made by the same person. It can be improved, of course. But right now it won't induce nightmares anymore.

God, I swear I'm starting to love the Wedge theme now!! At last!
Re: New revs
« Reply #219, on October 8th, 2010, 09:15 PM »
rev 188
- Simplified theme_copyright... Let's not be paranoid, okay? (Subs.php)
* Modified copyright notice to add Wedge and ourselves to it. Now Wedge is officially illegal. (index.english.php, index.css, index.php)
+ Added direct link to local credits page in footer. (index.english.php, index.template.php)
! Fixed a very, very, very annoying menu bug in IE6. (script.js)
! Fixed icon problems with IE6 and deleted the IE7 hack as it wasn't needed. (index.css, index.template.php)
* Spacinazi. (Themes.php)

(I added 'Wedgeward' as the copyright holder... That's us. Our temp name. Because my fave book is the Windward Horde. But again -- temp!)
Re: New revs
« Reply #220, on October 10th, 2010, 02:25 PM »
rev 189 (This was all done yesterday but I'm having some computer issues and wasting time...)
+ Changed Calendar icon to a new, sprited one. Added sprited icon for Register. Fixed icon widths. (Subs.php)
* Updated to SMF rev 10150, with a lot of minor tweaks to layout and styling.
  * Missing icon in profile/ignore boards. Markup/css to allow large content above the linktree (Profile.template.php, index.template.php, index.css) (NB: was already done in Wedge anyway...)
  * Minor cleaning up in admin. Better highlighting of search results. Defined new_win class. Better description for post options (Admin.template.php, admin.css, index.css, Post.english.php)
  * Fixed post-breaking bug in IE6 and IE7. Removed $context['right_to_left'] from two templates. (ie6.css, ie7.css, index.css, rtl.css, Display.template.php, Memberlist.template.php)
  * Fixed board selection in profile and help. Cleaned up stats markup. (Profile.template.php, Help.template.php, Stats.template.php, index.css, rtl.css)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #221, on October 10th, 2010, 05:25 PM »
The one thing about the icons is that they're hardcoded right now; would be hard for theme authors to set the icons themselves.

While this would be somewhat ugly, would it not be preferable to define classes in CSS for each icon (like how the sprite icons work in the thread view normally) and control it all through CSS so theme authors can override/ignore it as they see fit?
Re: New revs
« Reply #222, on October 10th, 2010, 06:25 PM »
Revision: 190
Author: arantor
Date: 17:24:43, 10 October 2010
Message:
+ Provide a default favicon.ico and have it called from the theme too (favicon.ico, index.template.php)
----
Modified : /trunk/Themes/default/index.template.php
Added : /trunk/favicon.ico

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #223, on October 10th, 2010, 07:20 PM »
Reasons why I didn't add a favicon myself:
- From the beginning, I was very happy with the favico I made for wedgeforum.com, but unhappy with the logo itself. Now, I'm very happy with my current Wedge logo, but unhappy with the (unused) favico I made from it...
- If admin has a favico for their site, they may erase it by thoughtlessly uploading the Wedge files to their website.
- If they're uploading to a subfolder, they may not like having a different favico than their main site, either.

This is basically why I didn't play with this...

Regarding the MIME type, why did you use "x-icon"?
The official type (as used on noisen and wedgeo) is "vdn/microsoft_crappy_files"
Cf. http://en.wikipedia.org/wiki/ICO_(file_format)
Posted: October 10th, 2010, 07:18 PM
Quote from Arantor on October 10th, 2010, 05:25 PM
The one thing about the icons is that they're hardcoded right now; would be hard for theme authors to set the icons themselves.
You mean, the sprited icons? Yes, that's always been the problem obviously...
Quote
While this would be somewhat ugly, would it not be preferable to define classes in CSS for each icon (like how the sprite icons work in the thread view normally) and control it all through CSS so theme authors can override/ignore it as they see fit?
Well, sure can do that, yes.
I'm sorry I didn't think of doing that from the beginning.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #224, on October 10th, 2010, 07:51 PM »
Quote
- From the beginning, I was very happy with the favico I made for wedgeforum.com, but unhappy with the logo itself. Now, I'm very happy with my current Wedge logo, but unhappy with the (unused) favico I made from it...
You can change it :P Just it was something to hand that was convenient.
Quote
- If admin has a favico for their site, they may erase it by thoughtlessly uploading the Wedge files to their website.
Sure, but how often do site admins have a favicon already in place for a top level domain and have nothing else there when adding a forum to the top level of the domain?
Quote
- If they're uploading to a subfolder, they may not like having a different favico than their main site, either.
Sure, but having it set up like this will mean they just copy theirs over the top of the provided one (we don't have to include it in upgrades).

It also means if they just want to customise it, they have a point of reference.
Quote
Well, sure can do that, yes.
I'm sorry I didn't think of doing that from the beginning.
No need to apologise; only reason I thought of it is because I've been doing a similarly styleable menu for my other project and one of the things was to make it as flexible as possible to style in pure CSS.