nested contents

how can i create content inside other content like nested content .
for example i have content type activity and i want to create inside this activity content type team related to this activity.
thnx.

Customising the template_files path for webform templates

Hi guys, big fan!

Coming across my first ever Drupal confusion. I have a local server, a staging server and a live server. These all have separate databases. I'm having a problem where I'm naming my webform template webform-form-6451.tpl.php and this is not corresponding to the staging or live server as when the webforms are created on these sites, they are issued with different IDs. I have managed to fix this issue for pages and nodes by simply using the hook_preprocess_node (something that only took me a couple of days to test and implement) however, I can't find how to do the same for webforms.

Ideally, if my webform were located at:

http://www.example.com/this-is-the-url-of-the-webform

I would want the template file to be named after the path alias as:

/sites/all/themes/themename/webforms/webform-form-this-is-the-url-of-the-webform.tpl.php

How can I go about this?

The code I used to do this for nodes is as follows:

function themename_v2_preprocess_node(&$vars, $hook) {

$suggestions = array();

// get node based on node ID
$suggestions[] = 'node-'. $vars['nid'];

// additional node template names based on path alias
if (module_exists('path')) {

// we already can have a path alias
if (isset($vars['node']->path)) {
$alias = ($vars['node']->path);
} else {
// otherwise do standard check

[SOLVED]retrieving value from form

I have field in form:
$form['usermasters_passed'] = array('#type' => 'textfield',);

and i would like to retrieve the value of this filed after form submission.
From what i have found on the web this value should be in here:
$form_state['values']['usermasters_passed'];
but it is not there
how to get the submitted value of this field?

Thanks

temporary

HI)
I have a problem with temporary
The mistake reveal this message:

The file temporary://filePjMj1C could not be copied, because the destination folder is not properly configured. This is often caused by a problem with file or directory permissions.
The file temporary://filebdp3ca could not be copied, because the destination folder is not properly configured. This is often caused by a problem with file or directory permissions.

Here is a PHP Script to Delete Unwanted Bot User Accounts from Your Website

I had a problem in the past with bots bypassing the Captcha security and creating user accounts so that they can later come back and spam my websites. When I discovered that bot user accounts were created, I had to log into my websites and manually delete all the bot user accounts one by one.

To solve having to manually delete the bot user accounts, I develop a small PHP script that I run on cron every 15 minutes that will automatically delete all the bot user accounts.

I am posting my script below for other site developers to use if they also happen to have same problem. Keep in mind that this script was written for Drupal 6.x. However, it can be easily modified for other Drupal versions. You can also test or run the MySQL part of the script within your site's phpMyAdmin.

Enjoy,

Sam308

The Script (delete_invalid_users.php)

Note: drupal.org automatically converted the URL in the last line of code. It added the (a href=...) anchor tag. You need to remove it and just use the URL itself.

The script below deletes all the bot user accounts based on the following two conditions:

(1) The profile field "Phone Number" has a value of 123456 (this is a common value that spam bots use for phone numbers)

drupal_http_request not working

Hi friends,
I am using drupal 6, and sending POST data to external server.
The code is working fine on my localhost server, and returns status 200.

But the same code is not working on my live server.
It returns

stdClass Object
(
[code] => 0
[error] =>
)

I am not figuring out, where is the problem. The code is fine as it is working on my localhost.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 6.x