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

Help Needed

Hi,
We are trying to develop a website( role based-content management system).
The requirements are as follows:

There will be a menu option ("Application Form")on the frontpage.
When the end-user clicks on Application Form menu,it should display a form with following text fields.
- Name of Applicant
- Department
- Address
- Email Address
-Submit button

when the user clicks on Submit button,the form should be forwarded to user with the login-ID "CLERK".
Now,the CLERK needs to approve the form submitted by END-USER ,after getting approval from CLERK,the form should be forwarded to SITE-ENGINEER.When the SITE-ENGINEER approves it,it should be forwarded to ENGINEER.

FYI,CLERK,SITE-ENGINEER and ENGINEER are the authorized users who will log-in using there IDs and will act as a authorised person to approve the request.

In short the flow should be like this............
Step I:End user will fill-up the Application Form and submit the form.
Step II:When CLERK will login,the submited application form will wait for approval from CLERK.
Step III:When SITE-ENGINEER will login,the clerk approved application form will wait for approval from SITE-ENGINEER.
Step IV:When ENGINEER will login,the site-engineer approved application form will wait for approval from ENGINEER.

I mean,there will be four users,ENDUSER,CLERK,,SITE-ENGINEER, and ENGINEER and ENDUSER doesn't require any login.The Application Form option will be available on the front-page.Any one can access and use the application form to submit his/her application but it is the resposiblity of CLERK,SITE-ENGINEER and ENGINEER to process that form and put proper comments on the request either on APPROVAL or REJECTIOn of application.

Form validation not working

Hi all!

adminblock.module

This module enables admins to display a block with the comments approval queue and the node moderation queue. Each item will have a edit and delete link.

I made it for my own site and thought maybe someone else also could make use of it.


/**
 * @file
 * adminblock.module 4.5.0v2, Fredrik Jonsson, 2005-02-17
 * Enables admins to display a block with the comments approval queue and
 * the node moderation queue.
 *
 * The block will only show for users with "administer nodes" privilages.
 *
 * If there are no comments to approve and no nodes to moderate 
 * the block will not show.
 */

/**
 * Implementation of hook_help().
 */
function adminblock_help($section = "admin/help#adminblock") {
  switch ($section) {
    case 'admin/modules#description':
      $output = t("Block that display the comments approval queue and the node moderation queue.");
      break;
  }
  return $output;
}

/**
 * Implementation of hook_block().
 *
 * Generates a block with the comments approval queue and
 * the node moderation queue.
 * $nlimit sets the number of comments and nodes to display
 */

function adminblock_block($op = 'list', $delta = 0) {
  if ($op == 'list') {
    $blocks[0]['info'] = t('Admin block');
    return $blocks;
  }
  else if (user_access('administer nodes')) {
    $nlimit = 10;

    $result = db_query_range('SELECT c.timestamp, c.subject, c.cid 
      FROM {comments} c 
      WHERE c.status = 1
      ORDER BY c.timestamp DESC ', 0, $nlimit);
    $items = array();
    while ($comment = db_fetch_object($result)) {
      $items[] = $comment->subject .' - '. format_date($comment->timestamp, 'medium'). ' ['. l(t('edit'),'admin/comment/edit/'. $comment->cid) .']|['.l(t('delete'),'admin/comment/delete/'. $comment->cid) .']';
    }

    $result2 = db_query_range('SELECT n.nid, n.title, n.changed, u.name, u.uid 
      FROM {node} n 
      INNER JOIN {users} u ON n.uid = u.uid 
      WHERE n.status = 0 AND n.moderate = 1 
      ORDER BY n.changed DESC', 0, $nlimit);
    $items2 = array();
    while ($node = db_fetch_object($result2)) {
      $items2[] = $node->title .' - '. format_date($node->changed, 'medium'). ' ['. l(t('edit'),'node/'. $node->nid .'/edit') .']|['.l(t('delete'),'admin/node/delete/'. $node->nid) .']';
    }

    $block['subject'] = t('Admin block');
    if ($items) {
      $block['content'] = theme('item_list', $items, t('Comments queue'));
      $block['content'] .= '<div class="more-link">'. l(t('more'), 'admin/comment/list/approval', array ('title' => t('Administer the approval queue'))). '</div>';
    }
    if ($items2) {
      $block['content'] .= theme('item_list', $items2, t('Content queue'));
      $block['content'] .= '<div class="more-link">'. l(t('more'), 'admin/node', array ('title' => t('Administer content'))). '</div>';
    }
    return $block;
  }
}

Latest headlines block

Hi,
how i can display 5 latest headlines in the block from one taxonomy category?

New headlines module -- your feedback, please!

I've written a module, called headlines.module, which is designed to create newspaper-like "headlines pages" for Drupal websites. It lets admins organize content into "sections" (like the sections of a newspaper. Each section can include multiple "topics." (For example, a sports section might include topics such as baseball, football, tennis.) Topics are derived from taxonomy terms, with a couple of refinements. First, a "topic" encompasses a term and all of that term's child terms. Second, there are a couple of "special" topics called "top stories" and "miscellaneous" that don't correspond to any taxonomy terms. Within each topic, there can be multiple "items," each of which lists the headline and an optional brief summary description for a single Drupal node.

Headlines.module is designed to interoperate with a separate module that I've written, called abstract.module, which manages the brief summary descriptions for each item on a headlines page.

Before adding these module to Drupal contributions, I'd like to get as much feedback as possible. For the time being, therefore, they can be downloaded as tarbells from my website, at the following URLs:

http://www.prwatch.org/headlines.tar.gz
http://www.prwatch.org/abstract.tar.gz

I'd appreciate any comments. I would also like to get feedback specially about abstract.module. Its function is very similar to the existing excerpt.module. The difference is that excerpt.module uses the teaser field in the node table to store its content, while abstract.module maintains a separate table for this purpose, thus leaving teasers unchanged. I'd like to know whether people think it would be best to:

Mod'ing Poll module to allow for multiple votes at the same IP

I am looking at trying to modify the poll module to allow multiple votes from the same IP. I have a website that runs Drupal 4.5.2 that is public to the internet but also mainly accessed via a controlled kiosk at a museum. I want to offer a poll but since the kiosk is always on the same IP you can't ever vote more than the first time.

I don't know whether this modification would be useful to the community at large or not but to even get there I was curious about a couple things:

Pages

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