User login

New module: Ubercart shipping rate filter for in or not in Europe

Added a new module for checking if the shipping address is in or not in Europe for Ubercart's excellent flatrate shipping method.

So you can easily configure shipping rates for people outside of Europe. (Perhaps you want to set a different base price plus a different default shipping amount per item)

Much easier than selecting all the EU countries by hand!

Ubercart assign product attribute / options automatically

Have had to come up with a quick recipe for adding the excellent ubercart product attributes automatically, and in my case, it depends on their taxonomy.

I dare say this solution is very dependant on the current "6.x-2.4" version of uc_attributes as it hijacks the form submission hook.

Drupal views module multiple pagers same page

Sometimes you want to programmatically render multiple views on one page but don't want to use the Panels module or something heavier, and you need to make sure that if you hit a page on one view, it doesn't effect another

<?php
  $view
= views_get_view('PagedItemList');
 
$view->set_display('page_1');
 
$view->pre_execute(array('First stuff'));
 
$view->set_pager_element(1);   
 
$output = $view->display_handler->execute();
  print
$output;
?>

Second

$view = views_get_view('PagedItemList');
$view->set_display('page_1');

Topic: 

Drupal date handling has critical issues with page arguments

So there seems to be some serious issues handling dates from your content types with views+cck+date module.

http://drupal.org/node/580178

if you have a page argument like "year/%" for example -> "year/2010" then you should really consider if date module has resolved these issues.

however, if you store the year as an integer, there is no problem, and it's only when dealing with the date module

What's more annoying is that the views preview button does not reflect any errors in the query, a nice little time waster till you figure out theres something low level going on.

Topic: 

Google pagespeed test


A nice handy link , Google pagespeed report engine http://pagespeed.googlelabs.com/

Ooops, Need to make sure I'm sending the right expiration headers for imagecache generated content!

Topic: 

Very rapid Drupal theming from an existing web template

I love this wget command (available under windows, linux and mac), sometime's you want to try out a template that you have seen or you want to rapidly implement an existing site from an external source to a local Drupal installation without breaking down the template into a zen (or other framework) template system.

Note: I don't really suggest this for building a good theme in Drupal, but it's just an idea for experimentation anyhow

Local dev - forcing email from PHP to a local file

Sometimes when working on site's for clients, you need to take a very close look at the mail output from PHP, some webapps like civicrm let you specifiy a different output, but in general, you can just edit your php.ini and set

sendmail_path = /usr/bin/pretend-sendmail

and then your /usr/bin/pretend-sendmail

#!/bin/bash
cat > /tmp/mail.out.$$

Don't forget to chmod +x /usr/bin/pretend-sendmail

in your /tmp you should have


-rw-r--r--  1 www-data www-data     1808 2011-04-21 14:25 mail.out.23829
Topic: 

"I don't want to say right now" Said the robot...

Seems to be some kind of robot joining drupal sites and entering in "I don't want to say right now" into any user registration profile fields

Try with this google search to illustrate

Topic: 

Pages

Subscribe to Front page feed