forum.coppermine-gallery.net

Support => Deutsch (German) => Language Specific Support => cpg1.5.x Deutsch (German) => Topic started by: sylvia.r on August 26, 2015, 07:28:18 pm

Title: Frage zu Coppermine 1.5.x Plugin - email_comments
Post by: sylvia.r on August 26, 2015, 07:28:18 pm
Tag Gemeinde,
falls jemand das kennt. Wie kann man benachrichtigen ohne den Text per mail zu senden ? Geht quasi nur um Nachricht daß Kommentar da ist, aber ohne Text und nur mit Link zu Seite.
Ich vermute, geht über codebase.php und die Variable comment muß weg. Kann mich aber irren deswegen vorsichtshalber die Frage..
Gruß
Title: Re: Frage zu Coppermine 1.5.x Plugin - email_comments
Post by: Αndré on August 26, 2015, 08:24:02 pm
Ohne das Plugin jetzt genauer angesehen zu haben, was wird denn derzeit versendet und was genau davon soll weg?
Title: Re: Frage zu Coppermine 1.5.x Plugin - email_comments
Post by: sylvia.r on August 26, 2015, 09:03:07 pm
Ich lege die php Datei als Anhang...
Also, brauche nur title, author und link als Benachrichtigung. Denke $comment soll aus Zeile 164 auskommentiert werden und aus 180,127,232 und 233 einfach gelöscht..
Gruß...
Title: Re: Frage zu Coppermine 1.5.x Plugin - email_comments
Post by: cmfa on August 26, 2015, 09:08:09 pm
der Ursprung des Plugin ist hier. (http://forum.coppermine-gallery.net/index.php/topic,71072.0.html) Dort ist recht gut beschrieben was du machen musst.

Das Plugin ist nicht ganz fertig... Der Link bringt dich weiter als Das Plugin zu installieren
Title: Re: Frage zu Coppermine 1.5.x Plugin - email_comments
Post by: sylvia.r on August 26, 2015, 09:23:17 pm
Ziemlich durcheinander steht dort. Die neuste Variante aus 2015 habe ich installiert. http://forum.coppermine-gallery.net/index.php/topic,78163.0.html. Die Verlinkung ist bei dem Thema was du mir gegeben hast inkl. drin.
Da hast du auch aktiv mitgewirkt inkl. Übersetzung auf D.. Was ist jetzt maßgebend ?
Der Plugin funktioniert bei mir bloß ich will etwas raus nehmen.. Hat also wenig mit "das und nicht das"-Installation eher nichts zu tun..
Gruß.. 
Title: Re: Frage zu Coppermine 1.5.x Plugin - email_comments
Post by: Αndré on August 31, 2015, 12:13:11 pm
Ich würde diese Funktion anpassen:
Code: [Select]
function email_comments_build_email($title, $pic_markup, $author, $comment, $link) {
  // construct email text from passed data and CONFIG variables.
  // called by email_comments_added function and admin.php script
  global $CONFIG;
  $mail_message = $title . '<br />' . $pic_markup . $LINEBREAK;
  $mail_message .= ($CONFIG['plugin_email_comments_text1'] != '') ? '<p>' . $CONFIG['plugin_email_comments_text1'] . '</p>' . $LINEBREAK : '';
  $mail_message .= ($CONFIG['plugin_email_comments_text2'] != '') ? '<p>' . $CONFIG['plugin_email_comments_text2'] . '</p>' . $LINEBREAK : '';
  $mail_message .= ($CONFIG['plugin_email_comments_text3'] != '') ? '<p>' . $CONFIG['plugin_email_comments_text3'] . '</p>' . $LINEBREAK : '';
  $mail_message .= ($CONFIG['plugin_email_comments_text4'] != '') ? '<p>' . $CONFIG['plugin_email_comments_text4'] . '</p>' . $LINEBREAK : '';
  // if no 'unlogged access' - add a message (if set in CONFIG)
  if (!$CONFIG['allow_unlogged_access']) {
    // gallery doesn't allow unlogged access - link requires you be logged on to bring you there...
    $mail_message .= ($CONFIG['plugin_email_comments_loginreq'] != '') ? '<p>' . $CONFIG['plugin_email_comments_loginreq'] . '</p>' . $LINEBREAK : '';
  }
  // replace tokens in message
  $search  = array('{author}', '{comment}', '{link}');
  $replace = array($author, $comment, $link);
  $mail_message = str_replace($search, $replace, $mail_message);
  return $mail_message;
}
Title: Re: Frage zu Coppermine 1.5.x Plugin - email_comments
Post by: sylvia.r on August 31, 2015, 01:30:35 pm
Danke dir...
Mittlerweile habe ich die simple Lösung gefunden. Es reicht die Konfiguration im Skript und Mail-Ausgaben selbst zu definieren.
(natürlich wieder am Anfang habe ich das übersehen).
Aus der Zeile 1 des E-Mails nur den Platzhalter {comment} raus nehmen und den Text anders gestalten. Ich habe jetzt folgendes zugefügt: Kommentar von {author} ist hier zu sehen: {link}.

Grüße..