User login

Science Collaboration Framework

Where is my Drupal? How to find a lost Drupal site on a server if you can still get to the site

Agaric Design Collective would like to stress that this note was written while working on an existing site of a client, on the client's server, before we started working with it. We at Agaric are not in the habit of using web sites.

The formalities dispensed with, I've had reason enough to wish to know where a site's codebase actually lives that I threw it into Agaric's Enabled Modules module as a little bonus.

Explode takes a parameter to stop exploding after a set number of splits

Explode has a limit parameter. Happy day at Agaric!

This code below was written offline when I was merely hoping that explode could be limited to splitting on its first parameter only the first time said parameter is seen:

File upload not working on Mac OS X development environment

Update: Solution

slarosa reported on this "Files Don't Attach" thread that the only thing that fixed file uploading was:

EXPLICITLY SET the upload tmp dir in php.ini to be THE SAME of the tmp dir set up in the file upload config in Drupal; for instance:

vi /Applications/xampp/etc/php.ini
Then in the file, make sure this is set and not commented out:
upload_tmp_dir = /tmp

That's how to do it.

For historical fun Agaric's misdirected debugging will stay down here.

Relationship processing code from SCF custom Ontology module

<?php
    db_query('delete from {ontology_relationships}');
   
    $bio_process_vocab = taxonomy_extra_get_vocab(6);
    $cell_components_vocab = taxonomy_extra_get_vocab(7);
    $molec_functions_vocab = taxonomy_extra_get_vocab(8);
   
    $term_glossary = array(); // format: term name => taxonomy ID
    $term_index = array(); // format: GO ID term => taxonomy ID

Snips of TCS import function for Taxonomy XML for future reference

<?php
// commented out below from TCS, possibly of interest
  //  $term = (object) array(
  //    'predicates' => array(),
  //  );
   
//    $term->id = $concept->getAttribute('id');

//    $term->uri = $url;

//      $term->name = $termname->textContent;
//      $term->namerefs[] = $termname->getAttribute('ref');

Be sure to register templates moved to module layer, and moving functions from template.php to module

Using FileMerge to compare (Mac OS X graphical diff), no differences between the page.tpl.php in the scf_base theme and the page.tpl.php I have in scf.module.

But the site doesn't look the same at all. That means the reason moving template files to the theme layer failed is because I am not calling them right.

Had to put them in hook_theme_registry, of course.

Once that was done, progress began in earnest. Breaking the site, of course.

Unable to use Drush in local XAMPP on Mac OS X environment

Unable to use Drush on localhost site for unknown reasons.

There really is a running site at http://localhost/scf but through the command line it must be seeing something else– it's giving back to me the HTML for a Drupal site offline, database connection error page.

./sites/all/modules/drush/drush.php -r /sites/scf/ -l http://localhost/scf/ pm install taxonomy_enhancer

I don't get clearer than that...

Resolution

Calling watchdog function (logging info) in Drupal 6

In Drupal 6, the way watchdog() is used has changed a bit.

It's all defined in the API, of course, but some things could use a little more clarification.

Here's the function definition as a starting point:
http://api.drupal.org/api/function/watchdog/6

<?php
function watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL)
?>

Openbase_dir redirection error

Errors from would-be user of SCF:

Syndicate content