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

Library of Content

Can anyone tell me if there is a Library module out there? Basically, Im looking to create a library of documents that are kept seperate from my site content. The library will have a category structure with basically two levels of categories; root level categories (lets say 10 of them) and sub-categories (200 total, 20 per root category).

Our site will be displaying news, aggregated content from feeds, and user comments. I would like to keep this library of documents seperate, yet be able to embed certain documents within specific categories (based on vocabulary/taxonomy).

How do I display one teaser followed by a node_title_list?

I'm trying to make a page that displays the most recent node's teaser followed by a node_title_list that excludes the most recent node.

I've already set up a page that displays the teaser for the most recent node and displays a node_title_list, but I can't figure out how to exclude the node whose teaser is displayed from the node_title_list:

<?php $nlimit = 1; ?>
<?php $result1 = db_query("SELECT n.nid, n.created FROM {node} n WHERE n.status = 1 AND n.type = 'flexinode-2' OR n.type = 'flexinode-7' OR n.type = 'flexinode-6'  OR n.type = 'flexinode-11' OR n.type = 'flexinode-4' ORDER BY n.created DESC LIMIT $nlimit"); ?>
<?php while ($node = db_fetch_object($result1)) {$output .= node_view(node_load(array('nid' => $node->nid)), 1);}; ?>
<?php print $output; ?>


<?php $n2limit = 25; ?>
<?php $result2 = db_query("SELECT n2.created, n2.title, n2.nid, n2.changed FROM drupal_node n2 WHERE n2.status = 1 AND n2.type = 'flexinode-2' OR n2.type = 'flexinode-7' OR n2.type = 'flexinode-6'  OR n2.type = 'flexinode-11' OR n2.type = 'flexinode-4' ORDER BY n2.changed DESC LIMIT $n2limit"); ?>
<?php $output2 .= "<div class=\"item-list\"><ul>\n"; ?>
<?php $output2 .= node_title_list($result2); ?>
<?php $output2 .= "</ul></div>"; ?>
<?php print $output2; ?>

One method I thought might work: save the first node's nid and exclude it from the db_query. The problem is I don't know how to include variables in the query. I tried saving the first node's nid to a variable $first, but it just causes a mySQL error when I place it in the db_query, as in "AND n2.nid != $first" or "AND n2.nid != $result1->nid" or something similar.

How do I restrict anonymous access to all but front page?

How do I restrict anonymous access to all content except the front page? I want to create an intranet and create content for authenticated users only. But if I restrict anonymous access to content in the node module, there is an ugly "Access denied
You are not authorized to access this page." message when someone hits the front page. As far as groups, I'm using OG.

Create a node in an action and make sure workflow knows about it?

Hi

I have 4.7-beta3 with actions and workflow installed. I create a custom node (A) which has a workflow (WA) associated with it. One of the actions is to create an instance of another type of node (B) which has another
workflow (WB) associated with it.

When WA implements the action to create B:

function action_fhsstadmin_createevaluationentry($op, &$edit, &$node) {
   $roles_array = user_roles();
   ksort($roles_array);
   $roleids_array = array_keys($roles_array);

   switch($op) {
     case 'metadata':
       return array(
         'description' => t('Submit for evaluation ...'),
         'type' => t('Node'),
         'batchable' => false,
         'configurable' => true,
       );
       break;
     case 'do':
        $edit = new StdClass();
        $edit->pageuid = $node->uid;
        $edit->pageid = $node->nid;
        $edit->title = $node->title." Evaluation";
        if ( $node->month && ! $node->generated_date ) {
        $edit->created = mktime ( 0, 0, 0, $node->month, $node->day, $node->year);
        $edit->changed = $edit->created;
        }
        node_save($edit);
        //workflow_nodeapi($edit,'insert');
     break;
     case 'form':
     break;
   }
}

B is created via the node_save call but when I edit B the workflow states don't register - I check that workflow_node database but B isn't registered as being created. I presume that workflow_nodeapi wasn't called. Even if I uncomment the line above:

Acidfree CSS question... in Firefox, the folder image doesn't center in the table cell, but the caption text does

Try 2 - I was sure I posted this, but it doesn't show up in the forums or in "my recent posts"

In Firefox, the Acidfree folder image isn't centered above the folder name. I had a much more long-winded post about the CSS involved, but suffice it to say that it works in IE and I can't see any reason why it shouldn't work in Firefox 1.5 either. There's a bug in IE where "margin: auto" divs aren't centered properly unless you exploit another IE bug - which is exploited (intentionally or not) in the default acidfree CSS, thus it works in IE.

user error: Table 'drupal.term_access' doesn't exist

"user error: Table 'drupal.term_access' doesn't exist
query: SELECT * FROM term_access where tid = '0' in /var/www/includes/database.mysql.inc on line 66.

warning: Cannot modify header information - headers already sent by (output started at /var/www/includes/common.inc:384) in /var/www/includes/common.inc on line 192."

Why lord, why?

I just did a clean installation of Drupal and now get this when I try to add a new page.

How do I manage to fix it, mates?

Pages

Subscribe with RSS Subscribe to RSS - Post installation