Using db_query with parameters to select from users table

I'm trying to use db_query to select a filtered list of users (among other things) from the database. I can successfully query with a parameter against tables like node, but not users, not system, etc. If I don't use any parameters, I can get a full list of users from the users table, but once I add parameters, no results in the set.

Here are 2 examples, 1 selecting node based on title and one selecting users based on name. The first result works, the second one does not.

image style problem with portrait images

I've got an issue with image styles.
when using any of the default image style, if an image is in portrait, it is rotated and displayed in landscape but there is not effect in the styles being applyed to rotate the image. anyone know how to get this to work correctly?

Submitted form values to node

Hi,

could someone help me by showing me how to get the values of submitted form printed into a node? I have a form block for which I have created a new module.

test_module.info

<?php
name = "Test module"
description = "A test module."
package = Custom
core = 7.x 
?>

test_module.module

<?php
function test_module_block_info() {
$blocks['test_module'] = array(
'info' => t('A form test - custom form block'), //The name that will appear in the block list.
'cache' => DRUPAL_CACHE_PER_ROLE, //Default
);
return $blocks;
}

function test_module_block_view() {

$block['subject'] = t('Some text here');
if(user_access('access content')){
$result = drupal_get_form('form_test_module');

$block['content'] = $result;
}

return $block;

}

function form_test_module($form, &$form_state) {
$form['description'] = array(
'#type' => 'item',
'#title' => t('Some text here'),
);

//$form['#action'] = url('test-page');

$form['intended_use'] = array(
'#type' => 'select',
'#title' => t('What you need?'),
'#options' => array('Web Hosting'=>t('Web Hosting'),
'File Server' => t('File Server')),
'#required' => False,
);

$form['submit'] = array(
'#type' => 'submit',

ModX to Drupal

We're helping out a new client with a site that's currently on ModX and was abandoned by the original developers... We're migrating it to Drupal 7 to take advantage of Solr and a bunch of other stuff, and I'm wondering if anyone else has any direct experience with moving from ModX to Drupal?

Currently planning on using some custom CSV exports out of their MySQL db and importing them using Migrate. Anyone know of any pitfalls to watch out for? Roadblocks, etc?

Thanks much!

Change the node View Mode with PHP

I have a page template override and I would like to change the node View Mode from the default View Mode to my Mobile View Mode. How would I do this with PHP?

Thanks!

SA-CONTRIB-2012-136 - Apache Solr Search Autocomplete - Cross Site Scripting (XSS)

  • Advisory ID: DRUPAL-SA-CONTRIB-2012-136
  • Project: Apache Solr Autocomplete (third-party module)
  • Version: 6.x, 7.x
  • Date: 2012-August-29
  • Security risk: Moderately critical
  • Exploitable from: Remote
  • Vulnerability: Cross Site Scripting

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x