Author Topic: Sendmail arguments and New users notification  (Read 26954 times)

0 Members and 1 Guest are viewing this topic.

Offline ALX

  • Pre-Newbie
  • Posts: 4
    • View Profile
Sendmail arguments and New users notification
« on: August 06, 2002, 10:37:19 AM »
Hello folks,

Thank you a lot Jan for this great script.

Now my questions:
1. How I can pass some arguments to the sendmail (I need to force return path /usr/sbin/sendmail -femail-return-path -t).

2. Is there a way to notify the admin about new user registering by e-mail? An option to validate users before they can use the gallery (just like some image posts) will be great. :)

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Sendmail arguments and New users notification
« Reply #1 on: August 06, 2002, 02:07:15 PM »
Hi,

1. See "includes/email.php", especially the functions set_from() and create_header().

2. Notify about user registration:

Open register.php and add before line:
Code: [Select]
$msg = ($config['account_activation'] == 1) ? $lang['register_success'] : $lang['activation_success'];
this:
Code: [Select]
include_once(ROOT_PATH.'includes/email.php');
$site_email = new Email();
$site_email->set_to($config['site_email']);
$site_email->set_subject("New user registration");
$body = "New user registration: $user_name\nEdit user: ".$script_url."/admin/index.php?goto=".urlencode("users.php?action=edituser&user_id=".$site_db->get_insert_id());
$site_email->set_simple_body($body);
$site_email->send_email();

You can edit the message in $body if you want.

If you want to validate the users first, set "Account activation by email" to no in your settings and replace this line:
Code: [Select]
$user_level = ($config['account_activation'] == 1) ? USER_AWAITING : USER;
with
Code: [Select]
$user_level = ($config['account_activation'] == 1) ? USER_AWAITING : USER_AWAITING ;
You should also edit $lang['activation_success'] in your lang-files to note the users that they must be first validated by the admin before thay can log in.

Greets Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline ALX

  • Pre-Newbie
  • Posts: 4
    • View Profile
Sendmail arguments and New users notification
« Reply #2 on: August 08, 2002, 03:12:07 AM »
Thank you ! :D

Offline mantra

  • Sr. Member
  • ****
  • Posts: 358
    • View Profile
    • DREAM WITH MANTRA
I couldn't fine the line in version 1.7
« Reply #3 on: December 07, 2002, 01:23:58 AM »
$main_template = 'register';

define('GET_CACHES', 1);
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$user_access = get_permission();
include(ROOT_PATH.'includes/page_header.php');

if ($action == "") {
  $action = "signup";
}

if ($user_info['user_level'] != GUEST && $action != "activate") {
  show_error_page($lang['already_registered']);
}
$content = "";

//-----------------------------------------------------
//--- Signup ------------------------------------------
//-----------------------------------------------------
if ($action == "signup") {
  $site_template->register_vars(array(
    "lang_agreement" => $lang['agreement'],
    "lang_agreement_terms" => $lang['agreement_terms'],
    "lang_agree" => $lang['agree'],
    "lang_agree_not" => $lang['agree_not']
  ));
  $content = $site_template->parse_template("register_signup");
}

