User login

Complete

To be used with care. Pages are complete only when they meet the posting guidelines.

Adding aliases and functions to your GNU-Linux shell

After making your changes, including linking to another file, you can run on the command line:

Include your supplementary file like this:

. ~/.baschrc-agaric

$ source ~/.bashrc

Resources

Resolution

Show nodes that reference a node, in a block

News content type has a nodereference that references Industries, Services, Products, and Testimonials.

From the Product, Testimonials, Services, and Industries nodes we should be able to see what News nodes referenced them.

That is, when on the product Widget, we want it to see news items that reference Widget.

Here is the answer to showing in a block the nodes that nodereference the current node

Localhost from a virtualbox XP install on Ubuntu

So you've got yourself a shiny new laptop, installed ubuntu and virtualbox and now you have a version of windows xp running nicely in a window.
But that's not enough for you is it? You want to be able to see your local environment from your XP install too, so you fire up IE and goto http://localhost, but it ain't there!!

well, have you tried http://10.0.2.2 ??

do it

Resolution

Convert Workflow's radio buttons to submit buttons in Drupal 6

Overview

When really messing with how a node and all the modules acting on it submit data when saving a node, you need to tackle things from both the form_alter side and the nodeapi side (or otherwise mess with the node submission).

Workflow uses nodeapi, and the only thing it's really looking for when inserting or updating a node is $node->workflow. We can set this in hook_nodeapi, most sensibly in op presave, or we can do it the probably harder but more correct-seeming way of an extra submit function. Detailed eventually below.

Include .htaccess in VirtualHost Document for performance

<VirtualHost *:80>
DocumentRoot /www/docs/example.com

<Directory "/www/docs/example.com">
AllowOverride None
RewriteEngine On
# etc
</Directory>
</VirtualHost>

The above is what you need to know before including this:

Example Clean URL configuration of httpd.conf for performance
http://drupal.org/node/43788

Resolution

Get rid of extra spaces using PHP's preg_replace

Right there in the examples for the php function preg_replace was how to strip whitespace from a string:

<?php
$str = preg_replace('/\s\s+/', ' ', $str);
?>

Ereg replace looks prettier:

<?php
$string = trim(ereg_replace(' +', ' ', $string));
?>

However, Agaric has read in several places that preg_replace tends to be faster.

Resolution

Maintaining referential integrity with Drupal CCK nodereference

Problem: Drupal does not check to make sure a node isn't being used as a nodereference on another node before it is deleted.

Solution: Agaric's own Stefan Freudenberg has created a module to protect from this.

Notes:

Both of these are about the opposite direction:

April Metrowest Drupal Meetup

Dan demonstrated a lot of JQuery goodness.

Kathleen demonstrated DBScripts

  • Keep the database in sync with code
  • Preserve the ability to use the web GUI
  • Rapid development workflow
  • Merge development and production databases

In full, you don't track watchdog, you don't track sessions. But you don't destroy it either. You just don't save it.

Min allows you to save the watchdog data etc.

So if your working on something that has search data

Syndicate content