drupal

How to create a user in drupal

How by program to create a user after the form is submitted ? How to preview the form before submit ? Where in the are stored? ...

Embedding inline advertisement in nodes in Drupal 6.x ?

Hi, I am struggling to insert inline advertisements on the fly in node content same as done by "Adsense Injector" module but with a different network, any suggestions ? Thanks ...

Getting error when trying to save CCK text fields in Drupal.

Invalid argument supplied for foreach() in /var/www/sites/all/modules/cck/content.module on line 1022. Entered text appears to work on save but does not display when returned. Appears to work on staging server sometimes, but not production. ...

Is there a customizable form in drupal similar to the contact form?

I need a form to enable user to enter event info in three fields (what, where, and when). Then I would like to be able to present the events in tabular form. I don't know PHP. Does drupal have a module for this purpose? ...

Best Website Statistics tool for Drupal

What is the best free Website statistics setup I can have for Drupal 6 on Apache? Particularities: 1. Multisite install. Might want to look over several sites. Should be able to restrict view for clients to their own site. Some hits are bypassing Drupal. Some urls are not public. Some sites have little traffic, it would be nice to b...

Drupal adding JS

I know this is not a Drupal forum but this forum is quick at responding so I thought I should give it a shot. Here's my problem. I'm trying to insert reference to the javascript file in the header by using drupal_add_js function. I placed this line inside template preprocess function of template.php. The result....is not working at all. ...

How do you promote blogs to a page other than the home page in drupal?

I really like the promote to home page feature of drupal. But what if I want some content promoted to a page other than the home page. Is that possible? ...

Drupal View display - setting a limit for the query results

I have a View set to grab the latest forum posts. That's working fine, but I'd like to limit it to get the last 5 records only. I know I can display only 5 with PHP but I don't want a larger query than I need. I can't find any option for this in the View. thanks ...

Drupal Imagecache Actions with ImageField and Node variables

I am able to add text to onto a imagefield using the imagecache textrender preset action (for a content type). I pull the node title using the following in the imagecache preset text: global $node; return $node->title; However this only works when an image is uploaded when creating new content. If I have an image set as a default ...

Drupal - Lightbox -> iframe node displaying entire website with views

I am attempting to make a view that would list thumbnails of my projects, then when clicking them enlarge the photo using lightbox and list out some text and a link to the website. I am not sure if there is a way I can just add text to the lightbox using views so right now I have it using a field for Lightbox2 iframe: thumb200wh->node p...

Drupal View with Taxonomy Argument Display

I have a view with an argument based on Taxonomy Term and a page display. I get a nice summary list on the display, but I'd like to show an image and the taxonomy term. Any way to do this non-programatically? Currently the page looks like this: I'd like something like this: (just an idea, exact layout is irrelevant at this point) ...

Should $new_link be used in mysql_connect()?

I'm maintaining an inherited site built on Drupal. We are currently experiencing "too many connections" to the database. In the /includes/database.mysql.inc file, @mysql_connect($url['host'], $url['user'], $url['pass'], TRUE, 2) (mysql_connect() documentation) is used to connect to the database. Should $new_link = TRUE be used? My unde...

add array element to row returned from sql query

I want to add an additional value into an array before passing it to json_encode function, but I can't get the syntax right. $result = db_query($query); // $row is a database query result resource while ($row = db_fetch_object($result)) { $stack[] = $row; // I am trying to 'inject' array element here $stack[...

Drupal Views: Display recent nodes created by user on profile page

I'm wondering how I can display the recently created nodes by a user on their profile page. I've created a new page for a user at /user/%user and I want to be able to display the latest nodes created by that user. ...

Drupal: allowing users to sign up to content using a form

My apologies if this is a little broad, but I'm struggling to know where to start here! OK, so I have a Drupal site and I need users to be able to sign up for certain content, here is the workflow in detail: I need a form within a block consisting of the following elements: First Name (required) Last Name (required) Organisation (op...

Why Is my json-object from AJAX not understood by javascript, even with 'json' dataType?

My js code simply gets a json object from my server, but I think it should be automatically parsed and turned into an object with properties, yet it's not allowing access properly. $.ajax({ type: 'POST', url: '/misc/json-sample.js', data: {href: path}, // THIS IS THE POST DATA THAT IS PASSED IN; safe2ignore. ...

Drupal: Two-way communication between unregistered customer and admin

I need to setup a system where customers can choose to Request a Quote for a specific holiday package, where they will enter their personal details as well as their holiday requirements (number of rooms, etc.) and will then allow them to view a page which will have a threaded conversation between them and the admin (so the admin can repl...

Combine two views into one view

I have two views that I would like to combine into one. The first view shows all items of X where company ID = Y. This is to give preferential sort to the client first, and then everyone else. So I created a second view, all items of X, where company ID != Y. I created it as an Attachment to attach to the first view, but I don't think...

Add page item to either Joomla, Drupal or Wordpress

I just want to design this very simple website. Basically there are multiple pages A, B, C... and each page has item A1, A2.. or B1, B2... These items follow fixed HTML template (table,image) and only specific content fields (name, body text..) can be change in the back-end. Backend users can add new pages or new items each page. Does a...

changed page title in hook _ menu section of Drupal module but no change seen on page

I changed page title in hook _ menu section of a Drupal module, re-installed, and cleared caches, but this did not change title on web page. Finally I renamed the whole module, files, and relevant function names in files and then re-installed. This did the trick. I suspect that there is a duplicate entry in mysql table that holds tit...