drupal-6

Theme function in Drupal 6

Hello, Im using Drupal 6.x. In my page i have the following code which prints a paged table. $headers = array(array('data' => t('Node ID'),'field' => 'nid','sort'=>'asc' ), array('data' => t('Title'),'field' => 'title'), ); print theme('pager_table','SELECT nid,title FROM {node_revisions}', 5, $headers ); Is there a w...

is Zen nineSixty theme compactible with iPhone?

Hi All, I have created a custom theme using Zen nineSixty (960 Grid system) in drupal and it works and looks great on all major browsers. I was just wondering if anyone could let me know if I need to do anything else to get this theme working on iPhone or is it auto compatible. Many of our potential clients use iPhone so was wanted to c...

How to used node_load()?

Hi m a bit confused that how to retrieve node title by using this code node_load($nid); $title=$nid->title; i have done this coding in block and i wants to retrieve from node id for displaying image.that images are normally uploaded at the site by using filezilla and it has same name as the node title.i have tried many forms of node_lo...

How to just show NodeQueue block on included nodes?

On my blog I have a series of posts on a common subject that I'd like to link together with a common navigation block, so that readers can easily jump forwards or backwards through the series. I've used NodeQueue to collect all the blog entries together in sequence. Putting the associated block in my sidebar gives me the navigation that...

User registration with payment option

Hello Drupal Experts, I need a help in new user registration with payment option with 2/3 types of user, Please tell which is the good module/method. thankyou ...

Block some drupal URLs

By wich module I can disable some drupal system pages. For example node, taxonomy/term/*, filter/tips. ...

Drupal, elements with odd or even id numbers in view

Hello I want to have two sliders on my site with the same content. Could somebody tell me is this possible to create html list with only even or odd elements? Regards ...

Views and NULL values

Whats the best way to have Views pull out records with NULL values for a CCK field? So far, with a simple filter of 'Is empty (NULL)' in the Views GUI does not return a record for me, but it should (I see them in the database). I also tried passing it as an argument: $handler->argument = 'NULL'; return $handler->argument; No results...

Drupal: Include user profile data in page.tpl (phptemplate_preprocess_page?)

I need to pull user profile fields to display in my page.tpl. I know the profile data isnt included in the $user array but I think with the theme function phptemplate_preprocess_page I can add the data, but Im not sure exactly how. ...

Drupal: does default #action matters in form submission

In my module I have a form represented by function comment_form(){ // form definition } I have a menu entry example.com/get_comment_form mapped to form provider callback to serve this form via ajax. function get_form_over_ajax(){ drupal_json(array('form' => drupal_get_form('comment_form'))); } The rendered form via ajax ca...

Separating a Drupal module logic and UI

I wrote a D6 module which provide user with the ability to communicate, config params and test a 3rdparty API service. The module works as intended but I want to separate the communicator class and bundle it as foo module. Then pack the rest (admin page) as the foo-ui module. Just like views and views-ui. I have no idea about what's the...

Theming node-xxx.tpl.php

hi. i am new to drupal theming. i want to do the following: i have a product content type that i am manipulating it's node-product.tpl.php, the product content-type has a CCK field of type "Embedded Video" (using the Media module found at http://drupal.org/project/media ). since i need to wrap the "Embedded Video" field with a tag i wan...

problem using jquery ui accordion in drupal

Hello, I am trying to use the jquery-ui accordion functionality on a drupal page. I have teams with multiple people in each team that I want to display. I have a view set up that groups by team, and has contact info for each team member. My accordion doesn't seem to be working. I used <?php jquery_ui_add('ui.accordion'); ?> to import...

Changing the value of a field in a Drupal form

Hello, I've created a hook submit function for my Drupal node edit form. I'd like to change the value of a CCK field (not in the form) for that specific node within the sumbit handler. I've tried setting the field as hidden and applying a value to it, but this didn't work. Could anyone suggest a way to do this? Thanks, Jonathan ...

In Drupal, how to set node-[content type].tpl.php to display 404 Error?

In Drupal 6, I would like to have certain Content Types display Error 404, when accessed. I don't want them indexed by search engines or being accessible to users. They are used to store data, such as photos or other attachments. I've tried setting node-[content type].tpl.php to <?php return drupal_not_found(); but it duplicates the ...

Redirecting or rewriting drupal links

I have a custom structure for browsing content built with hook_menu and Views. I would like links to content to be routed by node type to the appropriate destination in my structure. So while normally clicking on a node link takes you to node/123, I instead would like to be sent to foo/123 (because node 123 is of type 'foo'). I tried ...

drupal form api for radio button help needed

hi, i have to show a custom form like below either upload image or paste a url for the image O Radio button to set for image upload -------Input field for image upload OR O Radio button to set image url --------- input field to get that url im struggling with custom form code whether to use #type=>radio or #type=>radi...

How can I have 2 kinds of display for a single node in drupal?

I have 2 kinds of users, one for customer and one for affiliate. The thing is i want to show the node(product content type) different on each user. Say I will only want to show limited fields for the customer while in the affiliate i want to show all the fields. Also I need to put a link to switch in different display. I research for t...

Why won't this file field not save on the node object?

With print_r I get: stdClass Object ( [field_car_image] => Array ( [0] => Array ( [filename] => HERMAN 096.jpg [filepath] => sites/default/files/HERMAN 096.jpg [filemime] => image/jpeg [filesize] => 933105 [status] => 1 ...

How to attach local files to Drupal nodes

I need to attach video files to nodes in Drupal 6, yet the AJAX uploader fails (the dreaded HTTP error 0), and anything I tried to debug it didn't help (may be moving to Drupal 7 will, but that's still going to be some time). Is it possible to somehow upload the file to the server via FTP, and then simply attach it to a node, so that it ...