Archive for the 'Drupal' Category

How to directly expose a table for editing?

Monday, May 7th, 2012

I have imported all the tables from an external database into my Drupal 7 database. I would now like to create a view/or some other item that will allow me to view and edit the fields of these imported tables directly. For example: An imported table would be ‘Gateways’ and it would have the columns [...]

Hide Custom Line item Fields based on taxonomy

Monday, May 7th, 2012

I am busy with a Drupal 7 commerce site. There is a product type “Golf Clubs”. With different taxonomy Terms assigned to the products. How can I create a view to hide custom line item fields based on taxonomy. – Answer –

What is the "right" way to track a custom patch to a contributed module?

Monday, May 7th, 2012

I need to apply this patch to my site: http://drupal.org/node/483176#comment-5939648 What is the “right” or “responsible” way to track this change? We use Git for version control. – Answer –

CKE editor not showing up until I upload an image?

Monday, May 7th, 2012

If I add content as admin, it works fine right from the beginning(using admin overlay). But if I login as another role then CKE editor wont be neabled until I upload the image. In Both roles FULL HTML is the default text format. What might be the reason for this? When I upload an image, [...]

drupal 7 flag user login for anonymous user

Monday, May 7th, 2012

i want When anonymous users –or otherwise unprivileged users– visit my site they click on flag For these users you may wish to show a “Please log in” link instead in the lightbox or colorbox like facebook. i am use drupal 7. – Answer –

Finding variables available in preprocess node or node.tpl.php from cck fields

Monday, May 7th, 2012

Would really appreciate help resolving this. I am using D7 and the devel module is not an option, for some reason it causes some problems with my site. I have looked into the contemplate module but see it isn’t supported in D7, otherwise it would be great. Is there any quick way for me to [...]

How to add id to a block

Monday, May 7th, 2012

For example I have the code: function contact_block_view($delta = ”) { $block = array(); switch ($delta) { case ‘contact_block’: $block['content'] = drupal_get_form(‘contact_form’); break; } return $block; } How to set inside this block the id or class attributes? – Answer –

positioning sticky field using hook_form_alter in drupal 7

Sunday, May 6th, 2012

I’m trying to remove the sticky option from the option bar and adding it to the user form. function vacancies_form_vacature_node_form_alter(&$form, &$form_state, $form_id) { // remove sticky field from default (option) location unset($form['options']['sticky']); //create new sticky field $form['sticky'] = array ( ‘#type’ => ‘checkbox’, ‘#title’ => ‘Top vacature’, ‘#default_value’ => $form['#node']->sticky, ‘#weight’ => -1, ); dsm($form); [...]

Display some content on selected pages

Sunday, May 6th, 2012

My project runs on Drupal 6, and I’m using Views. I have a main menu with two submenus (menu -> sub1 -> sub2). This image shows what it looks like on my “edit panel.” The box with an orange border is the second submenu, and the one with a black border contains the item content [...]

Mouseover instead of click

Sunday, May 6th, 2012

Has anyone gotten the Quicktabs module to work on mouseover/hover instead of click? There was a patch for version 6.x-2 that does not work with the current version. – Answer –