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

Force page to be cached even for logged in user

One of my modules uses menu callback to output css. A little overhead might be to generate it everytime. How do I force browser to cache this CSS? Some headers? Or even would be great and I could force that CSS page to be cached by Drupal.

Get a list of all the nodes belonging to a category

Hello,

I am writing a module to define a new node type.
I am comfortable with that.
However...
In my taxonomy, I have defined a category called "issues", with the terms "issue_001", "issue_002", and so on. An article needs to set which issue it belongs to.

Within the module, I need to find all the nodes which belong to the category "issue_001". It's important that I getch the nodes starting from "issue_0001", and not from the term id.

This is obviously a simplification of my task. However, it gives you an idea...

Any hints?

Merc.

How to create two nodes (or more) at the same time?

Hi, I'm trying to develop a node type module basically to create nodes under a taxonomy term.

When user selects or creates a new taxonomy term I want to take user to a node submision page under that term.

It seems easy just creating one node as usual but I want to have 2 or 3 forms(title and body set of fields) at the submission page each for a different node.

Is this possible?

Are there any core/contributed modules which have a similar function that I can look for inspiration?

Or anybody have an idea how to implement it?

Problem with a sql query.

I would appreciate any help with the following query. I have tried it many ways but can't get the desired result. I am taking the result of a sql query and inside the loop I am trying to pull some data from another table that has the same c_id#.

Tutorial for creating tables?

I need to create a table with the ability to sort by clicking on the different headers. I can't find any tutorials for doing so in Drupal. Can anybody point me in the right direction?
Thanks,
Billy

PS - This is for a module I'm developing, but it may as well be a static page.

Can I cause a php snippet to run when preview or submit is clicked?

I'm developing a module which grabs contents from an external page authored in Macromedia Dreamweaver, and inserts it into the body of a new node. I have a form which allows me to enter the path to the page, the start and end delimiters, and a couple other things. Once the data is entered, I submit it, and it creates the node. What I'd like it to do is run the import code snippet when I click on preview or submit, so that the page is sucked in and stored in the database.

The two problems I have right now are (and I'm sure this reveals my ignorance of PHP :-):
1. When the node is created, the page grabbing php code snippet needs to use the path, delimiters and other variables I've entered in to the form before it's been written to the database.
2. The page grabbing code needs to run and update the body every subsequent time that the preview or submit button is clicked.

I'm working from the node_example.module code. Here's my module code.


<?php
// $Id: mmcontrib.module,v 1.153 2006/02/21 18:46:54 binky Exp $

/** Database definition:
* @code
* CREATE TABLE mmcontrib_data (
* nid int(10) unsigned NOT NULL default '0',
* path varchar(255) NOT NULL default '',
* subpath varchar(255) NOT NULL default '',
* startdelim varchar(255) NOT NULL default '<--starthere-->',
* enddelim varchar(255) NOT NULL default '<--endhere-->',
* updinterval int(10) unsigned NOT NULL default '0',

Pages

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