How to change filesaving behavior from FILE_EXISTS_RENAME to FILE_EXISTS_REPLACE

How can I change the default filesaving behavior from FILE_EXISTS_RENAME to FILE_EXISTS_REPLACE?
When I upload a new file with the same filename, I want the file to be replaced with the same fid(in all nodes that refer to this file), not to rename it and get her a new fid.
Thanks for you suggestions,
grossmann-mcs

Dev snapshot not updated after push

I have committed & pushed dev version of a project (views_ticker). But even after few days, the project page is showing a old dev snapshot. It is not updated. Any idea what might be wrong?

Creating a edit item form?

Hi,

I've been searching for a solution for my problem all over the drupal website an have gone trough numerous lines of code but i can't seem to get how you create a edit form with default values loaded.

I have a page listing all my items stored in the database, i have operands for each item, Edit and Delete.

I've also added the menu item for the edit operand:

	// Edit server link
	$items['admin/config/deltalan/gameserver/edit/%'] = array(
		'title' => 'Edit server',
		'description' => 'Lets you edit a gameserver',
		'page callback' => 'gameserver_edit_form',
		'page arguments' => array('edit', 5),
		'access arguments' => array('administer game servers'),
		);

As you can see the page callback is set to gameserver_edit_form, i have a form made here that is a copy of the add form but with default value set also on each form item.

The problem i'm having is how do i get the value from the wildcard % and use it so that i can fetch the specific row from the database and use it as default_value in my edit form?

PHP Notices and warnings after upgrade from 7.0 to 7.2

Hello,

Since I updated Drupal to 7.2 I have those Warning/Notice on my homepage:

Notice : Undefined offset: 435 dans file_field_prepare_view() (ligne 201 dans /homez.40/anjouspoh/www/modules/file/file.field.inc).
Warning : Invalid argument supplied for foreach() dans file_field_prepare_view() (ligne 201 dans /homez.40/anjouspoh/www/modules/file/file.field.inc).
Notice : Undefined offset: 435 dans file_field_prepare_view() (ligne 207 dans /homez.40/anjouspoh/www/modules/file/file.field.inc).
Warning : array_values() [function.array-values]: The argument should be an array dans file_field_prepare_view() (ligne 207 dans /homez.40/anjouspoh/www/modules/file/file.field.inc).

Install drupal after installing and linking apache, php and mysql manually

Hello,

I have manually installed apache, php and mysql on my windows 7 computer.

I want to intall drupal to for learning purposes so that i can host websites locally.

I want to install drupal 7, please let me know how to proceed without Xammp or Wamp

Thank you

module that creates a form and also has a config form

Are there any examples of a module that uses FORM API for an end user form, and the same module has a admin configuration form too?

Essentially need to build a module that an administrator can configure, the end user form then reads from the config settings.

Not come across any examples of a module that creates both an end user form and a config form using FORM API

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x