SMF Shop

SMFShop => Bugs => Topic started by: saladbar821 on January 13, 2010, 03:23:40 am

Title: Another Bug in E-mail Code
Post by: saladbar821 on January 13, 2010, 03:23:40 am
I ran into another issue with the e-mail admin code. If you try to use a br tag in the additional fields box, saving resets all of the values below "Make sure to change..." to 0.

EDIT: Actually, it seems that this happens when you edit the form.
Title: Re: Another Bug in E-mail Code
Post by: bigjoe11a on March 22, 2011, 11:42:28 pm
That's because it's all message up. I'll see if I can come up with a new one later on today.



Title: Re: Another Bug in E-mail Code
Post by: bigjoe11a on March 23, 2011, 02:10:52 am
Ok, here you go. It works and I tested it. I just took out all the extra **** that didn't need to be in there. If you see some thing extra that you would like to add to it. Let me know.

You will have to edit lines 32 and 33 to your own Name and Email address to use. Until I can get more information.



Title: Re: Another Bug in E-mail Code
Post by: saladbar821 on March 23, 2011, 05:26:36 am
Well I certainly appreciate the effort, however I've since moved on to MyBB.

Glad to see somebody worked on this!
Title: Re: Another Bug in E-mail Code
Post by: goodman84 on January 26, 2012, 11:35:43 pm
I'm aware that nothing has been posted in 75 days. But this forum is almost always dead anyways. So...

I still have an issue. I need the message that will be sent to be predefined by me. For each item. And when they use it it will tell me there user name and the item they used.

How would I do this?
Title: Re: Another Bug in E-mail Code
Post by: bigjoe11a on January 27, 2012, 02:41:11 am
I'm aware that nothing has been posted in 75 days. But this forum is almost always dead anyways. So...

I still have an issue. I need the message that will be sent to be predefined by me. For each item. And when they use it it will tell me there user name and the item they used.

How would I do this?

Well 1st you need to tell me or us what you mean. Your post I'm sorry I don't under stand.

Your talking about some message that you want to predefine it your self. So can you tell me what message are you talking about.

Title: Re: Another Bug in E-mail Code
Post by: goodman84 on January 27, 2012, 03:31:58 am
I want to make it so I set the message that's sent. So what happens is the user buys an item from the shop and uses it, and it sends me an email with there username and the item that they used they used as well as like a varification code i'd put on or something.

The way I had it set on the normal AdminEmail thing was that they would enter there user name into the example field and what not.

It worked great untill I edited the item again and everything went to zeros.

So I tried your shopadmin fix. but then it gave me a SQL error.

Code: [Select]
Database Error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'text" name="example" />

", `info4` = "The user: {$_POST["example"]}' at line 10
File: /home/conjoint/public_html/forum/Sources/shop/ShopAdmin.php
Line: 559

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.2, while your database is at version 2.0. The above error might possibly go away if you execute the latest version of upgrade.php.
Title: Re: Another Bug in E-mail Code
Post by: bigjoe11a on January 27, 2012, 04:26:31 am
Ok, so can you show me your code. The shop item. So that I can see what your doing. and Then maybe I mite be able to fix it.
Title: Re: Another Bug in E-mail Code
Post by: goodman84 on January 27, 2012, 05:53:18 am
I haven't changed any of the code for EmailAdmin.php ?
Title: Re: Another Bug in E-mail Code
Post by: bigjoe11a on January 27, 2012, 06:28:45 am
Ok, now giving some better detail. Tell me just what your trying to do and what version of shop are you using.
Title: Re: Another Bug in E-mail Code
Post by: goodman84 on January 27, 2012, 12:58:46 pm
I'm Running the latest version of the shop.

What I want to happen is the person buys an item from the shop (prize item). When they use it it sends an email telling me to give the person their prize.

Thats essentially what I need it for.
Title: Re: Another Bug in E-mail Code
Post by: bigjoe11a on January 27, 2012, 01:18:06 pm
That's not all that hard. If you look at some of the ones that are all ready created you will find that they will have an option for sending an email. and you can set it up so that it can email you with who won the prize and so on. If you can't find it. Let me know and I'll take a quick look for you. I'm sure that the items that come stock with the shop have 2 or 3 items that send both PM and email.

UPDATE:
   I check that file for you and it all ready has that option added for you. When a user buys the item and uses it. It sends you an email. Here look at the code.

EmailAdmin.php
Code: [Select]
function onUse()
{
global $sourcedir, $item_info;
$to = $item_info[1];
$subject = $item_info[2];
$message = $item_info[4];
// We need sendmail!
require_once($sourcedir . '/Subs-Post.php');

// Hack put in place to allow $_POST and $_GET vars in the $message var
// --Daniel15, 4 Septemeber 2005 2:15PM
foreach ($_POST as $postKey => $postVar)
$message = str_replace('{$_POST["' . $postKey . '"]}', $postVar, $message);
 
foreach ($_GET as $getKey => $getVar)
$message = str_replace('{$_GET["' . $getKey . '"]}', $getVar, $message);

// Send the email!
sendmail($to, $subject, $message) or die('Error sending message to admin! Please inform the Admin of this error. This item will still be available in your inventory.');

return 'Message sent to admin!';
}

Title: Re: Another Bug in E-mail Code
Post by: goodman84 on January 27, 2012, 04:05:55 pm
Yeah but If I go to edit that file all the fields I filled in are changed to Zeros.
Title: Re: Another Bug in E-mail Code
Post by: bigjoe11a on January 27, 2012, 05:18:12 pm
Ok, let me play with it and I'll get back to you on this.

