about 4 months ago - Comments Off
We wanted to automatically fill in the Location fields on a node add form based upon the author’s location. Since most of these items that are posted would share the same location as the author, it seemed like a nice thing to do to make it a little easier for users.
In order to accomplish this, More >
about 4 months ago - 1 comment
Using an external database with Drupal is very simple.
First, you must add the database to your settings.php file like so:
$db_url['default'] = ‘mysqli://user:password@localhost/database_name’;
$db_url['external'] = ‘mysqli://user:password@localhost/database_name’;
So, “default” is our regular Drupal database and “external” is an additional database. To switch to the “external” database, you would use this code:
db_set_active(‘external’);
//Your code here
//*****then remember to SWITCH BACK TO More >
about 4 months ago - Comments Off
Sometimes it requires a little PHP to get the job done in a Views filter. That’s where the Views PHP Filter module comes in. The goal when using a PHP snippet is to return an array of nids.
In this example we’re returning an array of nids where a field in a CCK content type is More >
about 4 months ago - Comments Off
Sometimes the preview button is unnecessary or unwanted in your Drupal installation. To remove the preview button, add this function to a custom module.
In this case, we wanted to remove the button from the node form for a “property” content type.
function digitalstax_customizations_form_alter(&$form, $form_state, $form_id) {
if($form_id==’property_node_form’) {
unset ($form['buttons']['preview']);
More >
about 4 months ago - Comments Off
When you want the user to search, the “apply” text can be confusing in a Drupal views exposed filter button.
To change this, create your own custom module and add the function below. Note that our module is named “digitalstax_customizations” and we wanted the change applied to a view named “admin_dashboard.”
function digitalstax_customizations_form_alter(&$form, $form_state, $form_id) {
More >
about 4 months ago - Comments Off
We created a view with exposed filters and arguments in Drupal so users could search for a particular product by city and state. For the purposes of this, we’ll call them widgets. We wanted to have custom meta descriptions and keywords for each of these city and state pages.
This requires the Nodewords module and you’ll More >
about 4 months ago - 4 comments
We were developing a website that required use by novice users and wanted to eliminate anything that could be confusing. The “Split Summary At Cursor” button on the body field in Drupal served no purpose and could possibly confuse users.
In order to remove it, you must create a module with the following function. Note that More >
about 3 months ago
found your site on del.icio.us today and really liked it.. i bookmarked it and will be back to check it out some more later
about 2 months ago
Very Good site, thank yo mister, it’s help’s me!