Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Frage zu Coppermine 1.5.x Plugin - email_comments  (Read 4135 times)

0 Members and 1 Guest are viewing this topic.

sylvia.r

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 98
Frage zu Coppermine 1.5.x Plugin - email_comments
« 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ß
Logged

Αndré

  • Administrator
  • Coppermine addict
  • ****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Frage zu Coppermine 1.5.x Plugin - email_comments
« Reply #1 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?
Logged

sylvia.r

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 98
Re: Frage zu Coppermine 1.5.x Plugin - email_comments
« Reply #2 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ß...
Logged

cmfa

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 226
Re: Frage zu Coppermine 1.5.x Plugin - email_comments
« Reply #3 on: August 26, 2015, 09:08:09 pm »

der Ursprung des Plugin ist hier. 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
Logged

sylvia.r

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 98
Re: Frage zu Coppermine 1.5.x Plugin - email_comments
« Reply #4 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ß.. 
Logged

Αndré

  • Administrator
  • Coppermine addict
  • ****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Frage zu Coppermine 1.5.x Plugin - email_comments
« Reply #5 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;
}
Logged

sylvia.r

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 98
Re: Frage zu Coppermine 1.5.x Plugin - email_comments
« Reply #6 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..
Logged
Pages: [1]   Go Up
 

Page created in 0.032 seconds with 19 queries.