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

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;
}

anyway to have TinyMCE recognize PHP pages

Is there any setting/config to let TinyMCE recognize that a pge is PHP code (like if pahe content starts with php tag.

I just started using Tiny and all was well until i went to edit one of my existing pages which was PHP code - Tiny corrupted the code. Even if after first going to edit page i switched off "rich text" it was too late.

I now have default set to not use Tiny.. but most of my pages are simple HTML so it is a pain to have to turn Tiny on every time.

Thought maybe someway to do this...

anyway to have TinyMCE recognize PHP pages

Is there any setting/config to let TinyMCE recognize that a pge is PHP code (like if pahe content starts with "<?php"

I just started using Tiny and all was well until i went to edit one of my existing pages which was PHP code - Tiny corrupted the code. Even if after first going to edit page i switched off "rich text" it was too late.

I now have default set to not use Tiny.. but most of my pages are simple HTML so it is a pain to have to turn Tiny on every time.

Thought maybe someway to do this...

How to create a book contributor module

I am asked how to create a module which presents all the book contributers, just like http://drupal.org/node/14205.

I think it would be possible to get the information by finding the book root node, and then traverse it and all childnodes an extract the uid from node.

But how do I actually include this in within an actual book. I mean, I must create a special contributor module. That is simple enough, but does it have to mimic book module, in order to be incorporated into books, or...?

Pages

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