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.
5656
Off-topic / Re: Gallery Effects
« on October 31st, 2011, 02:06 PM »
The most well known is Highslide, but Wedge has its own ;)
5657
Features / Re: New revs
« on October 31st, 2011, 12:14 PM »
(1 modified, 4KB)
Revision: 1140
Author: arantor
Date: 11:14:19, 31 October 2011
Message:
! If the error was logged by the code itself rather than an actual error condition, identify the file it came from for the purposes of plugin detection but dump it after that to avoid clogging the DB. (Errors.php)
----
Modified : /trunk/Sources/Errors.php
Revision: 1140
Author: arantor
Date: 11:14:19, 31 October 2011
Message:
! If the error was logged by the code itself rather than an actual error condition, identify the file it came from for the purposes of plugin detection but dump it after that to avoid clogging the DB. (Errors.php)
----
Modified : /trunk/Sources/Errors.php
5658
Features / Re: New revs - Public comments
« on October 31st, 2011, 12:12 PM »
In other news, remember I said about the ob_sessrewrite rewriting stuff being split up into multiple functions for clarity? I found another reason I would do that, or at least part of that.
Specifically, I'm working on WedgeDesk a bit, and there's a point where a link to a user's profile might be retrieved via AJAX. But because it's sent back via AJAX, the user name isn't reformatted.
Now, I know I can invoke the output buffer callback manually but when the entirety of what I'm sending back is:
Code: [Select]
...it almost doesn't seem worth invoking the entire buffer operation for that.
Specifically, I'm working on WedgeDesk a bit, and there's a point where a link to a user's profile might be retrieved via AJAX. But because it's sent back via AJAX, the user name isn't reformatted.
Now, I know I can invoke the output buffer callback manually but when the entirety of what I'm sending back is:
<?xml version="1.0" encoding="UTF-8"?><response><item><![CDATA[<a href="http://smf/wedge/index.php?action=profile;u=1">Arantor</a>]]></item></response>...it almost doesn't seem worth invoking the entire buffer operation for that.
5659
The Pub / Re: Error reporting with app-issued errors
« on October 31st, 2011, 10:10 AM »
On a separate note, do we really need the session id in the error log?
I cringe every time someone posts that on sm.org, because if we have their URL, we can trivially steal their session if the id's fresh.
I cringe every time someone posts that on sm.org, because if we have their URL, we can trivially steal their session if the id's fresh.
5660
The Pub / Error reporting with app-issued errors
« on October 31st, 2011, 09:52 AM »
This bit me in the arse today.
Errors that are genuine errors and tracked through PHP's error handler will have file and line numbers attached because they're passed from PHP itself. But errors issued through fatal_lang_error and fatal_error, that when passed to log_error... they will not have file and/or line numbers.
There's a certain logic to that, actually, in that there's not really a need to pack out the DB with file/line numbers when it's issued by the code itself in response to a user event/other failure condition, rather than an 'error' in the classical sense.
Trouble is, this also means plugins that call fatal_lang_error also won't get logged as being under their plugin unless they specifically pass their plugin id to the error handler, which is kludgy at best.
There's two courses. Either way I can grab the backtrace and get the file/line it came from. The question, really, is whether for general errors (rather than undefined variables etc) that the file and line should be logged. From a debugging perspective it'd be useful, but I'm not sure the user needs to be presented with the file/line every time.
What I'm going to do for now is to keep it mostly as it is, but if no file is found, grab the filename, identify if it's a plugin or not, and then bar logging the file/line number. But the option's open if people want it.
(I'm also debating providing the full backtrace in the error log for debugging purposes, which would be very useful sometimes.)
Errors that are genuine errors and tracked through PHP's error handler will have file and line numbers attached because they're passed from PHP itself. But errors issued through fatal_lang_error and fatal_error, that when passed to log_error... they will not have file and/or line numbers.
There's a certain logic to that, actually, in that there's not really a need to pack out the DB with file/line numbers when it's issued by the code itself in response to a user event/other failure condition, rather than an 'error' in the classical sense.
Trouble is, this also means plugins that call fatal_lang_error also won't get logged as being under their plugin unless they specifically pass their plugin id to the error handler, which is kludgy at best.
There's two courses. Either way I can grab the backtrace and get the file/line it came from. The question, really, is whether for general errors (rather than undefined variables etc) that the file and line should be logged. From a debugging perspective it'd be useful, but I'm not sure the user needs to be presented with the file/line every time.
What I'm going to do for now is to keep it mostly as it is, but if no file is found, grab the filename, identify if it's a plugin or not, and then bar logging the file/line number. But the option's open if people want it.
(I'm also debating providing the full backtrace in the error log for debugging purposes, which would be very useful sometimes.)
5661
Features / Re: New revs - Public comments
« on October 30th, 2011, 08:49 PM »
That's... interesting since I didn't change any of the logic, just unwrapped the ifs in them. I'll take a look in a bit.
5662
The Pub / [Archive] Re: Logo Madness
« on October 30th, 2011, 07:04 PM »
Well, it is a blurry font but because of how it was made, not because it was trying to be a 19th Century style by design. The story is rather interesting, actually.
5663
The Pub / [Archive] Re: Logo Madness
« on October 30th, 2011, 05:17 PM »
Interesting idea to play with: http://iotic.com/averia/
5664
Plugins / Re: Plugin CSS added to the main list?
« on October 30th, 2011, 04:33 PM »
OK, the issue as was originally pointed out is that calling add_plugin_css_file will create a new file in the cache, rather than integrate it into the main single CSS file.
There are both good and bad points to this, and it sort of bothers me that it would be left to plugin authors. If you add it on every page without fail, e.g. there is a bandwidth benefit yo getting it into every single CSS file that's cached, with the downside is that cache evaluation goes up every page as extra paths are evaluated.
On the other hand, if you indicate an extra file to be loaded, that goes through the minifier and is then essentially cached with a long life time on it, but it is a second HTTP request. Now, that might not be best, but I'd argue it might be preferable to the hordes of cached CSS files.
Right now, for example, I as a logged in Chrome user get chrome-member built. It's also possible that I might have triggered the guest version for Chrome also to have been cached. Then I add a style sheet that appears to both guests and members, but not every page.
Now I have chrome-guest, chrome-member, plugin-chrome-member, plugin-chrome-guest. Now multiply that by permutations based on browser sheets, and plugin combinations that might emerge. 3 plugins with their own stylesheets that may or may not be loaded at the same time gives you 8 permutations of CSS, multiplied by guest/member, multiplied by browser branches.
I figured it wasn't worth the effort and that it was better not to go down that road at all.
There are both good and bad points to this, and it sort of bothers me that it would be left to plugin authors. If you add it on every page without fail, e.g. there is a bandwidth benefit yo getting it into every single CSS file that's cached, with the downside is that cache evaluation goes up every page as extra paths are evaluated.
On the other hand, if you indicate an extra file to be loaded, that goes through the minifier and is then essentially cached with a long life time on it, but it is a second HTTP request. Now, that might not be best, but I'd argue it might be preferable to the hordes of cached CSS files.
Right now, for example, I as a logged in Chrome user get chrome-member built. It's also possible that I might have triggered the guest version for Chrome also to have been cached. Then I add a style sheet that appears to both guests and members, but not every page.
Now I have chrome-guest, chrome-member, plugin-chrome-member, plugin-chrome-guest. Now multiply that by permutations based on browser sheets, and plugin combinations that might emerge. 3 plugins with their own stylesheets that may or may not be loaded at the same time gives you 8 permutations of CSS, multiplied by guest/member, multiplied by browser branches.
I figured it wasn't worth the effort and that it was better not to go down that road at all.
5665
Features / Re: New revs - Public comments
« on October 30th, 2011, 04:22 PM »
I added it because the time is expressly queried when fetching the list of messages (and posters, as a by product)
It's used in relation to the double post merging, I believe.
It's used in relation to the double post merging, I believe.
5666
Plugins / Re: Plugin CSS added to the main list?
« on October 30th, 2011, 04:36 AM »
Hmm, this does solve one issue that Nao mentioned to me, that plugin CSS files weren't integrated into main CSS files (which I thought was a bad idea generally, on the basis that different plugins firing different files meant you might generate a great many cached files without realising it) - though it would solve the problem I had about top level menu items not being extensible without work.
However, I can see the logic of what you're doing. Define "not very efficient". What this will cause to happen is a test made every page load to the CSS files being requested, to see if they have been defined or not, but it'll be for all the files in the current stack (if I understand it correctly)
However, I can see the logic of what you're doing. Define "not very efficient". What this will cause to happen is a test made every page load to the CSS files being requested, to see if they have been defined or not, but it'll be for all the files in the current stack (if I understand it correctly)
5667
Features / Re: New revs - Public comments
« on October 30th, 2011, 02:10 AM »
I fixed the comma issue in r1138.
The template layer issue I referred to (that you asked about in the notes on r1137) stems from what happens in the event that a template layer is empty. The post was in http://wedge.org/pub/off/6980/battlefield-3/msg269815/#msg269815
I don't seem to have a problem if the array is defined with some content up front, or with ::layer, but it gets upset if it's declared in a master wetem::load call as an empty array.
On a related note, I have a case where I'm defining a container layer, which has before and after content, but that there may or may not be content added to that layer, and because that container is designed to be hookable, I see two routes. Either the plugin (of a plugin) tests for layer existence and re-adds it if necessary, or I create the layer by default, let hooks run, then have some kind of is-empty test on the layer, and if so, remove the layer.
I'm not sure whether it's necessary to have the is-empty test because I do have the ability to test and add if necessary but it seems that it might be nicer to be able to check is-empty status to allow things to do cleanup. (I'm not really fussed if it isn't implemented)
The template layer issue I referred to (that you asked about in the notes on r1137) stems from what happens in the event that a template layer is empty. The post was in http://wedge.org/pub/off/6980/battlefield-3/msg269815/#msg269815
I don't seem to have a problem if the array is defined with some content up front, or with ::layer, but it gets upset if it's declared in a master wetem::load call as an empty array.
On a related note, I have a case where I'm defining a container layer, which has before and after content, but that there may or may not be content added to that layer, and because that container is designed to be hookable, I see two routes. Either the plugin (of a plugin) tests for layer existence and re-adds it if necessary, or I create the layer by default, let hooks run, then have some kind of is-empty test on the layer, and if so, remove the layer.
I'm not sure whether it's necessary to have the is-empty test because I do have the ability to test and add if necessary but it seems that it might be nicer to be able to check is-empty status to allow things to do cleanup. (I'm not really fussed if it isn't implemented)
5668
Development blog / Re: Banning, and what I want to do with it
« on October 30th, 2011, 02:06 AM »
Ah, I look less at the substance and more of the form. I tend not to look at the code of others unless I have to, but I do look at what is provided and how it operates.
5669
Features / Re: New revs
« on October 30th, 2011, 01:19 AM »
(3 modified, 3KB)
Revision: 1138 (a certain cell number comes to mind!)
Author: arantor
Date: 00:19:07, 30 October 2011
Message:
! Fix a typo in the plugin manager, as advised by live627. (ManagePlugins.php)
! Provide a hook for extending the types of plugin validation, as suggested by TE. (ManagePlugins.php, Login2.php)
! Provide a hook for altering the list of posts to be retrieved, as suggested by live627. (ManagePlugins.php, Display.php)
----
Modified : /trunk/Sources/Display.php
Modified : /trunk/Sources/Login2.php
Modified : /trunk/Sources/ManagePlugins.php
Revision: 1138 (a certain cell number comes to mind!)
Author: arantor
Date: 00:19:07, 30 October 2011
Message:
! Fix a typo in the plugin manager, as advised by live627. (ManagePlugins.php)
! Provide a hook for extending the types of plugin validation, as suggested by TE. (ManagePlugins.php, Login2.php)
! Provide a hook for altering the list of posts to be retrieved, as suggested by live627. (ManagePlugins.php, Display.php)
----
Modified : /trunk/Sources/Display.php
Modified : /trunk/Sources/Login2.php
Modified : /trunk/Sources/ManagePlugins.php
5670
Development blog / Re: Banning, and what I want to do with it
« on October 30th, 2011, 12:23 AM »Oh... yeah, I do. But some Baidu engines still get through. Is it possible that some Baidu spiders do pass the Accept header?
You can't own ideas anyway.
Not that I look into others' work. So I don't bother.