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

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.

A blog-inspired module

I'm new to Drupal and developing a new module for listing out a user's podcast(s). It is basically for a community directory of podcasts, but I used the blog.module as a template since it had a lot of the functionality I was looking for.

I've got the individual node pages working and the last-10 block too, but the other pages are busted or not found.

To be specific, the list of recent nodes, specific user-owed nodes and the feed don't work. Any ideas?


/**
* Implementation of hook_view().
*/
function podlisting_view(&$node, $teaser = FALSE, $page = FALSE) {
$node = node_prepare($node, $teaser);
$profile = theme('podlisting_profile', $node);
$node->body .= $profile;
$node->teaser .= $profile;
}

/**
* Implementation of hook_user().
*/
function podlisting_user($type, &$edit, &$user) {
if ($type == 'view' && user_access('edit own podlisting', $user)) {
$form['podlisting'] = array(
'#type' => 'item', '#title' => t('podlisting'),
'#value' => l(t('associated podlistings'), "podlisting/$user->uid", array('title' => t("Check out %username's podlistings.", array('%username' => $user->name))))
);
return array(t('Vlogs') => $form);
}
}

/**
* Menu callback; displays a Drupal page containing recent podlisting entries.
*/
function podlisting_page($a = NULL, $b = NULL) {

if (is_numeric($a)) { // $a is a user ID

Pages

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