This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

How to create a content type - specific/required by user and required association by all other content.

I'm in charge of modifying a core drupal site in the following way.

1) Users can have one or more content type A associated with their profile.
2) All new user content must be associated with a specific content type A.
a. e.g. If they write a blog entry, the blog must be associated with content type A.
3) When content type A is displayed, all the associated content is displayed along with it (image galleries, blog entries, etc...)

How to hide user with default picture in view

Hi,

I have usernode module and I set up a default user picture (avatar). I want to display latest users by view and there is one problem. I want to hide (don't display in view) users who didn't update their picture because it doesn't look good when there is a 10 the same pictures and only 5 changed . How can I do this?

Help needed to render form on a page

Hello,

I have created a module named hrhcustommodule. I added the following piece of code to hrhcustommodule.module

/* $Id$ */
/**
* Display help and module information
* @param section which section of the site we're displaying help 
* @return help text for section
*/
function hrhcustommodule_help($section='') {

   $output = '';

   switch ($section) {
      case "admin/help#onthisdate":
         $output = '<p>'. t("Displays links to nodes created on this date"). '<p>';
         break;
   }
  
   return $output;
} //function hrhcustommodule_help

/**
* Valid permissions for this module
* @return array An array of valid permissions for the onthisdate module
*/

function hrhcustommodule_perm() {
   return array('access onthisdate content');
} //function onthisdate_perm()

function hrhcustommodule_all() {
  // content variable that will be returned for display
  $page_content = '';

  $page_content = 'hello';
    return $page_content;

}

function hrhcustommodule_menu() {

  $items = array();

  
  //this is added for this current tutorial.
  $items[] = array(
    'path' => 'hrhcustommodule',
    'title' => t('on this date'),
    'callback' => 'hrhcustommodule_all',
    'access' => user_access('access onthisdate content'),
    'type' => MENU_CALLBACK
  );
 
  
  return $items;
}

Filter by menu section

Hi,

I've developed a custom module that replaces the built-in search functionality, which contains a custom form and uses Views (and the search:index filter) to display the search results. This was done due to the specific requirements of the site.

Hide menu items from specific roles

Hi,

I have been trying to hide the "create content" menu item from normal users of my site, i have disabled all the items within the menu, but still the "create content" item appears, all be it with no children, is there a way to remove menu items using hook_menu() or something else?

cheers

How to split radios buttons in multiple collapsible field sets

Hi all,
all is in the title, my radios list is very long, I wan't to keep exclusives choices but I need to save screen space by collapsing groupes of radios buttons.

Thanks

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions