drupal-6

Location-based range search

I am trying to implement location-based range search using Drupal location and Gmap modules. Ideally I would like to have a form where the user can type in either zip/postal code or specific name - e.g. London + specify a range within which he would like to search. Currently I have a working searching functionality that returns map marke...

How do I remove HOME from breadcrumb

I am using Drupal 6.17 and want to get rid of "HOME" in the breadcrumb output... eg: $breadcrumb= PRODUCTS // SOFTWARE // FEATURES instead of HOME // PRODUCTS // SOFTWARE // FEATURES ...

Displaying 'select' elements in a form table

I have a table inside a form. I'm trying to display a 'select' form element in one of the table columns, but it doesn't display; it keeps getting rendered outside of the table. However, if I change the form element to 'checkboxes' or 'radios', it displays without problem. I'm rendering like this: $output .= theme('table', $header, $rows...

How to replace label on specific page?

I am trying to create a Your Story functionality where the users can submit their stories in form of a comment. I've made a standard page with comments functionality, however instead of 'add new comment' label, I would like to have 'submit your story'. How can I alter this label only on that particular site and keep it as it is on other ...

How to add multiple images to the node programmatically in Drupal - if possible

I am trying to attach multiple pictures to the node programmatically in drupal 7 but have no idea how. i am not even sure its possible. Here is my code for attaching one picture to the node and it works. Please if someone can help me how to attach multiple pictures more than one to the image field $node->field_image['und'][0]['fid'] = $...

Manually log in a user

Hello gents. I'm working on a drupal site where I allow users to login while at the same time posting a content. I've successfully added email & password fields to the original form, but I'm stuck as to how I should actually log in the user. (My plan is to do it in the validation step, before the content is created, to make the logged i...

How to make a block (or a region) float in Drupal?

I saw that there's a module called Floating block that should do what I'm searching for: but it duplicates the floating block, making it totally unusable. Can you please tell me some other ways to accomplish that? ...

How to uninstall a module that overrides the core user module?

One of my developers wanted to override some functionality of the core user module. He made a copy of the core user module and placed it in the sites/all/modules folder. Something in the functionality screwed up and now I am not sure how to uninstall it. I have tried deleting the module from the sites/all/modules folder and it now crashe...

Template files not being discovered

I was experiencing an odd problem where blocks were not showing up on a site. After a lot of spelunking I have found that block.tpl.php is not getting called/discovered. Looking at the suggestions that the theme engine is trying to find it looks like the most general template it will look for is block-MODULE.tpl.php - ie if I set up sy...

'Access violation' error message while uploading files

I'm using CCK FileField (and CCK VideoField) in my content-type. I get 'Access violation' error message (after several minutes uploading) when I upload big videos (let's say.. 18MB). (The Access violation is a server message I guess.. or PHP error message.. My PHP Post max size is 100M so I guess this is not the issue. What could be t...

The page template is not loading, but the node template is loading

sys info: drupal 6 installation, with tons of modules... too many to list. the problem: only a certain content type will not load it's template file correctly. some nodes that would be displayed on these pages through views are making it to the markup. they are the only content that gets loaded. the template file that this content falls...

[Drupal] Form fields & Popup

Hey everyone ! I'm developing a Drupal website,and in my add node form, I want the file upload fields (created with FileField) to be displayed in a thickbox-style popup. You just click on a "Add attachments" link, the popup comes in, and allows you to add the files. Then you close it, and submit the form normally. Anyone knows of a nic...

Drupal: Add Archive to Primary Links as SubNav

My site has news articles that I want to add to the sub-nav under "News" as years. News 2010 2009 But I only want the current year and 1 previous year. And I need it to happen automatically. I know how to create a page view that will only show news articles from the previous year, I just don't know how to change the Menu & Node T...

Drupal: how to enable SSL layer on shopping pages ?

It is the first time I'm using SSL for a Drupal-based e-commerce shop. I need to enable SSL only on the web shop pages, I've found this module for this: Secure Pages. However I need to know what are exactly the steps I need to perform... should I first 1) Buy SSL certificate at hosting service 2) Enable it.. (Hosting services usually...

Silently create a user account when another form is submitted

I have a form created from another module. I want to add 2 fields to that form: 1. email, 2. password. I think I can do this with hook_form_alter. Then I would like to create a user account and log the user in when the submit button is clicked, then go ahead and execute the action defined by the form. The original form doesn't have a #...

Remove drupal module javascript, replace with my own in template.php

I am trying to remove the default lightbox.js file coming from the Lightbox2 module, by using template.php, and load in my own. I would like to do this via template.php if possible, and not place this code in a custom module. I am adding my javascript file, then unsetting the module javascript file. The problem is $vars['scripts'] isn't ...

How to ask input file browser from user in Drupal 7

Hi i need some help with it. I have created a php script which i am running from copy paste into node as php code. I need a file path for a file to process like i am using '\birds\birds.xml'. I dont want to include the file path instead i am thinking, How to create a simple small form with browse button and selecting a file than submit w...

Drupal 6: Inline swf/flv upload in content.

Hello there. Working on a site where I want site admins to be able to upload swf and/or flv files inline in a content's body together with text, images, etc. I'm currently using the WYSIWYG module (with CKEditor). Basically, what I need is something like http://drupal.org/project/wysiwyg_imageupload, but for flash content. I've looked...

Send mail to address in another node in Drupal

I have a content type meeting that has a CCK node referer field that refers to one or more people nodes. Those people nodes contain a CCK Email field. Now I'd like to send a mail to all people listed in the meeting node when the node is created. I don't know how to do that as the mail adresses are in different nodes, so I can't just se...

How do I hide a CCK Nodereference input widget in #after_build?

I like simplifying the node form. One of my tricks in the past has been to conditionally hide CCK elements on new node creation when I want to enforce some kind of default. One of my favorite tricks is to whisk away things put in place by the Prepopulate module. Unfortunately for me, it's recent move to an #after_build-based mechanism se...