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

$op = 'settings' doesn't work in nodeapi example module

Hello,

I'm trying to get the nodeapi example module to work, but it seems it doesn't.

Blank admin>>modules page

Hey there, I've just recently installed Drupal 4.6.5 and am currently installing various modules that I would like to use. I've got several modules installed as of now, but have come to a point where several modules keep messing some stuff up as soon as place their xxxx.module file in my module directory.

The main problem is that once these module files are uploaded through my ftp site, I can't access the admin >> modules... I just get a blank page! Then as soon as I take the module file back out off my ftp site, it's fine again.

Raw Newb asking about architectural issues

OK I really really have RTFM. And its darn good, kudos and all that.
I am trying to write my first Drupal module. Some things are a breeze, but heres where I am stuck:

I don't understand exactly what a node is. (stop laughing) Is it just an abstraction of an html page held in the db? The page vs story vs node thing confuses me.

Module Proposal: Smart Search Module

Need:

Many sites require advanced search functions. These include the ability to search specific node types as well as specific taxonomy terms or vocabs. Furthermore, many sites would benefit from the integration of the Location modules radius search ability within an normal search environment. Finally, sites would benefit from the ability to create multiple "restricted" advanced searches. RSS feeds could be assigned to searches allowing users to monitor specific search criteria automatically through their feed reader. Email notification could also be useful.

Use Cases:

The most obvious use case for such a module would be a job search board. Admin could create a vocabulary for job postings and a flexinode or custom node type. Job searches would be restricted to this node type. Example: http://www.aupeace.org/search/jobs. On the same site, admin could create a "smart search" for housing restricted to housing vocabs and/or node types. Admin could also create a "smart search" within a taxonomy term, or possibly within a specific book with longer publications.

Past Implementations:

As of 4.7, the ability to search based on taxonomy and node type is included in the core. However, the advanced search defaults to include all node types and terms (at least all non-free tagging terms from what I can tell). The SQL Search module does offer the ability to control which vocabs and which node types are part of an advanced search, but the module is being discontinued after 4.6. Also, SQL Search allows an admin to create specific settings for one advanced search. Admin cannot create multiple advanced searches.

MySQL warning, can't import module

I'm trying to import playlist.mysql, which is this:

CREATE TABLE `playlist_relate` (
`rid` int(11) NOT NULL auto_increment,
`parent_id` int(11) NOT NULL default '0',
`child_id` int(11) NOT NULL default '0',
`weight` int(11) default '0',
PRIMARY KEY (`rid`)

and MySQL gives me the following error:

#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 6

4.7 Module Upgrade, getting warning: implode(): Bad arguments error

I upgraded to 4.7 over the weekend, including refactoring some of the modules I had written.

One is for a module about procedures, it has a _block function in it. The overall module works, but when I use the block I get this error on the "create content" pages. I suspect this is a bug in my code - since other blocks are setup and not throwing this.

warning: implode(): Bad arguments. in /home/vividselfadmin/public_html/modules/node.module on line 363.
user warning: You have an error in your SQL syntax near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.moderate, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/vividselfadmin/public_html/includes/database.mysql.inc on line 124.

Full Block code is:

<?php
/**
* Sidebar block for procedure, with callout info
*/

function procedure_block($op='list', $delta=0) {
// listing of blocks, such as on the admin/block page
if ($op == "list") {
$block[0]["info"] = t("Procedure Sidebar");
return $block;
} else if ($op == 'view') {

$node = node_load(arg(1)); //get the current page node info
if ($node->type != 'procedure') {
return;
}

Pages

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