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
5056
Archived fixes / Re: Optimizing parse_bbc() and Aeva
« on May 30th, 2012, 04:09 PM »
What I could do is show the URL in case it's a site that isn't known to provide a back link. I can't do anything for the title itself, though, if I'm not going to keep the lookup code...
But I'm actually in a situation where I think that it's silly to offer hundreds of sites to embed from. It was nice at a time where I was working on it and I was trying to fit in Karl Benson's shoes, and he had a tendency to add anything that was asked of him... But we're now several years later, and I don't think any 'small' site ever really caught on, YouTube, Dailymotion and a few others are all the rage and what matters is to ensure that THEY work... So I actually changed the embed code for YouTube to provide HTML5 support (e.g. mobile stuff), and I'm seriously considering dropping the non-major lists. Although Wedge already disables them by default, so as long as you don't screw up in the admin area, it doesn't matter that much...

What is missing in Wedge, too, is the 'Large | Normal' list of links to increase the size of a YouTube video. I have absolutely no idea what happened to that... :(
Posted: May 30th, 2012, 04:03 PM

Oh, and one of the drawbacks of the lookup code, is that all URLs that are shown in plain view (http something) will be surrounded by url tags in the database, whereas SMF will leave them untouched.
It makes it faster to process these links from parse_bbc, though, so it can be seen as an advantage... But I don't think I could remove the 'smart' link detector from parse_bbc() if only because we'd have to turn them into url tags at SMF import time, and I don't know if it's a good thing to do... (Plus, what if there's a very large post filled with URLs? It may get broken in the process...)
Posted: May 30th, 2012, 04:06 PM

Oh... Forgot about one thing. Titles are used for media items when you put an external video. Wedge will extract the title and use it in the album... :-/
5057
The Pub / Re: The Cookie Law (in the UK at least)
« on May 30th, 2012, 01:44 PM »
What are you doing here anyway, feline? I thought you had no interest in Wedge "if you weren't given half of the rights over it"... :^^;:

As you would say, "To browser these website, it's necessary to give us cookies and explain yourself." :lol:
5058
Archived fixes / Re : Optimizing parse_bbc() and Aeva
« on May 30th, 2012, 01:40 PM »
So... I removed the autolink calls from everywhere in Aeva embedding.

Here are my conclusions:

- They're not needed AT ALL at runtime. Because Wedge already autolinks anything that's not autolinked...
- They're needed at posting time, but for only one reason: so that Aeva can detect any URLs and start looking them up (to retrieve titles, etc.)

Now, here's the thing. It seems that EVEN that is broken right now... Aeva will return some incorrect stuff in the process.
I don't know where, but I really broke something when I implemented Aeva into Wedge. Something that won't be fixed by just magically adding more things to the autolink stuff...

So, I have two solutions right now.
- Either I try and fix the bug by comparing AeMe and Wedge codebases,
- Or I just give up on lookups altogether -- if only because most 'important' websites these days offer a video link & title in the thumbnail. The only advantage that Aeva has over these, is that you can still see the video's title while watching it... Also, you can choose to simply copy the video URL instead of having to open the tab and then copying the URL. Things like that were important to me back then. I'm not so sure right now...

Opinions please?
5059
Features / Re: Rewriting the skin file parser...
« on May 29th, 2012, 05:31 PM »
Lulz yeah...

But there's hardly any reason to account for the replace keyword's position when already I'm getting the suffixes as an array...
Could simply test for implode(',', array_diff($suffix_list_from_this_file_that_has_a_replace_suffix, (array) 'replace'))...
5060
(And that's where my expertise stops dead... :P)
5061
Features / Re: New revs
« on May 29th, 2012, 05:25 PM »
rev 1599
(6 files, 2kb)

* Minor fixes to errorbox items. Also introduced a $subject_font variable for user names and board titles. Well, that's what I'm using it for anyway... (Admin.template.php, index.french.php, PersonalMessage.template.php, index.css, index.rtl.css, sections.css)
5062
Features / Re: Rewriting the skin file parser...
« on May 29th, 2012, 04:39 PM »
Well, that's the reason I asked. (I could use 'index.replace.ie6,ie7.css' but I'm not sure people would follow.)
I'm already getting the list of suffixes for a file -- I could just as well remove 'replace' from the array, and then do a search on all parent folders, get all files with the same radix, explode the suffix list and compare the arrays. (Perhaps doing a sort() before maybe? I don't think array(1, 2) == array(2, 1)...)

There also is the point of replacing non-suffixed files in the same skin. Like, 'custom.replace,ie6.css' could be a request to entire remove 'custom.css' when IE6 is used, and replace it with 'custom.replace,ie6.css'...
5063
Features / Re: Thought system
« on May 29th, 2012, 01:31 PM »
Alrighty.
5064
The Pub / Re: The Cookie Law (in the UK at least)
« on May 29th, 2012, 12:33 PM »
FYI the latest .Net issue has a couple pages on the cookie law. They mention the solution adopted by BT, too (implied consent.)
5065
Features / Re: New revs
« on May 28th, 2012, 09:05 PM »
rev 1598
(11 files, 13kb)

+ Added support for a 'custom.xml' skin file. Basically, you can quickly add a new setting to a skin without needing to create a sub-skin. For instance -- adding a css option for loading a Google web font that will be overriding another font through custom.css. You won't be able to say I didn't think of everything... (Subs-Cache.php)

* Optimized parse_bbc() in various areas, notably to use a new $tag['len'] variable from the database instead of calculating it every time through strlen(). It doesn't save a lot overall, but it's also a very cheap new database field -- you can set it through 'update bbcodes set len = length(tag)'... (Subs-BBC.php)

* Saved some time when preprocessing media tags -- php and nobbc tags already pre-protect the tags so there's no need to test for them. Merged all preg_replaces into one, which makes the call a bit faster if you mix code, noembed and/or html tags in one post. Okay, it's not like I'm saving more than a microsecond... So what? Also optimized the media tag parser itself, for similar speed improvements... Meh. I did the work, so I have to commit it. (Subs-Media.php)

! Fixed Google Maps embedding (due to them now using HTTPS...) Looks like the embed code fixer is broken, I'll have to look into it another time. (Subs-Aeva-Sites.php)

! SMF bug (minor): max_image_width and max_image_height were both expected to be set, even though the later code will still test for them independently. (Subs-BBC.php)

- Removed support for the fixLongWords option, as it's now systematically enabled through CSS. (install.sql, ManagePosts.php, Subs-BBC.php, Admin.language.php, Help.language.php)

- Removed a few footer tags from the bbcode list, whenever they weren't used at all in the final CSS/HTML. Fixed margins around and inside quotes. (install.sql, index.css)

@ Of recent memory, this rewrite of Subs-BBC.php is my biggest disappointment... I was really hoping to optimize it a lot, until I realized it really didn't need optimizing that much. What a waste of time! Is that 'len' field really worth it..?
5066
Features / Re: New WYSIWYG editor..?
« on May 28th, 2012, 06:58 PM »
I used devpack on my atari ST.
Now that was old. But not wys.
5067
Features / Re: New WYSIWYG editor..?
« on May 28th, 2012, 06:08 PM »
I'm old enough to have used Write.exe for years...
5068
Archived fixes / Re : Optimizing parse_bbc() and Aeva
« on May 27th, 2012, 10:17 PM »
Bah. Starting to think I wasted my time with all my tiny rewrites. And the db change. Maybe I should just revert locally...
5069
Archived fixes / Re : Optimizing parse_bbc() and Aeva
« on May 27th, 2012, 09:24 PM »
I made a comparison between a Wedge and a SMF board, benchmark based on real use for parse_bbc() etc, and... I get pretty much the same results. A bit better for Wedge, but not by more than 20% or so, and we're talking about times less than a millisecond...

I'm really starting to wonder what the fuss was about parse_bbc performance, really. Or maybe it's because servers back in 2003-2007 were shitty compared to now... (or PHP.)
5070
Other software / Re: PHP 5.4 bug, mods/plugins with hooks
« on May 27th, 2012, 08:52 PM »
Nope. And no plans for now...