English idioms web site

This is a community site for sharing English idioms - anyone can post, edit or browse for their favourite regionalisms. This is also a successful port from the MediaWiki platform to Drupal - we're quite taken with the ease of use, documentation and functionality of Drupal as compared to Wiki.

Thanks to everyone who offered support and advice to us in the forums as we worked to get this site changed over!

http://www.whatdoesthatmean.com

Complex query in Views API - advice

Hi

I want to use the views module to list the nodes returned by a query like this:

<?php 
 $querynobody = "SELECT uid FROM users WHERE name = 'nobody'";
  $nobodyobject = db_fetch_object(db_query($querynobody));
 $query = "SELECT m.evalid,n.title,n.nid,n.created FROM (node n INNER JOIN fhsstadmin_mediation m ON n.nid=m.nid) WHERE n.type='fhsstadmin-mediation' AND m.mediationstatus='0' AND m.evaluid != '$user->uid' AND m.pageuid != '$user->uid' AND n.uid='$nobodyobject->uid' GROUP BY n.title ORDER BY n.created ";
 if ($limitnum >= 0 ) $query .= " LIMIT " . $limitnum;
?>

How do I put in all the ANDs in the end properly?

I know how to expose the various columns using:

<?php
$tables['fhsstadmin_mediation'] = array(
"name" => "fhsstadmin_mediation",
"join" => array(
"left" => array(
"table" => "node",
"field" => "nid"
),
"right" => array(
"field" => "nid"
),
),
"fields" => array(
"mediatoruid" => array(
'name' => "Mediator ID",
'sortable' => true,
'mediatoruid' => "mediatoruid",
'addlfields' => array("mediatoruid")
),
"evaluid" => array(
'name' => "Mediator Eval ID",
'sortable' => true,
'evaluid' => "evaluid",
'addlfields' => array("evaluid")
),
// etc.
),
"filters" => array(

Blocks benefiting from AJAX updates?

I have been working on AJAX updates to the event.module calendar block, and there's now a working patch. The effect is so 'magical', but more importantly such an improvement to the functionality of the block, that I decided to implement the block updating as generic as possible so parts of it can be repurposed for/shared with other modules (eg using a blockupdate.js in /misc).

What blocks would benefit from dynamic updates through AJAX?

Using flexinode for videoblogging

Hello - I'm confused about how I can make RSS feeds for our drupal site. For instance, we have a "videos" section, and it would be great if all submitted videos could be automatically downloaded by aggregators. How would this work, since the videos are embedded into the nodes and not direct links? When you click on our "videos" section, for example (which is a URL alias for "node/322"), you see all recently added videos. How do I turn this into a valid RSS 2.0 feed with enclosures?

I've looked around on this but there is just too much info of a wildly varying degree.

PHP Filter and Method Execution

I have a question about how the PHP Filter works in relation to installed modules. Should module code should be accessible through the PHP Evaluator?

I am finding inconsistencies in how this is implemented. There is code from some modules that I can call through the PHP Filter, and some that I cannot. For instance, if I want to get the latest image from an image gallery, I write something like:

Silly problem with form API, please help!

I'm creating a module with a custom search page.

The form is displayed and the data submitted with validation.

In the function 'formname_submit' I get the posted values, do a query but... how to show results?

The problem is how I pass output from _submit hook function to the function that build the page content?

I haven't understood the connection from post datas and page building.

Thank you much and, please someone should update the documentation page 'Forms API Quickstart Guide' becaus this point is unclear.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 4.7.x