Drupal
Image Resizer
The purpose of this module is to let you
to resize images to arbitrary sizes.
This functionality is used in many Wordpress theme via the external
TimThumb image resizer, http://timthumb.googlecode.com. Installing such
module is an alien body in Drupal and cradle of many exploits.
This functionality tries to be a better solution. You can
- incorporate it with other Image module style effect
- Clean URL support
- Caches the rendered image, like as the normal "imagecache"
Just Drupal Core.
InstallationEnable the module.
<?php$preview_file = _image_resizer_style_path('my_cropper_style', $portfolio->file_uri, '640x400');
$preview_url = file_create_url($preview_file);
?>
The $preview_url should be something like
http://nailartinlondon.co.uk/sites/default/files/ir/a_crop/public/640x40...
Change the the 640x480 to any dimension you would like, and wonder. :)
Open Source Training: How to use Drupal's Context Module
"If ..., then ..." is one of the most commonly used phrases in the world of software development and, I suppose, in life:
- If the sky is blue, then it probably won't rain.
- If I learn Drupal, then I'll make lots of money.
- If the webpage URL includes "services" in the path, then display the block called Services.
In this blog, we are going to introduce to you to the Context module, which puts the power of "If ..., then ..." into your hands.
comm-press | Drupal in Hamburg: Bit of Testing: Use Contains for CSS Class, Tests Involving Translating Strings
But, I'm set to learn more. On my path to learning to write tests, I recently worked on improving some tests that someone else started.
Web Wash: Using Simple Google Maps Module In Drupal 7
The Simple Google Maps module for Drupal is a field formatter which displays a map using Google Maps. Using this module, you can display a map without having to install three or more location modules. All you have to do is, create a text field to store the address and configure the Simple Google Maps field formatter in the manage display section.
The geocoding - converting the address to a longitude and latitude coordinate - of the address is handled by Google Maps API when the formatter is rendered. Drupal will not store the geographical coordinates for each address. If you need to store coordinates in the database look at the Geofield module.
In this tutorial, I'll show you how to store an address and display a map in a few easy steps.
Media Mover SNS
Media Mover SNS (MM SNS) extends the Media Mover (MM) module by integrating it with Amazon SNS and adding three new actions to MM configurations.
If your site use any of these actions, whenever a file is uploaded, you'll publish a message on Amazon SNS, in the topic that you defined in the MM configuration.
ConfigurationThis module provides a configuration page to define the list of Amazon SNS topics that you plan to use.
There, you must inform the Topic ARN, Access Key and Secret Access Key for every topic.
You also have to inform a friendly name for each topic you define.
This is necessary for the next step: Using the MM actions.
When you create a new MM configuration, you'll be able to pick the actions supported by this module.
The actions are available in the MM "storage" and "complete" steps.
MM step: Storage
- Publish a message on Amazon SNS
- Upload file into Amazon S3 and publish a message on Amazon SNS
Notice that the second action above also integrates with Amazon S3.
ie. The file is copied to S3 and a message in published on SNS.
This is done with help from the MM S3 built-in module.
MM step: Complete
- Publish a message on Amazon SNS
Once you select an action provided by this module, you'll see a new field (select/dropdown) with the list of topics that you defined in the configuration step.
You just need to pick the SNS Topic that you want to use for this action.
That's all.
MuMu
MuMu is a simple module that allows you to legally (read: Drupally) upload a single CSS and a single JS file to your website.
Why In The World Would You Need To Do This?Good question. Sometimes it is overkill to create a subtheme just to add several CSS or JS changes / additions. As great Drupal themes are now being created (and with the addition of awesome modules like DisplaySuite), one can build and configure an awesome Drupal site without the need to extend a Base theme.
If you have configured your site to use an awesome theme (like Omega) but only want to make CSS changes and add a couple of JS enhancements, this module is perfect for you.
If your CSS extends beyond 1000 lines, you should consider extending a base theme. The same rule applies if you are adding JS as well as adding libraries.
How to Use- Download and install the module on your server like any other Drupal Module.
- Enable the module in /admin/module
- Navigate /admin/appearance
- Look for the "MUMU" tab
- Upload your files
Election First Past the Post
Provides a First Past the Post election type to the Election module.
Ubercart Gate2Play Payment Integration
This module integrates Ubercart v3 with Gate2Play payment gateway.
No JavaScript Info
This module adds a block to the system and activates it in the footer.
Why it is in the Footer?
When the browser loads the website, the footer is the last and so no time delays!
The content of the block is only a information which is only shown when the browser does not support JavaScript or if it's deactivated.
Via preset css the content is hidden on a browser with activated JavaScript
Sometimes you have to add the Block "No JavaScript Info" manually to the footer of your website
This is a not really clean implemented version... but it works ;)
Google Analytics Cookie Exclusion
Exclude certain visitors from Google Analytics statistics.
Visitors who have been to a secret address on your web site will be excluded from future tracking by Google Analytics on your site.
Thingiview File Field Display Formatter
This module provides a configurable field display formatter for file field-types.
Create a file field in your content-type, limit it to accept only .stl files, then configure the display format to "3D View" to display the file using thingiview.js - a javascript 3D model viewer and STL/ OBJ parser (using the Three.js 3D engine).
For details on installation and usage, please see the README.txt file which comes with the module download.
Views Isotope ME
A fork of the Views Isotope development branch containing my additions.
Taxonomy Mapper
Allows an administrator to create a mapping between one vocabulary and another, and to bulk add terms onto nodes from the second vocabulary based on on existing terms from the first vocabulary on those nodes and the mapping.
Field Group Ajaxified Multipage
By using Field Group it's possible to easily turn an entity form into a multipage form, however
The paging is can only be done on client side which has several disadvantages
- Validation of form fields is very basic, real validation is done after the form is submitted
and often user will have to return to previous pages to correct the entered values -
More complex multi page forms often dynamically change what user see in next steps depending on the
data entered in previous steps, now that the form pages are ajaxified there is no limitation -
When the form is complex and has many pages with different fields it can become considerably heavy
to load since by using only javascript for hiding / showing related fields to each page, the whole
form needs to be loaded
This module addresses these two issues by making it possible to enable ajax for multipage groups
It also provides Developers with special variables attached to form array regarding page status
to allow them to further customize the form depending on active page
Also it works with any forms even custom ones!
Usage- Setup your multipage field groups as usual for your entity/node
- In your entity/node fields list , edit your multipage field group properties and check Ajaxify option
If you're a developer and like to implement more complex multi page forms you can use the following
variables
- $form_state['field_group_ajaxified_multipage_enabled']
- $form_state['field_group_ajaxified_multipage_group']
Sample code for using these variables :
function hook_form_alter(&$form, &$form_state, $form_id) {
if (isset($form_state['field_group_ajaxified_multipage_enabled']))
if ($form_state['field_group_ajaxified_multipage_enabled']) {
$step = empty($form_state['storage']['field_group_ajaxified_multipage_step']) ? 1 : $form_state['storage']['field_group_ajaxified_multipage_step'];
$page_group = $form_state['field_group_ajaxified_multipage_group'];
if ($page_group['children'][$step-1] == 'group_two') {
$form['actions']['skip'] = $form['actions']['next'];
$form['actions']['skip']['#value'] = t('Skip this step');
$form['actions']['skip']['#limit_validation_errors'] = array();
}
if ($step == count($page_group['children'])) {
unset($form['actions']['preview']);
}
}
}
?>
Sample code for enableling for custom developed forms :
function myform() {
$form['#groups_custom'] = array (
'group_measurements' => array(
'group_name' => 'group_measurements',
'label' => 'Measurements',
'format_type' => 'multipage',
'children' => array (
'gender',
'birthday',
),
),
'group_goal' => array(
'group_name' => 'group_goal',
'label' => 'Goal',
'format_type' => 'multipage',
'children' => array (
'overall_objectiv',
'duration',
),
),
'group_steps' => array(
'group_name' => 'group_steps',
'label' => 'Steps',
'format_type' => 'multipage-group',
'children' => array (
'group_measurements',
'group_goal',
),
'format_settings' => array (
'label' => 'Steps',
'instance_settings' => array (
'ajaxify' => '1',
'classes' => ' group-steps field-group-multipage-group',
'page_header' => '3',
'page_counter' => '1',
'move_button' => '1',
'move_additional' => '1',
),
),
),
);
}
?>
