This forum is for less technical discussions about the Drupal project, not for support questions.

How to send out Big5 emails

I have successfully changed the email sending with Big5 encoded.

Please do the following 2 things:

1. Add a new function to the file "include/common.inc":

function drupal_convert_to_big5($data, $encoding='utf-8') {
if (function_exists('iconv')) {
$out = @iconv($encoding, 'big5', $data);
}
else if (function_exists('mb_convert_encoding')) {
$out = @mb_convert_encoding($data, 'big5', $encoding);
}
else if (function_exists('recode_string')) {
$out = @recode_string($encoding .'..big5', $data);
}
else {
watchdog('php', t("Unsupported encoding '%s'. Please install iconv, GNU recode or mbstring for PHP.", $encoding), WATCHDOG_ERROR);
return FALSE;
}

return $out;
}

// I would suggest adding the above right under the function "function drupal_convert_to_utf8($data, $encoding)" for easy debugging in the future

2. Replace the function "user_mail" inside the file "modules/user.module" with this:

function user_mail($mail, $subject, $message, $header) {
if (variable_get('smtp_library', '') && file_exists(variable_get('smtp_library', ''))) {
include_once variable_get('smtp_library', '');
return user_mail_wrapper($mail, $subject, $message, $header);
}
else {
/*
** Note: if you are having problems with sending mail, or mails look wrong
** when they are received you may have to modify the str_replace to suit
** your systems.
** - \r\n will work under dos and windows.

Prodigem API for bittorrents

The Prodigem API is an interface for programmers to gain access into the Prodigem Bit Torrent Hosting Service. It allows the possibility of designing new Prodigem interfaces and making Prodigem a part of other services (eg. blogging tools, content management systems). Imagine the power of a "Help, I've been slashdotted!" button in any web management tool.

404 on lost password page

When someone tries to use the lost password feature on our site... they get a 404 saying "requested page not found".

Any idea why that could be happening ?

Thanks
Marcel

?q=foo and xyz_foo(), abx_foo(), how does it work?

in the menu doc,

If the user accesses http://example.com/?q=foo, then the menu system will first look for a menu item with that path. In this case it will find a match, and execute page_example_foo().

how does this work for two modules with _foo, as in xyz_foo(), abx_foo() , in order to get the right _foo()

Just a minor spelling error on the Post New Message part of the forums

Before posting a forum topic, please search the forums first; chances are your questions has been asked a couple times.

When asking a question, describe the symptoms of your problem, the environment in which it occurs (Drupal version, webserver, database), the research and diagnostics steps you did to try and understand the problem.

Also note that posts that are interesting, complete, well-written and correctly spelled/punctuated are often promoted to our main page.

Corrections:

chances are your questions has been asked a couple times.

Uploading .htaccess files with Linux

I know this sounds kinda silly, but I'm running ubuntu 5.04 as my development machine, and when I tarred the directory and moved it, I tried to upload all of the drupal files to the site use gftp. The problem is, I can't seem to find the .htaccess file.. like it just doesn't exist. I think this has to do with the fact that it is under /var/www/ which happens to be my apache2 directory... is there anyway I can upload from this directory?

Pages

Subscribe with RSS Subscribe to RSS - General discussion