//-----------------------------------------------------
//--- Add New User ------------------------------------
//-----------------------------------------------------
if ($action == "register") {
  if (!isset($HTTP_POST_VARS['user_name'])) {
    if ($config['activation_time'] != 0) {
      $expiry = time() - 60 * 60 * 24 * $config['activation_time'];
      $sql = "DELETE FROM ".USERS_TABLE."
              WHERE (".get_user_table_field("", "user_joindate")." < $expiry) AND ".get_user_table_field("", "user_level")." = ".USER_AWAITING;
      $site_db->query($sql);
    }
  }
  $user_name = (isset($HTTP_POST_VARS['user_name'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['user_name'])) : "";
  $user_name = ereg_replace("( ){2,}", " ", $user_name);
  $user_password = (isset($HTTP_POST_VARS['user_password'])) ? trim($HTTP_POST_VARS['user_password']) : "";
  $user_email = (isset($HTTP_POST_VARS['user_email'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['user_email'])) : "";
  $user_showemail = (isset($HTTP_POST_VARS['user_showemail'])) ? intval($HTTP_POST_VARS['user_showemail']) : 1;
  $user_allowemails = (isset($HTTP_POST_VARS['user_allowemails'])) ? intval($HTTP_POST_VARS['user_allowemails']) : 1;
  $user_invisible = (isset($HTTP_POST_VARS['user_invisible'])) ? intval($HTTP_POST_VARS['user_invisible']) : 0;
  $user_homepage = (isset($HTTP_POST_VARS['user_homepage'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['user_homepage'])) : "";
  $user_icq = (isset($HTTP_POST_VARS['user_icq'])) ? ((intval(trim($HTTP_POST_VARS['user_icq']))) ? intval(trim($HTTP_POST_VARS['user_icq'])) : "") : "";

  $error = 0;
  if (isset($HTTP_POST_VARS['user_name'])) {
    if ($user_name != "") {
      $sql = "SELECT ".get_user_table_field("", "user_name")."
              FROM ".USERS_TABLE."
              WHERE ".get_user_table_field("", "user_name")." = '".strtolower($user_name)."'";
      if ($site_db->not_empty($sql)) {
        $msg .= (($msg != "") ? "<br />" : "").$lang['username_exists'];
        $error = 1;
      }
    }
    else {
      $msg .= (($msg != "") ? "<br />" : "").$field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $lang['user_name']), $lang['field_required']);
      $error = 1;
    }

    if ($user_password == "") {
      $msg .= (($msg != "") ? "<br />" : "").$field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $lang['password']), $lang['field_required']);
      $error = 1;
    }

    if ($user_email != "") {
      if (check_email($user_email)) {
        $sql = "SELECT ".get_user_table_field("", "user_email")."
                FROM ".USERS_TABLE."
                WHERE ".get_user_table_field("", "user_email")." = '".strtolower($user_email)."'";
        if ($site_db->not_empty($sql)) {
          $msg .= (($msg != "") ? "<br />" : "").$lang['email_exists'];
          $error = 1;
        }
      }
      else {
        $msg .= (($msg != "") ? "<br />" : "").$lang['invalid_email_format'];
        $error = 1;
      }
    }
    else {
      $msg .= (($msg != "") ? "<br />" : "").$field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $lang['email']), $lang['field_required']);
      $error = 1;
    }

    if (!empty($additional_user_fields)) {
      foreach ($additional_user_fields as $key => $val) {
        if (isset($HTTP_POST_VARS[$key]) && intval($val[2]) == 1 && trim($HTTP_POST_VARS[$key]) == "") {
          $error = 1;
          $field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $val[0]), $lang['field_required']);
          $msg .= (($msg != "") ? "<br />" : "").$field_error;
        }
      }
    }
  } // end if
  else {
    $error = 1;
  }

  if (!$error) {
    $additional_field_sql = "";
    $additional_value_sql = "";
    if (!empty($additional_user_fields)) {
      $table_fields = $site_db->get_table_fields(USERS_TABLE);
      foreach ($additional_user_fields as $key => $val) {
        if (isset($HTTP_POST_VARS[$key]) && isset($table_fields[$key])) {
          $additional_field_sql .= ", $key";
          $additional_value_sql .= ", '".un_htmlspecialchars(trim($HTTP_POST_VARS[$key]))."'";
        }
      }
    }
    $activationkey = get_random_key(USERS_TABLE, get_user_table_field("", $user_table_fields['user_activationkey']));
    $user_id = $site_db->get_next_id($user_table_fields['user_id'], USERS_TABLE);

    $current_time = time();
    $user_level = ($config['account_activation'] == 0) ? USER : USER_AWAITING;
    $sql = "INSERT INTO ".USERS_TABLE."
            (".get_user_table_field("", "user_id").get_user_table_field(", ", "user_level").get_user_table_field(", ", "user_name").get_user_table_field(", ", "user_password").get_user_table_field(", ", "user_email").get_user_table_field(", ", "user_showemail").get_user_table_field(", ", "user_allowemails").get_user_table_field(", ", "user_invisible").get_user_table_field(", ", "user_joindate").get_user_table_field(", ", "user_activationkey").get_user_table_field(", ", "user_lastaction").get_user_table_field(", ", "user_lastvisit").get_user_table_field(", ", "user_comments").get_user_table_field(", ", "user_homepage").get_user_table_field(", ", "user_icq").$additional_field_sql.")
            VALUES
            ($user_id, $user_level, '$user_name', '".md5($user_password)."', '$user_email', $user_showemail, $user_allowemails, $user_invisible, $current_time, '$activationkey', $current_time, $current_time, 0, '$user_homepage', '$user_icq'".$additional_value_sql.")";
    $result = $site_db->query($sql);

    if ($result) {
      $activation_url = $script_url."/register.php?action=activate&activationkey=".$activationkey;

      include(ROOT_PATH.'includes/email.php');
      $site_email = new Email();
      $site_email->set_to($user_email);
      $site_email->set_subject($lang['register_success_emailsubject']);
      $site_email->register_vars(array(
        "activation_url" => $activation_url,
        "user_name" => $user_name,
        "user_password" => $user_password,
        "site_name" => $config['site_name']
      ));
     
      switch($config['account_activation']) {
      case 2:
        $email_template = "register_activation_admin";
        $msg = $lang['register_success_admin'];
        break;
      case 1:
        if ($config['language_dir_default'] != $config['language_dir']) {
          $activation_url .= "&l=".$config['language_dir'];
        }
        $email_template = "register_activation";
        $msg = $lang['register_success'];
        break;
      case 0:
      default:
        $email_template = "register_activation_none";
        $msg = $lang['register_success_none'];
        break;
      }

      $site_email->set_body($email_template, $config['language_dir']);
      $site_email->send_email();
      if ($config['account_activation'] == 2) {
        $site_email->reset();
        $site_email->set_to($config['site_email']);
        $site_email->set_subject($lang['admin_activation_emailsubject']);
        $user_details_url = $script_url."/admin/index.php?goto=".urlencode("users.php?action=edituser&user_id=".$user_id."&activation=1");
        $site_email->register_vars("user_details_url", $user_details_url);
        $site_email->set_body("admin_activation", $config['language_dir_default']);
        $site_email->send_email();
      }
    }
    else {
      $msg = $lang['general_error'];
    }
  }

  if ($error) {
    if ($user_showemail == 1) {
      $user_showemail_yes = " checked=\"checked\"";
      $user_showemail_no = "";
    }
    else {
      $user_showemail_yes = "";
      $user_showemail_no = " checked=\"checked\"";
    }
    if ($user_allowemails == 1) {
      $user_allowemails_yes = " checked=\"checked\"";
      $user_allowemails_no = "";
    }
    else {
      $user_allowemails_yes = "";
      $user_allowemails_no = " checked=\"checked\"";
    }
    if ($user_invisible == 1) {
      $user_invisible_yes = " checked=\"checked\"";
      $user_invisible_no = "";
    }
    else {
      $user_invisible_yes = "";
      $user_invisible_no = " checked=\"checked\"";
    }
    $site_template->register_vars(array(
      "user_name" => htmlspecialchars(stripslashes($user_name)),
      "user_email" => htmlspecialchars(stripslashes($user_email)),
      "user_homepage" => htmlspecialchars(stripslashes($user_homepage)),
      "user_icq" => $user_icq,
      "user_showemail_yes" => $user_showemail_yes,
      "user_showemail_no" => $user_showemail_no,
      "user_allowemails_yes" => $user_allowemails_yes,
      "user_allowemails_no" => $user_allowemails_no,
      "user_invisible_yes" => $user_invisible_yes,
      "user_invisible_no" => $user_invisible_no,
      "lang_user_name" => $lang['user_name'],
      "lang_password" => $lang['password'],
      "lang_email" => $lang['email'],
      "lang_register_msg" => $lang['register_msg'],
      "lang_submit" => $lang['submit'],
      "lang_reset" => $lang['reset'],
      "lang_email" => $lang['email'],
      "lang_show_email" => $lang['show_email'],
      "lang_allow_emails" => $lang['allow_emails'],
      "lang_invisible" => $lang['invisible'],
      "lang_optional_infos" => $lang['optional_infos'],
      "lang_homepage" => $lang['homepage'],
      "lang_icq" => $lang['icq'],
      "lang_yes" => $lang['yes'],
      "lang_no" => $lang['no']
    ));
   
    if (!empty($additional_user_fields)) {
      $additional_field_array = array();
      foreach ($additional_user_fields as $key => $val) {
        if ($val[1] == "radio") {
          $value = (isset($HTTP_POST_VARS[$key])) ? intval($HTTP_POST_VARS[$key]) : 1;
          if ($value == 1) {
            $additional_field_array[$key.'_yes'] = " checked=\"checked\"";
            $additional_field_array[$key.'_no'] = "";
          }
          else {
            $additional_field_array[$key.'_yes'] = "";
            $additional_field_array[$key.'_no'] = " checked=\"checked\"";
          }
        }
        else {
          $value = (isset($HTTP_POST_VARS[$key])) ? htmlspecialchars(trim($HTTP_POST_VARS[$key])) : "";
        }
        $additional_field_array[$key] = $value;
        $additional_field_array['lang_'.$key] = $val[0];
      }
      if (!empty($additional_field_array)) {
        $site_template->register_vars($additional_field_array);
      }
    }

    $content = $site_template->parse_template("register_form");
  }
}

