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 - Nao
5611
Archived fixes / Re: Smart Tag Closer
« on April 4th, 2012, 11:05 AM »
Oh, a fixed bug... Gone to archived now, gone.
5612
Features / Re: timeformat annoys me...
« on April 4th, 2012, 10:57 AM »
Yup.
BTW the SVN version is buggy (it no longer supports Today/Yesterday), it's just a matter of one line to move down, I fixed it here yesterday but haven't yet got around to committing it...
5613
Other software / Re: Connection error
« on April 4th, 2012, 08:32 AM »
I'm fine with such a policy. I don't mind supporting our regular posters but we aren't even a SMF community in its purest sense ;)
5614
Development blog / Re: Back in the Saddle
« on April 3rd, 2012, 11:58 PM »
Definitely is! :)
5615
Plugins / Re: Which next? [Poll]
« on April 3rd, 2012, 11:00 PM »
Quote from Arantor on April 3rd, 2012, 06:32 PM
It depends how much inelegance you'd be prepared to put up with, and possible performance issues. It would be possible to add a flag in when the tag is detected to be 'nofollow' and reset it when closed, and use that flag in conjunction with the validate function for URL tags. But not the best way it could be handled.
Scratch that.
Could be done through a post-group permission... (Easiest example.)
When showing a post, if they don't have permission to get rid of nofollow, go through the anchor tags in the post and add a nofollow.
I'm not sure it's the best option (especially, where do we determine the permission for the *author* rather than the current user...?), but it's better than a nofollow tag which itself is unlikely to be used by anyone... (If you don't want to give PR juice to someone, then just don't link to them. Or use a code tag around the link...)
Quote
I'd personally rather it be rewritten to be the same structure and style as other uses of the generic menus,
Let me explain. There are two menus in AeMe, basically.
- The admin area's menu, which basically does things the same way as other areas do,
- And the media area's menu, which itself is built entirely on custom URLs and won't show contextual tabs for that reason.

I rewrote the media area menu to show said tabs, but it's not working perfectly. You can already have a look here (only works on the Moderate section, though, as Admin redirects to the admin area, Albums only show one tab, and Home doesn't show anything.)
I still need to replace the 'Media' we:cat's with a we:cat that says the actual section name (it used to, it just won't for now...)

Now, the question would be: is there a point in offering contextual tabs in the media area...? I think there is, but OTOH, perhaps it takes space in the upper area that would be better used by something else... (And if I start adding a 'description' for each entry, they'll take even more space I guess. But a description would be nice for some areas like Add Album...)
Quote
which also means it would be possible to cleanly extend it with hooks etc. if authors want to do so.
Well, I suppose it's all automated even in the current SVN version...?
It's just that the contextual tab code is a bit messy. I think it's because Dragooon wrote it back when he wanted to support SMF1 as well... And I've always hated the code for contextual tabs (you need a PhD to decrypt it), so no one bothered to change it again.
Quote
I can't see = ever being used properly in a selectbox
No, but using it in an input box could lead Wedge to open a list of boards in a select box to a section that says "===> Board"... Although I don't think there should be any case of this happening.
Quote
(outside the admin panel in which case people are almost certainly not using the keyboard). But yeah, I agree that removing focus would be better.
Oh oh... This means I'll have to look into my sbox code again... :P
5616
Features / Re: New revs
« on April 3rd, 2012, 10:45 PM »
rev 1536
(3 files, 1kb)

* Minor optimizations to timeformat(). Most notably, logic dictates that the setlocale code block should only be executed when lang_capitalize_dates is set, because otherwise the 'tokens' are converted in the final strftime() anyway. This seems to make my call to timeformat() about twice faster overall. My guess is that the SMF team didn't realize that because the English version always goes through the loop anyway. (Subs.php)

+ Added yet another exception to the 404 error list. Any files starting with /Themes/default/images/ are probably remainders of an SMF install called by Google Cache or equivalent, and should be ignored. (QueryString.php)

! If a button's class is set but empty, a useless space will be added at the end of the class list... (index.template.php)
5617
Features / Re: timeformat annoys me...
« on April 3rd, 2012, 10:45 PM »
I couldn't do much to optimize, in the end... Until I found out that non-English installs may benefit from just skipping a replacement loop that makes the time string go through multiple strftime calls :)

Made 10.000 loops and the new version executed in .12s in average, versus .3s for the 'full' version.
Of course it's VERY fast in both cases... You're right, I probably wasted my time lol.
5618
Features / Re: timeformat annoys me...
« on April 3rd, 2012, 09:22 PM »
What I was thinking was calculating the minimum date to have a full date, not a shortcut. Then the minimal date to have a year added. That's two milestones. We could cache date formats if a date is found to be in that threshold.

Maybe I'm wrong though...
5619
Features / Re: timeformat annoys me...
« on April 3rd, 2012, 06:08 PM »
Quote from Arantor on April 3rd, 2012, 04:38 PM
What calculations, exactly, can you cache between calls for the life of the page?

In a typical page, you're calling it ~20 times, each with a different time each time.
Except there are only two different time formats (or so), the regular one and the Today/Yesterday shortcut... (And the year-free version, too... Hmm.)
Quote
It's also potentially different for different users, further eroding the value of cache, no?
Life of the page, as we said. So it's once per user...
Posted: April 3rd, 2012, 06:08 PM

What do you think about the %e issue, Pete?
5620
Plugins / Re: Which next? [Poll]
« on April 3rd, 2012, 06:06 PM »
Quote from Arantor on April 3rd, 2012, 06:01 PM
As it finds them. It steps through the post, looking for each instance of a ], and parses as it finds, with the exception of code tags which are handled separately - first.
So, I guess it could be done only by parsing nofollow tags after all other tags, like for the footnote tag...
Quote
It's a good idea, but I think it should also be an option too.
Of course. And you know how I hate manipulating UI stuff... :P

