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...)
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?
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;
}
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.
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?
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.