if ($action == "activate") {
  if ($config['activation_time'] != 0) {
    $expiry = time() - 60 * 60 * 24 * $config['activation_time'];
    $sql = "DELETE FROM ".USERS_TABLE."
            WHERE (".get_user_table_field("", "user_joindate")." < $expiry) AND ".get_user_table_field("", "user_level")." = ".USER_AWAITING;
    $site_db->query($sql);
  }
  if (!isset($HTTP_GET_VARS['activationkey'])){
    $msg = $lang['missing_activationkey'];
  }
  else {
    if ($config['account_activation'] == 2 && $user_info['user_level'] != ADMIN) {
      show_error_page($lang['no_permission']);
      exit;
    }
    $activationkey = trim($HTTP_GET_VARS['activationkey']);
    $sql = "SELECT ".get_user_table_field("", "user_name").get_user_table_field(", ", "user_email").get_user_table_field(", ", "user_activationkey")."
            FROM ".USERS_TABLE."
            WHERE ".get_user_table_field("", "user_activationkey")." = '$activationkey'";
    $row = $site_db->query_firstrow($sql);
    if (!$row) {
      $msg = $lang['invalid_activationkey'];
    }
    else {
      $sql = "UPDATE ".USERS_TABLE."
              SET ".get_user_table_field("", "user_level")." = ".USER."
              WHERE ".get_user_table_field("", "user_activationkey")." = '$activationkey'";
      $site_db->query($sql);
      $msg = $lang['activation_success'];

      if ($config['account_activation'] == 2) {
        include(ROOT_PATH.'includes/email.php');
        $site_email = new Email();
        $site_email->set_to($row[$user_table_fields['user_email']]);
        $site_email->set_subject($lang['activation_success_emailsubject']);
        $site_email->register_vars(array(
          "user_name" => $row[$user_table_fields['user_name']],
          "site_name" => $config['site_name']
        ));
        $site_email->set_body("activation_success", $config['language_dir']);
        $site_email->send_email();
      }
    }
  }
}

