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 [2]   Go Down

Author Topic: [CPG1.4]: Restriction of email domains [1.4.20]  (Read 74586 times)

0 Members and 1 Guest are viewing this topic.

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - (Windows)
    • Makc's home page
Re: [CPG1.4]: Restriction of email domains [1.4.4]
« Reply #20 on: April 03, 2006, 12:31:31 am »

Sounds good.

I created a new thread for 1.3.x version...
http://forum.coppermine-gallery.net/index.php?topic=29946

I added a note about 1.3.x in first post.

Hope now we can move this thread and a new one to MODS section!

Thanks!
Logged

lamama

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 404
Re: /REQ/ only one email domain for registration and ecards.
« Reply #21 on: April 12, 2006, 02:44:41 am »

I am looking some one who can give me an idea how EASELY modify this mode so me can restrict not only 1 domain but multi domains...

Did you find one?

I'm looking for a mod that is able to block certain "throw-away-email"-domains (like mailinator.com) via blacklist...
Logged

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - (Windows)
    • Makc's home page
Re: /REQ/ only one email domain for registration and ecards.
« Reply #22 on: April 13, 2006, 12:33:59 am »

Did you find one?

I'm looking for a mod that is able to block certain "throw-away-email"-domains (like mailinator.com) via blacklist...

Coppermine can block any domains you like by default!
My bad. CPG doesn't allow to block emails :-X

My sentence was not right. It must sounds:
I am looking some one who can give me an idea how EASELY modify this mode so me can allow not only 1 domain but multi domains...
« Last Edit: May 04, 2006, 11:21:50 pm by Makc666 »
Logged

Frankieloum

  • Guest
Re: [CPG1.4]: Restriction of email domains [1.4.4]
« Reply #23 on: June 30, 2008, 11:33:18 pm »

ok quick question I just got Coppermine installed and am trying my best to figure out how to do the email notification for my members.
From what I gather I find this section which I did
if ($CONFIG['email_comment_notification'] && !USER_IS_ADMIN ) {
                $mail_body = "<p>" . bb_decode(process_smilies($msg_body, $CONFIG['ecards_more_pic_target'])) . "</p>\n\r ".$lang_db_input_php['email_comment_body'] . " " . $CONFIG['ecards_more_pic_target'] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . $redirect;
                cpg_mail('admin', $lang_db_input_php['email_comment_subject'], make_clickable($mail_body));
            }
 and then do I replace it with this?? or add this somewhere in it lol Sorry I AM SO NEW at this


// send an email to the owner of the picture
            $result = db_query("SELECT user_name,user_email FROM {$CONFIG['TABLE_PICTURES']} AS p, {$CONFIG['TABLE_USERS']} AS u WHERE u.user_id=p.owner_id and p.pid=".$pid);
            if (mysql_num_rows($result)) {
              $picture_owner_data = mysql_fetch_array($result);
              $subject = "New GJPix Comment by ".USER_NAME;
              $mail_body  = "Hi ".$user_name."!\n\n".USER_NAME." just wrote a comment on one of your photos, click the link below to read and reply to it.\n";
              $mail_body .= "http://gallery.greatestjournal.com/displayimage.php?pos=-".$pid;
              cpg_mail($picture_owner_data['user_email'], $subject, $mail_body, 'text/plain', "GJPix", 'dontreply@yourdomain.com');

            }
Logged

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - (Windows)
    • Makc's home page
Re: [CPG1.4]: Restriction of email domains [1.4.4]
« Reply #24 on: July 03, 2008, 12:06:09 pm »

##   2008-07-01 - Version 1.4.18
##      - You can select Whitelist or Blacklist mode both for registration or ecards sending check
##      - Multiply domains can now be added separated with ;
##      - You can now select whether to include domains available for registration in error messages or not
##      - You can now select whether to include domains available for sending ecards in error messages or not
##      - Updated for CPG version 1.4.18 and tested with it
##      - Fixed some errors
##      - Fixed translations

New version 1.4.18 and screenshots are in the first post!

Upgrade

Files:
The best way to upgrade from 1.4.4 to 1.4.18 is to remove version 1.4.4 and add the new code of version 1.4.18

