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

Classified ads module

I am working on a classified ads module that integrates with Drupal, and possibly release it to the drupal community if there are sufficient interest.

Q: Profile iterest links like on drupal.org

How would I go about tweaking my user page so it displays people's interests as links and keep them all categorized in a taxonomy type structure like on drupal.org? If you go and view my profile here: http://drupal.org/user/42008 and then click on one of my interests it will then take you to a page with everyone else who has the same interests. Does anybody know how this could be achived?

Thanks!

Profile Comments?

I'm sorry that I didn't really know where to post this, but is there a module that I can install to allow users to comment on other users' profiles? If so, is there a module that has to be installed so that module can function correctly?

Thanks
Natsuki Orsiko

Out of control patching or core hacking what's the difference?

og module for forums, freetagging, taxonomy, access i18n and probably more that I don't know about. These modules all have new, old , conflicting and not working patches are just glorified hacks to the core. Yet they all have contrib status. Add to the confusion with the fact that a patch only applies to a certain version of a module and the modules have no versioning. To the average joe like me this is all very confusing and impossible to fix and keep track of.

There's got to be a better way!!!

Pages within modules

Is it possible and how, do I create pages within the modules script?

You have the normal pages...form, main, settings, etc. Plus, I have a custom overview page.

But, how do I add more than one custom page?

node title in recent comments block

I am looking to try and achieve 3 things with the recent comments block:

1/ Have the node title displayed above each of the recent comments in the recent comments block.
2/ List (eg) 30 words of each comment
3/ Get rid of the time stamp

The code in the comments module that i think must be tweaked is this:

/**
 * Implementation of hook_block().
 *
 * Generates a block with the most recent comments.
 */
function comment_block($op = 'list', $delta = 0) {
  if ($op == 'list') {
    $blocks[0]['info'] = t('Recent comments');
    return $blocks;
  }
  else if ($op == 'view' && user_access('access comments')) {
    $result = db_query_range(db_rewrite_sql('SELECT c.nid, c.* FROM {comments} c WHERE c.status = 0 ORDER BY c.timestamp DESC', 'c'), 0, 10);
    $items = array();
    while ($comment = db_fetch_object($result)) {
      $items[] = l($comment->subject, 'node/'. $comment->nid, NULL, NULL, 'comment-'. $comment->cid) .'<br />'. t('%time ago', array('%time' => format_interval(time() - $comment->timestamp)));
    }

    $block['subject'] = t('Recent comments');
    $block['content'] = theme('item_list', $items);
    return $block;
  }
}

From looking at the code above, would i need to add to the $result query to SELECT title FROM {node}? How would i actually code that in?

With the length of the recent comment itself, where can this be altered?

Pages

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