12.30
Vikram Vaswani‘s language is clear and his humour is right on cue. Topics ranging from absolute beginner to slightly experienced. Highly recommended.
http://devzone.zend.com/article/627
Author: Kayra (16)
Antidote for a weak memory
Vikram Vaswani‘s language is clear and his humour is right on cue. Topics ranging from absolute beginner to slightly experienced. Highly recommended.
http://devzone.zend.com/article/627
Author: Kayra (16)
There is an (in)famous error message in DWR which usually troubles newcomers. When you do a remote call, you get:
It basically tells you that you have some member of type Class in the return type of your remote method, or in one of his child members’ fields.
It’s up to the author of that class to convert that field or not. But if you do not intend to convert Class field, and you’re sure that none of your parameter types or return values do contain a Class field, check for a enum in one of these. Having an enum raises (naturally) the same exception, and it’s easily overlooked. If so just add an enum converter and it’s done:
PS: I assume this is also valid not just for return types but also parameters which tries to set a class name from javascript
Author: Selim (8)
Pressflow might be your answer.
Pressflow is designed for large-scale high-performance implementations of Drupal. It abandons support for out-dated versions of PHP and required MySQL version 5.x. It is also designed to take advantage of more advanced caching systems (e.g. memcached and APC) which are typically only available in dedicated hosting environments.
If you are using a typical “shared” hosting account (e.g. not dedicated or VPS), you will have a hard time taking advantage of much of what Pressflow has to offer. Similarly, if your traffic is modest, you may find it easier to stick with vanilla Drupal.
However, if you have a VPS or dedicated hosting, have 10s of thousands (to 10s of millions) of pageviews, are interested in using advanced caching systems like Varnish, and are concerned with growing traffic or traffic spikes, Pressflow is designed for you.
Author: Kayra (16)
When you hear the word “taxonomy” for the first time while trying to grasp what Drupal is about, it might look like a problem impossible to tackle. A major in science might help with the meaning of the word but nothing more. However, soon afterwards, you realize that it is not so difficult, you just need to use it properly and sometimes intelligently.
Sometimes when you get comfortable with the notion, it is easy to forget some easy tricks. Here is two of them that are related to parent/child relationship of taxonomy terms.
Taxonomy: Term ID (with depth)
option in the arguments section of the view that you are building.To show the nodes belonging to a term you use:
taxonomy/term/x
— where x is the term id to show, a number.However, to show children nodes you need to add a depth variable. The syntax is:
taxonomy/term/x/y
— where x is the term id to show, and y is the depth to go below x.An example will explain this better. Let’s assume you have a structure such as this:
America (tid=1)
–Canada (tid=3)
–United States (tid=4)
—-Texas (tid=9)
——Amarillo (tid=11)
——Austin (tid=12)
—-California (tid=10)
——Los Angeles (tid=14)If you use
taxonomy/term/1
, you’ll see only entries catalogued only under America (tid=1), but not its children.If you use
taxonomy/term/4/1
, you’ll see entries for United States (tid=4) and its children to a depth of one; that is, you’ll see entries catalogued under Texas (tid=9) and California (tid=10).If you use
taxonomy/term/4/2
, you’ll see entries for United States (tid=4) and its children to a depth of two; that is, you’ll see entries catalogued under Texas (tid=9) and California (tid=10) [this is the first level of depth], but also entries catalogued under Amarillo (tid=11), Austin(tid=12) and Los Angeles(tid=14).
Author: Kayra (16)
Content Profile is highly useful if you want to extend the default profile module with e.g. Content Construction Kit (CCK). While implementing I ran into a small problem. When I search for a username the results were directing me to the profile node but not the account page that I had created with Panels. Here are two simple solutions.
The first one uses the rules but might be a little less effective than the second as the rule is called whenever any users would request any node. This might make you loose 50ms
per view. The second one might scare non-coders but is really easy to do actually.
1. via Rules:
import and use this rule and tweak it as you like.
2. via node-uprofile.tpl.php, source Michelle:
Author: Kayra (16)
Even though the core search module is quite powerful, it is not that easy to find another module that would add Solr-like search functionality (faceted search, fielded sorting of search results, finer-grained content bias) to Drupal. The best search engine available, Apache Solr Search Integration, requires a separate search server or at least Java 5 or higher. These requirements are not always easy to satisfy by small or start-up websites.
Search Lucene API, intervenes right at this point. It has almost all the functionality of Apache Solr (not the same performance of course however quite satisfying) and it is much easier to implement. The following modules that depend on Search Lucene API make it even more powerful.
Author: Kayra (16)
Sometimes -especially before version upgrades-, disabling all contributed modules can become quite frustrating. And inter-dependency of modules do not help at all.
The following method which allows you to update the system table in Drupal, works like a charm for me. You can use phpMyAdmin and/or shell access -> mysql.
Author: Kayra (16)
I found this cool collection which install every single IE version (I mean it, there is even Internet Explorer 1.0), and you can use them simultaneously to test your web apps easily.
http://finalbuilds.edskes.net/iecollection.htm
Author: Selim (8)
Internet Explorer allows us to target its different versions with conditional comments:
But how to target non-IE browsers is a little bit more tricky:
Mind the two extra <!--
That’s all!..
Source: http://www.cssplay.co.uk/menu/conditional.html
Author: Selim (8)