Ever wanted to create a Google XML Image Sitemap?
This is how it could be done with PHP: Continue reading “Create Google XML (Image) Sitemaps in PHP”
…dev, tech problems and solutions.
Ever wanted to create a Google XML Image Sitemap?
This is how it could be done with PHP: Continue reading “Create Google XML (Image) Sitemaps in PHP”
Actually i was a fan of YAML regarding the configuration files of Symfony2.
This was probably because i was used to it since symfony 1.4 and i also thought its better readable.
Its partly still true, but my Netbeans Editor has some problems with using @ in YAML and this breaks my highlighting.
So the better readability vanished to nirvana.
So i checked out XML configuration. Its also widely used by the community.
Pros and Cons (mostly Pros) you can read in this post by Fabien.
I you ever wondered how you can check if a Country, resp. a Country Code, is in the EU, i did the following:
Magento has a config value: eu_countries that lists all Countries of the EU.
You can find it in the backend under:
Configuration -> General -> Country Options.
Against this list you can validate your country code, f.e. that you got in an billing or shipping address of an order.
Continue reading “Check if a country is an EU country in Magento”
Symfony2 has a great Caching Layer based on its HTTP Cache. But this aims mainly on caching the views.
In some apps however you need to cache data behind the scenes, f.e. responses from API calls or custom objects sets.
Symfony2 itself doesnt have such a functionality on first sight (symfony2 doesnt, but Doctrine, see below) and so I searched for one and first found a bundle which utilize the Zend Cache lib:
https://github.com/KnpLabs/KnpZendCacheBundle
This worked well but as discussed here(https://github.com/KnpLabs/KnpZendCacheBundle/issues/2) this adds dependencies to your Symfony2 project. This is actually not necessary since Doctrine/Commons is almost always part of your Symfony2 distribution and the Doctrine/Commons provides a Cache Layer as well.
A very good one, indeed.
So if you need to cache data use Doctrine/Commons.
Continue reading “Caching Data in Symfony2”
First off some general thoughts on how to use opengraph metatags.
Since the uprise of Social Media, sharing sites, deeplinking and snippetting content has become a important aspect of SEO and so almost every site has some kind of facebook-like-button to let user easily share the page.
Most sharing endpoints, facebook f.e, bring a more or less good parser/linter to summarize the page content. So the first text paragraph will be taken as text snippet and all images that fit certain requirements will be offered to chose a preview-thumbnail from.
So far so good.
Continue reading “Opengraph MetaTags in SilverStripe”
When you start with symfony you probably use the Symfony Standard Edition.
This is a quite good start but there are somethings that helped me and might help you aswell.
Since every beginning is “schwer” :)
So here there are.
Continue reading “Symfony2 Starter Tweaks”
This is a reoccuring requirement: you need a profile for some object in your project.
FE you have a company, a member or a location that should get an address, a marker on the map, an icon, homepage etc.
So I created a small silverstripe module that adds a profile tab to any object you choose in your Silverstripe CMS backend.
In the last days, i was trying to find a solution hosting multiple Express apps on my vServer the same Server.
Starting with Apache and mod_proxy, i ended up with a plain node solution, which i really like. Continue reading “Hosting multiple Express (node.js) apps on port 80”
to be honest i didn’t find a clean way yet, but i thought this workaround might be worth sharing.
…since Silverstripes‘ Userforms Module Uses jQuery for Validation you can put these lines of code in your UserDefinedForm.ss Template: Continue reading “how to add placeholder attributes in Silverstripe Userforms Module”
I might be a bit late (yeaikno it exist over a year now and a bunch of blogs had it covered) but nevertheless i would like to point out a very helpful online tool i recently ran into:
Its basically a online benchmark tool for testing different approaches in javascript.
It covers some important aspects of benchmarking, that your homemade bench probably wont have like milliseconds accuracy & statistical analysis.
The tests are run on your browser and the results will feed the “browserscope”. A graph of the “highest known results” for the participating browsers.
So we can see some kind of comparison.
Continue reading “javascript benchmarking with jsperf”