Полная документация по CMS Drupal (создание сайта, локализация)

Установка и настройка сайта, а также системного окружения. Исключая вопросы программирования новых модулей и тем.

См. документацию на английском: http://drupal.org/node/258

Сбор новостей

не

Drupal.ru - 13 минуты 40 секунды назад
нет
Категории: Drupal.ru

how to remove : on forms made with the api

Module development - 21 минуты 20 секунды назад

Hello,
when adding forms through the api, it adds a colon (:) after a title of a form element. Is there any way to remove it?
thanks,
Dan Silver

Категории: Drupal.org

Is it possible to get the number of blocks that displayed on a page?

Module development - 2 часа 1 минут назад

I am using drupal6.15 i would like to know whether it is possible to get the number of blocks that are displayed on a page?
I tried researching a lot but nothing could help me.
My idea is to show block on the leftsidebar when there is no active blocks.
is it possible programatically?

Категории: Drupal.org

Displaying a form in a block

Module development - пт, 03/19/2010 - 00:06

Hola,

PROBLEM:
I've been working on a simple block module in which I seek to implement a form. My idea has been to set the $block_content to the form but unfortunately to no avail.Currently, using my code gives a 'page not found'. However, the block displays when I set $block_content to any string. A sample of my hook_block() code is as below:

  function loancal_block($op ='list',$delta=0,$edit=array()){
    if($op == 'list'){
     $block = array();
     $block[0]['info'] = t('Loan Calculator');
    return $block;
    }

    if($op == 'view'){
    $block['subject'] = t('Loan Calculator');
    $block['content'] = _loancal_test_form();
    return $block;
    }
}

function _loancal_test_form(){
    $form = array();
    $form['calculate']=array(
    '#type'=>'textfield',
    '#title'=>t('Enter amount'),
'#size'=>15,
    'required'=>TRUE
    );
    $form['submit'] =array(
    '#type'=>'submit',
    '#value'=>t('Calculate')
    );
    return drupal_get_form('_loancal_test_form',$form);
   }

function _loancal_test_form_submit($form,$form_state){
   $message = "Now u have a form in the block!";
   drupal_set_message($message);
   }

QUESTION:
Is it possible to get this done in drupal 6 ? ..and what is the bug in my code that is causing what I'm experiencing.Any lead is deeply appreciated.

Regards,
Polarsky.

Категории: Drupal.org

dropdown for users

Module development - чт, 03/18/2010 - 23:53

Hi Guys

can someone explain to me how i can get a full list of users into a select form element please
i have managed to get my own name in but none others

TIA

Категории: Drupal.org

Toggle Node

New Drupal modules - чт, 03/18/2010 - 22:52

Toggle Node removes the $tabs on a node page and uses those links to create a simple 'edit' button. It saves space, is clean and it is more intuitive.

You have to set manually where you want to print the edit button. In your page.tpl.php theme file, paste the following:

<?php print $togglelinks; ?>

Special Thanks

Most of the code was taken from Version 1.x of the Admin Module Thanks to Young Hahn and Aj Ashton, Maintainers of the admin module.

Категории: Drupal.org

Best SIMPLE way to get podcasting on drupal 5.x

Module development - чт, 03/18/2010 - 22:34

oops
looks like i put this in the wrong section of discussion. can't seem to undo that.
sorry
I'm looking at the audio module, filefield, swftools and similar modules to figure out what is the best way to get a simple player up there that can accompany text/graphic features. Something that supports playlists and which can be subscribed to would be ideal.

I'm running a drupal site with about 5000 nodes of content about 50% text and photos. (It's the online parallel of a print journal). We are looking to branch out with podcasts of audio interviews we have been conducting in studio, in person on the phone etc.

i threw up an xspf button player and it sort of worked but it doesn't strike me as a very robust solution and since its a 2006 release i'm quite sure better things have been built . I also fiddled up some prefab mixpod.com skins and liked the look and feel but don't really want to get bogged down in some other providers server problems or drive people to an advertising driven site.

i'm reasonably proficient at administering drupal sites but i'm a content creator and editor not a programmer or developer. I don't mind tweaking a few parameters, rewriting some html, installing a module or two but i'd like to keep it simple to find out if the content we're going to run really has any audience/value before building some big architecture.

read more

Категории: Drupal.org

Add Option box for every exposed filter.

Module development - чт, 03/18/2010 - 22:19

Hello there,
I want to add an option into view exposed filters which will filter according to term of the taxonomy, as the current taxonomy filtering is not dynamic. so i tried with hook_views_data() but it does show the option into view filtering... see the codes below.

function view_taxonomy_filter_views_data() {
$data['term_data']['table']['group'] = t('taxonomy term filtering');

$data['term_data']['table']['base'] = array(
'field' => 'tid',
'title' => t('Table id '),
'weight' => -10,
);
$data['term_data']['table']['join']['node'] = array(
'left_table' => 'term_node',
'left_field' => 'tid',
'field' => 'tid',
);
$data['term_node']['table']['join']['node'] = array(
'left_field' => 'nid',
'field' => 'nid',
);

// Example plain text field.
$data['term_data']['tid'] = array(
'title' => t('Plain term text field'),
'help' => t('Just a plain text field.'),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort',
),
'filter' => array(
'handler' => 'views_handler_filter_string',
),
'argument' => array(
'handler' => 'views_handler_argument_string',
),
);

return $data;
}

read more

Категории: Drupal.org

how to use tpl files

Module development - чт, 03/18/2010 - 22:02

hi guys

i'am working on a custom module that i want to have a form in it that writes the inputed data into the database

