Drupal is up and running but how do I ...?

Taxonomy context - getting things in order - please help!

I'm using the Taxonomy_context module to display a term, with its sub-terms, then the nodes below each sub-term. However, I'm perplexed about the order in which the nodes get displayed.

What I want, is to display the nodes ordered by title. What I get, is the nodes ordered by create date.

I thought, easy enough, just hack the module to sort the way I want. Trouble is a can't find where!!!

I thought, here is the place (only place I can find where taxonomy_context outputs nodes:

function taxonomy_context_show_nodes($tid) {
  static $context;
  if (!isset($context)) {
    $context = taxonomy_context_get_context();
  }
  $output = "";
  $sql = "SELECT DISTINCT(n.nid), n.title, n.body, n.type, " .
    "n.created, n.changed, n.uid, n.sticky, u.name FROM {node} n " .
    "LEFT JOIN {term_node} r ON n.nid = r.nid LEFT JOIN {users} u ON n.uid = u.uid " . node_access_join_sql() .
    " WHERE r.tid = %d AND n.status = '1' " . node_access_where_sql() .
    (variable_get("taxonomy_context_use_promote", 1) ? " AND n.promote = '1' " : "") .
    " ORDER BY sticky DESC, n.created DESC";
  $result = db_query($sql, $tid);
  while ($node = db_fetch_object($result)) {
    if(!strpos('<?', $node->body)) {
      $params = array("title" => node_teaser(strip_tags($node->body)));
    }
    if ($node->nid == $context->nid) {
      $params["class"] = "active";
    }
    $link = l($node->title, "node/". $node->nid, $params);
    $output .= "<li class=\"leaf\">" . $link . "</li>";
  }
  return $output;
}

But when I change "ORDER BY sticky DESC, created DESC" to "ORDER BY sticky DESC, n.title DESC" nothing happens. Am I looking in the right place?

I would be really grateful for any light anybody can shed on this as I am stumped.

Fatal error: Call to undefined function: db_escape_string

What?? This is showing up in several places.... uh... any ideas... I've been able to deduce that db_escape_string was the replacment for a query string but it seems to not have been defined or something... I'm a bit confused...

db_escape_string

Fatal error: Call to undefined function: db_escape_string() in /home/nashrad/public_html/drup45/modules/fscache.module on line 7

Problems with HTMLarea and Images

I'm having a strange problem with HTMLarea and images. Seems that only the admin can actually see the pictures in the "Drupal insert image" box and in the HTMLarea.

As a regular user (or even another user type with all the image permissions turned on) all folks see is a red X where the image should be. This happens even for images the user uploads him/herself.

When I test the image locations manually for normal users, I get the following:

Module Enabling Problems

I got Drupal up and running and have started configuring it but for some reason it won't let me enable any of the modules. It's a fresh install of Drupal 4.5 on Apache with MySQL 4.1. So does anyone know what’s going on?

Non user-editable Profile fields

What would be the fastest way to create a profile field that was not editable by the user, or better, to limit modification of certain user fields based on role?

drupal running good but I keep getting sql errors

such as

"user error: Access denied for user: 'mn12tech@3.1.6.%' to database 'mn12tech'
query: LOCK TABLES sequences WRITE in /home/content/b/i/l/billabong132/html/includes/database.mysql.inc on line 125.
"

This happens when a new user registers

or when a new user posts content

however, the error does not prevent the action from happening.

If you go back to the site, the user will be registered and the content will be there so the database is being written to, so I don't understand these errors.

Thanks.

Pages

Subscribe with RSS Subscribe to RSS - Post installation