Tabbed Sub-menu

Short and sweet - I am using D7. I am interested in getting the same sort of sub-menu effect as on drupal.org. For instance, when you click on Download & Extend, you get a set of sub-menu tabs in the white region. What would be the best place to start if I want to create this same effect on the theme I am working on?

Thanks!

db_query with named placeholders error

Hey guys, I'm trying to use the db_query function with named placeholders but I'm getting this error message:

PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens: SELECT {node}.nid, {field_data_field_link}.field_link_value, {field_data_field_image}.field_image_fid FROM {field_data_field_link}, {field_data_field_image}, {node}, {field_data_field_placement} WHERE {node}.type = 'advertisement' AND {node}.nid = {field_data_field_link}.entity_id AND {node}.nid = {field_data_field_image}.entity_id AND {node}.nid = {field_data_field_placement}.entity_id AND {field_data_field_placement}.field_placement_value=':placement' ORDER by rand() LIMIT :num; Array ( [:placement] => Header [:num] => 1 ) in random_advertisement()

This is the code I am trying to use:


// --- Variables to replace the placeholders in the SQL statement
$sql_vars = array(
':placement'=>$placement,
':num'=>$num
);

// --- Get all of the advertisement nodes from the database
$result = db_query('SELECT {node}.nid, {field_data_field_link}.field_link_value, {field_data_field_image}.field_image_fid
FROM {field_data_field_link}, {field_data_field_image}, {node}, {field_data_field_placement}
WHERE {node}.type = \'advertisement\'
AND {node}.nid = {field_data_field_link}.entity_id

MS SqlServer Access from Drupal running on MySQL

Is it possible to have a module that talks to MS SQL Server on a different server from a Drupal Installation built on MySQL?

Are there any PHP issues related to interacting with 2 different database systems.

Does anyone have or know where there is an example?

Thanks.

base_url

Hi,

When i'm pointing in my website to for example an image in my theme folder I always use this code:

global $base_url; echo $base_url.'/'.$directory.'/';

but this is pretty long, is there another way to do this?

grz

simplenews unsubscribe button

hallo,

i have installed the simplenews module on drupal 7.
now i only see the subscribe button. in earlier versions there were both buttons, subscribe and unsubscribe. i have tryed all settings i found, but i can not figure out how to do that. does anybody know what i can do to show both buttons?

thank you for any help.

best
fred

Default Image for field_create_field, where to put the path value?

Hi, I was wondering if anyone knows what value I should put for the default_image for creating an image field?

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x