Author Topic: [Possible Bug] E-Cards  (Read 12654 times)

0 Members and 1 Guest are viewing this topic.

Offline Alan @ ArtScans

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://www.qcs-software.com
[Possible Bug] E-Cards
« on: June 29, 2002, 10:03:54 PM »
Hi,

Just been testing 4images, and tried to send a couple of e-cards, and noticed the following problems.

The time in the e-mail is missing the last number - "Your eCard has been sent on 29.06.2002 20:5".  It was infact sent at 20:53.

The link to the e-card didn't work at all.  All I got was "Invalid eCard ID", and it displays a random image.

The site in question is at http://new.artscans.co.uk (please take into account, that this site is not launching until Monday 1st July, so it's not fully working yet).

Thanks,
Alan.
Alan Wagstaff,
Software Development Manager, SDT
QCS Software

Offline Alan @ ArtScans

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://www.qcs-software.com
[Possible Bug] E-Cards
« Reply #1 on: June 29, 2002, 10:12:30 PM »
Hi folks,

Further testing has revealed that it is cutting of the final character in postcard_id as well.  This is what was causing the second error (Invalid ecard ID).

Thanks,
Alan.
Alan Wagstaff,
Software Development Manager, SDT
QCS Software

Offline Vienix

  • Full Member
  • ***
  • Posts: 144
    • View Profile
    • com.municate.nl
[Possible Bug] E-Cards
« Reply #2 on: June 29, 2002, 10:17:17 PM »
Same here...

 8O
Thats It !

Offline Vienix

  • Full Member
  • ***
  • Posts: 144
    • View Profile
    • com.municate.nl
Survey
« Reply #3 on: June 29, 2002, 10:56:29 PM »
Art Scan> 1.6 >Problem ecards
http://wev9.venus.sprintweb.de/gal/ 1.6 >ok  (same template, had to check :)
vierstra.com > Problem ecards 1.6
bali-pictures.com > Problem ecards 1.6
www.vrulez.animescape.net ok 1.5 ( same template )
http://www.2x2online.com/4images/ ok (modified 4grey templ)
4homepages ok
http://www.mjpd.com/php/4images/ 1.6 > 4grey templ ok



I was worrying about something in the template, but that looks not like it....

Alan, did you do a clean install of 1.6 or did you only replace changed files ? ( like me )
Thats It !

Offline Alan @ ArtScans

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://www.qcs-software.com
How to fix it...
« Reply #4 on: June 29, 2002, 11:29:57 PM »
Hi,

I installed all 1.6 files over the top of the 1.5 files.  Then applied the new 1.6 patch on top of that.

Been doing some more testing, and have tracked the bug down to functions.php->prepare_text().  The following line seems to be causing the problem...

Code: [Select]

$message = preg_replace("/[^\r]\n/si", "\r\n", $message);


To fix it, change the line (95) above to ...

Code: [Select]

$message = preg_replace"/(?<!\r)\n/si","\r\n", $message);


Thanks,
Alan.
Alan Wagstaff,
Software Development Manager, SDT
QCS Software

Offline Vienix

  • Full Member
  • ***
  • Posts: 144
    • View Profile
    • com.municate.nl
[Possible Bug] E-Cards
« Reply #5 on: June 29, 2002, 11:48:52 PM »
Ah,

in email.php you mean ?
Thats It !

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
[Possible Bug] E-Cards
« Reply #6 on: June 29, 2002, 11:50:25 PM »
It's in "includes/email.php"...

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

Offline Vienix

  • Full Member
  • ***
  • Posts: 144
    • View Profile
    • com.municate.nl
[Possible Bug] E-Cards
« Reply #7 on: June 30, 2002, 12:03:46 AM »
Quote
Parse error: parse error in /www/htdocs/vierstra/pictures/includes/email.php on line 96

Fatal error: Cannot instantiate non-existent class: email in /www/htdocs/vierstra/pictures/postcards.php on line 92


After the line change??
Thats It !

Offline Alan @ ArtScans

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://www.qcs-software.com
[Possible Bug] E-Cards
« Reply #8 on: June 30, 2002, 12:04:28 AM »
Sorry, yes.  It's in email.php.  Was looking at the wrong file whilst writing :-)

Thanks,
Alan.
Alan Wagstaff,
Software Development Manager, SDT
QCS Software

Offline Vienix

  • Full Member
  • ***
  • Posts: 144
    • View Profile
    • com.municate.nl
[Possible Bug] E-Cards
« Reply #9 on: June 30, 2002, 12:19:31 AM »
ah it should be :

Code: [Select]
$message = preg_replace("/(?<!\r)\n/si","\r\n", $message);

Now it works, thanks
Thats It !

Offline Alan @ ArtScans

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://www.qcs-software.com
[Possible Bug] E-Cards
« Reply #10 on: June 30, 2002, 12:21:26 AM »
I only find and fix the bugs, I can't be expected to type correctly as well <g>

Thanks,
Alan.
Alan Wagstaff,
Software Development Manager, SDT
QCS Software

Offline Vienix

  • Full Member
  • ***
  • Posts: 144
    • View Profile
    • com.municate.nl
[Possible Bug] E-Cards
« Reply #11 on: June 30, 2002, 12:27:49 AM »
<g>

It woukd be handy if users would have a email adresses database, with standard messages wouldn' you think ?

:)
Thats It !

Offline Alan @ ArtScans

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://www.qcs-software.com
[Possible Bug] E-Cards
« Reply #12 on: June 30, 2002, 12:52:40 AM »
Hi,

I'm sorry, I don't fully understand what you mean.  Are you talking about mass-emailing all users?  If so, that can be done from 4images admin panel.

If not, then sorry :-)  I didn't understand the question fully :-)

Thanks,
Alan.
Alan Wagstaff,
Software Development Manager, SDT
QCS Software

Offline Vienix

  • Full Member
  • ***
  • Posts: 144
    • View Profile
    • com.municate.nl
[Possible Bug] E-Cards
« Reply #13 on: June 30, 2002, 12:55:44 AM »
ALAN !

Every users has a email adresses dbase, for sending ecards,
with predefined messages.

Mass ecarding :)

( and i will not give my users access to the admin panel :))
Thats It !

Offline Alan @ ArtScans

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://www.qcs-software.com
[Possible Bug] E-Cards
« Reply #14 on: June 30, 2002, 01:05:51 AM »
Oh, I understand now (I think).

You mean like a personal e-mail address book for each user?  Where they can enter their friends e-mail addresses, and use it to mass-send e-cards?

If I've got it right this time :-)  Then yes, that would be a good idea.  Wouldn't be too hard to impletment either.  I may think about writing a mod to do that once I get a free minute :-)

(btw, I wasn't suggesting you give your users access to the cp, I thought you meant you (as the admin) wanted to mass-email :-) )

Thanks,
Alan.
Alan Wagstaff,
Software Development Manager, SDT
QCS Software