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 - Arantor
5506
Other software / Re: Once upon a time...
« on November 10th, 2011, 03:15 PM »
Quote
So there is no function to reload data?
No, because of the nature of updateMemberData. It is designed specifically for updating multiple members at once, not just the current member. Consequently it's more work to update the current member's data, especially since virtually every single time it's used, it's then pushed through a redirect and so it will be reloaded on the next page load.

You could, I guess, call loadUserSettings() but I really wouldn't recommend it, especially if you already have the data handy, having just validated it, you could just update $user_info there and then.
Quote
How does it work when I change my forum profile in the default profile form in smf? It sends data, executes the update and then reloads the page?
By calling updateMemberData, going through a redirect and reloads the page.
Quote
Well, only email and password fields at the moment... So I'll update the array in the update script. It really isn't a problem, I only wanted to know if there is a way to do it using existing functions.
Unless you're going to be using right there and then to do something (i.e. in the scope of the current page load), there's no need to reload $user_info. Even if you *are* using it in the same page load, you have it available to work with.
Quote
I'll do my best in smf-bugfinding and I'll pass you informations!
All bug reports are useful, even if they might not seem like bugs.
Quote
That's the point. For example: I don't require that smf has a function to update members data. There can be tons of simple "workarounds" for doing that. But a simple answer like yours can really route a user in the right direction, without wasting time in looking at something that simple doesn't exist...
*nods* This is one reason I actually don't like doing support. People ask a question and they expect their question answered, except that very often I find they're asking the wrong question. Sometimes intentionally, often not.

In this case, for example, you're asking about reloading $user_info after a change. The real question isn't how to update $user_info, but whether you actually need to or not. If you're not using that information for anything for the rest of the page view, there's no need for a reload. Even if you are using it in the exact same page load, as you seem to be, and you're just using $user_info as convenience, you can trivially update $user_info there and then anyway once you have it. Don't forget there's also $context['user'] to consider.

Or you can do what SMF does and leave page flow to force it to be reloaded anyway. Depending on what else you're changing on that page it might be advisable to just do that.

Incidentally, email and password are tricky things to deal with. Not so much password, assuming you get the hashing right and make sure the other fields are left alone, but email is, because normally it's supposed to retrigger email validation (assuming that's turned on) which is a raft of other changes that updateMemberData doesn't automatically deal with. (Most importantly, it's going to reset is_activated from 1 to another number, though off hand I can't remember what that number is, because I don't think it's 0. There are something like 9 different legal values for is_activated, too.)


Getting back on point, I realise that not everyone knows SMF/Wedge's code like I or Nao or others do. What I would hope and expect to see is how volunteer support boards that are worth a damn should work: those who know the general stuff (which is, to be fair, what the majority of topics really are) can answer the general questions. Anyone can answer them and most questions do not require intimate knowledge of the system.

Then for anything more complex, the quantity should be lower but so too is the quantity of people who can answer them. But it's in this field where people have the real chance to shine; it doesn't take that much knowledge to follow through the bulk of SMF, no matter how huge it seems, and it often doesn't take more than a minute or two to scan through the source for the area that controls something. I learned a lot of the specifics about SMF by doing just this, and I really think some of the team would *really* benefit from this approach. Kicking back questions doesn't help anyone, it's just ego stroking for the person doing it.[1]

But in most cases, the total time spent kicking someone's post back (followed by the inevitable apology and further kick back) could have been used to find the real answer.
 1. I learned this the hard way. Took me a while to realise it, too.
5507
The Pub / Re: Logo Madness
« on November 10th, 2011, 12:30 PM »
Quote
I failed to watch TS last Christmas so I guess I only watched it once, at Christmas 2009...
It's about the most 'Christmassy' I get each year. I mean, while I have a 7ft tree in the house... it's BLACK. Not green, not sodding festive, it's black. It's imposing and awesome.
Quote
I never watched the thing, so I wouldn't know. I never even bothered with the main tune. At the time. Heck, even today, I think it's by far the weakest part of The Tubular Bells...
*shrug* I prefer Tubular Bells II to the first album, III was fairly awful IMO, but the amusement factor for me wasn't the music at all, it's just the way the dialogue is written.
Quote
Yeah, I think I have it somewhere but it has no subtitles or something, so I never watched it...
It's not bad, from what I remember of it.
Quote
Me neither. Anything that was made to offer counter-programming to Harry Potter doesn't strike me as made with love, unlike the animated movie I mentioned, which with its very tight budget managed to do something interesting.
I don't think it was intentionally made as counter-programming to HP, but it was certainly up against it. Mind you, if you're going to play the vs-HP game, explain LoTR: FotR which came out in cinemas around the same time as HP1 did... :whistle:

