php

Taxonomy Section Custom Drupal Code

  1. $taxo_section_string = $taxo_section;
  2. echo "[" . $taxo_section_string . "]";
  3. $taxo_section_tids = taxonomy_get_term_by_name($taxo_section_string);
  4. if (!$taxo_section_tids) {
  5. // add section into this issue
  6. // this will only occur with new section names
  7. $form_values = array('vid' => $taxo_volume_vid, 'name' => $taxo_section_string, 'parent' => array($taxo_issue_tid));
  8. $status = taxonomy_save_term($form_values);
  9. echo "[added" . $taxo_section_string .
Original location: 

none

How to create a site redirect on a sub-directory using .htaccess and PHP

I needed to make the old http://socialsynergyweb.org/oardc domain point to the new home at http://localfoodsystems.org (and include all sub-directory listings under /oardc). Plus, it was desired to place a message letting people know about a timed redirect, and to "update your book marks".

So, here is what I did:

The .htaccess file:

RedirectMatch 301 ^/oardc/.*$ http://socialsynergyweb.org/lfs/index.php

This simply finds everything that is under http://socialsynergyweb.org/oardc and redirects to http://socialsynergyweb.org/lfs/index.php

Syndicate content (C01 _th3me_)