drupal

How do I use theme preprocessor functions for my own templates?

I have several .tpl.php files for nodes, CCK fields, and Views theming. These template files have a lot of logic in them to move things around, strip links, create new links, etc. I understand that this is bad development and not "The Drupal Way". If I understand correctly, "The Drupal Way" is to use preprocessor functions in your templ...

How can I control the empty cart text in Drupal Ubercart

Options... 1) create a block that tests for and empty $order session type object. 2) find the configuration text area in the tangled ubercart admin area. 3) hack the module to call a block on empty cart rather than the hard coded text (if that's true.) Thanks! ...

How to surround a Drupal view with some tags?

Let's say I have a view that returns some items. I want to display the items in an unordered list, so I rewrite the field output with <li>[field]</li>. Now I only have to surround the view with <ul>and </ul> tags. However, when I add those tags as "full HTML" to the view's header and footer areas, they are being surrounded by a div lik...

Drupal: How to implement a SECOND admin with fewer rights than the normal and own theme?

I'm currently trying to realize a second (lower) admin layer in drupal. I have made an extra section via the module of the same name for those users so they can have their own theme etc. I want to give these second or lower admins a menu in their section of the page where they can access certain admin funtions like administer other users...

Drupal Imagfield/Filefield in custom form

Hi, i have created a module with this among others this function in it: <?php function ils_ladda_upp_form() { $form['upload'] = array( '#method' => 'post', '#attributes' => array( 'enctype' => 'multipart/form-data', ) ); $form['upload']['album_name'] = array( '#type' => 'textfield'...

Merge 2 views in Drupal - using filters?

Hi there, I have a view for news items and one for events. I want to create a list that lists both of them together. However, I want to filter the news items on a custom date expires field (that events doesn't have) and I want to filter the events on a custom event date field (that news doesn't have). Can I do this? Ben ...

Drupal Dynamic Select on a Form

I'm sure this is an easy one for jQuery experts, but I'm a backend guy, and can't find the best way to do this. I have two arrays in Drupal, one is a list of names of views, and the other is an array that contains a list of displays for each view. Here's the code to populate the two arrays: //load list of views in to array for select...

How do I display many images (by imagefield) in all my nodes of a type?

The thing is that I have hundreds of nodes each with 4 to 12 images all of them around the same size in an imagefield but I want to order that so it looks at the end in a grid or something like that. I know that panels and views are the answer but I think I've seen all of the tutorials available but nothing. If anyone know where can I ...

CSS Layout not working in IE7 (all other browsers are fine)

I'm working on a project whereby the University has full control over the source code (Drupal) and all I can do is CSS Overrides in the theme area. The problem that I'm having is that the header is not staying where it is supposed to in IE7. IE8 along with Firefox, Chrome, and Safari work exactly as expected. Here is my CSS Overrides ...

How to set up Drupal default front page (view) to open in other language than default

I need to open view with particular path as front page. Everything would be nice except the view must be open in another language than default (english). Tryinig to prefix language in Site information settings or adding path alias with that prefix fails as Drupal says "tha path xxx is invalid" 'cause Drupal prefixes language automatica...

Drupal, Views, Exposed filter, make tags unselectable

hi, I'm using Drupal Views with an exposed filter with several tags. I would like to make some tags "unselectable", if they cannot be combined with the already selected tags. (They would give empty results page. thanks ...

make job Custom Search with cck and taxonomy

Hello There: Im building job website using drupal and some modules like job_search + cck + views + panels .... etc i added to jod node some cck fields like work type and salary and integrate with taxonomy (job: doctor,web developer, teacher ,worker .....etc) Im trying to make custom search that I can enter salary that i want in input te...

Drupal: set id attribute in multi-step form

I'm building a multi-step form in Drupal 6. For some reason, the id attribute of the form element have an extra "-1" the first time the step 1 form is displayed. For example, if the form name is "user-registration", the first time I access the step 1 form, the id is "user-registration-1". Then, if I go to step 2, the id is "user-registr...

How can use the currently displayed node to filter a block-level view on that node's page?

I have parent/child relationship set up via Node Reference. A Child record can have a Parent record selected from a Node Reference field (this is optional -- I can have Parent-less Children as well). I've created a Views block to appear on the Parent pages, below the content. It's going to show a table of all the Child nodes for that ...

Drupal: how to upgrade a running production website to a dev version?

Can you help me to understand, how do I do Drupal website deployment and development? Suppose, I developed 1.0 version of Berty&Frank website. I copied everything to their production server and it is alive and kicking now. Site is already full of contents and is growing. I am asked to add additional features to the website. I am now ex...

Problem in migrating to LAMP from XAMPP.. Memory limit error

I was using XAMPP for my local machine but as I wanted to run applications like mysql work bench and some test frameworks I decided to switch to LAMP self install. I'm using ubuntu and followed the instructions at: https://help.ubuntu.com/community/ApacheMySQLPHP But the problem is LAMP is consuming too much of my memory (RAM) I've allo...

drupal function theming for custom menu

i have a custom menu with three levels. It is in format: - a/b1/c1 - a/b2/c2 - a/b3/c3 I want to have same css formatting for all the b1, b2, b3 and same formatting in c1,c2,c3 but different between them. I have found that the function that renders that menu is: theme_menu_item_link() But the same function renders the b1 and c1 too....

Drupal: Can I avoid forwarding after content is created / saved ?

Can I avoid forwarding after content is created / saved ? I don't want to display the node after user click on "Save" ...

Drupal: last core version update. Risky, if I don't update it ?

hi, I did several websites with Drupal, and now the core is updated and I cannot come back to my customers to update previous installation. I was wondering how risky is to not update drupal core to the last version and how web developers should deal with websites management. ps. My customers do not have any computer skills. thanks ...

Add custom message in Drupal

I want to add a custom message once someone saves a specific content-type telling them that it is going through an approval process. This will let them know as well as prevent them from re-submitting. ...