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
4816
Features / Re: New revs
« on July 4th, 2012, 05:19 PM »
rev 1627 -- hoping for some feedback about the new reqWin ;)
(11 files, 12kb)

* Rewrote the reqWin popup code. The world wasn't ready for a bottom-right aligned thingy. The new one is simpler, shorter and, admittedly, better. Support for IE (position fixed), iOS (ditto) and generally low-res devices is better, too. Things like noDrag are no longer needed, as the scrollbar is always in an undraggable area. Also saves 200+ bytes of gzipped code compared to the previous version. But you're used to that by now... (Display.php, Like.php, ManageAttachments.php, Display.template.php, Help.template.php, Packages.template.php, script.js, index.css, index.ie6.css, mana.css)

! Fixed select boxes showing squares instead of arrows in IE6. (index.ie6.css)

! Fixed fixed positioning for popups in iOS. (Not that's not a typo.) (index.iphone.css)

- Removed support for bottom-right alignments in dragslide because it takes space for nothing (I don't think anyone would use that outside of the earlier reqWin.) (script.js)
4817
Features / Database field formats
« on July 2nd, 2012, 02:56 PM »
As discussed earlier, I'm spending some time with the database and trying to harmonize field sizes.

id_album is currenty an int(10), while id_board is smallint(5).
In the future, albums will internally be treated as boards, so I could either reduce the id_album to a smallint (maximum value: unsigned 64K), or increase the size of id_board to medium(8), i.e. in the millions, and reduce the size of id_album accordingly.

While technically it's true that having millions of boards will probably crash Wedge before long, I'm not sure that the 64K limit is good enough. If you have a popular website where thousands of users create media galleries every day, you could easily break the limit in a few months time. More realistically, any image-oriented forum with a decent community could potentially break the limit in a few years. After that, we can either release a patch to increase the id_board size for them -- or simply account for it now.

Only problem is, mediumint(8) is stored on 3 bytes so I'm not sure it's as good in terms of performance as smallint. What do you think...? (The worst possible offender is the messages table, which has an id_board field.)

And finally -- id_group should be increased as well. Currently it's set to mediumint(5) which doesn't make sense (the 5-char limit will likely be ignored anyway if there are millions of groups...?), so I started by setting it to mediumint(8) for clarity, and then changed it to int(10) mainly for one reason: ideally, ANY user can create ANY number of groups to put ANY number of members into it. We should (?) probably put a limit to those, but for now I'm upgrading to int. Anyone knows whether this will have an influence over perfs...?
4818
Features / Re: Media boards: fishing for opinions
« on July 1st, 2012, 06:22 AM »
Quote from Arantor on July 1st, 2012, 02:39 AM
I'm already here in KY
I assumed it was likely since you mentioned the hot weather, and last time I checked it's not so hot here in Paris so I doubt it's any better in the UK :P
Quote
and have been to bed at least once (and now I'm actually on the right time, really, I was going to bed/getting up in American time for a while!)
Ah, you're lucky... Somehow. I myself immediately caught the 'right' timezone when going to sleep because it's easy for me to extend a night's work on code, ahah. But when I came back to Paris, there went the problem -- unable to catch the French timezone again.
Quote
OK, let me tackle the limits stuff first, since that's the most pressing matter from my perspective. mediumint(8) allows for something like 8.3 million topics, even if it's signed (16,777,215 if unsigned), now I can't imagine a forum having that many topics + attachments.
I can...
Quote
But also consider how many media items you'd have to have to get to that stage, and more importantly how big they'd be. Even at 1KB each, you'd be in to the GBs of storage to cope with it.
There's a strong possibility that it wouldn't cope easily, indeed. Eheh.
Then again, in the latest .Net I saw an ad about a £49 monthly server delivered with 2x3TB hard drives in RAID... Now, just launch a successful project where people can post their pics and remove them at will. (IDs will stay unique so any pic removed won't free up its database ID space.) Well, I can very well see it working.
Let's say... 20k users.
8MB topics & media items & whatever floating types / 20k = 400 entries per user in average.
Sure, it'll take some time to reach that... But it's doable.
Hence my suggestion to go for int(10) (like id_msg) or int(11) (like id_media), although it's basically the same (int11 is for signed stuff I guess, since it supports the minus sign.)
Quote
On a wider scale, though, you also have to consider that if you have to actually consider many millions (more than a mediumint can hold), you might want to be considering the next field up from an int, which is a bigint, and that causes *many* more problems. Going over the 32 bit threshold is a potential problem on many levels, more than you really want to be diagnosing.
Hmm, 2 billion entries (signed int) is enough for me... I'll leave the rest up to Facebook ;)
Quote
But realistically, a forum that is even close to approaching that is going to require specialist attention long before they get that big, and the single biggest SMF forum I know has 19.7m posts in 520k topics (warriorcatsrpg.com),
Oh my...
Quote
or, alternatively I looked at Nairaland which used to run SMF, which currently has 913k topics
Had a look at that... It's ...quite ugly, to be polite.
Why do 'big' forums always have to be the ones that make you wanna facepalm...?
Quote
As far as the context goes, everything else you've pointed out is fine as far as I'm concerned.
I'm thinking we could even consider dropping the album table... I'll have to look.
Quote
Lastly, re negative ids, there really aren't that many instances of it but we should certainly look through it - ideally every time we find a case where it happens, we should add a comment to the SQL to indicate that. Once we know which columns have to remain signed, we can make everything else unsigned ;)
Well, at the very least, auto increment fields are unsigned for sure...!
4819
Features / Media boards: fishing for opinions
« on July 1st, 2012, 01:53 AM »
So... For the last few weeks I've been considering multiple ways of integrating media items smoothly into Wedge. (Via the upcoming floating board feature.)

After all this time, there's one technique that sticks, and I'll explain it to you. The reason is that I'm not sure whether it's for the best, because it has a few disadvantages.

Simply said, a topic (wedge_topics table) would now have an associated id_media field. This field would represent a single entry in the media table.
With that said:

- an album is a custom board
- an album comment thread is a topic in this board where id_media = 0 (no associated image)
- an album item is actually a topic, which has a custom id_media that tells Wedge what thumbnail it should show. The item description could very simply be the first post in the topic.
- an album item comment thread is, obviously, the list of messages in that topic.

One of the advantages of this system is that it allows you to associate a media item with a topic even when the board isn't an album board.
For instance, we could have a blog where the posts are listed along with a thumbnail of their associated media item. Meaning, for each blog post the first media item you upload for it will become the default id_media for the topic. I could also ensure that you can select another item for use as main item. (Really, you could even use a single id_media for multiple blog posts -- e.g. like a category image.)

Now for the drawbacks...
- when you're writing a post, even a reply to some other post, if you upload a media item to attach in it, it creates a new topic internally. Which makes a lot of sense -- but then you get to the point where creating topics as 'supporting players' of a simple message sounds weird, even uncomfortable. (Then again, it's only internal stuff. I mean, users of Facebook don't really mind URLs with long series of digits... Also, we could always show ?topic=base64encoded_id in the URL, ahah...)
- it's not gonna be fun writing a converter for all of that... (Plus, TE is kinda MIA these days, so I fear it will be up to me to do it :P)
- the 'view unseen' permission is nulled by this, because it's all about new topics by then. Maybe I could add a filter for board types in the 'view unread posts' page. i.e. 'Mark (select box) as read' where the select box has Forums, Media, Blogs...
- I had another drawback in mind, which actually brought me to write this post, but I forgot about it for now. I'll make sure to bump this topic if I remember it.

Also, I've noticed that in AeMe, id_media is set to a size of int(11), while topics are set to mediumint(8). If a topic is now automatically attached to a media item, then it makes sense to set topics to int(11) as well, or set media size to mediumint(8) instead... No?

Which also reminds me that the SQL file has a lot of entries that don't use UNSIGNED where they could. But I don't know what's best -- fixing them as I find them, or leaving them as is, in the event that some would actually want to force a negative value...? (see privacy levels for instance, where a value of -3 means 'everyone' so that positive values can be assigned to membergroups.)

Please discuss all of this :)

(And Pete -- I understand you're on your way to KY, so you're dismissed, I was myself totally unable to participate in complex discussions this week with all the jetlag :P But if there aren't any solutions found by the time you come back, please feel free to share your opinion!)
4820
Features / Re: New revs
« on July 1st, 2012, 12:26 AM »
rev 1626
(4 files, 4kb) -- getting back to work after a one-week holiday...

! Don't double-encode entities in safe page titles. Is that a good idea..? How to reproduce: go to an album page where the name of the album is a long word. 'Shy' should show up in the title... (Subs.php)

* French translation. (Help.french.php, index.french.php, Post.french.php)
4821
The Pub / [FAQ] Re: Is it a friendly fork?
« on June 26th, 2012, 05:26 PM »
Sadly ----- agreed strongly.
4822
The Pub / [FAQ] Re: Is it a friendly fork?
« on June 26th, 2012, 07:02 AM »
There are other discussions about this, some recent mentions made in public too, but the bulk of it was done in private boards where I'm actually pushing these days for Wedge to be released in LGPL or EFL. (Even GPL when I'm evil enough :P)
I don't like people telling me what to do, though...! And just for that I'd be capable of dropping the idea altogether :lol:
4823
The Pub / Re: The Cookie Law (in the UK at least)
« on June 26th, 2012, 07:00 AM »
FB hosts the whole image doesn't it...?

And AeMe offers to host images remotely, too, thus ensuring this could happen.
OTOH, preventing this could be annoying, i.e. signatures with a banner that shows up details that depend on a cookie being set... That could annoy some people if it got messed up.
4824
Off-topic / Re: Handy JS plugin
« on June 26th, 2012, 06:57 AM »
Do you reckon it's worth including in Wedge by default?
Or I could rewrite it to optimize its code for size... Or for silliness.
Is this license compatible with Wedge's? Both are mentally deranged after all.
4825
Features / Re: Additional rows inn generic list
« on June 21st, 2012, 11:18 PM »
There's now a 24-hour window for editing posts... Isn't it enough...?
4826
Features / Re: New revs
« on June 21st, 2012, 05:42 PM »
rev 1624
(1 file, 1kb) <-- doesn't do justice to the time I spent on this :lol:

* Updated list of IP ranges per whois server for IP tracking. I s'pose no one's gonna go and check that I didn't do any mistakes, so I'll just say that the list will need to be updated as long as all ranges aren't assigned. (Profile-View.php)
4827
Features / Re: Rewriting the skin file parser...
« on June 20th, 2012, 01:19 PM »
Quote from Arantor on May 29th, 2012, 05:36 PM
Putting aside the position of the replace keyword, just consider the remainder of the terms - index.replace.some,thing.css should replace index.some,thing.css but not index.thing,some.css.

While I can see the logic of arguing either way, I'd strongly be in favour of keeping it simple.
I need a briefing on this. I still don't know what's best -- deleting replace-type skins or not.
4828
Features / Re: New revs
« on June 20th, 2012, 01:15 PM »
rev 1623
(5 files, 3kb)

* Still not done with the UI, but in the meantime enjoy this one: in profile pages > account settings, membergroup selection is now showing you the badges you're going to get. It only works for badges that always show up or badges that show up depending on their status (primary or additional). For instance, if the admin group has a badge but it's set to show only if used as a primary group, then the primary group list shows an admin badge, and the additional group list doesn't. (Profile-Modify.php, Profile.template.php)

* A couple of attic files had an extra line break at the end of the file. Which isn't cool. (attic/*)

* Another popup tweak.. Never completely happy with it eh? (script.js)
4829
Features / Re: Badges and the displaying thereof
« on June 20th, 2012, 01:13 PM »
So... What about these? Anyone happy or unhappy with them?
(Of course, to test these you need to touch the database manually... Sorry about that.)
4830
Plugins / Re: Edit History
« on June 19th, 2012, 06:53 PM »
It's just... extremely annoying. And I don't want to add some stuff like "if (is_opera || is_firefox) reqWin(proper_window)"...