SQL:
To upgrade database entries from 1.4.4 to 1.4.18 run throw phpMyAdmin:
Code: [Select]
INSERT INTO `cpg1418_config` ( `name` , `value` )
VALUES
('domain_email_list_reg', '0'),
('domain_email_list_ecard', '0'),
('domain_email_reg_whitelist', '0'),
('domain_email_ecard_whitelist', '1')

Important!
#   If you have a different table prefix then change this command accordingly.
#   I have used the default table prefix for Coppermine version 1.4.18!
#   You have to change value in this line: INSERT INTO `cpg1418_config` ( `name` , `value` )
#   The value is: cpg1418_config

Logged

Frankieloum

  • Guest
Re: [CPG1.4]: Restriction of email domains [1.4.18]
« Reply #25 on: July 08, 2008, 05:34:46 pm »

I have the new Coppermine, just installed it couple weeks ago, I cannot find the thread that had the mod to receive email notifications
Members are uploading in the Gallery and want to receive email notifications. I cannot recall where the mod is?
Logged

Joachim Mller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: [CPG1.4]: Restriction of email domains [1.4.18]
« Reply #26 on: July 09, 2008, 07:16:13 am »

Then don't hijack a thread that deals with something completely different. Start a new thread on the support board instead!
Logged

Frankieloum

  • Guest
Re: [CPG1.4]: Restriction of email domains [1.4.18]
« Reply #27 on: July 09, 2008, 02:53:02 pm »

Then don't hijack a thread that deals with something completely different. Start a new thread on the support board instead!

sorry, the title said Restriction of email domains and I thought that was for what I was needing? I am new to this and doing my best at posting in right spots. Bear with me please.
Thanks
Logged

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - (Windows)
    • Makc's home page
Re: [CPG1.4]: Restriction of email domains [1.4.20]
« Reply #28 on: February 04, 2009, 08:14:18 pm »

##   2009-04-04 - Version 1.4.20
##      - Updated file changes in ecard.php for CPG version 1.4.20

New version 1.4.20 is in the first post of this thread.

There is no need to upgrade to this one.
This is only for new installes.

The change was made bacause my code had been added between lines which were changed in 1.4.20 in ecard.php

Code: [Select]
***************
*** 68,76 ****
  $valid_email_pattern = "^[_\.0-9a-z\-]+@([0-9a-z][0-9a-z-]*\.)+[a-z]{2,6}$";
  $valid_sender_email = eregi($valid_email_pattern, $sender_email);
  $valid_recipient_email = eregi($valid_email_pattern, $recipient_email);
! $invalid_email = '<font size="1">' . $lang_ecard_php['invalid_email'] . ' (' . $recipient_email . ')</font>';
! if (!$valid_sender_email && count($_POST) > 0) $sender_email_warning = $invalid_email;
! if (!$valid_recipient_email && count($_POST) > 0) $recipient_email_warning = $invalid_email;
 
  $gallery_url_prefix = $CONFIG['ecards_more_pic_target']. (substr($CONFIG['ecards_more_pic_target'], -1) == '/' ? '' : '/');
 
--- 68,79 ----
  $valid_email_pattern = "^[_\.0-9a-z\-]+@([0-9a-z][0-9a-z-]*\.)+[a-z]{2,6}$";
  $valid_sender_email = eregi($valid_email_pattern, $sender_email);
  $valid_recipient_email = eregi($valid_email_pattern, $recipient_email);
! if (!$valid_sender_email && count($_POST) > 0) {
!       $sender_email_warning = '<font size="1">' . $lang_ecard_php['invalid_email'] . ' (' . $sender_email . ')</font>';
! }
! if (!$valid_recipient_email && count($_POST) > 0) {
!       $recipient_email_warning = '<font size="1">' . $lang_ecard_php['invalid_email'] . ' (' . $recipient_email . ')</font>';
! }
 
  $gallery_url_prefix = $CONFIG['ecards_more_pic_target']. (substr($CONFIG['ecards_more_pic_target'], -1) == '/' ? '' : '/');
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.032 seconds with 21 queries.