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.
5371
Features / Re: Multiple default skins?
« on April 25th, 2012, 01:37 PM »Works fine (Android 2.3, both stock browser and Opera Mobile tested), but the default font size could be a tad bigger.
BTW: Here is a very reliable, still relatively lightweight PHP class for detecting mobile devices. It pretty much detects everything you throw at it.
The code is also very, very tight now...
<?php
/**
* Wedge
*
* Mobile browser detector. Very simplistic code, based on an early version of Mobile_Detect (MIT license).
*
* @package wedge
* @copyright 2010-2012 Wedgeward, wedge.org
* @license http://wedge.org/license/
*
* @version 0.1
*/
class weMoDe
{
protected $devices = array(
'Generic' => 'mobile',
'iOS' => 'iphone|ipod|ipad',
'Android' => 'android',
'BlackBerry' => 'blackberry|rim tablet',
'Symbian' => 'symbian',
'Windows' => 'windows ce|windows phone',
'PalmOS' => 'palm|avantgo|plucker|xiino',
'Others' => 'kindle|silk|playstation|nintendo|wap|up.|bolt|opera mobi'
);
public function isMobile()
{
if (empty($_SERVER['HTTP_USER_AGENT']))
return false;
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
if (isset($_SERVER['HTTP_PROFILE']) || isset($_SERVER['HTTP_X_WAP_PROFILE']) || isset($_SERVER['HTTP_X_OPERAMINI_PHONE_UA']))
return true;
if (isset($_SERVER['HTTP_ACCEPT']) && (strpos($_SERVER['HTTP_ACCEPT'], 'text/vnd.wap.wml') !== false || strpos($_SERVER['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false))
return true;
foreach (explode('|', implode('|', $this->devices)) as $device)
if (strpos($ua, $device) !== false)
return true;
return false;
}
}
?>However, by now I'm not even sure this is the 'right' thing to do anymore.
Because what bothered me in the first place was: inability to store the result in the database (because, basically, your account isn't tied to your browser), or a cookie (I like it to stay as short as possible really...), then it struck me that I could simply use a session variable for that... 'Eh.' Actually, I've never (ever!) used $_SESSION before to store anything in my own code, but I should do it more often -- if only because it acts as a secondary cache where I can put complex calculations that don't need to be done on every single page.
What do you think...?
I've rewritten my (short) code to use the session. Seems to work. Maybe I should switch to Mobile_Detect 2.x and use sessions for it...
5372
Features / Re: Multiple default skins?
« on April 25th, 2012, 10:29 AM »
So... This morning I worked on (finally) adding a separate mobile theme setting to Wedge.
*Normally*, if everything goes well, you should be getting the Wireless skin by default if you visit Wedge on a smartphone or tablet (I know -- with the iPad 3 now sporting a larger resolution than most desktop monitors, it sounds silly to include that in the mobile mode as well... probably should add some media queries to compensate a bit...), and the Weaving skin by default if you visit it with a desktop browser. These two settings should be independent, i.e. you can set Weaving in mobile mode and set Wireless in desktop mode, although there's little point in doing that, and I don't think one can select their mobile skin for now. (I haven't tried... I'm pretty sure it won't work though :P)
Just wanted to know if it works for you...
(It works on my iPod Touch, obviously it'll work on any iPhone too.)
(Two quick ways to confirm it's Wireless: the font is bigger :P, and forum posts have the avatar on top rather than on the left/right.)
*Normally*, if everything goes well, you should be getting the Wireless skin by default if you visit Wedge on a smartphone or tablet (I know -- with the iPad 3 now sporting a larger resolution than most desktop monitors, it sounds silly to include that in the mobile mode as well... probably should add some media queries to compensate a bit...), and the Weaving skin by default if you visit it with a desktop browser. These two settings should be independent, i.e. you can set Weaving in mobile mode and set Wireless in desktop mode, although there's little point in doing that, and I don't think one can select their mobile skin for now. (I haven't tried... I'm pretty sure it won't work though :P)
Just wanted to know if it works for you...
(It works on my iPod Touch, obviously it'll work on any iPhone too.)
(Two quick ways to confirm it's Wireless: the font is bigger :P, and forum posts have the avatar on top rather than on the left/right.)
5373
The Pub / Re: Database Backup, Restore and Repair
« on April 25th, 2012, 07:48 AM »
We removed that feature last year. Our thinking is that you can't trust your data to a minor admin feature. There are third party pho scripts that do a much better job at that.
5375
Development blog / Re: This. Is. Crazy.
« on April 24th, 2012, 10:53 PM »
Not sure
But you can always install the latest AeMe now and it'll do the upgrade for you.
TE hasnt written an AeMe converter iirc. I'm not sure how we will deal with this.
But you can always install the latest AeMe now and it'll do the upgrade for you.
TE hasnt written an AeMe converter iirc. I'm not sure how we will deal with this.
5376
Features / Re: New revs
« on April 24th, 2012, 07:35 PM »
rev 1561
(5 files, 14kb)
* Rewrote quick message icon modification popup. The gzipped code for this object is now only 321 bytes, as opposed to the original ~1100. This also saves over 20% off the total gzipped filesize of topic.js. All of the CSS is now moved to the skin, as it should have been from the start. Also optimized MiniMenu (turned it into a single object as well), and a few other objects. (Display.template.php, Xml.template.php, sections.css, topic.js)
- Wedge will no longer mark a post as 'modified' if the user only changes its icon. That field should be there to notify users something important may have changed -- and an icon isn't that important. (JSModify.php)
@ Note: icon box's hover site has issues compared to earlier version (I'll fix it if I don't forget), and I removed the timer that removed the popup if hovering out for a while -- mainly for accessibility reasons, as it's not exactly a very wide popup to begin with...
(5 files, 14kb)
* Rewrote quick message icon modification popup. The gzipped code for this object is now only 321 bytes, as opposed to the original ~1100. This also saves over 20% off the total gzipped filesize of topic.js. All of the CSS is now moved to the skin, as it should have been from the start. Also optimized MiniMenu (turned it into a single object as well), and a few other objects. (Display.template.php, Xml.template.php, sections.css, topic.js)
- Wedge will no longer mark a post as 'modified' if the user only changes its icon. That field should be there to notify users something important may have changed -- and an icon isn't that important. (JSModify.php)
@ Note: icon box's hover site has issues compared to earlier version (I'll fix it if I don't forget), and I removed the timer that removed the popup if hovering out for a while -- mainly for accessibility reasons, as it's not exactly a very wide popup to begin with...
5377
Features: Miscellaneous / Re: Gravatar support
« on April 24th, 2012, 06:36 PM »
It's been around for a very long time really... Heck, my gravatar uses an e-mail address I haven't used in like 8 years...
And anyway: if Wedge outlives Gravatar, we'll release a version that removes them.
If Gravatar outlives Wedge, no problemo :P
And anyway: if Wedge outlives Gravatar, we'll release a version that removes them.
If Gravatar outlives Wedge, no problemo :P
5378
The Pub / Re: Bloc Madness
« on April 24th, 2012, 10:53 AM »
I went to have a look at his sci-fi website... Considering I am, myself, a fan of Blade Runner (which I watched countless times), I read his review of the movie... So, Bloc, just so you know... It's Blade Runner, not Bladerunner. Also, a third (!) of your article is devoted to reminding everyone that...Quote from Bloc I think it's disappointing to see someone claiming that when they love that movie so much... I suppose it's a combination of two separate events that got you confused:
1/ The (director's cut's) unicorn scene was allegedly taken from a Legend shoot. Legend is another Ridley Scott movie of that era, where the soundtrack was a classic orchestral piece written by Jerry Goldsmith and released as such in Europe. However in the rest of the world, the soundtrack was replaced by a new version written by Tangerine Dream (who are loosely connected to Vangelis in that they write predominantly progressive synthesizer music). So it's the other way around, but basically similar to your story.
2/ The Blade Runner soundtrack wasn't released until 1992 (IIRC -- I remember I bought what I "thought" was the Blade Runner OST in my teens, and then jumped on the real final sountrack back in '92 when they re-released the movie with the director's cut.) So, before that, there was a soundtrack, but it was re-recorded by a symphonic orchestra and only had a few of the themes (Tears in rain, Rachel's love theme, etc.) Maybe you thought the original Blade Runner theater release had this for a soundtrack -- it isn't the case. It's just that they never cared to release the proper soundtrack, and someone else went ahead and made their 'own' version...
At any rate, Blade Runner, as a movie, has always had the same soundtrack, for the last 30 years, and in every single country.
Just wanted to make it clear...
Initially the musical score was made by Vangelis, but was replaced with a more classical score right before the movie was released. Luckily the haunting synth soundscapes of Vangelis was added back in later releases of the movie.
1/ The (director's cut's) unicorn scene was allegedly taken from a Legend shoot. Legend is another Ridley Scott movie of that era, where the soundtrack was a classic orchestral piece written by Jerry Goldsmith and released as such in Europe. However in the rest of the world, the soundtrack was replaced by a new version written by Tangerine Dream (who are loosely connected to Vangelis in that they write predominantly progressive synthesizer music). So it's the other way around, but basically similar to your story.
2/ The Blade Runner soundtrack wasn't released until 1992 (IIRC -- I remember I bought what I "thought" was the Blade Runner OST in my teens, and then jumped on the real final sountrack back in '92 when they re-released the movie with the director's cut.) So, before that, there was a soundtrack, but it was re-recorded by a symphonic orchestra and only had a few of the themes (Tears in rain, Rachel's love theme, etc.) Maybe you thought the original Blade Runner theater release had this for a soundtrack -- it isn't the case. It's just that they never cared to release the proper soundtrack, and someone else went ahead and made their 'own' version...
At any rate, Blade Runner, as a movie, has always had the same soundtrack, for the last 30 years, and in every single country.
Just wanted to make it clear...
5379
The Pub / Re: Bloc Madness
« on April 24th, 2012, 08:32 AM »
Apparently, his account here was removed... Was it you, Pete?
Or did something happen? :P
Anyway...
Bloc's site? I don't think he planned 'anything'... He think he was just bored one day and built that. In a few weeks time he'll be bored again and so he'll remove his site for another few months...
Seriously, I have no idea how his, err, users, can still post nice messages about him over there, right after he re-opened his site after closing it for months... ::)
Nice design though. But what less can we expect of the Bloc? I've always considered him better than me in terms of pure design (and JUST that :P). I'm more interested in knowing when he'll start working on his people skills...
Or did something happen? :P
Anyway...
Bloc's site? I don't think he planned 'anything'... He think he was just bored one day and built that. In a few weeks time he'll be bored again and so he'll remove his site for another few months...
Seriously, I have no idea how his, err, users, can still post nice messages about him over there, right after he re-opened his site after closing it for months... ::)
Nice design though. But what less can we expect of the Bloc? I've always considered him better than me in terms of pure design (and JUST that :P). I'm more interested in knowing when he'll start working on his people skills...
5380
Archived fixes / Re: Buffer hook never called
« on April 24th, 2012, 08:20 AM »
Good :) See, I'm not that stupid :lol:
5381
Features / Re: New revs - Public comments
« on April 23rd, 2012, 09:21 PM »
Eh, you don't have any obligations to Wedge... ;)
5382
Off-topic / Re: How to center a div in the middle of the screen
« on April 23rd, 2012, 06:00 PM »
Yeah you don't, but it's cleaner to add it because vertical margins don't do anything when you set them to auto. 'margin: auto' might imply 'center horizontally and vertically' ;)
5384
Archived fixes / Re: Time offset (auto detect)
« on April 23rd, 2012, 05:58 PM »Ugh, that's the last time I rely on code posted on php.net :/
We have the browser's default language, yes. It's a starting point, perhaps, but I'd argue it's even more insane and effort intensive than using the list I already did, seeing how there's many different language codes, that's a couple of hundred in memory serves, and I *really* don't want to go through the codes to figure out what timezones might be applicable.
new Date().getTimezoneOffset() would get our timezone, and we'd just need to select the first entry in the select box that matches the timezone... (Only if no timezone is already selected, of course.)
Mind you, what's actually so wrong with a single dropdown? I can put in a nice graphical map if that would help?
Then again, I registered on a phpBB website today, and it had a timezone list, and oh hell, the actual option values are *timezone offsets*... Which is not exactly great for daylight savings ;)
5385
Features / Re: New revs - Public comments
« on April 23rd, 2012, 04:39 PM »
Committed that today :)
How do you like all the changes?
Hopefully I didn't break anything... I changed so many things...
Oh, and I'm not sure about the short notation... Not because I don't like it, but because I don't see anyone using a PHP 5.4-only feature (that otherwise will break a site) in generic software (i.e. not stuff you write for yourself) for many years...
How do you like all the changes?
Hopefully I didn't break anything... I changed so many things...
Oh, and I'm not sure about the short notation... Not because I don't like it, but because I don't see anyone using a PHP 5.4-only feature (that otherwise will break a site) in generic software (i.e. not stuff you write for yourself) for many years...