by Sebastian Schürmann
27. Februar 2009
No Comment
http://github.com/sebs/laconica/tree/master
The github (sf.net clone) has one big difference in the ui: a button called fork.
You simply copy any repo. into your own and fork it. The result is public so it follows the open source idea quite well.
by Dominik Jungowski
24. Februar 2009
Comments (8)
Today I was working on a Top 100 List with pagination. I thought a quite sensible way would be to use ordered lists, so I don't need to take care of displaying the place myself. Working with pagination I was looking for a way to start the values of the ol-items at #51 on page 2, #101 on page 3 and so on. Searching at W3C directly, I came across this page: http://www.w3.org/TR/html401/struct/lists.html#h-10.2. According to it, <ol> has start attribute, and <li> has a value attribute, which would give me the following to possibilities:
<ol start="51">
<li>Product Name</li>
</ol>
<ol>
<li value="51">Product Name</li>
</ol>
But there is one stupid disadvantage these 2 attributes have: The attributes are marked as deprecated (and even on a page for HTML4). Following the link on the word Deprecated I found this W3C-own definition:
A deprecated element or attribute is one that has been outdated by newer constructs. Deprecated elements are defined in the reference manual in appropriate locations, but are clearly marked as deprecated. Deprecated elements may become obsolete in future versions of HTML.
User agents should continue to support deprecated elements for reasons of backward compatibility.
Definitions of elements and attributes clearly indicate which are deprecated.
This specification includes examples that illustrate how to avoid using deprecated elements. In most cases these depend on user agent support for style sheets. In general, authors should use style sheets to achieve stylistic and formatting effects rather than HTML presentational attributes. HTML presentational attributes have been deprecated when style sheet alternatives exist (see, for example, [CSS1]).
Meaning: If start and value are deprecated there HAS to be another way to achieve this. After hours of searching I found out that there seems to be no alternative. The only valuable thing I found was this page about ordered lists that confirmed my apprehension (btw. same goes for the li value attribute):
Compatibility Notes
The start attribute of the ol element was deprecated in HTML 4.01, and is not supported in XHTML 1.0 Strict DTD.
Note: At the moment, there is no CSS alternative for the start attribute.
That was the moment I said: "F*ck it, I'm going to use it anyway" just to find out 5 minutes later, that the Internet Explorer is too dumb to use it correctly. For some microsoftish reason the numbers IE shows are totally wrong, no matter if I used start or value. I encountered missing numbers and when he got to 99 he sometimes commenced at 100, sometimes at 0(!).
This is so great. Thanks to everyone at W3C and Microsoft.
by Dominik Jungowski
23. Februar 2009
Comments (3)
The Zend Controller Router allows you to easily create your own routes. That is very useful, but it seems rather unknown, that you can also use these routes to generate URLs according to their definition.
Let's assume you have a route like this:
$controller = Zend_Controller_Front::getInstance();
$router = $controller->getRouter();
$productRoute = new Zend_Controller_Router_Route(
':pid/:name',
array(
'module' => 'default',
'controller' => 'product',
'action' => 'show'
),
array(
'pid' => '\d+'
)
);
$router->addRoute('productpage', $productRoute);
In this route we parse a URL that is supposed to show a product page. The URL will look like http://www.phpdevblog.net/4815162342/Microsoft+Windows+XP+Professional for example. The Router would explode it into pid=4815162342 and name="Microsoft Windows XP Professional"
To generate a URL with the help of the Router you simply need to call the assemble method, which you can either call from the router or the definied route, but keep in mind that you will get different results!
From the router the assemble would look like this:
$link = $router->assemble(
array(
'pid' => '4815162342',
'name' => 'Microsoft Windows XP Professional'
),
'productpage'
);
The result of this method is /4815162342/Microsoft+Windows+XP+Professional
The only difference, if you call the assemble method from the defined route, is that you don't need the route name in the second parameter:
$link = $productRoute->assemble(
array(
'pid' => '4815162342',
'name' => 'Microsoft Windows XP Professional'
)
);
Here the result is 4815162342/Microsoft Windows XP Professional
by Dominik Jungowski
18. Februar 2009
No Comment
Unfortunately there is an annoying bug in DNS Cache 1.3: It doesn't work if you don't enable the main panel icon. The bug is fixed now, you can install DNS Cache 1.4 directly from here. The Firefox Addons Page should be updated within the next few days.
If you've experienced problems with Version 1.3 (clicking on the icon in the statusbar had no effect), please follow these 4 easy steps after/before installing Version 1.4:
- Open about:config
- Filter for "network.dns"
- Right-Click on "network.dnsCacheEntries" and select "Reset"
- Right-Click on "network.dnsCacheExpiration" and select "Reset"
by Dominik Jungowski
9. Februar 2009
No Comment
I just released the latest version of my DNS Cache extension for Firefox. The changelog is rather short:
- New: Statusbar Icon
- Improved Image Quality of the main panel icons
You can install it directly from here. I already submitted the new version to the Mozilla addons page, but it's still in the sandbox. You can install it from there too anyhow, if you follow this link and then click on "Show all versions" and then select Version 1.3 for installation.
by Dominik Jungowski
9. Februar 2009
One Comment
Here's a short list of useful Firefox addons for web developers:
Firebug
Probably the most useful addon around. You cannot only change the whole page on the fly (HTML and CSS) but you also have the very useful Javascript console which can even be used by your application for debugging. Furthermore you can see all AJAX activities. Download at https://addons.mozilla.org/de/firefox/addon/1843
FirePHP
FirePHP allows you to send debug messages to Firebug through a PHP Script. Download at https://addons.mozilla.org/de/firefox/addon/6149
Greasemonkey
Greasemonkey allows you to create JavaScript scripts for specific or all websites (Use of wildcard * possible!). This can be very useful to either test how new scripts would integrate into your website or to change the look and behaviour of any other webseite. Download at https://addons.mozilla.org/de/firefox/addon/748
Stylish
Same as Greasemonkey only for CSS. This way you can easily test new styles on a website before integrating them. Download at https://addons.mozilla.org/de/firefox/addon/2108
Web Developer
The classic one. Allows you to easily change behaviour of your browser (caching, JavaScript, etc.) and has a whole lot of other useful tools like showing document size, the styles, submitting the page to the W3C Validator, Browserframe resize (to test your application for specific resolutions), viewing response headers, outlining specific elements and so on. Download at https://addons.mozilla.org/de/firefox/addon/60
Search Status
Although it also shows the page rank (not very reliable), I only use this addon to display all the nofollow links on a page, which is really extremely useful. Download at https://addons.mozilla.org/de/firefox/addon/321
DNS Cache
My own Firefox extension that allows you to disable the DNS caching of Firefox, which comes in quite handy when you have to check your webservers quickly. For a more detailed description see here. Download at https://addons.mozilla.org/de/firefox/addon/5914
by Sebastian Schürmann
4. Februar 2009
No Comment
Quoting from http://qa.php.net/testfest.php
TestFest 2009
The TestFest is an event that aims at improving the code coverage of the test suite for the PHP language itself. As part of this event, local User Groups (UG) are invited to join the TestFest. These UGs can meet physically or come together virtually. The point however is that people network to learn together. Aside from being an opportunity for all of you to make friends with like minded people in your (virtual) community, it also will hopefully reduce the work load for the PHP.net mentors. All it takes is someone to organize a UG to spearhead the event and to get others involved in writing phpt tests. The submissions will then be reviewed by members of php.net before getting included in the official test suite.
Fine, the next event is on its way. I hope there is a thing at Liip offices Zurich again, but instead of just raiding Pierres (Munich) home again i hope to get some resources from my company.
- There is need for download space, I guess we can provide that. Our website has lots of bandwith.
- Maybe Burda can provide an Open Space to use for 2 days. The CXO offices turned out little tricky to use but this time i try to get the new cafe they opened just for reasons like this
- I hope some people from the team will join the effort
We'll see what happens ;) Last Year was a lot of fun and a lot of learning. I hope i can provide one or two Tests with more sense than last year.
by Dominik Jungowski
3. Februar 2009
No Comment
I have an addition for my recent blog post "Detecting mobile devices" a while ago. In order to also detect Android phones (like the T-Mobile G1), you simply need to add the string "android" to the mobileClients array (both PHP and JavaScript). I also edited the original blogpost by adding the "android" string.
< Januar 2009 | März 2009 >