I am a Permanent Member (or Community Ambassador) of the Drupal Association.Commit #280114 by robertDouglass at 19:17
Apache Solr Search Integration: /modules/apachesolr/apachesolr.admin.inc 1.1.2.34 @ DRUPAL-6--1Apache Solr Search Integration: /modules/apachesolr/apachesolr.module 1.1.2.12.2.171 @ DRUPAL-6--1
She placed 5th out of 9 in the up-to 63Kg weight class with a total of 130Kg in the two disciplines (55Kg snatch, 75Kg clean/jerk).
Commit #279868 by robertDouglass at 22:11
Core searches: /modules/coresearches/DRUPAL-6-14.patch 1.1.2.1 @ DRUPAL-6--1
Adding a patch for DRUPAL-6-14
To explore how easy or hard it would be to write a UI component using web technologies, and then integrate it as a first class citizen in Eclipse, I reimplemented the PDE "site.xml" editor for the 0.9 release of e4, using HTML, JavaScript, Dojo, and CSS.I thought it would be interesting to document the design decisions that I made for this. Since my experience with web UIs is somewhat limited, you should take the following with a grain of salt. I did, however, work on something that could be characterized as an "IDE in a browser" for over three years (2001-2004), so I don't consider myself a complete rookie. :-)Note that I won't talk about integrating the web UI component into Eclipse, this posting is just about the actual web UI component itself. The Eclipse integration is a related, but different story, that deserves its own post.
This month's issue of the print magazine and website PHP User (in German) features an article on Drupal's CCK and Views module. The article was written by Meinolf Droste of MDWP, an Acquia Silver Partner.
There are at least four magazines in Germany that sometimes feature Drupal in print articles. This puts Drupal onto the news stands in kiosks, grocery stores, and train stations throughout Germany. It's nice to see Acquia Partners taking such an active role in promoting Drupal. Great work!
Yesterday I gave a keynote presentation at the Digital Marketing First 09 trade show in Brussels, Belgium. Drupal was out in full force with four Belgian companies joining forces to make the conference a special Drupal-themed event. There were also a number of other companies present who are using Drupal.
To prepare for the event I made a micro-site that focuses on Drupal and interactive digital marketing (the theme of the conference). It features a directory of the companies that were present and some case studies about how Drupal is the ultimate integration platform for anyone who offers an online service or tool.
The DrupalVillage.be companies that were present:
Also present were:
Special thanks to ICanLocalize.com for translating a portion of the micro-site content into Dutch and French.
My presentation was very well attended. The slides are below. The take away for me was that Drupal is a great tool for people doing digital marketing, and Drupal people should be attending marketing conferences (and vice versa).
Commit #276758 by robertDouglass at 14:46
Apache Solr Search Integration: /modules/apachesolr/apachesolr.index.inc 1.1.2.6.2.9 @ DRUPAL-6--2
Commit #276752 by robertDouglass at 14:37
Apache Solr Search Integration: /modules/apachesolr/apachesolr.index.inc 1.1.2.6.2.8 @ DRUPAL-6--2
Commit #276746 by robertDouglass at 14:32
Apache Solr Search Integration: /modules/apachesolr/apachesolr_search.module 1.1.2.6.2.111.2.25 @ DRUPAL-6--2
Two days ago, JSR 330 passed its final vote, and we now have a standard way to annotate Java classes for dependency injection. Thanks to the spec lead Bob Lee, the JSR 330 expert group did its work in record time, in the open, and under one of the most permissible licenses.
I ordered a new Strato Multiserver product hoping to consolidate my server architecture. I received the SMS that sent my “Freischaltcode” (activation code) and was able to activate the account. I then got a mail saying to log in and use the password sent in an SMS to start using the account.
Sehr geehrte(r) Herr Robert Douglass,
wir freuen uns Ihnen mitteilen zu können, dass Ihr Server fertig eingerichtet wurde:
Artikel: Hardwareoption L (v2.1)
Host-Name: xxxxxxx.stratoserver.netÜber den Kundenservicebereich unter https://config.stratoserver.net/ können Sie ab sofort alle Daten Ihres Servers abrufen.
Bitte benutzen Sie dazu den oben genannten Host-Namen sowie das Ihnen per SMS auf Ihr Handy zugesandte Passwort.
Mit freundlichen Grüßen
Commit #270672 by robertDouglass at 16:11
Apache Solr Search Integration: /modules/apachesolr/apachesolr.module 1.1.2.12.2.155.2.29 @ DRUPAL-6--2
Commit #270452 by robertDouglass at 21:07
Apache Solr Search Integration: /modules/apachesolr/contrib/apachesolr_commentsearch/apachesolr_commentsearch.info 1.1.2.2 @ DRUPAL-6--2
See the update at the bottom!
Drupal’s pagers are neat, and when they were first developed, were way ahead of their time. They also have a couple problems. One of them is scalability. When you’ve got 10,000,000 somethings, calculating how many pages there are so that you can skip to the last one is time consuming.
Another limitation is that the pager is designed to page over a database query. The Apache Solr Search module uses Drupal pagers to move through pages of search results that come from Solr. The pseudo code for getting this to work looks like this:
<?php
// What result do we want to start on?
$offset = $page * $number_per_page;
// How many search results are there in total?
$total = $result->get_total();
// Send a very simple database query to the pager system to trick it.
pager_query("SELECT %d", $offset, 0, NULL, $total);
// Magic happens here. A pager appears.
$output .= theme('pager');
?>That’s great! But I recently had a case where it was impossible to tell how many results there are in the total set. What is really needed is the ability to advance the pager until there aren’t any more pages, but Drupal doesn’t support anything like this by default. Twitter does it, but Drupal… meh. It’s sneaky time!
<?php
// Remember: http://is.gd/3Sf9Z
$total = 0;
// Note that $page is zero based (page zero is the first page).
// Note also that count($results) is just one page's worth of results,
// not the entire possible set (which is impossible to calculate).
// If there are fewer results than what we want to show per page,
// we know we've come to the end of the result set, and don't need
// to show any more pages.
if (count($results) < $number_per_page) {
$total = $number_per_page * ($page + 1);
}
// Otherwise, we want to tell the pager to give us yet another
// page to go to.
else {
$total = $number_per_page * ($page + 2);
}
// Now the pager will either end where we are, or add one
// more page to the end. This way you can keep advancing one
// more page until there are no more results left.
pager_query("SELECT %d", $number_per_page, 0, NULL, $total);
$output .= theme('pager');
?>This strategy could be applied to both of the problem cases I mentioned above. If you have a HUGE result set and need a pager, and don’t want to destroy your database, this is a viable technique. It also works if you’re getting your results from a source that can’t tell you how many results there are in total. And it’s sneaky. Enjoy.
Update:
Instead of using a database query to manipulate the page you can manipulate the globals instead:
$GLOBALS[‘pager_page_array’][] = 1; //what page you are on
$GLOBALS[‘pager_total’][] = 3; // total number of pages
$items_per_page = 50;
print theme(‘pager’, NULL, $items_per_page);
Thanks Chx for the tip!