/[drupal]/contributions/modules/contact_forms/contact_forms.module
ViewVC logotype

Diff of /contributions/modules/contact_forms/contact_forms.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.11, Thu Sep 25 04:20:15 2008 UTC revision 1.12, Wed Dec 31 12:37:41 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: contact_forms.module,v 1.10 2008/09/14 09:50:50 gpdinoz Exp $  // $Id: contact_forms.module,v 1.11 2008/09/25 04:20:15 gpdinoz Exp $
3    
4  /**  /**
5   * @file   * @file
6   * Creates a unique Site Wide Contact form with out drop down menu for each of the Contact Categories.   * Creates a unique Site Wide Contact form with out drop down menu for each of the Contact Categories.
7   */   */
8    
   
   
   
 /**  
  * Implementation of hook_menu()  
  */  
 function contact_forms_menu() {  
       // instead of hijacking the path 'contact' we create a path for each contact category  
     $result = db_query('SELECT category FROM {contact}');  
     $num = db_result(db_query("SELECT COUNT(*) FROM {contact}"));  
     if ($num) {  
       foreach (db_fetch_object($result) as $contact) {  
         $name = str_replace(' ', '_' ,$contact->category);  
   
         $items['contact/%name'] = array(  
           'page arguments' => array('$name'),  
           'access arguments' => array(1), // ??????????????  
           'type' => MENU_CALLBACK,  
   
         );  
       }  
     }  
   return $items;  
 }  
   
9  /**  /**
10   * Implementation of hook_form_alter()   * Implementation of hook_form_alter()
11   */   */

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.2