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

Translation module (locale and i18) for Drupal 4.7

Ive heard through some of the posts that i18 and the other modules needed for auto translation do not yet work with Drupal 4.7 (only 4.6.6).

Is there a timetable for the 4.7 upgrade. ?

thanks
firebbug

Database information display

Maybe this is a dumb question, but what is the best way to go about querying the drupal database in the block hook and displaying the query result. I've been able to generate a list of item titles and either the word object or array, but never the desired content of this database.

howto fire our own content type ?

Hi,
I want to add my own content-type when user clicks add comment to node link. Any Idea ?
Thank you
:)

Using php GET within SQL query

Is it possible to use php GET function with an SQL query?

For example:

I access http://example.com/mymodule?title=CUSTOMTITLE

  $GETTITLEPHP = $_GET['title'];
  $sql = db_rewrite_sql("SELECT DISTINCT n.nid, n.title, b.title, b.logo FROM {module} b INNER JOIN {node} n ON b.nid = n.nid WHERE n.status = 1 AND n.title LIKE $GETTITLEPHP");

This does not seem to work....so is there an alternative?

Any ideas? Thanks.

Intercept taxonomy before the form rendering

Hi all. I have my module (zbtips) and my zbtips_form() function:


/**
* Implementation of hook_form().
*/
function zbtips_form(&$node) {
print_r($node);
/* if ($node->uid == 0) {
$form['name'] = array('#type' => 'textfield', '#title' => t('Il tuo nome'), '#required' => TRUE, '#default_value' => $node->name, '#weight' => -10);
$form['mail'] = array('#type' => 'textfield', '#title' => t('La tua email'), '#required' => FALSE, '#default_value' => $node->mail, '#weight' => -9)
;
}
*/
$form['title'] = array('#type' => 'textfield', '#title' => t('Titolo tips&tricks'), '#required' => TRUE, '#default_value' => $node->title, '#weight' => -8
);
$form['body_filter']['body'] = array('#type' => 'textarea', '#title' => t('Descrizione del tips&tricks'), '#default_value' => $node->body, '#rows' => 20,
'#required' => TRUE, '#weight' => -7);

$form['body_filter']['format'] = filter_form($node->format);
$form['format'] = array('#default_value' => 4);
//print_r($form);
for ($i=0;$i < count($form['body_filter']['format']); $i++)
{
if ($form['body_filter']['format'][$i]['#title'] != 'Filtered HTML')
unset($form['body_filter']['format'][$i]);
else {
$form['body_filter']['format'][$i]['#default_value'] = $i;
$form['body_filter']['format']['#default_value']= $i;

Question about images using the image module

I'm using the image module to display product nodes and using the ecommerce module.

What I currently get, and because the img html tag is being used, is a normal image (in thumbnail size)
displayed as a rectangle.. the image itself is rectangular.

Is there anyway of applying a sort of mask to every thumbnail image so as to display it as circular?
Would I need to use the PHP gd library for this or is there any other simple way ? Any module that could help?
Any suggestions?

cheers

Pages

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