Show Posts

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.

Messages - Nao
9706
Features / Re: Recycling board by default
« on February 15th, 2011, 10:51 AM »
Quote from Arantor on February 15th, 2011, 09:34 AM
Leaving it at 2 isn't *that* bad, IMO, but I can see why it should probably be moved.
Most people would only enable that board *after* creating their main structure, so they wouldn't mind about the board ID... But having it created by default, and show up for admins, can be a little unnerving. Not only that, but if you're one of these admins who don't believe in deleting posts (or who believe that deleting posts should be definitive), that's a board you'll really never get to use at all, so you'll delete it (if you can/think of it), and it'll create a gap in the board list... (Less of a problem, though.)
Quote
There's already an unapproved posts/topics browser in the moderation centre.
Which I never use, hence my ignorance :P
Quote
But honestly, I think that makes it too likely that stuff gets brought back into the ecosystem, not to mention the fact that in every way you slice it, the UI ends up sucking badly, whether you make it 'deleted' but left inline, or moderated for the purposes of deletion. (SimpleDesk moved from an SMF style to the whole inline thing, and it's one of the few things that while I wrote, I ended up really hating in practice)
UI? Why is it a UI problem at all?
I think we should ask others what they think about this...
9707
Features / Re: New revs
« on February 15th, 2011, 09:40 AM »
rev 592
(5 files, 8kb)

! Fixed and optimized math function in the CSS parser. I was pretty sure I'd tested it thoroughly, eh... (Class-CSS.php)
+ Added support for some basic PHP functions in math(), in case you need them: round, ceil, floor, abs and fmod. (Class-CSS.php)
* Moved gz Mime type overrides to the cache folder. (other/.htaccess, cache/.htaccess)
* Ensure WAP2 mode never uses more than .5em of whitespace between lines. (wireless.css)
* Made a code block more compact, because I've learned to hate it, and I don't want to see it anymore. (script.js)
9708
Features / Re: Recycling board by default
« on February 15th, 2011, 09:27 AM »
Quote from Arantor on February 15th, 2011, 09:19 AM
Quote
Then... What do we do?
Maybe this is a sign that we have to rethink how recycled topics need to be handled. Or we accept that having board 2 as-is isn't an entirely bad thing.
Oh, see, I'd rather either go 0 and rewrite everything, or go 100 and rewrite the stuff to not use auto_increment (and if you really want to use auto_increment, there are some complicated alternatives using a secondary table), than leave it at #2... :-/

Alternatively, we could rewrite the recycle bin stuff to leave deleted topics/posts in their place and just consider them as unapproved... Then we could simply have somewhere in the admin area an "unapproved posts/topics browser" or something. That would actually be my preferred solution.
Quote
FWIW, I'd rather have styles, it's shorter and easier to remember.
Alrighty.
9709
Features / Re: Recycling board by default
« on February 15th, 2011, 07:47 AM »
Quote from Arantor on February 15th, 2011, 12:03 AM
Quote
simply add our id_board manually for each new board -- at worst it's only an extra query to do.
Hmm, I can just see that causing issues with forums where two admins are trying to add new boards at the same time.
Then... What do we do? :-/
Quote
Styles or stylings works for me, it's certainly more accurate than css.
Okay. Anyone else? Would you rather have a 'styles' or 'stylings' folder?
9710
Features / Re: Recycling board by default
« on February 14th, 2011, 11:39 PM »
I do see that createBoard() calls modifyBoard(), which itself reassigns 'order' values to the boards, but it doesn't touch id_board values at all... I think the id_board=101 is a MySQL thing. Basically, if AUTO_INCREMENT <= MAX(auto_increment_column), it resets it to MAX(auto_increment_column) + 1. Now, maybe there's a SQL option somewhere to avoid that... Or we could just as well drop the AUTO_INCREMENT thingy and simply add our id_board manually for each new board -- at worst it's only an extra query to do.

Okay I've committed my latest changes, hopefully you'll like them... (I really do, but I understand it's a matter of taste.)

Unrelated, but I have to go to bed so I can't bother to look for the right topic -- I'm thinking of renaming the 'css' folder to something that doesn't say 'css' really. Or rename 'scripts' to 'js' because that'd make more sense. But I'd rather rename 'css' to either 'styles' or 'stylings', so that themers aren't frightened at the idea of putting their graphic files into their styling subfolders. (Which I'd recommend doing, if only because it's easier to manage for themers, as well as users who have plenty of stylings.) Any ideas on your side?
9711
Features / Re: New revs
« on February 14th, 2011, 11:31 PM »
rev 590
(8 files, 12kb)

* Changed the dynamic sidebar removal to instead move it to the far left, and restore it (with an animation) when hovering it. Only tested in Opera for now. Also adds a box-shadow in this mode, to make it clear that it's no longer in the regular flow. (index.css, Warm/index.css, index.template.php)
* If the linktree only has one item, it has to be the home page, hasn't it? Let's not waste time showing it then... But keep the linktree div in it, since we might have some padding applied to it. (index.template.php)
! The special popup at runtime wasn't using the new system. (install.php, Install.english.php, Install.french.php)
! Fixed a horizontal scrollbar at board creation time. (ManageBoards.template.php)
! Fixed a warning when caching the Pastel styling -- had forgotten a bracket. Next step: drop stupid CSS and use the new syntax everywhere. (sections.css)

@ Note: should we care about the legacy code for older PHP versions in the installer...? Lines 102-117. (install.php)
@ Note2: cool changes innit? :P As indicated, it's only tested in Opera for the sidebar stuff (should work everywhere but IE won't get the animation obviously), and the linktree area -- I'm not sure the homepage is the only place that has only one item. If it's not the case then we should change the other areas to have at least two items, /mesays.
@ Comments welcome.
9712
Features / Re: Recycling board by default
« on February 14th, 2011, 11:19 PM »
So, you mean that's SMF doing its little thing right...?
I thought of that and I was looking into the code to find the culprit...
I guess I'll keep lookin'.
Posted: February 14th, 2011, 11:17 PM

Sorry, no can find.... :-/
It doesn't seem to be touching the board ID at creation time. Maybe later..?
9713
Features / Re: Recycling board by default
« on February 14th, 2011, 11:13 PM »
I've always hated the recycle bin...
Having one by default, well, never been excited with the idea obviously.
But it has to have a special ID. I suppose something like id=100 would be acceptable, considering all the trouble that id=0 would bring. I'm not fond of having a "gap" but...
Posted: February 14th, 2011, 10:57 PM

Holy schmoly...

Create recycle bin = 100;
(Ok)
ALTER wedge_board SET AUTO_INCREMENT = 2;
(Ok)

Then I create a new board and I get..................... id_board = 101??????!!!!!
Headache...
9714
Features / Re: Recycling board by default
« on February 14th, 2011, 10:50 PM »
It's just that id 0 is so well suited to a trashcan... See what I mean?

Well, I've implemented this code and it works:

Code: [Select]
ALTER TABLE {$db_prefix}boards AUTO_INCREMENT = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
INSERT INTO {$db_prefix}boards
(id_board, id_cat, board_order, id_last_msg, id_msg_updated, name, description, url, urllen, num_topics, num_posts, member_groups)
VALUES (0, 1, 2, 0, 0, '{$default_recycling_board_name}', '{$default_recycling_board_description}', '{$default_recycling_board_url}', CHAR_LENGTH('{$default_recycling_board_url}'), 0, 0, '2');
SET sql_mode = '';

Now I have a board=0.0 for the recycle bin. However:
- it still shows up first in the list, even though it has order set to 2 (and the main board set to 1)
- anything that tests for $_GET['board'] needs to be double-checked to make sure they don't test for empty() or (int)==0... Because right now,
(a) can't even view the recycle bin board, it just redirects me to the homepage... (with "board=0.0" in the URL)
(b) can't move topics to there with the dedicated function -- it just does nothing after I confirm.

Let me do a big "siiiigh".
9715
Features / Re: Recycling board by default
« on February 14th, 2011, 10:36 PM »
Yup...

I'm just worried that people using mysqldump on an older version of MySQL would get issues.
Fact is -- the help file doesn't say WHEN it started behaving correctly for it.

Ah, well.
9716
Features / Re: Recycling board by default
« on February 14th, 2011, 10:13 PM »
Yes, so what do you think we should do...? Use 0 or not?
9717
Features / Re: Recycling board by default
« on February 14th, 2011, 09:27 PM »
Link says how to fix the error but says it's not recommended. I just don't know why.
9718
Features / Re: Recycling board by default
« on February 14th, 2011, 08:45 PM »
Errors? How so?
9719
Features / Re: Recycling board by default
« on February 14th, 2011, 08:07 PM »
It's technically possible. Anything preventing us from going forward?
9720
Features / Re: Recycling board by default
« on February 14th, 2011, 07:35 PM »
OTOH, if someone has enough members to have 65k+ blogs/forums on their install, they're BOUND to know about MySQL and stuff, and they'll be able to deal with that by themselves, because they'll have studied what limits Wedge/SMF have for huge websites... (I suppose.)

But what about my first question?