//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['register']."</span>";

//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  "content" => $content,
  "msg" => $msg,
  "clickstream" => $clickstream,
  "lang_register" => $lang['register']
));
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
?>


which one line should I add could you tell me jan???

Offline fanncy pants

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • http://www.backshots.us
Sendmail arguments and New users notification
« Reply #4 on: December 07, 2002, 01:43:21 AM »
I'm using v 1.7.  I, too, want to receive e-mail when a new user registers.  I can't seem to find the code indicated below in my register.php.  I've come across two lines that look similar, but I'm not quite sure.  Please help!

Quote from: Jan

2. Notify about user registration:

Open register.php and add before line:
Code: [Select]
$msg = ($config['account_activation'] == 1) ? $lang['register_success'] : $lang['activation_success'];
this:
Code: [Select]
include_once(ROOT_PATH.'includes/email.php');
$site_email = new Email();
$site_email->set_to($config['site_email']);
$site_email->set_subject("New user registration");
$body = "New user registration: $user_name\nEdit user: ".$script_url."/admin/index.php?goto=".urlencode("users.php?action=edituser&user_id=".$site_db->get_insert_id());
$site_email->set_simple_body($body);
$site_email->send_email();

You can edit the message in $body if you want.

Fanncy Pants!

[/color]

Offline mantra

  • Sr. Member
  • ****
  • Posts: 358
    • View Profile
    • DREAM WITH MANTRA
