Rock the Drop has the single mission to make others' experiences with Drupal much simpler. As we continue to build custom Drupal sites, we encounter challenging situations that require REAL know-how with the cool blue drop. As our knowledge expands, so does yours.
Stick around... it only gets better.
We are also front- and back-end Drupal Themers, Developers and PHP coders; available for development in NYC and abroad with no limit on size and scope.

Object PHP Code


require_once "/sw/installed/apache20/htdocs/soap/lib/nusoap.php";
class XMPieRequest
{
    protected $xmpie_username = "un";
    protected $xmpie_password = "pw";
    protected $soap_version = 1;

    public $xmpie_api_server = "xmpie";

    protected $soap_class;
    protected $soap_action;
    protected $action_parameters = array();


    public $xmpie_class_app_name = "";
    public $xmpie_api_location = "";
    public $soap_request = "";
    public $soap_response = "";

    function __construct($soap_class, $soap_action, $action_parameters = array())

Multi-Step Form Code


/**
 * Important note:  product_list.php
 * is a required file that sets many variables here.
 * I could not include it here because I didn't have time to 
 * edit it - need to eliminate business-specific strings
 * and variables. Until I'm able to do a real tutorial with a
 * bogus content-type and business goal, there will be the 
 * added difficulty of not knowing what's in that include file.
 * Sorry...
 */

/**
 * Set a Menu item.
 */
function open_request_form_menu()
{
    $items["request_form/index2.php"] =

Taxonomy Tables and relations

The following is a list and descriptions of the taxonomy tables used by Drupal 6. In depth description and explanations are not provided here. I'm only listing them because I've had a hard time finding a list myself. BYODD (Backup YOur Database, Dummy) before changing these tables.

-- VOCABULARY TABLES --
custom_breadcrumbs_taxonomy_vocabulary : Added by the Custom Breadcrumbs Taxonomy module. I don't know how it's used at this time.
vocabulary : Assigns an ID to a vocabulary name and stores the description, weight, hierarchy, and other metadata about vocabularies

Use MySQL to delete terms to save me from the single-term manual delete process.

I needed to delete a bunch (Over 100) of child terms from a Vocabulary and save the parents.
I needed to do this without sitting in front of a web browser and waiting for a page to load every time.

Disclaimer: BYODD (Backup YOur Database, Dummy!) before attempting any instructions on this site. Owners AND all Affiliates are NOT responsible for anything YOU screw up by following any instructions you find here.

Anyway... I'll cut to the chase... then explain. here are the queries I ran:

Technologies:

Move taxonomy terms to a new vocabulary while retaining Term IDs (tid) with an added bonus

I've been tasked with tightening up our site's taxonomy. Unfortunately, this includes yet another desire that cannot be met with any of the default tools available in Drupal (and noone has quite hit the mark with a module): Gather terms from multiple vocabularies into one single vocabulary and do it in such a way as to avoid recategorizing the thousands of nodes we have that have already been categorized using the existing terms. The reason for this was that all the vocabulary names could be seen as one.

Drupal Views Falls short by not including aggregation functions and custom group by and distinct options

I've always felt sometihing was missing with Drupal Views. I never identified it while using views but I've always "felt it's presence" - or lack thereof - while building custom queries for whatever reason in MySQL. Every time I added a function like min(), max(), or sum() or tried to aggregate results with 'group by', I've said to myself silently, "I wonder if I can do this in Views.." but never checked it out until now.

Forget About "Taxonomy CSV" and "Taxonomy Export"... Use "Taxonomy import/export via XML" instead.

Just spent hours trying to find a method for exporting Taxonomy terms to other Drupal instances.

I tested the following and very easily found flaws:

http://drupal.org/project/taxonomy_csv : Found it difficult (never actually found "it") to describe to the front end what I need (ie full download of all taxonomies including Vocabulary name, descriptions, etc)
http://drupal.org/project/taxonomy_export : Seems to be just a shell... insert your code here.. is not the type of help I was looking for from a module.

Technologies:

The 3-color Pinwheel: Dev - Staging - Production

So we're working a REAL corporate website here... Proudly using Drupal 6 with a shipload of modules + some custom code.
The big puzzle at some point became how to deploy it all without killing each other's work and without losing anything in the process. The solution to which eventually became creating a second set of remote servers hosting a full copy of the site with code copied from local dev (a backup server of all local code and DB)

I don't know if this is the right way to do it. But it does't seem quite wrong at all...

Drupal 'l' (lowercase L) function

Formats an internal link...
All internal links (especially those generated by modules) should be generated by l():

l($text, $path, $options = array())

Documentation:
http://api.drupal.org/api/function/l

JQuery 'each()' method

Just found this sort of holy grail of JQuery looping. As usual, I have little time to elaborate.... so here's what I did:

To show only a specified number of entries in a tag-set. The example here is on a set of divs with class="comment".

  $('#comments .comment').each
  (
    function (idx)
    {
      if(idx>1)
      {
        $(this).css("display", "none");
      }
    }
  );

This is how I used the each method. (In my usage) each() takes a function as a parameter.

Technologies:

Pages

Subscribe to www.rockthedrop.com RSS