drupal

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 ...

Drupal: Sub views?

I have a parent/child relationship (based on the cck node reference field). Recipe Group contains a node reference to the type Recipe. It's a 1 to many relationship. What I need to do is create a view that displays the recipe group information, and then under it, the recipes that have been assigned to it's cck field. So RecipeGroup1...

Drupal View (Page) vs Taxonomy

Hi, I have the following problem: I use taxonomys (tx) as tags. They can be added when the node is created. So I don't know how many tx I have or what ID they have. The path of the tx is like the following: /foo/element1 /foo/element2 /foo/element3 ... The secound element is the tx. Now I want to use a view (page) to handle the tx-pa...

Drupal: send output to user in form's submit handler, instead of redirecting

Hi, I have this basic Drupal scenario and question: I have a form which accepts some input from user, and a submit handler which should process data and show the result to user. In other words, I don't write anything in database or set e variables etc., just show some output to user. I was wondering how I can do this, because a submit h...

New CCK fileds not showing up on Creat Content form

I have created new fields for a CCK content type. They were showing up before just fine. Now nothing. The only thing I did differently was delete some fields before adding the new ones. I can see the columns in the content type table. They are just not showing up in the Create Content form. Any help on this would be greatly appreciated. ...

How to prevent memcache storing an incomplete page when someone clicks away prior to page load completion?

I'm fairly new to memcache so apologies if this is an obvious one. I have looked through the memcached documentation and tried various Google searches but to no avail. The setup : Drupal 6.19 Memcache API and integration module Authcache module Centos 5 Memcached 1.2.6 If you need further information let me know. The situation : M...

Ubercart uc_cart_get_contents get data from standard class

Hi All, I'm writing a custom module for one of my projects and I'm having a bit of an issue. What I'm trying to do is get a piece of data from uc_cart_get_contents() into a variable so that I can use it in a calculation: Here's my var_export: array ( )array ( 0 => stdClass::__set_state(array( 'cart_item_id' => '5', 'cart_id' => '1'...

Deleted Page in Drupal Still Showing Up

I deleted a page in Drupal and I confirmed it by logging to the page. It shows a page not found on my browser. However, some viewers are still able to see the page. Help. ...

Tutorial links for implementing facebook login button

Hello friend Please suggest me some links for implementing facebook login button ...

(Drupal 6 Views) How can I make a view that shows a list of specific nodes (by node id)?

I'd like to manually specify a view to show certain nodes. I can add a Node id filter (e.g. display if node id = 50), but I can make a multiple filters becomes they are "AND"'d (e.g. display if node id = 50 AND node = 51). I'd prefer to not have to use taxonomy or whatever, as Im not currently using this. It would be easier to just man...

drupal '#process' callback seems not working!

here is my hook_elements: function test_elemets() { return array( 'test_field' => array( '#input' => TRUE, '#process' => array('test_field_process'), ) ); } and process callback: function test_field_process($element, $edit, &$form_state, $complete_form) $element = array(); retur...

Drupal behaviours

What are Drupal behaviours at all? What type of service layer it offers to module developers? What type of relation it maps to jQuery.ready function? ...

How to add input field to an element in Drupal hook_elements

Hi,I have created a new element with hook_elements.But how do I add a input element like textfield to it? I wrote the following code,textbox is shown on form but when I print form_state values in form's submit function there is not any value for that.Is process function the right place to add the input field? function test_elements() {...

Drupal custom module object not accessible from GUI PHP tags

So I have created a custom module for Drupal 6.x and it works as I can see the desired results in the page.tpl.php page, but when I edit a page from the GUI (it allows php tags) the object is not accessible. I can set the values in a SESSION which I can access from the GUI as well as the module but is this the correct way to do this? H...

Create node programmatically with cck location field

I try to programmatically create a node of custom contenttype "location" in Drupal 6, with the node containing a location field (http://drupal.org/project/location) called "location" (yes I know, the nomenclature could be better, but I am just experimenting on this at the moment). Creating the node works just fine, but I cannot find a w...

Trying to join data from two mysql tables in order to sort by it.

I'm currently working on Drupal site, building a custom JSON module for a project at work. I'm trying to join data of events from the drupal node table to a date field associated with it, stored in another table. This cannot be altered. What i want to do, is run a query to fetch the list of events from the node table, and but i need to...

hook_nodeapi in template.php

I am trying to use hook_nodeapi in my template.php file to alter the breadcrumb. I have tried altering the 'if' statement, but it seems as if Drupal is not even using this hook in my template.php. function gh_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { $productNodeType = 'product'; $tid = preg_replace('#[^\d+]#i', '', $_GET['bc']...

Drupal preprocess function and session

Hi, I set a session var at template preprocess function in a theme I use, but the first time I open the site I cant read the session var, if I refresh the page it works fine, anybody know what can be the problem?? This is the code I use in the preprocess function: function m_preprocess(&$vars, $hook) { $default_location = array( ...

drupal expandable hover menu

Anyone know of a decent way of making drupal menus exapandable when the user hovers over the parent menu item. ...

Drupal function db_query() stores overflow value for INTs that are not too large

I have this code inside of a exit hook in a custom module: $diff = round(((microtime(true)-$script_start_time)*1000)); watchdog('thaty', $diff); if(variable_get('thingy', 0) == 1) { $data = array( 'q'=>$_GET['q'], 'memory'=>memory_get_peak_usage(), 'execution_time'=>$diff ); d...