drupal

Loading users from an SQL query - the correct way

I have an SQL query that lists the uid of all users who have a certain role: SELECT u.uid FROM {users} as u, {users_roles} as ur WHERE u.uid = ur.uid AND ur.rid = 10 ORDER BY u.uid DESC I need to load them all in an array as objects for listing. I asked a question previously that left me only with the answer that what I wanted to d...

Drupal Exclude taxonomy listing pages from search.

I have a Drupal 5 site that needs to have has taxonomny listing pages excluded in the search results. For instance http://site.com/category/role/guest-speaker returns a listing of all of the nodes tagged with guest-speak in the vocabulary role. I tried Advanced Search module. This just prevents searching for terms. I then had a hunc...

Drupal select list only submitting first character

I have a select list I've created in a form alter, however, when I select an option and submit the value, only the first digit gets stored in the database. I know this has something to do with how the array is formatted, but I can't seem to get it to submit properly. function addSR_form_service_request_node_form_alter(&$form, $form_stat...

Prevent drupal from loading other module's javascript

I have a drupal page that I'm using in a way that's very different from all the other pages of the site. I have a module that loads a set of specialized js on this page. I'm finding that my JS does not work well with the js from other modules or perhaps drupal core. How can I prevent the other modules from doing drupal_add_js on that s...

Hide "Authoring information", "Menu Options" and "Publishing Options" in node creation form

I want to hide these fieldsets in a Drupal 6 site for some content types (not for all of them), because these options are unnecessary and confusing to the end user. How can I do this? Thank you! ...

drupal : how to restrict users to only be able to see one contentType

i have created a contentType called "Price". I wish to set permissions so that users of the role "PriceUsers" can only see content of contentType "Price" I am using drupal 6 ...

How to only show one content type with Content access

I'm using the "Content Access" Module. I have created a user call "PriceUser" which I want to only be able to see the content of the content type "Price". ie "PriceUser" goes to "/admin/content" and can only view price content. so in order for "PriceUsers" to just view contentType "FundPrice" i need to uncheck "administer nodes" i t...

Drupal - editing tab options for a content type not showing up

I'm working on a D5 site and a lot of the content types have the menus at the top of the edit page. Examples: Overview | Grants | Dev load | Dev render | Edit | Revisions | Track | Workflow Overview | Dev load | Dev render | Edit | Revisions | Track | Workflow | Node queue | RelatedContent I'm not sure where these tabs come from, b...

$op variable for form_alter

I am having a hard time using the $op variable when working with forms. It seems that the $op variable is generally part of node_api (which I haven't really used), but what about the $op variable in a form alter? How can I make my form alter apply when the node is being edited vs. created? ...

Drupal theming stop using panels for mobile site

Hello, I'm working on a Drupal mobile site which is powered by the Mobile module. The non-mobile theme uses panels, and the mobile theme does not. I need to turn off panels for the mobile theme as the panels appear and ruin its layout. How can I do this, or is there a better way to achieve a separate mobile site in general? We're runnin...

When to develop a new drupal module vs. work with what exists?

This can probably apply to other extensible content management systems, but I've been working with Drupal. Specifically I created an image sharing web application whose functionality relied on more original code than Drupal core code. I used the WebForm module and point its forms at Custom Pages with hard coded php to have nodes create...

Drupal views filters dynamically

Hi, I am integrating location with views modules in the filters options I find a distance/proximity filter, I need to dinamically set latitude and longitude using geolocation html5 feature. Anybody have an idea to help me??? I try Service module too, to make json requests but I dont know how to add filters paramenters. Thanks your help...

Drupal form validation not working for me

I am trying to modify some Drupal 6 form code and incorporate some native form validation. Code looks like this, but validation does not work. I never even get into function thisFormName_form_validate. Any Drupalians have some good ideas? function thisFormName_form_alter(&$form, $form_state, $form_id) { $form['email_address'] = arr...

Programming of TV, replicatable in Drupal / Javascript?

I was watching TV and wondering what programming languages get the continuous digital video to the TV. I am assuming it is on the receiver. But the major question is that could this be reproducible using JavaScript (JQuery) or Drupal? And to be clear, the end result would be a site that simply displays continuous video in full screen t...

Most stable Linux Distribution for Drupal?

I have a VPS that is running Fedora Core 6, with yum somehow removed (Why do you do that Network Solutions?). I don't have an overwhelming amount of experience with any distribution of Linux, so I set up my own server running FC12. However, when I transferred over my Drupal site, I had some errors that I had trouble fixing. Granted, the ...

Handling file uploads in Drupal

I've been messing around a bit with various solutions to what I would see as a fairly common problem, but I've not yet been able to solve it in a satisfactory way. What I wish to achieve is some kind of functionality where a user can upload new files, or select existing files to reuse them. What I've been using so far is a combination...

Changing Drupal notifications e-mail address

Hello, I am using built in Drupal 6 user module, fore user registration, forgot-your-password-emails and all that stuff. When a notification is sent by e-mail for confirming reistration, resending passwords, etc, these are sent from a different e-mail address to the one I want. I dont remember where I configured this setting, and canno...

Which one to use for payments on Drupal website, LM_Paypal or Ubercart ?

Hello, Im a new Drupal user . I want to be able to handle payments on my Drupal website. I would like to know which would be a better option, LM_Paypal module or the Ubercart module ?. Does the Ubercart module have any specific advantages over the LM_Paypal module or vice versa ? Please help. Thank You ...

Drupal: Taxonomy & Security

I have an intranet on the Drupal platform. I am using permission to restrict access to certain node types that have sensitive information in them. This is all working nicely. However, some of theses sensitive nodes use taxonomy as a method of categorization. The problem is, I have found certain paths, apparently created by the taxonomy ...

Hooking user registration in Drupal

I have a site where some users will be registered by our staff, and won't have emails associated with them. I would like to keep the email field a required field, so I devised a random email generator. function generateRandomEmail() { $email = 'noemail'. rand(0,1000000) . '@noemail.com'; return $email; } So, I attached th...