Oh, speaking of UI... The Media area's menu is pretty fucked up when it comes to doing contextual tabs. Because it's made up of various sections that aren't physically linked, it's not possible to automatically generate the contextual tabs through template_generic_tabs or whatever. I had to add a 'force_tabs' option to 'skip' looking through the menu array and just use whatever data force_tabs provides instead. Still, it's broken... I don't know if there's much of a point in doing that.
My main concern was that AeMe uses template_button_strip to basically show what is a contextual tab strip of related areas in the menu... Meh.
Any opinion?
Quote
There aren't that many keys you really need to worry about, 0-9 and A-Z are really it, rather than any printable character.
Maybe "=", too... Things like that...
Anyway, I think I should just remove focus, like a regular sbox.
5621
Off-topic / Re: How to center a div in the middle of the screen
« on April 3rd, 2012, 05:57 PM »
CSS inheritance is fun... Just on Wedge.org I've been having trouble with Wine all day. Well, not that much but it annoys me a bit that when I do a change on Weaving, I don't always think of the consequences on inherited skins... Silly me. Although one of the changes was actually for the better, I think.
5622
Plugins / Re: Which next? [Poll]
« on April 3rd, 2012, 05:56 PM »
Quote from Arantor on April 3rd, 2012, 04:50 PM
Of that list...
* nofollow bbcode - what exactly should it do? There's a lot more to it than simply adding the base bbcode, it is essentially duplicating the url bbcode including all the preparsing and calls to fixTags.
I was thinking of a tag that would turn all links *inside* its contents to nofollow... Should be rather easy to take the body, and do a regexp on it... (Although it would have to be done last. And I'm not sure whether Wedge converts tags as it finds them, or by nesting level, and even then, top-level or low-level first..?)
Quote
* merging likes - yeah, I forgot about that. I'll look at that shortly, should be relatively quick to implement.
Yep ;)
Quote
* smartphone/tablet icons should be doable enough; the user agent is stored in the log_online table when the action is also logged, so it's not as if it's a huge ask to figure that out, really. Might be nice, actually.
Yeah, sometimes I have nice little ideas like that... :eheh:
It's the kind of thing that could help socially... "Okay I've sent this guy a PM, he's online but why isn't he replying...?"
---- Because it sucks to answer a PM or anything with quotes on a smartphone :P
Quote
* A-Z keystrokes, yeah, that's bitten me when I've set a different privacy and forgotten to click on the textbox again, heh.
Yes, and in iOS mode it's worse -- if you select a privacy and then type a thought, it'll reopen the select box. This is because Wedge doesn't remove focus from the select box when it's closed. It was actually a personal preference -- I thought that in terms of UI, it behaved more logically for people who used a keyboard. And indeed it works when you use tab to get out of the box. But if you click, it doesn't always focus it out... Maybe it's ONLY an iOS bug, I don't know.
Quote
But it needs to be 0-9 plus A-Z, since I can well imagine numeric entries as well as textual ones
Any key > 0x20, really...
Quote
* resize JS... that does depend on whether Zoomedia is used or not, really, since it may or may not be applicable then.
Indeed. It was more of a... transition before doing the Zoomedia stuff.
5623
Features / Re: timeformat annoys me...
« on April 3rd, 2012, 04:23 PM »
Wouldn't work for users who already have a timeformat set up would it..?
5624
Off-topic / Re: How to center a div in the middle of the screen
« on April 3rd, 2012, 04:05 PM »
That'll be $200! Check or credit card?
5625
Off-topic / Re: How to center a div in the middle of the screen
« on April 3rd, 2012, 03:53 PM »
Quote from MultiformeIngegno on April 3rd, 2012, 03:41 PM
Quote from Nao on April 3rd, 2012, 02:57 PM
Hey. Was looking at your code, and... Where's the table-cell definition on #page? Where's the vertical-align?
Yay!! Now it finally works!!!!! :cool: :cool: :cool:
There weren't a lot of lines to copy, really... You could have been careful :lol:
Quote
Really latest question: now that everything works, the only thing that remains is the horizontal align :P
I tried with a text-align:center on #page but nothing.. I can't use a position:absolute;left:50% + negative margins because the vertical align wouldn't work anymore...
Hmm, I think it would still work, but if you have a constant width for your site (which is required to do negative margins), you could just as well use other techniques...
No, text-align:center would be enough but you can also simply try "margin: 0 auto" on the #page (or the #wrapper). Make sure whatever gets the margin isn't set to a width of 100%, though.