Skip to content

User login

Drupal Digest Modules

Syndicate content
Show a listing of all feed items for a feed
Updated: 16 hours 52 min ago

Drupal Database Cache That Respects HTTPS

Mon, 12/26/2011 - 14:07

The caching layer nor the database caching implementation respect https through the system. This is important because parts of Drupal (core included) generate absolute URLs. These URLs can be cached with a protocol of http:// and then embedded in a page (through nested caching) where the protocol should be https://.
This contains a Drupal database caching alternative that attempts to respect caching via https. The default Drupal database cache doesn't think about https (aside from the page cache). That means you could have html cached with absolute urls generated by Drupal using http in caches like the block or filter cache. This data can then bubble up into the https version of the page cache.
This cache is a small layer of logic on top of the current database cache. So, if changes happen there (non-API changes) they will be inherited in this as well.
How to use this cache
In your settings.php file include this cache backend:
<?php
$conf['cache_backends'][] = 'sites/all/modules/database-cache-respecting-https/db.cache.inc';
?>
Then set the default caching class to the one included here.
<?php
$conf['cache_default_class'] = 'DrupalDatabaseCacheResepectHTTPS';
?>
The cache includes a whitelist of cache bins (tables) that skip checking and

enforcing https. You can alter this list by adding a variable to your settings.php

file like:
<?php
$conf['database_cache_respecting_https_whitelist'] = array(
  'cache_page',       // This table already respects https by containing the full url.
  'cache_path',       // Caching of aliases for a page is relative.
  'cache_menu',       // The internal paths we are concerned with are relative as stored here.
  'cache_image',      // This one looks safe too.
  'cache_bootstrap',  // Shouldn't be html in this cache.
  'cache_views',
  'cache_views_data',
  'cache',            // This one has been added to the whitelist.
);
?>
There is a core issue to deal with this at http://drupal.org/node/1377840. This

is considered an interim solution until Drupal core properly handles this.

Categories: Drupal Modules

Location CCK Migrate

Thu, 11/24/2011 - 09:06

Migrate module that transforms D6 location_cck fields into D7 geofields.
You will be able to use Geofieldwith Openlayersand do much more.
Make sure that you have the geoPHP library (required by Geofield for full functionality) installed. This migration will not do a lot without it. (see the Geofield page for documentation on that.)
Patches are welcome, this does cover our own migration so we wont develop it further.

Categories: Drupal Modules

Performance testing project

Sat, 10/22/2011 - 15:33

This project will track code used to add performance testing to our test infrastructure, both for individual developers and Drupal.org.

Categories: Drupal Modules

Stripe

Sun, 10/02/2011 - 12:35

Aiming at some stripe (https://stripe.com/) integration. Co-maintainers welcome to help out.
Currently just features a way to store your API keys and choose which to use and the start of a form for testing purposes. Still need to implement number 3 here: https://stripe.com/api
Not sure what direction to take this module just yet, so if you have ideas, please open an issue. So far I'm thinking it would be nice to be able to just add a property to an FAPI form array and have this module add in the necessary components to have Slide process the form. Perhaps specify a custom callback in order to do something with the response.
The obvious use would be integration as a payment method for Commerce.
Also available on github. https://github.com/sirkitree/stripe

Categories: Drupal Modules

Commerce userpoints

Sat, 10/01/2011 - 11:11

This module makes a bridge between Drupal Commerce module and Userpoints.
It allows users to create commerce line items with negative points value, behaving like a discount system. The user can choose how many points he wants to use, they will be automatically taken from his userpoints account.
It is not directly used as a payment method for the following reason:

- Depending on how your site will manage points, user will or will not always have the exact amount nor enough points to fully pay an order

- I don't want to overload the payment process by displaying an odd interface asking the user how he will pay (userpoints and CB ? CB only ? Userpoints only etc...)
To install

- Enable the module

- Enable the checkout pane in Store > Config > Checkout ...

- Create a taxonomy in userpoints vocabulary (Say "Credit" for instance)

- Go to Store > Config > Commerce userpoints settings

--> Setup the taxonomy point that will serve as "money"

--> Setup the price component that can be paid by the points (base_price is the standard product total)

--> Setup the decimal multiplicator. Points are handled as "Integer" while prices are most of the time "Decimals" (Even thought Drupal Commerce manages it with Integer to avoid calculation precision issues). The easiest way to handle it is to have a 100point = 1 currency value conversion rate. To keep this conversion rate, leave the field value to 1.
- Grant points to your user (either manually, through rules... whatever your workflow requires)
Test it !

- Add an item to cart

- Go to checkout

- Use points in the checkout pane and see the line item do its thing
Project homepage : http://drupal.org/sandbox/liupascal/1262466

Git clone : git clone --branch master liupascal@git.drupal.org:sandbox/liupascal/1262466.git

Drupal version : Drupal 7 only
Thank you for your work !

Categories: Drupal Modules
AdaptiveThemes