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

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

cron jobs

I suppose this is a stupid question but here I go: am I supposed to set up a cron job using my web control panel to run cron.php daily? I don't suppose it magically runs itself. I've just never read any docs that tell me to do that.

Jay

About the way to show off contrib modules/themes in Drupal -vs- other models

This is mostly a request to change (or maybe extend) the current model.

Please, compare with the phpBB or WordPress models.

phpBB has its own official database for MODs and Themes. Developers may host their contribs at other places (there are lots) or even at their own sites. People in certain phpBB Teams validate what authors submit to be published at the official repository, but development and or support may take place wherever. phpBB offers some forums for authors and contrib support, but that is not required.

Where is paypal_framework.module.

I want to add paypal functionality to my website. But I couldnt be able to fine paypal_framework.module (as paypal_subscription.module is dependent on that.) . Can anybody tell me where is this module.
Thanks in advance.

Pages

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