Yeah Jan could you help us out ..cos you the best
« Reply #5 on: December 07, 2002, 05:31:04 AM »
Yeah Jan could you help us out ..cos you the best :D  :lol:  :wink:  :wink:

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Sendmail arguments and New users notification
« Reply #6 on: December 08, 2002, 05:44:38 PM »
Change
Code: [Select]
     if ($config['account_activation'] == 2) {
        $site_email->reset();
        $site_email->set_to($config['site_email']);
        $site_email->set_subject($lang['admin_activation_emailsubject']);
        $user_details_url = $script_url."/admin/index.php?goto=".urlencode("users.php?action=edituser&user_id=".$user_id."&activation=1");
        $site_email->register_vars("user_details_url", $user_details_url);
        $site_email->set_body("admin_activation", $config['language_dir_default']);
        $site_email->send_email();
      }

to
Code: [Select]
       $site_email->reset();
        $site_email->set_to($config['site_email']);
        $site_email->set_subject($lang['admin_activation_emailsubject']);
        $user_details_url = $script_url."/admin/index.php?goto=".urlencode("users.php?action=edituser&user_id=".$user_id."&activation=1");
        $site_email->register_vars("user_details_url", $user_details_url);
        $site_email->set_body("admin_activation", $config['language_dir_default']);
        $site_email->send_email();

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline fanncy pants

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • http://www.backshots.us
Sendmail arguments and New users notification
« Reply #7 on: December 08, 2002, 08:47:40 PM »
Thank you Jan!  Code worked perfectly!!

Now, is there a way to do the same thing (email notification), but with new image uploads to the gallery?

Fanncy Pants!

