See the Mailing lists or Drupal Issue queue. There are also various working groups on groups.drupal.org

drupal_is_front_page & breadcrumbs problems with front page & i18n

Hi,

I was having many problems with breadcrumbs, especially:

  • The 'Home' is set to '<front>', which is translated to 'nothing' and is not language aware (link will become: http://domain.ext/)
  • drupal_is_front_page() is not language aware
  • drupal_is_front_page() is not taking care of the default front page setting

All this leads to problems with code that needs to know when it's in the front page (generally) and breadcrumbs (when the i18n module is installed). Here is what I did to solve most of these problems (Note: I'm not familiar with the drupal API and I tested these only with the i18n module installed, don't know if it still works without it):

In 'menu.inc', replace the line
$links[] = l(t('Home'), '<front>');
with
$links[] = l(t('Home'), drupal_get_normal_path(variable_get('site_frontpage', 'node')));

In 'path.inc', replace 'drupal_is_front_page()' with:
<?php
function drupal_is_front_page() {
// As drupal_init_path updates $_GET['q'] with the 'site_frontpage' path,
// rely on $_REQUEST to verify the original value of 'q'.
if (!isset($_REQUEST['q'])) return true;

$request = "";
$front_page = "";

if (function_exists('i18n_get_normal_path'))
{
$request = i18n_get_normal_path(trim($_REQUEST['q'], '/'));
$front_page = i18n_frontpage();
}
else
{
$request = drupal_get_normal_path(trim($_REQUEST['q'], '/'));

is any curve header layout in drupal

hello,
is there any curve header in drupal??

Multiple default languages for several domains

Greetings,

I would like mysite.com to use several languages (i.e. "en", "jp", "ru").
I have several domains mysite.com, mysite.jp and mysite.ru

I want all of these domains point to the same database but each of them will load the corresponding language by default.

mysite.com will run english version, mysite.jp - japanese, mysite.ru - russian.

This is in order not to use mysite.com/en, mysite.com/jp, mysite.com/ru.

Can anybody suggest how should I set up those sites ? I should probably use several settings.php files for each of those sites .....

Line Break Converter Issue

Greetings,

I found that line break converter turn several line breaks (ENTERs) into a single BR. Users can't make more than one breaks ... An I missing something or is it a bug ?

Thanks.

Expire a password after time limit

Hi guys,
First post, hope it's in the right place.

Reallllly liking Drupal. But I haven't been able to get Drupal to expire a password after x many days. Need that to happen for it to be hipaa compliant, so I started writing for it. I hit an issue with calling the redirect page, outside of that I'm good.

I'm trying to call the password page when the password is expired. The set message works great so I'm hitting that part of the code, but it always goes to the user page, and doesn't call the profile update page. Which one of these is correct, cause I can't get any of them to work..

			drupal_set_message(t('TimErrPass:  You password has expired..'));
 			return url("http://server/?q=user/2/edit");
			user_pass_reset_url($username);
			drupal_goto('user/password');
			return drupal_get_form('user/password', $form);

what I did:
I made a new table (tim_timecode) with a varchar and int for the username and the timecode.

In the user.module, in the user_save function, I wrote some code that writes the current timestamp everytime the user hits submit from the user profile update page to my own table.

$timecode = time();
$username = $account->uid;
$result = 0;
// echo "Trying: UPDATE tim_timecode SET timecode=$timecode WHERE username=$username";
$result = db_query("UPDATE tim_timecode SET timecode=$timecode WHERE username=$username");

Pages

Subscribe with RSS Subscribe to RSS - Deprecated - Drupal core