drupal-6

How do I create a node from a cron job in drupal?

In a custom module for drupal 4.7 I hacked together a node object and passed it to node_save($node) to create nodes. This hack appears to no longer work in drupal 6. While I'm sure this hack could be fixed I'm curious if there is a standard solution to create nodes without a form. In this case the data is pulled in from a custom feed ...

How do I upgrade from Drupal 5 to 6?

I'm running Drupal 5 on my website and want to upgrade to V6. I've not got any obscure or unsupported modules running. What do I do though? I can't seem to find any step-by-step upgrade methods. Do I just have to overwrite all the files and then re-run the installer again? ...

How to create a custom filter for the Drupal View's Module?

I have the Profile, CCK, and Views2 modules installed on a Drupal 6 site. I added a string field to the user profile. I can filter easily on preset values, thru the Views GUI builder, really nicely. However, I'd like the filter criteria to be dynamically set based on other environment variables (namely the $_SERVER['SERVER_NAME']). I...

Can CCK take care of my fields for a programatically defined node type in drupal?

Does the CCK api allow me to create a node type, from a custom module, with a bunch of fields that use CCK to store their state? If so can these fields be locked so that users may not alter them, but still allow the user to add more fields to the node type? Thanks ...

How do I get the path of the current drupal theme?

The drupal api has drupal_get_path($type, $name) which will give the path of any particular theme or module. What if I want the path of the current theme? ...

is ther a drupal function to jump out of the page rendering process and return a page not found?

I would like to have the choice in a variable_load function (as used to load variables from menu arguments) to circumvent the remainder of the page rendering process and give the user a "page not found." I could use a drupal_goto() but I would prefer not to redirect the user and change the url in their browser. Is this possible? ...

Drupal Views2 Exposed Form how to change

I have a View with an exposed form . I am trying to a few things on it. Ideally I would like to have a dropdown that fires the form with no button. If that is not possible then I would like to have the button text something different than apply. I hacked it for now and change views_form in views.module but that does not seem like the ri...

in Drupal, how to make login state consistent between browser pages and embedded XMLRPC client?

I have a Drupal site with user logins. Embedded within this site is a Flash application that shows some data to everybody but allows extra functionality if the user is logged on. From within Flash, I'm using XMLRPC to access the system.check method (to determine whether the user is logged in) and the user.login method (to log in a user...

How do I alter the #weight of the content generated by the upload.module?

On my Drupal powered website, I want to list available downloads at the top of a node page (within a narrow float:right <div>), not at the bottom where they normally appear. Within my theme, I've overridden the theme_upload_attachments() function to generate a <div> of width 40%, but this is showing up at the bottom of the page. Within...

Drupal form being rendered before submit action

I have a Drupal module page where I am populating a form with a drop-down that contains a list of available parts of a set of files that the user can upload. Once the user uploads a file of a certain type, it removes that option from the list, and when all the available files are uploaded the form will not be rendered. The problem is t...

How to use Drupal 6 views and panels arguments together?

I need to acheive the following layout/setup for a section of my website: Using the following panels layout: Top column spanning full width containing: - a view (prob themed using jquery cycle) of images relating to current node 3 columns below containing: Left column: List of 4 single hierarchy taxonomy terms: Term 1 Term 2 (...

Drupal 6 add node form close when submitted

How do I have a submit form close when you hit save and then force the next page to reload and update with the data from the form? This is drupal 6. ...

Drupal wizard form: Validation and previous button

In my drupal6 site I have wizard form. I implemented it with FormAPI using form storage and the rebuild property. My form validation is being done with the #required property and with functions in the #element_validate property. It's working fine but for one thing, when I click on the previous button the form is being validated and I don...

Drupal Views: Generate xml file

Is there a views plugin that I can use to generate a xml file? I would like something that I could choose the fields I would like to be in the xml and how they would appear (as a tag or a attribute of the parent tag). For example: I have a content type Picture that has three fields: title, size and dimensions. I would like to create a v...

How to disable display of authoring information in drupal?

Hi, Am doing a local website in drupal. I have applied the theme 'Acquia Marina' (http://drupal.org/node/315555) to it. Under Administer > Themes > Configure I have unchecked "Enable or disable the submitted by Username on date text when displaying posts of the following type" for type 'Page' and the same is enabled for 'Story' (I don'...

don't display 'user login' block

I do not want the user login block to be displayed for users who are not admin. I only want it to be displayed for the admin user (sitadmin, uid:1, in my case) and users who are not logged in (uid:0) In the configure page (/admin/build/block/configure/user/0) for the block, under page specific settings, I have selected "Show if the foll...

problem with new content type created via module

I trying to write a drupal module. I'm following book "Learning Drupal 6 Module Development ". I have created a new content type (mybio)in module. I'm able create new node and edit node for new content type , it works fine but I'm not able to see new fields for mybio content type when viewing node. I have placed mybio_info.tpl.php file ...

Create a menu link to a particular node type in drupal

So, I have created a content type "Vehicle". Basically I create a submission form that allows users to submit vehicle information. So, I want to create a menu link called "vehicle" and it brings me to the page where all the "Vehicle" posts are listed. Is there anyway to do this? I understand that this is the job of view module. But when...

How to store user's first-name and last-names in Drupal?

I can not see a first-name or full name field in Drupal's create/edit user form. I am using Drupal 6. How do I store a user's full name in it? ...

How to store Blobs in Drupal?

I want to store PDF and Image files in Drupal. By default Drupal seems to store binary/uploaded files into the filesystem. I want to to be able to store files so that - I can have workflows, metadata, IP information and URL aliases? Update, am still stuck at how to create URL aliases for files on the file system. Drupal only seems to al...