if i understand correctly i can have a tpl file that would display the layout of the form is that correct ?

and if so how do i implement this.
Actually advise on the complete setup would be helpfull if some kind soul would point me in the right direction

complete n00b to drupal

TIA

Категории: Drupal.org

Using AHAH to change the content of the body field

Module development - чт, 03/18/2010 - 22:02

Hi, I'm trying to change the content of the body field with some default text whenever someone changes an option in the form's select drop down menu. I added the select field using CCK. It looks like something is trying to happen, but I just don't know how to access the content of the body field the correct way to change it's value. Any ideas?

Thanks!

Категории: Drupal.org

User realations 'post to social network'

Module development - чт, 03/18/2010 - 21:55

UR has a post to social network feature that allows people to post nodes that only there friends can see it is an optional checkbox on the content creation page. I would like to make this unoptional and automatic so the user has no control and they are stuck with posting to thier friends and not the rest of the site.

Does anybody know how to do this?
I hope i have made my situation clear enough. Thanks.

Категории: Drupal.org

Page Content With echo and not return

Module development - чт, 03/18/2010 - 21:50

I am turning to Drupal from Wordpress to open my development possiblity more. One question I have is about generating page content with a module. I read and completed the tutorial here: http://drupal.org/node/206762 but one thing that bothered me is that, in order to display information on the page, you have to return the variable that holds your html. I am used to the situation (and prefer it) in Wordpress and in Joomla where you can just echo out your display items rather than gathering them in a variable. This allows you to take advantage of your IDE specific coloring and autocomplete. For example, in Drupal, I would do this (very rough examples):

<?php
$content = "<div> Hi, everyone </div>";
$content .= "<div> how are you </div>";
return $content;
?>

But in WP or Joomla, i would be able to use raw html

<?php
?>
<div>
     Hi, everyone
</div>
<div>
     <?php echo $second_line; ?>
</div>

<?php

If I try to echo straight from the module function in Drupal, it ends up above the page. So, finally my question, is there ANY way to generate page content in Drupal, similar to the second example?

Категории: Drupal.org

Prediction Market

New Drupal modules - чт, 03/18/2010 - 21:48

The purpose of this module is to implement a prediction market in Drupal. The prediction market features a 'market maker', a facility to automatically conduct trades with users based on algorithmically-determined prices. This ensures that the market remains liquid at all times and that users can always conduct trades, subject to having the necessary funds.

read more

Категории: Drupal.org

hello..unction ereg() is deprecated in \\VCSWEBSQL\HOSTING\ComedyCornerNYC.com\includes\file.inc on line 895.

Performance and scalability - чт, 03/18/2010 - 20:01

unction ereg() is deprecated in \\VCSWEBSQL\HOSTING\ComedyCornerNYC.com\includes\file.inc on line 895.

Категории: Drupal.org

How can I exclude nodes by type on /taxonomy/term page.

Module development - чт, 03/18/2010 - 19:56

Hello!

I've created one taxonomy vocabulary (ex: 'location') for several node types (ex: 'articles', 'news', 'blog', 'etc')
Those nodes can be tagged using 'location' tag.

And now I want to display only one type of nodes on /taxonomy/term/[location_taxonomy_id] page.

In other words I need to create smth like a filter for a node type, which will show only nodes with $node->type I want.

Any ideas?
How can I inject to taxonomy sql query to add to it smth like ' AND node.type IN ('articles', 'news') '

Категории: Drupal.org

Missing/disappearing tabs

Module development - чт, 03/18/2010 - 19:45

Hi,

In my code, I create some tabs using MENU_LOCAL_TASK.
Sometimes for some unknown reasons, the tabs disappears for some users.
I have the similar codes from other Drupal or contributed modules.

The only remedy that I can do is to truncate all cache tables and do menu_rebuild().
Can anyone help me?

Thanks.

Категории: Drupal.org

How do you add fields with AHAH Helper?

Module development - чт, 03/18/2010 - 19:15

I'm trying to use AHAH Helper to add new instances of a fieldset (containing one textfield and a group of checkboxes) to a form but I'm obviously missing something vital. The form replaces itself just fine, but no new fields are added. I suspect I need to create a counter for the number of additional field sets there are, and then iterate over the creation of them when rebuilding the form but I'm at a loss as to where those things should happen.

read more

Категории: Drupal.org

Syslog problem

Module development - чт, 03/18/2010 - 19:12

I have just installed the new drupal and when i log in to admin section it shows a blank page and when i write only my domain I would get the following error:-

warning: openlog() has been disabled for security reasons in /home/webgiver/public_html/modules/syslog/syslog.module on line 76.

what should I do now plz help me

Категории: Drupal.org

taxonomy menu visibility setup

Module development - чт, 03/18/2010 - 18:57

Please help. I have several menus, each associated to a specific taxonomy vocabulary. Each item in these menus triggers views by taxonomy/term/number.

How can I set these menus so that they remain visible when i click on any of the menu items, please, without having to enter the number of EACH taxonomy term in the block view configuration.

Can this be done by specifying the name of the vocabulary, for instance, so that if I want to add another item to the vocabulary later on, I wouldn't have to block view configuration again?

Категории: Drupal.org

Create module with functions set

Module development - чт, 03/18/2010 - 16:56

Hi
I want to create a module where I will place all my functions that I will use from other modules. It means that I want to create a separate module with common functions for all other modules.
How should I define the mymodule_menu() function $items array that way it be just a functions set, not a module page?

Thanks

Категории: Drupal.org
RSS-материал