drupal

How do I set the value for a CCK Node-reference field automatically when create form submits

I have a content type (A) that references a single node of a different content type (B). The node referenced (B) can be programmatically determined using the information for the user creating this new node (A)... Each user can only create a single node of the referenced content type (B), so this single node will always be referenced from...

creating a drupal non-cached template variable

In drupal 6 I'm trying to execute a function on every page and output a different link based on what IP address someone is coming from. However, when I try this, it seems that the result is getting cached. I have tried this as a module and in template.php, but have not gotten results. What is the best approach to make sure this function ...

Drupal Views: How can I log searches ?

Hi ! Is there a module that allows me to log all the searches made on a view ? Thanks ! ...

Drupal books and primary menu

Hi, A quick question I have couple of books (3) on my site and I add the main page to a primary link and it work, but I just realized that the child pages of those books are not keeping the primary link selected. I has been looking around for a solution, but so far I don't have anything yet. In a nutshell: How can child pages of a book...

Unable to access "create content" "blocks" or "my account" on new drupal installation

I'm switching one of my clients websites over to Drupal and when I try to navigate to Create Content, Site Building -> Blocks, or My Account it redirects me to my client's existing homepage with a path that seems like it should work (ex. domain.com/?q=node/add). I've searched the stack and googled about the problem and haven't found any...

In drupal, does features ignore or delete fields on live data?

We're considering using Features module for pushing out changes to production servers. If a feature is to update an existing node with exisiting data, how will it behave? For example, if the update will remove a field, will it remove all data corresponding to this field? If I just rename a field, will it create a new field on the nod...

Drupal Modify Login System

Hi all, I'm newbie in drupal... I have a drupal website, and i want to extend its login system - i've been looking around the code but end up with headache. what i wan to do is: I want to put additional hidden form inside any login form create a session variable that will be used on login process (after user click submit) and then de...

How can i add view in the content template module in drupal?

Hi i m working on content template module in drupal,but there is problem in showing view of ranking field with below coding <td width="10%" align="left"><font color="#669900"><b>Address:</b></font></td> <td colspan="3"><?php print $node->field_perm_add_line1[0]['view'] ?>,<?php print $node->field_perm_add_line2[0]['view'] ?></td> <td ...

Which CMS uses an ORM (Object-relational mapping)

If you're aware of a CMS that uses an ORM (either their own or one of the well-known ones), please list the CMS here with the name of the ORM it uses. If you know that the CMS you use DOESN'T use ORM, please also say so. ...

How to trim uploaded file name's length to 10 chars when using Drupal CCK file fields?

I uploaded 1 file and name it "test-test-test-test-test.php". It create problem in my layout. my layout is mess up. so if i upload file name up to 10 char then its fine. ...

drupal language per user

I have a clean installation of Drupal 6.19 and I just installed locale module and the spanish interface translation file. I have set spanish like the default language, but I would like to use the english language when I login as USER #1. I have set language negotiation to none and I selected english on the My Account page, but I am stil...

Preferences and nice admin interface in Drupal

I created a custom Drupal module and now want to save some preferences for it. Those are essentially 3 arrays of strings that should be saved and also easily edited by a (administrative) user. What would be the best way to do that in Drupal? I've read about variable_set and variable_get, are they appropriate to store module-specific dat...

How do I change an existing block to be nodequeue?

Hi, I'm drupal newbie and I'm living in terror now ;) I've got an existing block on the site where you can see the newest articles. I would like to make this block nodequeue, so I can decide which articles are gonna be there. Is there a way to change block settings to be nodequeue or do i have to create new one and style it again? Tha...

Aborting a change to a node from a module

I'm building a module for Drupal 6 (what it does isn't wildly important; I've spent a long time looking for other solutions to this problem and rolling my own is definitely the simplest), and I've run into something of a conceptual road-block. Much like the uploadpath module, I'm creating a directory based on (via a replacement pattern)...

Find a file and open it for editing. How to do it fast in a bash shell ?

I face many times this simple and repetitive task configuring the LAMP or some stuff in Ubuntu or Drupal: I have to edit a config file (php.ini, httpd.conf, ... whatever) so quite frequently, if I don't remember the path by heart, I run these 2 commands: locate php.ini ------- typing manually one of the paths that are shown in the list...

Using Drupal 7 or developing a new system: What's better for a website relaunch with a community of 15.000 users?

Hi, I have to make a decision for our (eXma german) community webpage. We will relauching it with a new system. There are two sites: The first is to develop a whole new system on e.g. Django and Python. The second is to use the new Drupal 7. Personally I have a lot more experiences with Drupal 6 and now since I'm testing Drupal 7 ...

how to organize drupal content in next case...

i need help how to organize nodes of drupal cms. i have three kind of users (three additional user groups). nodes are accessible only if users are logged in. users from first group can access to all nodes, that are created by all users (all users group). users from second group can access only to nodes created by them self. users f...

Webform validation Drupal

I'm looking to add some speacial validation with webform through Drupal. It seems the old forms you could add extra PHP code to "Advanced Settings". According to this link we shouldn't be doing this anymore. (Running Drupal 6) What I have is a check box that makes a few fields disappear and a few different fields appears. So for my vali...

Use drupal ubercart to make have user affiliation

Basically im going to start a site where plenty of people will register and be members... but when someone sign up under another person they first person gets a percentage of the item bought example: User1 signs up> User1 tells User2 to sign up> User2 signs up through User1 (some type of reference code or enter their name when signing ...

Using a Drupal theme in a standalone PHP web application

We are using Drupal alongside several standalone PHP/MySQL web apps. Although they are external, we want them all to have the same appearance in terms of HTML layout and CSS. We basically just don't want to have to do separate design work for Drupal and for the web apps. When we update a block or a menu in Drupal, we want the changes to ...