drupal

Remove the red outline on form elements that fail validation in drupal

When a drupal form fails validation, it is redrawn with the elements that failed validation surrounded in a red border. Drupal does this by adding the error class to the input elements, and specifing a 2px red border on input.error elements in system.css. Without modifying this stylesheet, how can I remove the red border on a specifi...

problem with drupal view and php code

Hello, I have a view set up in drupal and I am using some jquery code within the view which hides some data based upon a text box value. Everything is working fine for me when I am logged in. When I log out and access the block anonymously, it doesn't work correctly. I am somewhat new to drupal, and don't know where to begin troubles...

Adding Facebook Log in button to PHP code

I am trying to add the new Facebook log in button to my registration page on my Drupal site. I know the following code is wrong, but I don't know the right syntax to implement it: function facebook_user($op, &$edit, &$user, $category = NULL) { switch($op) { // User is registering. case 'register': // Add a Facebook login button. ech...

Drupal: jQuery media module: how can I pass object ID ?

hi, I'm using jQuery-media module to embed my flash player. How can I pass the current id using the FlashVars ? I can only write static string in jquery Media advanced settings, but I would like to pass the object id, maybe some token ? thanks ...

Drupal development workflow for teams

In my last Drupal project we were 5 people doing coding and installing new modules, at the same type our client was putting up content. Since we chose to have only one server for simplicity there were times were many people needed to write to the same files like style.css or page.tpl.php or when someones broken code would prevent others ...

How to Translate Template Strings in Drupal 6

I have some strings in my theme/template and I was hoping to translate them with t(), but they don't appear in /admin/build/translate/search. I could do it in PHP code and make my own function, but is this "the right way"? ...

Relationships via Email Rather Than User List

I'm new at Drupal, so I may have missed a solution despite a lot of research: I want users to be able to invite non-users and other users into a named relationship they've set up (using e.g. the Friendlist or User Relationships module) using only email addresses and not the user list. I believe that invitations from both of those modules...

restaurant menu card tutorial for drupal?

im new on drupal and want to make a menu for a restaurant showing all the dishes with photos, prices and descriptions in categories (japanese food, chinese food etc). i wonder if there are some great tutorials or modules for this? i cant find any on the web. thanks you ...

Drupal, Lightbox: cannot edit the content inside

hi, I'm using Drupal and Lightbox module to display the content of articles in this website: donatellabernardi.ch/drupal if you click on an article the lightbox is displayed. However I have 2 problems with it: 1) I cannot use the libraries such as the tooltip library qTip from it. (If you move the mouse over the balls, you'll see the...

Drupal auto change user role in module

I am trying to write a module that will change a user's permissions once a node form is inserted into the database. I already have a role assigned when a user registers, but i want that role to be changed once they create a 'company' profile in this case which is when they fill out a cck form of 'company_post' type. My code is below... ...

Why modules link is not coming on Administrator Main page?

I have added two modules in my drupal site called.... 1. me alias 2. Mime mail Whenever we add new modules to our site, it has links on admin page. but after activating modules, i can't see the links on admin page. but this happens only on server but on my localhost i can see the modules links on admin page. i have put screenshot o...

Best approach to limit users to a single node of a given content type in Drupal

I need to limit users to a single node of a given content type. So a user can only create one node of TypeX. I've come up with two approaches. Which would be better to use... 1) Edit the node/add/typex menu item to check the database to see if the user has already created a node of TypeX, as well as if they have permissions to create it...

Drupal CCK Date: how to set datetime field's default value to a fix date?

Hi, I have a CCK datetime field and would like to set its default value to 31 May 2011. When I go to the configuration of the field I can set the default value to Now, Blank or Relative. Relative is to be set by a PHP's strtotime argument. However, it fails when I set it to 31 May 2011 --> I get today in the node add form last day of...

Theming in drupal

I have created a module with one form in drupal.How i can give theme to the form, means applying css and all Thanks in advance.. ...

Drupal content sections

totally new to drupal is there a way to split content into sections and have navigation for those sections i.e. about us about us -opening times -contact -history whats on -this month -this year etc any advice would be awesome ...

Displaying Array in Select - FORM API Drupal

Hi: I want to add key(type_id) and value(type_description) to select in drupal form API $result_x->product_types->RPMProductType is array result from Database :- array(4) { [0]=> object(stdClass)#18 (2) { ["type_description"]=> string(10) "Calendered" ["type_id"]=> int(1) } [1]=> object(stdClass)#19 (2) { ["type_description"]=> s...

How to delete drupal's unused core modules correctly?

Hi I want to delete the unused drupal modules like ( blog, Forum, taxonomy ...) but I'm worried if I delete the modules from the modules directory I might cause an error (now or in the future) . is it safe? and if I deleted the corresponding tables what will happen? the reason for this is because I want to deliver the site to my clien...

Drupal Module Development: How to Communicate between form_submit and page handler functions

I am writing a module and I need to retrieve values set in a form_submit function from a page handler function. The reason is that I am rendering results of a form submit on the same page as the page handler. I have this working, but I am using global variables, which I don't like. I'd like to be able to use the $form_state['storage'] ...

Keeping Drupal updated with Git

I'm trying to figure out how to use the Drupal mirror on Git hub. I'm new to git but have worked out the following: Set up a git Drupal repo * git init * git remote add drupal git://github.com/drupal/drupal.git * git fetch drupal * git tag * git merge <tag_name> Make a branch for my site * git branch <my_site> * git checkout <my_si...

Should I *always* import my file references into the database in drupal?

I have a cck type with an image field, and a unique_id text field. The file name of the image is based on the unique_id. All of the content, including the image itself is being generated automatically via another process, and I'm parsing what that generates into nodes. Rather than creating separate fields for the id and the image, and do...