This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Locale for anonymous user, 2nd TRY

Hello,

I am currently working on a multilingual Web Site.

I would like to know if there is a way (code question) to change the interface translation for anonymous user.

I have taken a look to the locale.module code, but I can not figure how to use it to make interface changed for anonymous user. I am abble to find user browser default language or add a link that allow the user to change language, I can compare the language against locale to see if it is available and I can save his configuration in a cookie. But I am unable to change interface translation !

Diff module with 4.7?

does anyone know if the diff module is compatible with Drupal 4.7? It is in HEAD, but I can't find any mention of whether it is or isn't supposed to work with 4.7. I've got it installed with 4.7b2, but I get a blank screen anytime I try to get a diff.

Does anyone have this working?

Thanks

Overhead for multiple PHP source files?

While reading through the Drupal docs I remember it mentioned somewhere that having multiple PHP files added overhead that can be reduced if all the code is merged back into one file. I am currently developing a module and to make everything manageable I have the source in about 11 different files which I am include_onceing into the main .module file.

Locale for anonymous user, a development question

Hello,

I am currently working on a multilingual Web Site.

I would like to know if there is a way (code question) to change the interface translation for anonymous user.

I have taken a look to the locale.module code, but I can not figure how to use it to make interface changed for anonymous user. I am abble to find user browser default language or add a link that allow the user to change language, I can compare the language against locale to see if it is available and I can save his configuration in a cookie. But I am unable to change interface translation !

Disable authoring information and other fieldsets

If you want to hide authoring information and the other fieldsets on new/edit node pages, add something like this to a module. It seems to work, but please reply if anyone's got a better solution.

You'll need to change 'news_article_node_form' to e.g. 'page_node_form' or whatever your node type is. Alternatively if you want it for all node types.


<?php
// Implementation of hook_form_alter
function news_article_form_alter($form_id, &$form) {

if ($form_id == 'news_article_node_form') {

// We're going to hide various fields by setting default values for them

$form['author']['#type'] = 'value';
$form['author']['name'] = array('#type'=>'value', '#value'=>$form['author']['name']['#default_value']);
$form['author']['date'] = array('#type'=>'value', '#value'=>$form['author']['date']['#default_value']);

$form['options']['#type'] = 'value';
$form['options']['status'] = array('#type'=>'value', '#value'=>$form['options']['status']['#default_value']);
$form['options']['moderate'] = array('#type'=>'value', '#value'=>$form['options']['moderate']['#default_value']);
$form['options']['promote'] = array('#type'=>'value', '#value'=>$form['options']['promote']['#default_value']);
$form['options']['sticky'] = array('#type'=>'value', '#value'=>$form['options']['sticky']['#default_value']);
$form['options']['revisions'] = array('#type'=>'value', '#value'=>$form['options']['revisions']['#default_value']);

CiviCRM and Photos

Hello,

I would like to developp a site like yellows pages with the ability to display photos. Anybody knows how to to that with civiCRM or another module to suggest ?

Thank's in advance for advises.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions