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

Advanced Search with Drupal

Is anyone thinking about an 'advanced search' module that can let you filter nodes on multiple terms of the same vocabulary or of different vocabularies ???
This could help very much Drupal Users !!

I would be interested in doing it....

Matteo

image.module sql problems

Using drupal 4.2.0, image.module 4.2.0

When clicking on the 'Read More' or 'Add Comment' links for an image node, I am presented with this error:

event.module putting events on wrong day of calendar

I've installed the current event module on my site and I'm having problems with the way it pulls events and places them on the calendar. Here's an example...

http://er7600.com/event/2003/08

The event "Afterburn" that is displayed as taking place on the 1st of August is scheduled to be on the 1st of September. I've checked the node and there's nothing wrong with it as far as I can tell.

guestbook

What's the best way to write a guestbook.module? (Like a real guestbook with nice links) Not a static page where people can add comments, now but a nice little static texts whith some links under it that say "read the guestbook" and "sign the guestbook"

FIX for random thumbnails in image.module

The random thumbnails weren't working for me -- sometimes I wouldnit get a thumbnail for an album on the gallery page.

When I looked at the code, the query didn't seem to make sense...

A patch follows, although it uses the mysql specific LIMIT clause -- Postgres has something similar, but what is the prefered way of handling this type of thing?

J


--- image/image.module	2003-08-18 12:03:14.000000000 -0700
+++ image2/image.module	2003-08-18 12:08:21.000000000 -0700
@@ -1229,10 +1229,10 @@
     $albums[$term_id]->thumb = $last_update->thumb_path;
 
     if (variable_get("image_gallery_thumb", "last") == "random") {
-      $nodes = db_fetch_object(db_query("SELECT MIN(nid) as min, MAX(nid) as max FROM {node} WHERE type = 'image'"));
-      $id = rand($nodes->min, $nodes->max);
-      $random = db_fetch_object(db_query("SELECT i.thumb_path FROM {node} n INNER JOIN {image} i ON  n.nid = i.nid INNER JOIN {term_node} t ON n.nid = t.nid WHERE t.tid IN (". implode(",", $terms) .") AND n.type = 'image' AND i.personal = 0 AND n.nid >= ". $id ." LIMIT 1"));
-      $albums[$term_id]->thumb = $random->thumb_path;
+      $id = rand (0, ($albums[$term_id]->image_count - 1));
+      $result = db_query ("SELECT i.thumb_path FROM {term_node} tn INNER JOIN {image} i ON tn.nid = i.nid WHERE tn.tid = ". $term_id ." LIMIT " . $id . ", 1" );

Module development guidelines?

Are there existing module development guidelines?

One of the things I would like to see in particular are some guidelines around content display/generation. So, no hard-coded styles, no hard-coded attributes like position etc.

Ideally, all content should be semantically tagged so that CSS styles can be applied for styling. Each module should ship with a default CSS file, which can then be modified or integrated into the main stylesheet.

Pages

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