That's the thing about the BBC, incidentally. Sure, yes, recent DW has relatively big budgets etc, but part of the appeal is that its budget isn't huge and the people involved do care about what they do, and the same is true of all the BBC drama productions, especially costume/period dramas (as opposed to contemporous dramas)
Quote
and most promotional material actually spells it Blackadder. They... Are just unsure
All promotional material I can find after the second season debuted refers to it as Blackadder, it is only that first season.
Quote
'Pure' colors are good for size reduction, and particularly good to establish a brand, I'd say (Nike and stuff.) I'm still not a specialist though... Is it better in color?
It's better in colour.
Quote
Because you think I had the tools and skills to begin with...? A few months ago I had never even touched a vector graphics program...
No, but you get less frustrated than I do with trying new tools. No matter what toys I find to play with, I always end up coming back to my comfort zone.
Quote
The main point with vectors, is that you can work in an iterative way like in code
You can do that in GIMP but my problem is precision. I don't like working particularly iteratively, as it were. I tend to think about the structure and overall parts first, then fill in the gaps, then iterate on what I had. The art equivalent is taking a landscape, dividing it up with composition, then painting small areas at a time rather than iteratively creating the whole thing.
Quote
It's basically trial and error. And you just put the finger on it (probably just a French expression), I like this because it's like coding!
No, not just a French expression ;) Whereas I've tried working on vector images, and I find it easier to hack up SVG *by hand in code* than I do to manipulate it the same way in Inkscape. I tried.
5508
Features / Re: Re: Thought system
« on November 10th, 2011, 12:19 PM »
See, the whole nature of doing that would never have occurred to me. I'd have just used a regular select.

Mind you, if that's styleable (e.g. to put an image next to the item text)... I can think of many good uses for that.
5509
Other software / Re: Once upon a time...
« on November 10th, 2011, 12:15 PM »
updateMemberData is supposed to update the row, and it should then kick in on the next page load (if you want it to be active in the current page load, update $user_info yourself)

Note that not everything in $user_info is taken directly from the members table, so it would be interesting to know exactly what you're trying to update and how.

As for asking questions, for the most part they will be relevant to Wedge as well, so there's no real harm in asking, and it has been known to prompt me to fix things I'd known were broken but never got around to fixing.

(The reason it doesn't update the current member is because it's a general purpose function for addressing any and all members, not just the current user.)


(I should note it doesn't bother me that people are asking questions. What bothers me is that I can still answer questions for SMF, and still do a better job of it than the bulk of their support team *put together*. That's not me blowing my own trumpet, it's the fact that I'm not going to fob you off with some 'I'll reply if and when I know the answer' crap. If you don't know the answer, fine. But stop fucking about with telling people how you don't know the answer, and go and find out. I'm sure more people will appreciate having an answer that's useful after 10 minutes instead of being fobbed off after 5. Here endeth the rant -_-)
5510
Features / Re: Thought system
« on November 10th, 2011, 12:02 PM »
Quote
- I haven't been using preparsecode, as I said before. It's something I'll have to deal with, too.
I'd assume that newlines should be stripped before sending to preparsecode, but that's the only gotcha as far as I'm concerned.
Quote
- Sidebar box doesn't show a parsed thought because the Ajax stuff doesn't return anything. It was done this way on noisen, never cared to develop further... Obviously, I *should* return a parsed string to show. And I will.
I had a horrible discovery on that note the other day. I put a thought reply of 'I made him say <odd item> though... ' in and I was more than a shade bothered when I found it didn't protect the tag on the inline save (but of course it is when it's held on the backend, and reloading the page is of course fine)
Quote
- BTW, if you add a URL between nb tags, it won't be parsed into a url tag. Just a limitation I noticed yesterday in here... Dunno if it's in Wedge too, but I suppose so.
Really? Fairly sure I've put links in footnotes before and it worked as expected. In other news I've been quietly wondering if the footnotes couldn't be made even more awesome: if you have two footnotes with the same contents, I feel that only one entry should be put at the bottom and the same number used in both cases. The main reason this came into my head was because for one thing I want to do, I want to be able to do Wikipedia like citations by reusing footnotes instead of having to roll my own (because I have a project in mind that I would rather use a customised Wedge, or even a customised SMF,[1] for than MediaWiki)
Quote
I'm kind of on a break right now because, well... I thought I was done but I started logging a lot of items I should do, and I figured, oh crap this is going to take me another week... So right now, it's all you get
I know the feeling. I'm currently tackling moving the calendar into its own plugin. It's... interesting.
Quote
- Color stuff: ah, yes, thanks for the tip...
Side note: I seem to recall the bbcode parser will chew through uppercase bbcode e.g. [WHITE] but tags like that won't be converted, because the regular expression just replaces white|blue|black|red|green with color=$1 without any callback or inline eval to strtolower it. (Since this is at preparsecode time rather than display time there's no reason why it couldn't be rewritten to use a case-insensitive match and strtolower it once found)
Quote
Update: not getting any problems with Packer...?
Chrome doesn't like it for some reason. This was off a totally fresh install, too.
 1. As much as developing on Wedge is awesome, for a project that is a one-off codebase, I'd rather build it once and leave it without having to do regular patching and updates, if that makes sense.
5511
The Pub / Re: Logo Madness
« on November 10th, 2011, 11:53 AM »
Quote
Oh... Sorry, we were just talking about HP, I mixed it up.
Now I seem to remember that they fly by it in TS, indeed. It totally slipped my mind...
Interestingly, if you look at the presents, one of the tags says Brighton on it :)
Quote
I'm not sure it'd have the same effect on you today as it had on me at the time...
Probably not. But then again I'm strange anyway. People still find it hard to believe that I laughed hard at the Exorcist because it was just so ridiculous.
Quote
Although it doesn't seem to be from the Beebs in the end...
The Beeb[1] did do an adaptation of TLTWaTW at some point and that was my first exposure to Narnia. I have the books, I have the recent film adaptation of TLTWaTW but I never seem to find the time to actually experience them.

Hmm, maybe I should try audio books.
Quote
Couldn't have told it was the same castle as in Black Adder!
I certainly didn't realise because the shots are vastly different, and there's extra towers and CGI going on in HP. That said, there aren't exactly many long shots of the castle in TBA[2].
Quote
Because it's black?
Although black is an awesome colour, pure black has no contrast, no subtlety, no variation. These things are needed, IMO.
Quote
Not that it matters much. We have all the time in the world to find a logo. Holy cow, it's one of the few cases where, even though it could be annoying that it'll be finished either tomorrow or in 6 months, I don't mind at all and I really enjoy working on this. Plus I really appreciate being able to learn how to manipulate vector graphics. I read a lot of tutorials and I like that. I think that's the high point of my logo/typography training.
It helps to have some sense of style and art about you when doing such things but it sounds like you're really enjoying what you're doing; I know full well that if I were to try such things, I'd only end up getting very frustrated. With me, I can visualise many things but I lack the tools and/or the skill to realise them, and I don't know how to go about getting that skill. I can craft almost anything out of code but to draw a picture? Out of my league.
 1. Or, Auntie, as she is often known for some reason.
 2. First season is actually The Black Adder, while later ones are Blackadder II, Blackadder The Third and Blackadder Goes Forth. I'm not entirely sure why the name was changed to remove the space but I wouldn't be surprised if the change of writer was involved. Atkinson wrote the first season but 2-4 were co-written with Richard Curtis. There was also a Christmas special, parodying A Christmas Carol. But there was only ONE Christmas special, you hear me? ONE!
5512
The Pub / Re: Logo Madness
« on November 10th, 2011, 11:26 AM »
Quote
Okay, the only landmark I know of in Brighton, if I'm not mistaken, is that casino in the sea (?), or building anyway, connected to the land by a bridge...
That's Brighton Pier. (It's in The Snowman, as is the Taj Mahal-styled 'Brighton Pavilion')
Quote
Starting with great children's cartoons! I also loved The Lion, The Witch and the Wardrobe... That cheap BBC film from the late 70's
I must have missed that somewhere.
Quote
And I don't remember seeing that in HP. Was that in the bank escape scene? I thought they were dropped in Scotland or something...
Hogwarts is implied in the books to be in Scotland, and principle filming of the castle in the films is at Alnwick Castle which is not far from the Scottish border.
Quote
Okay, I tried for a monochrome version with a slight modification of the upper 'petal'... How about that?
It doesn't have the 'weak' feeling I was getting at before, nor the 'falling off the wall' feeling... I don't particularly like it but I can't tell you why :/
5513
Features / Re: Thought system
« on November 10th, 2011, 10:33 AM »
Getting back to the original topic, I find two problems and one thing I don't understand.

First up, there's a bug in it whereby nobbc is not handled properly. It's not a potential security issue as far as I can see, because htmlspecialchars is run still, so even though nobbc is not parsed the same way as other tags, it won't do anything bad. It just won't work as expected. (Since nobbc is available to the inline parser, we need to run preparsecode on it to actually carry out the inlining on it, I did wonder if that would be the case, though.)

Second, the JS is broken if Packer is used. I haven't figured out quite where that is yet, but it gets very upset with "Unexpected token (" which breaks all remaining JS on the page (which is problematic as it also breaks things like the menus, fortunately menu navigation isn't the only route to Server Settings now ;))

Also, is it intentional that links posted in thoughts should not be clickable? In fact... the URL tag doesn't work. It's parsed in the display view but it's raw BBC in both the thoughts view in profile and in the sidebar box.

The one thing I don't entirely get is how a user is supposed to reply to thoughts, there's no interface like in Noisen or here.

Otherwise though, it looks pretty good :)
Posted: November 10th, 2011, 10:29 AM

On a related note, the inline parser has 'color', 'black', 'blue', 'green', 'red', 'white' listed, but this should just be 'color' as preparsecode does the conversion. (Though it does it case-sensitively.)
5514
The Pub / Re: Logo Madness
« on November 9th, 2011, 11:55 PM »
Quote
Hard not to shed a tear for this one. Especially after THAT song
If you're paying attention, they fly from somewhere just north of Brighton (and fly directly over Brighton)... which is virtually where I live...
Quote
And yes it's a typical British tradition to watch The Snowman. It's totally unknown in France.
The British do strange things, but awesome ones :)
Quote
I wouldn't know where to start when it comes to making me cry systematically...
Other than that episode of DW, I don't tend to cry much at TV.
Quote
Any opinions? (The last two are what you see in the sidebar.)
I like the font on the 'petal' logo most, while I like the square logo most. The petal part itself makes me think as though the lower part seems more floppy and unable to support the upper part, while the middle logo looks like the pieces have fallen off the wall, as it were.
5515
Features / Re: Thought system
« on November 9th, 2011, 11:50 PM »
Media items are always referred to by their id only, which is a PK lookup, and then a lookup against the album's permissions.

Attachments are currently done as a request referring to the attachment id, plus the topic id. I'm not quite sure why that's done that way, because it causes two problems. Firstly, it means that if a message is moved to another topic, any pre-existing link in posts is broken. Secondly, it means there's a lookup of attachments table (by attach id) to messages table (by id_msg) which will then return the topic.

The only reason the topic id is even given in the first place is so that ;topic= is filled in the URL and the board permissions are implicitly loaded as a by-product. That means a BFQ[1] is issued, one that queries the topics table, the boards table, the categories table, plus fetching the board's owner, board moderators... yeah. That's not clever.

So pushing it solely to id and managing the access and permissions internally would almost certainly be at least as fast, if not faster, than the current approach.

The exact method to be used is up for debate, since it implies allowing for unexpected alterations and extensions later, but the principle seems clear enough. That's the 'main' problem with using attachments, from my perspective.

The other issue is relating to how the file path is determined. Right now, the path is determined based on the album's information. What I figure is that, invariably, a second query is going to have to be made. The first query identifies that the file exists, and would return the information necessary to locate and pass to the authorisation subsystem.

The authorisation subsystem would not only identify that the file can be passed on to the user but should also return the path to it.

As far as files being attached to posts, we could retain the current UI. Once the files are uploaded, we can insert the equivalent of the smg bbcode into the post itself, meaning that users are free to reposition the items within the page if they wish.

I'm sure there's more but that's all I have right now in my little brain for it. (Busy watching The 7th Voyage of Sinbad. Awesome film.)
 1. Big fucking query.
5516
The Pub / Re: Logo Madness
« on November 9th, 2011, 10:42 PM »
Quote from Nao on November 9th, 2011, 09:16 PM
I'm a softie at heart. I cried at the end of the last Harry Potter.
OK, open time. Each year we watch The Snowman. Each year, I feel myself shedding a tear. Oh, and one almost got shed when Tennant regenerated. ALMOST.
5517
Features / Re: Thought system
« on November 9th, 2011, 09:50 PM »
It doesn't need much indexing, it's mostly accessed by primary key anyway...
5518
Features / Re: Thought system
« on November 9th, 2011, 08:09 PM »
I know why it's complex, but if you turn it round a bit, it makes sense.

The core attachment system has two principle weaknesses, in my book: firstly, it's not extensible, and secondly its management capabilities are limited.

Really, all an attachment is is a file uploaded to the system... Post attachments are restricted by the topic permissions, album attachments by the album permissions. The more you look, the clearer it is that they have an awful lot in common, probably more than is realised.

And I'm not really seeing the problems with doing it, other than the fear of doing it. All the issues related to how I think it can be made extensible aren't really issues at all, I already covered off how that would likely work, at least in my head, by giving each item a source to have originated from (both a place and a contextual id, such as album+1 for an item in album 1 or help desk+2 for an item attached to a helpdesk ticket, etc.)
5519
Plugins / Re: Plugins I refuse to do
« on November 9th, 2011, 03:32 PM »
Why shouldn't it be a custom template? I always sort of figured it was, and it is for the message index...
5520
Features / Re: Thought system
« on November 9th, 2011, 03:31 PM »
Blog support might need tidying up, but that's it really. Just need to remember board access UI doesn't work if more boards are created.