drupal

Importing legacy table to Drupal database

Hi, I have legacy database and tables that I would like to try to import in Drupal. Here's an example table structure : Table : Projects ProjectID ProjectName CountryID TypeID ProjectID is primary key, CountryID and TypeID are foreign keys which point to Countries and Type tables , respectively. I think I would make a Projects co...

PURL and/or Spaces?

My site is to have a section for normal users, a section for managers, and a section for use only by anonymous visitors. Each section of the site requires changes to Drupal settings for using a different theme, changing the Primary & Secondary links, changes which blocks are used, etc. In other words, the user experience changes signific...

How to register a user to Drupal 6.x without using the API?

We have to have a "register" method available via web service that is written in java so hence forth we do not have access to the Drupal API. But we need to be able to register a user successfully. Simply adding a user to the users table will not do it as the newly created users are never able to login successfully. Again I love the Drup...

Theming Ubercart Order Panes

Hello I am working on an Ubercart installation on a Drupal site we are producing. Everything is going smoothly, but I am now trying to setup the order page template (uc_order module), so that the frontend developers can style it up. The page is the one you view when you go to user/[UID]/order/[ORDER-ID]. I understand how to use hooks...

Edit results inline

I am returning my views in the style draggableviews. At the bottom you have a save order. This obviously must set the CCK field I have for weight. Would it be possible to update over columns as well? Ideally you would be able to edit the columns returned either by free text or drop downs. By the sounds of it I think I may need to code s...

Taxonomy view with nodes

Using Drupal 6, I'm trying to create a page with views that shows something like the following: -Taxonomy Term 1 -- Title and description of a node that contains this term -- Title and description of a node that contains this term -Taxonomy Term 2 -- Title and description of a node that contains this term -- Title and descr...

Acces/See settings page for a custom odule

Hi, I upgraded a module from 5 to 6. I only have one problem: I can access the settings page for it, but can not see the contents of it. This is my code: function agbnagscreen_menu() { global $user; $items = array(); if (agbnagscreen_nag($user)) { // var_dump($_GET['q']); die(); drupal_goto(sprintf('%s/%s', AGBNAGS...

How to access a file information from inside a formatter after submitting it?

I am creating a drupal cck field that allows you to create an audio recording and then display that recording immediately. After uploading the file to the server, I can't seem to figure out how to give the formatter the name of the file in order to play it back. Is there an easy way to store the file name with a tag specific to each reco...

How to create a custom front page redirect for anonymous user?

I have a web site at what-i.com that uses Drupal Commons profile. I have created a custom theme called 'whati' and placed it in /sites/all/themes folder. My page-front.tpl.php is supposed to drive my front page. It has an if-else statements for 2 scenarios: logged in and non-logged in users. For logged in users, everything works great:...

Optimize CSS files - file not found

In the performance settings when Optimize CSS files is selected, I get a 404. The reports section shows a 404 for example sites/default/files/ctools/css/588b003a48050c4e59cbeba2b453cb92.css not found. I have the site running on a Mac without any issues. It's on Ubuntu. It's not a permissions issue (files dir and sub dirs have chmod 777...

Am I referencing the polls content type wrong in my Drupal module?

I have the following module, which affects how users arrive at two different content types, "question" and "poll". Question is a CCK content type, poll is the default poll content type, but it works perfectly for question, taking a user who goes to, i.e., http://sparechangenews.net/content/are-you-seeing-evidence-economic-recovery (whi...

Local tasks in drupal disappear on one path

I'm using the notifications module and I'm trying to move the notifications profile tab to a secondary tab under the profile/edit tab. I've used hook_menu_alter to add the tab under the user/edit path together with User profile and Account, and it appears as it should. But when I press it, both the Account tab and the User profile tab di...

How can I separate admin menus?

Hello guys I would like to separate administrator menus (the menus that appear after login as admin) from normal menus. I have to show admin menus in some other blocks. I don't like to use any modules for this, let me know how can done this with code, Thank you ...

nodeapi insert and presave

I've got the weirdest glitch. I'm using nodeapi and targetting the story node type. I have insert case before the presave case, where presave is being used instead of update. switch ($op){ case 'insert': //do some stuff break; case 'presave': //do some stuff break; } The weird thing is that when a story n...

Joining tables when certain one table has no values?

I have these tables: USER TABLE uid | name | role | | 1 | bob | package 1 2 | jill | package 2 3 | pam | package 1 NODE TABLE nid | uid | type | | 1 | 1 | car 2 | 1 | car 3 | 1 | car 4 | 2 | page 5 | 1 | car 6 | 3 | car If I do: select u.uid, u.name, count(nid) as totalNodes from USER...

how to get absolute path for a image in drupal?

I have some images in drupal/sites/default/files/images/ How can get the absolute path for an image like abc.jpg placed in this directory. ...

How to split the code of a module into separated files

I am very curious to know how a Drupal module can be dis-integrated into multiple include files. A number of hook support to link include components, like hook_menu, hook_theme etc. Once I planned to simplify one of my complex module that have reached to 2.3K of lines with half of its feature set. I have to roll back all those steps due...

how to add a lightbox to images in Ubercart cart ?

Can I apply "Custom formatters" presets to Ubercart cart ? I need to customize the html code of the images in the cart. I'm trying to do it with hook_form_alter but what I get is the output html and it is too late to modify it: [#value] = > < a href="/website/node/87">< img src="http://localhost/website/path/to/picture 1.png...

Drupal: posting photos from Drupal site to Facebook, Flickr and a twitter update -- all at same time. Looking for API.

Is there existing code available that provides functionality in Drupal to: - post from a Drupal website, photos into Facebook, Flickr accounts - view the photos also in the Drupal site from one of these sites (preferrably Flickr) - update a twitter feed to indicate photos have been published (If there isn't then I'm happy to reuse exist...

displaying parent terms in taxonomy view title ?

I have a Taxonomy View with all nodes having a specific taxonomy term. At the top of the view I can read the term name. If the term is a children of another term, I would like to display the parent as well on the top of the View parent > children How can I make it ? Thanks ...