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
706
Archived fixes / Re: 'Like' Disappears When Clicked
« on May 10th, 2013, 11:40 PM »
Quote
Oh, thinking about it... I should probably add echo before that call_user_func_array, shouldn't I..? In case the callback function isn't a template at all... ;)
Hmmm, I've had some rum so I feel all warm and fuzzy but I'm thinking:
Code: [Select]
$var = call_user_func_array($callback, $args);
if ($var !== null)
  echo $var;

Then you're covered either way.
Quote
and I changed it from return_text to return_raw, I think, and for no particular reason...
Because return_text is what was originally used but it doesn't work because the template got echoed, then the buffer emptied, then nothing got returned, as I discovered last night ;)
707
Archived fixes / Re: 'Like' Disappears When Clicked
« on May 10th, 2013, 11:31 PM »
Return by callback is cool. clean_output ensures ob_sessrewrite gets called too, so the URL rewriter gets called and everything's magic and wonderful.

Also, no, I didn't get multiple notifications but at the same time the original one was still unread...
708
Features / Re: Pruning old PMs
« on May 10th, 2013, 07:24 PM »
I was never against it... I've been saying for a long time that exporting PMs should be a core feature... management around that is another matter entirely.
709
Archived fixes / Re: 'Like' Disappears When Clicked
« on May 10th, 2013, 05:51 PM »
It's quite simple: unwind to before r2103, click like and before you do anything else (like going off the page), click the what-is-now-an-unlike button and it'll fail. Not the same bug, but it puts a lovely error into the Apache log.
Quote
The given path is misformatted or contained invalid characters: Cannot map POST /wedge/%3CURL%3E?action=like;topic=33;msg=62;aff911201e2=72fe73fe1834e6ce41af40021b472f3d HTTP/1.1 to file, referer: http://localhost/wedge/index.php?topic=33.msg62
The like template outputs a <URL> for the current post, except of course, return_raw wouldn't parse that into the $scripturl format. It also wouldn't apply pretty URLs to it either.

The answer is to call the other return_ functions or call clean_output so that the relevant buffer gets called. Or, I suppose, calling the main ob_sessrewrite buffer directly but I'd rather not. The problem as outlined in the changelog is that you can't call clean_output because it clears what's already in the buffer and in our case that would be the contents of the like template since it doesn't return anything, it outputs it.

Now, I suppose, you could rewrite the likes template to return its content rather than echoing it (and then alter the places where it's called to treat it as a returned value rather than something that will output things.

The only reason I noticed it was because I was testing the likes notification after I moved the file into the notifiers folder, and it was failing on me.
710
Bug reports / Re: Infraction bugs
« on May 10th, 2013, 05:10 PM »
Quote
I'd recommend you do an overall review of the words 'infraction' and 'punishment' in your language files, and modify them to 'sanction' as needed.
See, in English, sanction is a stronger word than punishment; I changed it to punishment for that reason.
Quote
Colons are used to represent the port, and I think that because of that, the ISO standards determined that they shouldn't be used in the query string either, although technically it's accepted by all browsers.
In which case I'll just fix it to use , instead of : no biggie.
Quote
Even with the u=1 in it..?!
Yup, even with the u=1 in it. Try to warn me for one of my posts, you should see that it gives you a URL with my user id in it but throws an error to you for trying to warn yourself.

Off hand I'd say that because of the /profile/ URL it's routing to the profiles action but it's then expecting a name rather than a u= and failing to catch it.
711
Other software / Re: My review of customer service on SMF
« on May 10th, 2013, 03:18 PM »
It was funnier when you had people with the developer badge that weren't even using 2.0.

The reason why they use it to ban instead of actually using a ban is because only admins have the ban power and using the warning system in SMF to mute users is cheaper in performance terms than using the ban system itself. (Coincidentally, using an infraction to actually ban a user is cheaper in Wedge than using the ban system to ban a user is too. And for a similar reason.)

The warning system is useful, though I'll admit not as powerful as it could be.
712
Features / Re: Miscellaneous/WIP screenshots
« on May 10th, 2013, 03:51 AM »
@Nao, it's likely you'll want to tweak the code. I'm not very happy with what I have but it was the only way I could see of getting it from the bbcbox initialisation up through to the bbcbox object and then to the editor object. (This will become clear when I commit it, but if no-one's that bothered I might just skip that bit)
713
Features / Re: Miscellaneous/WIP screenshots
« on May 10th, 2013, 03:39 AM »
I've always wanted more options for the editor. I like users not having to write mods for something I can reasonably trivially support in the core. This has made the editor code slightly bigger, haven't benchmarked it in terms of size.

I'm planning to offer up the whole editor thing itself being organisable, but just this for now.
714
Features / Re: Miscellaneous/WIP screenshots
« on May 10th, 2013, 12:53 AM »
Quote from Arantor on May 9th, 2013, 11:13 PM
+ Contact list is now shown in the PM area, allowing you to send a PM to/bcc your contacts. As I intimated I'm not overly happy with the JS I've done here, it feels fragile and ugly and yet more organised than before. Feel free to rewrite/refactor/ignite. (PersonalMessage.template.php, PersonalMessage.template.php, pm.js, index.member.css, PersonalMessage language file)
Go nuts ;)
715
Features / Re: Miscellaneous/WIP screenshots
« on May 10th, 2013, 12:45 AM »
I spent an hour futzing with it and farting with variable scope. JS is a tool I can use but it doesn't mean I like it...
716
Features / Re: Pruning old PMs
« on May 10th, 2013, 12:35 AM »
Oh, I want to have the whole extraction thing going on but I'm generally frightened of the PM code. The main PM code is actually one of the largest source files in both SMF and Wedge -_-

I think a lot of people have a lot of different approaches for the reason that they have different goals. Some people just want the ability to manage their PMs a bit faster, some people want to be able to control how much space is used and whatnot and discourage hoarding[1] and I want to try and provide options that can be used to provide a reasonable balance.

I'm only too aware I can't solve all the issues for every user but I can provide enhancements that do make it easier for people where possible :)
 1. I remember when there was a migration of systems when my old company was taken over, the number of people who were 'OMG I can't work inside a 100MB email inbox' was astounding. Of course, I knew how to organise my inbox as well as store files I needed so I had access to everything I needed quickly without having a glut of old useless mail in my face too.
717
Features / Re: Miscellaneous/WIP screenshots
« on May 10th, 2013, 12:29 AM »
Because I had to do something with it. The original suggest objects were contained inside the wePersonalMessageSend function as properties and thus not accessible outside of that object.

I dunno, it just felt slightly more natural to do it the same way as other stuff does it. *shrug*
718
Features / Re: Miscellaneous/WIP screenshots
« on May 9th, 2013, 11:38 PM »
Agile development, yo.
719
Features / Re: Miscellaneous/WIP screenshots
« on May 9th, 2013, 11:19 PM »
Well, it's also a core feature so when Nao updates the site to current SVN, you'll no doubt get to try it. ;)
720
Features / Re: New revs
« on May 9th, 2013, 11:15 PM »
(1 modified, 1 moved, 1KB)

Revision: 2104
Author: arantor
Date: 09 May 2013 22:14:54
Message:
! Move likes notifier to notifiers folder - we'll have more in future. (Notifications.php, Class-NotifierLikes.php)
----
Deleted : /trunk/Sources/Class-NotifierLikes.php
Modified : /trunk/Sources/Notifications.php
Added : /trunk/Sources/notifiers/Class-NotifierLikes.php (Copy from path: /trunk/Sources/Class-NotifierLikes.php, Revision, 2100)