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.
7216
Features / Re: Thought system
« on November 3rd, 2011, 03:04 PM »
Looking at some of your code in updateMemberData...
Code: [Select]
Couldn't this be simplified to this?
Code: [Select]
Untested... Just wondering ;) It works if I use echo (array) '1' === array('1') for instance.Quote from Arantor on November 3rd, 2011, 01:12 PM I take it you agree that a data field is a good idea then :)Quote Okay, scrapping this one then...Quote I didn't know that instant_messages was calculated when sending a PM. I thought it was done when going to your PM area or something... So, scrapped.
unread_messages is probably in a similar situation.
Clearly, though, I'll be doing the data field because it's a good opportunity for plugins to store profile-specific data without having to add their own database fields (or custom fields).Quote So there's really no reason to keep it that way... :)
I always wondered about that but didn't want to break it.Quote Ah, yes, that was it... I remember now how I was frustrated having to cancel my upcoming commit about that... :lol:Quote We could also simply say -- if your upload process doesn't work, use FTP and don't bother us with that! Just outputting a nice error message explaining what happened is okay to me...
if ((!is_array($members) && $members === $user_info['id']) || (is_array($members) && count($members) == 1 && in_array($user_info['id'], $members)))Couldn't this be simplified to this?
if ((array) $members === (array) $user_info['id'])Untested... Just wondering ;) It works if I use echo (array) '1' === array('1') for instance.
Works for me.Quote id_thought and thought can be in it, because it's only going to be used in the member's sidebar.
Timezone doesn't bother me, unless we want to do some kind of display of user timezones. Language, however, has other consequences, like when sending email templates, it actually tries to fetch the right one for the language of the user the email is going to.
Not they're not. If you send someone a PM, do you really want to have to query their member rows, unserialize each one, increment, then update each row? If you send 10 people a PM, that's 11 queries. Now imagine sending a newsletter to each member via PM. As opposed to a single query that updates all of those things at once (which means only one table lock)
unread_messages is probably in a similar situation.
Clearly, though, I'll be doing the data field because it's a good opportunity for plugins to store profile-specific data without having to add their own database fields (or custom fields).
The dump is from either mysqldump or phpMyAdmin (not sure which) which escapes everything, anything that's without quotes is one added manually somewhere.
I always wondered about that but didn't want to break it.
On top of that we were talking about using wesqlQuery with it too, which is probably why no-one did it, because it's hellishly complicated (and important to get right)
It depends on your definition of strange. From my point of view, the majority of filesystems are strange :P I did consider avoiding the whole upload process entirely and forcing users to use FTP but that's not very nice, now, is it?
7217
Features / Re: Thought system
« on November 3rd, 2011, 12:46 PM »
Okay...... I *think* I've found our solution, or something like that.
We add a special text data field in the member table, which will hold a serialized array of *all* variables that are only of use to the member in question.
id_thought and thought can be in it, because it's only going to be used in the member's sidebar.
Things like smiley_set or id_theme/skin could also be in it (although the latter would prevent easily giving stats in the Change Skin page.)
Maybe timezone and language stuff, too. (It's used in a user's profile, though. But we could have some kind of function that gets the serialized array and extracts some data from it. As long as it's not used for more than *two* users at a time (the viewer and the viewee), it's probably safe.)
message_labels maybe... But it's a text field so it could end up eating the new data field's space. We could make the data field a LONGTEXT but it could end up wasting a lot of time unserializing data that's never used (outside the PM area.)
instant_messages and unread_messages are good candidates, too.
Well... What do you think? I for one would sure enjoy seeing a stripped down member table!
And TE's importer can easily deal with serializing imported fields.
Oh, while looking at the member table, I found a couple of definitions ending with default 0 instead of default '0'... I turned them to '0' but I've always wondered the point of using a string when an integer is perfectly fine... Maybe it was for compatibility with SQLite or PGSQL or something...? Maybe we should just go ahead and use integers....
Quote from Arantor on November 3rd, 2011, 11:50 AM Yes we did. And like with so many conversations, I guess nobody thought of adding this to their to-do list... :P (Mind you, it's probably the same on SMF's side.)Quote I completely agree with your view on FTP, but there's really nothing we can do.
I'd tend to say, "to hell with people who use strange filesystems", but the more we say that kind of thing, the less users we'll have... And after spending 14 months on the project, I don't want it to fall into oblivion, even though I didn't care about that on day one.
We add a special text data field in the member table, which will hold a serialized array of *all* variables that are only of use to the member in question.
id_thought and thought can be in it, because it's only going to be used in the member's sidebar.
Things like smiley_set or id_theme/skin could also be in it (although the latter would prevent easily giving stats in the Change Skin page.)
Maybe timezone and language stuff, too. (It's used in a user's profile, though. But we could have some kind of function that gets the serialized array and extracts some data from it. As long as it's not used for more than *two* users at a time (the viewer and the viewee), it's probably safe.)
message_labels maybe... But it's a text field so it could end up eating the new data field's space. We could make the data field a LONGTEXT but it could end up wasting a lot of time unserializing data that's never used (outside the PM area.)
instant_messages and unread_messages are good candidates, too.
Well... What do you think? I for one would sure enjoy seeing a stripped down member table!
And TE's importer can easily deal with serializing imported fields.
Oh, while looking at the member table, I found a couple of definitions ending with default 0 instead of default '0'... I turned them to '0' but I've always wondered the point of using a string when an integer is perfectly fine... Maybe it was for compatibility with SQLite or PGSQL or something...? Maybe we should just go ahead and use integers....
Posted: November 3rd, 2011, 12:44 PM
Technically, it's in loadMemberData where the join is. Hmm, lMD needs more branches than just minimal, normal, profile. Didn't we already talk about that before? :/
The plugin management itself is pretty straightforward. It's all the crap that goes with it, like dealing with file permissions[1] and figuring out how the update process should work.
1. Seriously, while I understand the principles and so on of the way Linux/Unix file permissions are done, the whole lot of having to use FTP to elevate permissions on most systems instead of allowing the PHP process to run as the right user is just so mindnumbingly broken...
I'd tend to say, "to hell with people who use strange filesystems", but the more we say that kind of thing, the less users we'll have... And after spending 14 months on the project, I don't want it to fall into oblivion, even though I didn't care about that on day one.
7218
Features / Re: Thought system
« on November 3rd, 2011, 11:44 AM »There's no good way around that. Either you have to store both in the members table, or you have to store them both in the main thoughts table and query for them appropriately. Or one of each.
It's this, or we get three fields in the members table: personal_text, thought and id_thought... :(
I know exactly what you mean :/
7219
Features / Re: New revs
« on November 3rd, 2011, 09:49 AM »
rev 1144 (there are still something like 25+ files left to commit for the thought system so I'm trying to split it as much as possible...)
(5 files, 9kb)
! Error messages like double quotes better than HTML tags. Also added a few thought system strings for later (eh, didn't want to bother removing them just for that fix.) (index.language.php)
! Fixed broken array_insert in the template object, simplified array insertion in another area, and added strict test in the array_insert function itself. (Subs-Template.php, Subs.php)
- Can no longer set personal text from the profile area. This is because it'll be set through the sidebar starting in my next commit. (Profile-Modify.php)
(5 files, 9kb)
! Error messages like double quotes better than HTML tags. Also added a few thought system strings for later (eh, didn't want to bother removing them just for that fix.) (index.language.php)
! Fixed broken array_insert in the template object, simplified array insertion in another area, and added strict test in the array_insert function itself. (Subs-Template.php, Subs.php)
- Can no longer set personal text from the profile area. This is because it'll be set through the sidebar starting in my next commit. (Profile-Modify.php)
7220
Off-topic / Re: MySQL Database access
« on November 3rd, 2011, 08:44 AM »
I'd rather install a phpmyadmin-like gallery with everything in a single php file. I think we had a discussion about this last month.
7221
Off-topic / Re: Battlefield 3
« on November 3rd, 2011, 08:40 AM »
It was only announced this year.
Ever heard of Oblivion and Morrowind? It's the followup.
Ever heard of Oblivion and Morrowind? It's the followup.
7222
Features / Re: Thought system
« on November 3rd, 2011, 07:47 AM »
It wouldn't work that way. Thoughts are shown: in topic pages, in profile pages (not done yet), and on the homepage (possibly later an SSI function as well). Only the topic pages will use the stuff we mentioned. However, the main use for that field, for me, is in the sidebar where your current thought is being shown. If we only store the latest public thought (which BTW may sound silly to members who then can't see your member thoughts under your avatar), this will disrupt the sidebar block.
That's why it's complicated.
As for 'not under my avatar', currently the options (public/members/friends/self, all written as of now) are shown in a select box, but if I want to enable users to say they don't want their stuff in the topic pages, I'd need to do one of these: either have a profile option to completely disable sharing on topic pages (this would also be the logical destination of a 'share public thoughts on Twitter' option), or replace the select box with an Ajax popup called through a 'privacy' icon, where you actually have a list of checkboxes: 'show in topic pages', 'show to everyone', 'show to members only', 'show to my friends only'. If you disable everything, it's the equivalent of 'self' in the select box. If you enable 'show to everyone' and 'show to my friends only', you're just a cunt :P
I can't tell you the number of times I rewrote the thought system since last week... :lol: And there's still a lot of work to do. I'm feeling like everytime I want to tackle a small task like thoughts, I end up spending ten times longer on it than I first expected. The exact same thing happened for the skeleton system which I originally thought would take only a couple of days to implement... :^^;: (Well, it DID take only a couple of days. To get it working. But it was very basic then.)
Ahh, midnight! The Cinderella effect has caught up with me, and I'm out of pumpkins.
(bump!)
Maybe I should commit my work in progress for now?
(It does not work well and I'd rather not.)
That's why it's complicated.
As for 'not under my avatar', currently the options (public/members/friends/self, all written as of now) are shown in a select box, but if I want to enable users to say they don't want their stuff in the topic pages, I'd need to do one of these: either have a profile option to completely disable sharing on topic pages (this would also be the logical destination of a 'share public thoughts on Twitter' option), or replace the select box with an Ajax popup called through a 'privacy' icon, where you actually have a list of checkboxes: 'show in topic pages', 'show to everyone', 'show to members only', 'show to my friends only'. If you disable everything, it's the equivalent of 'self' in the select box. If you enable 'show to everyone' and 'show to my friends only', you're just a cunt :P
I can't tell you the number of times I rewrote the thought system since last week... :lol: And there's still a lot of work to do. I'm feeling like everytime I want to tackle a small task like thoughts, I end up spending ten times longer on it than I first expected. The exact same thing happened for the skeleton system which I originally thought would take only a couple of days to implement... :^^;: (Well, it DID take only a couple of days. To get it working. But it was very basic then.)
Ahh, midnight! The Cinderella effect has caught up with me, and I'm out of pumpkins.
Posted: November 3rd, 2011, 12:01 AM
(bump!)
Maybe I should commit my work in progress for now?
(It does not work well and I'd rather not.)
7223
Other software / Re: So, SMF has declared the cold war...
« on November 3rd, 2011, 07:45 AM »
Hmm. Out of my league now. ;)
7224
Other software / Re: So, SMF has declared the cold war...
« on November 3rd, 2011, 12:09 AM »
At worst, we can always centralize everything on wedge.org and go get a powerful server. I don't believe we'll ever reach the number of users that SMF has, so it's probably not going to be a *horrible* problem. Plus, AeMe fetched an entire web page (well, about 20 or 30KB of text?) when Wedge will only retrieve a few bytes (plus headers).
And if we use your 'push' concept on wedge.org...
And if we use your 'push' concept on wedge.org...
7225
Plugins / Re: Plugins I refuse to do
« on November 3rd, 2011, 12:05 AM »
I don't know, I just don't feel like 'look board' is a horrible thing to implement. It's something I could have used at some point a few years ago, so it doesn't strike me as bad really. Then again, I'm not exactly in a hurry to implement it, either. Maybe something for Wedge 2.0 if we find a good way to implement it...
7226
Other software / Re: So, SMF has declared the cold war...
« on November 2nd, 2011, 11:50 PM »
Hmm. I'm guessing that if authors don't set up a repo of sorts, it prolly means they don't bother with sending updates either. I know I craved for control with AeMe and stuff.
You know best anyway. You'll figure something out in no time ;)
You know best anyway. You'll figure something out in no time ;)
7227
Other software / Re: So, SMF has declared the cold war...
« on November 2nd, 2011, 11:37 PM »
Hmm... A push system?
Yeah, that could work...
Although I'd rather see it, once again, defined in the plugin's xml file.
- server installs plugin
- plugin tells server the URL of its fetcher system
- server pings fetcher by sending it a target URL
- fetcher records URL
- when the plugin is updated, fetched pings said URL
- if it fails, retry in 24 hours if it's a security update, or a week if not. (Or just 24 hours for everything.)
Yeah, that could work...
Although I'd rather see it, once again, defined in the plugin's xml file.
- server installs plugin
- plugin tells server the URL of its fetcher system
- server pings fetcher by sending it a target URL
- fetcher records URL
- when the plugin is updated, fetched pings said URL
- if it fails, retry in 24 hours if it's a security update, or a week if not. (Or just 24 hours for everything.)
7228
Off-topic / Re: Battlefield 3
« on November 2nd, 2011, 11:29 PM »I take it you pre-ordered Skyrim? I'm taking a wait and see. I'm sure it'll be a good game, but I'd prefer to wait until they've released their 10 inevitable DLCs and fans have had a decent amount of time to fix the game with mods... I've never been able to stand a unmodded Bethesda game... :P
Never bothered to play a DLC from Bethesda.
| 1. | It was very ballsy for its time! |
7229
Features / Re: Thought system
« on November 2nd, 2011, 11:15 PM »
WTF... The thought system is so complicated now ;)
Let's say I'm writing a new thought, and set it with a privacy value > 0, meaning 'not public'.
Wedge will record the ID and text in the member table, so that I can quickly get back my latest thought on each page load.
However, when it comes to showing the latest thought under your avatar in topic pages... How exactly is Wedge supposed to know whether it CAN show it to everyone? Does it mean storing the privacy value in the member table as well...? Or use some hack, like storing a negative value of the id_thought, meaning 'the absolute value of this is the actual id_thought, and I don't want anyone to see this thought in a post'?
Heck, I should probably have a potential privacy value saying 'public, but don't show under my avatar'... :^^;:
PS: id_thought is now stored in the member table as implied above. It's mainly because it's really used on every page...
Let's say I'm writing a new thought, and set it with a privacy value > 0, meaning 'not public'.
Wedge will record the ID and text in the member table, so that I can quickly get back my latest thought on each page load.
However, when it comes to showing the latest thought under your avatar in topic pages... How exactly is Wedge supposed to know whether it CAN show it to everyone? Does it mean storing the privacy value in the member table as well...? Or use some hack, like storing a negative value of the id_thought, meaning 'the absolute value of this is the actual id_thought, and I don't want anyone to see this thought in a post'?
Heck, I should probably have a potential privacy value saying 'public, but don't show under my avatar'... :^^;:
PS: id_thought is now stored in the member table as implied above. It's mainly because it's really used on every page...
7230
Off-topic / Re: Post count fever
« on November 2nd, 2011, 09:12 PM »
My sponsor is letting go of me, I thought they'd already contacted you! :lol: