Installation by script, anyone to give a hand ?

Hello,

I'm trying to install drupal 7 by a script. In fact accordingly to drupal doc it is possible to make a non interactive installation of the CMS by calling install_drupal($settings) function.

So far I ain't get anywhere, I just found a script on internet that is supposed to do exaclty so but I have DB connexion errors when I try it. I tried to debug the script but it's way to long, really not easy to find the error.

This is the script :

<?php

$settings = array(
# First, tell Drupal you are not using the interactive installer.
'interactive' => FALSE,

# This part is required for multisite support. The keys
# you put here overwrite the $_SERVER array, allowing Drupal
# to find a site path (in this case, localhost.my.site, my.site etc.
'server' => array(
'HTTP_HOST' => 'localhost',
'SCRIPT_NAME' => '/my/site',
),

# Next, choose the profile and locale Drupal should use.
# The profile must be in a ./profiles/$profile/ folder.
'parameters' => array(
'profile' => 'expert',
'locale' => 'en',
),

# This is the data that will be submitted to the various
# forms in the installation wizard.
'forms' => array(
# Database configuration.
'install_settings_form' => array(
'driver' => 'mysql',
'database' => 'db_name',
'username' => 'db_user',

Block Filter

I know there are several ways I can do this but I am looking for a method that would have the best work to maintainability ratio. Basically, my site is to have different text in it's banner for every page. My first thought was to make a new content type that would have a text field where you can enter the uri of the page you wanted it to appear in. I would then create a block view that would somehow use this as a filter. Is there a way to do this? Or alternative a better solution?

Multiple buttons in one Form to manipulate the form via ajax

Hi drupal community,

I'm new to drupal module development. I have done some small changes to an existing drupal installation.

Now I want to code a small module for our student cafe on my university.

So what I want to do?

I want to have till now two groups of buttons, so that each group expand one part of the form structure.

<?php
<?php
/**
* @file
*/

/*
* Form for plenary minutes
*/
function telquel_protocol_form_page() {
$build = array(
'header_text' => array(
'#type' => 'markup',
),
'example_form' => drupal_get_form('telquel_protocol_form'),
);
return $build;
}

function telquel_protocol_form($form, &$form_state) {
// Because we have many fields with the same values, we have to set
// #tree to be able to access them.
$form['#tree'] = TRUE;
$form['names_fieldset'] = array(
'#type' => 'fieldset',
'#title' => t('Plenumsteilnehmer'),
// Set up the wrapper so that AJAX will be able to replace the fieldset.
'#prefix' => '

',
'#suffix' => '

',
);

// Build the fieldset with the proper number of names. We'll use
// $form_state['num_names'] to determine the number of textfields to build.
if (empty($form_state['num_names'])) {
$form_state['num_names'] = 3;
}

for ($i = 0; $i < $form_state['num_names']; $i++) {

Unable to save, or create new content

Hi everyone. I am having a heck of a problem. I am using Drupal 7. I can't save or create any new content. It isn't even saving changes to existing content. But other things within the system are still saving, such as changing menus or other settings. I am at a loss.

Set access restrictions to specific nodes

I have some restricted information that I would like only administrators to see, what plugins or things I need to do to restrict specific nodes to specific roles? I'm using 7.4, I've found neat plugins but they're mostly for older versions. Any suggestions?

Simple password challenge to view node content

I'd like to password protect a node. To access the content users need to be able to request a password & then enter that password I supply.

This should be possible to any user, regd or anonymous.

Can someone please suggest the right mod to use for this ?

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x