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.
3016
Archived fixes / Re: 'Like' Disappears When Clicked
« on May 10th, 2013, 11:29 PM »
Okay, thanks for the explanation.
It's just a bit odd that it works in here (and locally for me), but it's probably due to something like jQuery parsing the HREF at $.post time, and deciding to get rid of the 'wrong' characters, or something... :-/
Anyway, I've thought about it, over and over, and came up with a half-better solution. You tell me if you're okay with that.
Code: [Select]
We established that was bad... Now I'm doing this:
Code: [Select]
And the function is, obviously, defined as such:
Code: [Select]
What do you think..? Is it elegant enough to have as a utility function? Do you see yourself using it in future Ajax endeavors?
PS: I don't even know why my return_raw call worked at all, since it added the HTTP header *after* the template was written... Meh!!
Also, you didn't say if you received multiple notifs..?
It's just a bit odd that it works in here (and locally for me), but it's probably due to something like jQuery parsing the HREF at $.post time, and deciding to get rid of the 'wrong' characters, or something... :-/
Anyway, I've thought about it, over and over, and came up with a half-better solution. You tell me if you're okay with that.
return_raw(template_show_likes($id_content, true));We established that was bad... Now I'm doing this:
return_callback('template_show_likes', array($id_content, true));And the function is, obviously, defined as such:
function return_callback($callback, $args = array())
{
clean_output();
header('Content-Type: text/plain; charset=UTF-8');
call_user_func_array($callback, $args);
exit();
}What do you think..? Is it elegant enough to have as a utility function? Do you see yourself using it in future Ajax endeavors?
PS: I don't even know why my return_raw call worked at all, since it added the HTTP header *after* the template was written... Meh!!
Also, you didn't say if you received multiple notifs..?
3017
Features / Re: Pruning old PMs
« on May 10th, 2013, 07:12 PM »
Does that mean you're open to the idea of mail archives, Pete? ;)
3018
Archived fixes / Re: 'Like' Disappears When Clicked
« on May 10th, 2013, 05:40 PM »
Losely related, but I won't create a new topic, ah ah...
So, rev 2103 mentions that likes are broken.
I took rev 2103, and reverted it here temporarily, and they still work. Like / Unlike / Like / Unlike... It goes on undefinitely, without a refresh.
Pete, can you tell me exactly how to reproduce the issue you mentioned..?
Also, you may have received multiple notifications for that little game of mine, ah ah... If you didn't, good. If you did, we might want to fix that to keep the notif in the database even if unliked, and then ensure the notif isn't already in there if we're sending a new one...
So, rev 2103 mentions that likes are broken.
I took rev 2103, and reverted it here temporarily, and they still work. Like / Unlike / Like / Unlike... It goes on undefinitely, without a refresh.
Pete, can you tell me exactly how to reproduce the issue you mentioned..?
Also, you may have received multiple notifications for that little game of mine, ah ah... If you didn't, good. If you did, we might want to fix that to keep the notif in the database even if unliked, and then ensure the notif isn't already in there if we're sending a new one...
3019
Bug reports / Re: Infraction bugs
« on May 10th, 2013, 05:36 PM »
Ah, yes, now I remember...
Profile URLs are prettified by looking for ;u=[0-9]+ in them. Which, at this point, does NOT happen, because it's ;u=%2%, i.e. the special variable...
If you'll look at the user box menu, the IP tracking link is the same -- doesn't get prettified at all.
I don't think it's a big deal for admins and mods to have non-prettified URLs, but I'll have to fix the bug that occurs when you click the link, I guess...!
Quote from Arantor on May 10th, 2013, 05:10 PM Oh, I see... Well, it's the opposite in French, I'd say... (?)Quote Nope, it's okay to use it, I simply thought I might have 'forbidden' it for ISO reasons, which I didn't. I don't really mind either way...
Fixed here, BTW! It was a logic error in QueryString.php, ah ah... Will commit later.
Profile URLs are prettified by looking for ;u=[0-9]+ in them. Which, at this point, does NOT happen, because it's ;u=%2%, i.e. the special variable...
If you'll look at the user box menu, the IP tracking link is the same -- doesn't get prettified at all.
I don't think it's a big deal for admins and mods to have non-prettified URLs, but I'll have to fix the bug that occurs when you click the link, I guess...!
Posted: May 10th, 2013, 05:21 PM
See, in English, sanction is a stronger word than punishment; I changed it to punishment for that reason.
In which case I'll just fix it to use , instead of : no biggie.
Fixed here, BTW! It was a logic error in QueryString.php, ah ah... Will commit later.
3020
Bug reports / Re: Infraction bugs
« on May 10th, 2013, 05:00 PM »In other news I am slightly concerned that I made screenshots of almost all of this stuff and it wasn't mentioned at the time when they contained the same wording.
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.
Posted: May 10th, 2013, 04:58 PM
But here's the weird part. The above post generates the URL:
profile/?u=1;area=infractions;warn;for=post:288772
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.
Not profile/Nao as would normally be generated, which makes it pull up *my* profile for some reason
@Nao, I'm really not comfortable touching pretty URLs code, so I'd like you to take a look at it but if that means altering the format to post.id rather than post:id, that's fine.
3022
Off-topic / Re: for(i=1;i<j;i++)
« on May 10th, 2013, 12:53 AM »
IE10 doesn't remove any markers, BTW ;)
Okay, bed time...
Okay, bed time...
3023
Features / Re: Miscellaneous/WIP screenshots
« on May 10th, 2013, 12:52 AM »
Eheh ;)
So I have your authorization to include these into the object, right..?
So I have your authorization to include these into the object, right..?
3024
Features / Re: New revs
« on May 10th, 2013, 12:49 AM »
rev 2106 -- just all my remaining fixes before going to bed.
(5 files, 2kb)
! In the end, IE7 *did* need that table layout rule... (index.css)
! And IE8 still had issues with its main menu. I finally figured that I needed to disable the filter for it to work. Uh... (extra.ie8.css)
* Translation. (PersonalMessage.french.php)
* Commenazi. (Security.php)
* Optimization of JS code. Saves 0 bytes. Happens even to me. (pm.js)
(5 files, 2kb)
! In the end, IE7 *did* need that table layout rule... (index.css)
! And IE8 still had issues with its main menu. I finally figured that I needed to disable the filter for it to work. Uh... (extra.ie8.css)
* Translation. (PersonalMessage.french.php)
* Commenazi. (Security.php)
* Optimization of JS code. Saves 0 bytes. Happens even to me. (pm.js)
3025
Features / Re: Miscellaneous/WIP screenshots
« on May 10th, 2013, 12:42 AM »
In SMF, all objects had prototypes, even if not used outside of the object. I turned most of them into self-contained this.function déclarations, for these reasons:
- it looks a bit better...
- it compresses better, sometimes much better
- these functions can access their parent's local variables, so no need for this.opt for instance... (dunno why it's still in this one.)
The only drawback is that it's supposed to consume more memory, but there's no point in worrying about that when you only create a couple of these objects per page... ;)
- it looks a bit better...
- it compresses better, sometimes much better
- these functions can access their parent's local variables, so no need for this.opt for instance... (dunno why it's still in this one.)
The only drawback is that it's supposed to consume more memory, but there's no point in worrying about that when you only create a couple of these objects per page... ;)
3026
Features / Re: Miscellaneous/WIP screenshots
« on May 10th, 2013, 12:24 AM »It all works but I just feel odd about its code :/
Anyway, @Nao or anyone else, any thoughts about presentation?
I'd recommend using text links instead of buttons, though -- this would make the box a bit less intrusive, mesays.
Will probably have a play with the source code...
May I ask why you took to add your functions through prototypes, rather than including them Inside the main object, like the rest...? A leftover from the SMF way of doing things? ;)
3027
Features / Re: Pruning old PMs
« on May 10th, 2013, 12:05 AM »
I'm still of the opinion that said 'pruning' should happen in conjunction with the sending of a PM archive by e-mail... e.g. one HTML file per conversation, maybe in 'print' mode, or something close to that.
IPB did it, and this is one of the few features from IPB 1.3 that I've always missed in SMF...
IPB did it, and this is one of the few features from IPB 1.3 that I've always missed in SMF...
3028
Features / Re: New revs
« on May 9th, 2013, 11:41 PM »
(What? Likes are broken?! I need to look into that code... Will have to do that tomorrow, though.)
rev 2105
(10 files, 6kb)
! Some fixes for popup dimming in oldIE, and removing support for responsive design in IE6/7, because it's just too messed up. Keeping it in IE8 because it's more sensible. Also fixed main menu position in IE8 (it still has a glitch, but I don't care at this point), and table-layout not being needed in IE 6/7. (Load.php, index.css, sections.css, Wine/extra.css)
! Had a hardcover responsive media query value left in... (extra.rtl.css)
! Some nbsp-related fixes. Basically, what happened is that I noticed in my Win XP virtual box that IE doesn't support Unicode 3.0 entities in there; the same in Windows 7 work fine. And any other browser in Win XP seems to work fine. So that's just that combination... I threw in mobile devices in the process, because I can't be sure whether they support it, as it's probably not too memory efficient, so whatever, it's just the pedantic French translator talking and making everyone else waste a CPU cycle with a str_replace that will wield no results. I'm odd. Pete, you have my authorization to add a language test before it, if you want, because it's unlikely any other translator will use my obscure entity... ;) (Subs-Template.php, Admin.english.php (sic), ManagePlugins.french.php, ManageSettings.french.php)
* More translations. And I'm far from finished, since I have ManageInfractions left to complete... Hmmmmmmmm. (ModerationCenter.french.php)
rev 2105
(10 files, 6kb)
! Some fixes for popup dimming in oldIE, and removing support for responsive design in IE6/7, because it's just too messed up. Keeping it in IE8 because it's more sensible. Also fixed main menu position in IE8 (it still has a glitch, but I don't care at this point), and table-layout not being needed in IE 6/7. (Load.php, index.css, sections.css, Wine/extra.css)
! Had a hardcover responsive media query value left in... (extra.rtl.css)
! Some nbsp-related fixes. Basically, what happened is that I noticed in my Win XP virtual box that IE doesn't support Unicode 3.0 entities in there; the same in Windows 7 work fine. And any other browser in Win XP seems to work fine. So that's just that combination... I threw in mobile devices in the process, because I can't be sure whether they support it, as it's probably not too memory efficient, so whatever, it's just the pedantic French translator talking and making everyone else waste a CPU cycle with a str_replace that will wield no results. I'm odd. Pete, you have my authorization to add a language test before it, if you want, because it's unlikely any other translator will use my obscure entity... ;) (Subs-Template.php, Admin.english.php (sic), ManagePlugins.french.php, ManageSettings.french.php)
* More translations. And I'm far from finished, since I have ManageInfractions left to complete... Hmmmmmmmm. (ModerationCenter.french.php)
3029
Features / Re: New revs
« on May 9th, 2013, 06:31 PM »
Was waiting for Pete to use that rev number... :P
rev 2102
(8 files, 8kb)
! Popup height fix didn't work properly on Android devices with a HD screen, due to screen.height being a wrong value for compatibility purposes, or something. Gave up and replaced with window.innerHeight, and I don't care if it's off by a few pixels... It shouldn't be. (script.js)
! Fixed error log's file viewer sometimes giving you a login confirm box. Because the popup wasn't designed to hold these, I've rewritten the admin check code to determine whether it's called from Ajax (as in the file viewer), and if yes, silently redirect the user to a full page. Better than a broken form, really..! (Subs-Auth.php)
- Removed forced windowbg on help popups; this would cause some bad styling when the popup is shown as a full page. This breaks styling on IE7, which I don't care about, because it just goes to show how IE7 is buggy... I'll fix that later, yay. (GenericPopup.template.php)
* More French translations. Fixed mc_warned_users_points string, which wasn't in the original commits (good thing I checked the English version for once...) (Errors, ManageInfractions, ManageTopics, ModerationCenter, Profile)
rev 2102
(8 files, 8kb)
! Popup height fix didn't work properly on Android devices with a HD screen, due to screen.height being a wrong value for compatibility purposes, or something. Gave up and replaced with window.innerHeight, and I don't care if it's off by a few pixels... It shouldn't be. (script.js)
! Fixed error log's file viewer sometimes giving you a login confirm box. Because the popup wasn't designed to hold these, I've rewritten the admin check code to determine whether it's called from Ajax (as in the file viewer), and if yes, silently redirect the user to a full page. Better than a broken form, really..! (Subs-Auth.php)
- Removed forced windowbg on help popups; this would cause some bad styling when the popup is shown as a full page. This breaks styling on IE7, which I don't care about, because it just goes to show how IE7 is buggy... I'll fix that later, yay. (GenericPopup.template.php)
* More French translations. Fixed mc_warned_users_points string, which wasn't in the original commits (good thing I checked the English version for once...) (Errors, ManageInfractions, ManageTopics, ModerationCenter, Profile)
3030
Features / Re: New revs
« on May 9th, 2013, 01:09 PM »
rev 2100
(6 files, 7kb)
* Merged two isAllowedTo calls into one. (ManageErrors.php)
! Fixed issues related to http-equiv refresh calls. One was a typo dating back to old SMG days I think; the other was conceptual: if you have a semicolon in your URL (which is likely given you're using Wedge, right..?), you don't *need* to turn it into an ampersand, you just need to surround the URL with single quotes... Yup, that was all... (Aeva-Gallery2.php, ManageMedia.php)
* More French translations. Also fixed an issue with 'pre-set' vs 'ad-hoc' in French. (Admin, ManageInfractions, Profile)
(6 files, 7kb)
* Merged two isAllowedTo calls into one. (ManageErrors.php)
! Fixed issues related to http-equiv refresh calls. One was a typo dating back to old SMG days I think; the other was conceptual: if you have a semicolon in your URL (which is likely given you're using Wedge, right..?), you don't *need* to turn it into an ampersand, you just need to surround the URL with single quotes... Yup, that was all... (Aeva-Gallery2.php, ManageMedia.php)
* More French translations. Also fixed an issue with 'pre-set' vs 'ad-hoc' in French. (Admin, ManageInfractions, Profile)