UPDATE:
  Ok, well the problem your having is some thing that is not happening on my end. So what I would do is, Is uninstall the mod and try and reinstall it again and see if you don't have the same problem.

The other thing is that if your using SMFShop 3.1.8. This is newer then what I'm using. I use version 3.1.6. and I don't seem to have this problem. You mite want to do is down grade your SMF Shop and see if that doesn't fix it. It could be a bug in the PHP scripts.
Title: Re: Another Bug in E-mail Code
Post by: goodman84 on January 28, 2012, 12:28:48 pm
Ok, let me play with it and I'll get back to you on this.

UPDATE:
  Ok, well the problem your having is some thing that is not happening on my end. So what I would do is, Is uninstall the mod and try and reinstall it again and see if you don't have the same problem.

The other thing is that if your using SMFShop 3.1.8. This is newer then what I'm using. I use version 3.1.6. and I don't seem to have this problem. You mite want to do is down grade your SMF Shop and see if that doesn't fix it. It could be a bug in the PHP scripts.

Is 3.1.6 Compatible with the latest version of SMF?
Title: Re: Another Bug in E-mail Code
Post by: bigjoe11a on January 28, 2012, 04:34:35 pm
I don't know. the only thing you can do is try and upload it and then try and install it.
Title: Re: Another Bug in E-mail Code
Post by: goodman84 on January 31, 2012, 09:46:57 am
I dont understand you have a post talking about the glitch where is replcaes your text with a zero. 0'
Title: Re: Another Bug in E-mail Code
Post by: bigjoe11a on January 31, 2012, 11:12:34 am
I dont understand you have a post talking about the glitch where is replaces your text with a zero. 0'

Like I said in an earlier post. That version does have some bugs in it. And it's the version That I use is 3.1.6. I never used 3.1.8 before and that's why I never updated. More then likely there are bugs in that version all so. I do know that version 3.1.7 does have the same bug.

It only happens when after he creates a new item and then he edits the item again. It turns every thing too '0'
Title: Re: Another Bug in E-mail Code
Post by: goodman84 on February 09, 2012, 03:04:13 pm
I dont understand you have a post talking about the glitch where is replaces your text with a zero. 0'

Like I said in an earlier post. That version does have some bugs in it. And it's the version That I use is 3.1.6. I never used 3.1.8 before and that's why I never updated. More then likely there are bugs in that version all so. I do know that version 3.1.7 does have the same bug.

It only happens when after he creates a new item and then he edits the item again. It turns every thing too '0'
But I have SMF 2.0 or w/e and it say 3.1.6 is for 1.1.1 versions of SMF so will it even work? And where can I find older version of SMF Shop?
Title: Re: Another Bug in E-mail Code
Post by: bigjoe11a on February 09, 2012, 05:20:22 pm
www.smfshop.com and I did do an update on my system and I'm sorry to inform you that I'm not having the same problem you are. You mite have to uninstall smfshop and try and reinstall it again.

I'm am using SMF 2.0.2 with SMFShop 3.1.8

Title: Re: Another Bug in E-mail Code
Post by: xanenightwing on September 25, 2012, 04:57:12 am
www.smfshop.com and I did do an update on my system and I'm sorry to inform you that I'm not having the same problem you are. You mite have to uninstall smfshop and try and reinstall it again.

I'm am using SMF 2.0.2 with SMFShop 3.1.8

if you're not using the latest version of the software, are you really fit to be a helper? because not everyone wants to use an old version of something.
Title: Re: Another Bug in E-mail Code
Post by: bigjoe11a on September 25, 2012, 05:58:25 am
www.smfshop.com and I did do an update on my system and I'm sorry to inform you that I'm not having the same problem you are. You mite have to uninstall smfshop and try and reinstall it again.

I'm am using SMF 2.0.2 with SMFShop 3.1.8

if you're not using the latest version of the software, are you really fit to be a helper? because not everyone wants to use an old version of something.

Well I am running the newest one and I never had that problem before.
Title: Re: Another Bug in E-mail Code
Post by: xanenightwing on September 25, 2012, 06:10:42 am
www.smfshop.com and I did do an update on my system and I'm sorry to inform you that I'm not having the same problem you are. You mite have to uninstall smfshop and try and reinstall it again.

I'm am using SMF 2.0.2 with SMFShop 3.1.8

if you're not using the latest version of the software, are you really fit to be a helper? because not everyone wants to use an old version of something.

Well I am running the newest one and I never had that problem before.

but isnt the latest version of smfshop 3.2?
Title: Re: Another Bug in E-mail Code
Post by: bigjoe11a on September 25, 2012, 06:38:57 am
Well I run version 3.1.8 and I still have a green light saying that it's the current version. and doesn't say any thing about it. So I'll have to check on that.

Joe
Title: Re: Another Bug in E-mail Code
Post by: xanenightwing on September 25, 2012, 06:42:42 am
Well I run version 3.1.8 and I still have a green light saying that it's the current version. and doesn't say any thing about it. So I'll have to check on that.

Joe

I got my version from the SMF mod site, not from this website.
Title: Re: Another Bug in E-mail Code
Post by: bigjoe11a on September 25, 2012, 06:52:16 am
Well I run version 3.1.8 and I still have a green light saying that it's the current version. and doesn't say any thing about it. So I'll have to check on that.

Joe

I got my version from the SMF mod site, not from this website.

Right, and I run SMF 2.0.2 and version 3.2 doesn't work with my version of SMF. I didn't see any update info on this. and I mite have to uninstall the old one and then I would lose every thing in my shop.

I tried uploading it and it has problems with SMF. I get the little square turns red after I upload the package. It's telling me that 3.2 is an older version. Any way. I'll keep the one I have.

Joe