[/color]

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Sendmail arguments and New users notification
« Reply #8 on: December 08, 2002, 09:00:53 PM »
Replace in members.php
Code: [Select]
if ($config['upload_notify'] == 1 && !$direct_upload) {
with
Code: [Select]
if ($config['upload_notify'] == 1) {Note that "Notify by email upon user upload" must be set to "Yes" in your settings.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Sendmail arguments and New users notification
« Reply #9 on: December 08, 2002, 09:44:21 PM »
Works fine, exept one thing:
admin receve 2 emails in one of them I get:
Quote
New user registration: 1
Edit user:
http://192.168.1.3/main/admin/index.php?goto=users.php%3Faction%3Dedituser%26user_id%3D20
that's what supposed to be. and second email with:
Quote
New user registration: 1
Edit user:
http://192.168.1.3/main/admin/index.php?goto=users.php%3Faction%3Dedituser%26user_id%3D20
Dear {user_name},

we thank you for registering at "{site_name}".

Your access codes are:
User name:  {user_name}
Password:   {user_password}

In order to activate your account, please click the link below:
{activation_url}

In case you have not sent a registration, just ignore this email.

--
Best regards,
{site_name}

and same thing happend when I send email to ONE user from admin control panel, the user get that email AND admin too! I dont think that supposed to be like that.
P.S. I use SMTP without authentical login. if I use mail() function in 4images, it compleately screwed with TO: FROM: fields.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Sendmail arguments and New users notification
« Reply #10 on: December 09, 2002, 08:09:24 AM »
You should try to add
Code: [Select]
$site_email = new Email();
below
Code: [Select]
$site_email->reset();
If you send emails through the control panel it's correct that the admin receives always a copy. Thats because we use the BCC field to send the emails to the users and the admin email as main recipient.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Sendmail arguments and New users notification
« Reply #11 on: December 09, 2002, 05:01:54 PM »
ouh, never mind, Jan, sry, my fault, I used first changes for v1.6 on v1.7 and more then that, I placed it the wrong place... :oops:

and about BBC, now I got it, u said before something about using BCC, now it's clear. expept... :wink: ... http://4homepages.de/forum/viewtopic.php?p=11522#11522
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Biggi

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • http://www.bibodia.de/
Sendmail arguments and New users notification
« Reply #12 on: December 09, 2002, 07:20:20 PM »
Hallo Jan,
ich habe diese Tutorials hier eben abgearbeitet und ich bin begeistert. Die Benachrichtigungen funktionieren  :)

Nur ein winziges Problem habe ich noch, wozu mir einfach die PHP-Kenntnisse fehlen - ich habe schon hin- und herprobiert.

Und zwar möchte ich bei neuen Uploads in der Datei upload_notify.html zusätzlich zum Bildnamen, der Kategorie usw. auch gerne den Namen des Users einbauen, der ein neues Bild hochgeladen hat.

Ich habe auch schon raus, wo ich das machen muß: ich muß dies in der member.php hinterlegen. Richtig? Aber wie genau lautet der Befehl dafür? Bei mir steht in der Benachrichtigung nur {user_name}, aber der richtige Namen wird nicht angezeigt. Hilfst Du mir?

Danke! Ich würde mich sehr freuen!

Biggi

P.S.
Ach - und in diesem Zuge hätte ich gleich noch eine Riesenbitte: wie bekomme ich es hin, daß in der Benachrichtigungs-Email nicht der Link zur Freischaltung angezeigt wird, sondern gleich der Link zur Bild-URL, also das Original in der details.html? Wir schalten die Bilder nicht frei, sondern jeder kann direkt hochladen, wenn er registriert ist. Deshalb wäre für uns zwei Admins der direkte Bild-Link sehr interessant.

Ist das schwierig umzusetzen?

Nochmals viele Grüße, Biggi

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Sendmail arguments and New users notification
« Reply #13 on: December 10, 2002, 09:11:38 AM »
Du fügst nach
Code: [Select]
"cat_name" => $cat_cache[$cat_id]['cat_name'],
diese Zeilem ein
Code: [Select]
"user_name" => $user_info['user_name'],
"image_id" => $image_id,

Jetzt kannst Du im Template {user_name} verwenden und als Link zum Bild http://www.domain.com/4images/details.php?image_id={image_id}
Die URL natürlich noch anpassen.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Biggi

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • http://www.bibodia.de/
Sendmail arguments and New users notification
« Reply #14 on: December 10, 2002, 07:02:29 PM »
Jan, ich bin Dir unheimlich dankbar - es funktioniert hervorragend :P

Herzlichen Dank für Deine Mühe!

Viele Grüße, Biggi