Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/69305?pagenum=1
04 November 2025, 23:52
Topic
Classicmotorcycling
MOD: Auction v1.2
26 April 2010, 04:37
Hello,
I was asked by a few of my users for some Auction software on the site, so I put together a small Auction Mod v1.2 The Auction Mod v1.2 is easy to install and with 10 being easy and 1 being hard, this is a 10.
The Auction Mod v1.2 is fully intergrated into Snitz and e-mails others that have bidded on an item so they (hopefully) don't miss out on the item. I have also allowed visitors to go to the first page of the Auction Mod v1.2 but no further and need to be a logged in member to view items and bid. This has been tested on and MS SQL Database and MS Access only.
I have plans to add in the next release (v2.0) to have Categories, Admin Interface and the abillity to upload images.
Please read the readme in the download and if you have issues, please post in the Help: MOD Implementation forum. E-mails will not be returned. Enjoy.
Replies ...
Classicmotorcycling
26 April 2010, 04:43
I almost forgot to mention that I Language Packed the MOD for the International users so they can change the text on each page easy.
bobby131313
27 April 2010, 10:28
This sounds awesome, I will be looking into it. Is there a demo somewhere?
Carefree
27 April 2010, 11:23
David, you overlooked a couple potential problems.
The current/minimum bids should be numeric only or your call to "formatnumber" will fail. Should do a check for isNumeric on the querystring calls. Also, those field types in the table should be changed from text to long int.
I made changes to allow admin or the seller to modify or delete an auction item, fixed the numeric bid issue, and fixed the missing image issue. You can change whatever you don't like. Modified Zip File
Etymon
28 April 2010, 13:46
Thanks Classic for the MOD! Looks great!
Giumer
29 April 2010, 01:34
hi all me test yuo mod mate is very nice i have 1 problem is this and me look item and go for bid , i have this error :
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'cDbl'
/forum1/auction_bidItem.asp, line 77
forum is this http://www.darksid.net/forum1/auction_item.asp?intAuctionID=1 User : test pass: demo thx
Classicmotorcycling
29 April 2010, 06:29
I will have a look at it on the week-end and redo the edit function that Carefree put together with the code that I originally put together as I ahve found another issue with the current bid in that code. In the mean time I have placed the original one back up that I did as it worked for me.
Carefree
29 April 2010, 07:19
The error that Giumer encountered is due to the field type and content. You cannot double a text field, must be numeric. If you enter a 3 (without the $ symbol), the error is eliminated. With the changes I made, that problem also is gone.
Giumer
29 April 2010, 10:17
carefre I tried to put your modified files, but I was always the same error, if you tell me in which file should I do with the change. and me cauntry is € is possibol modification ?
Carefree
29 April 2010, 18:12
Originally posted by Giumer carefre I tried to put your modified files, but I was always the same error, if you tell me in which file should I do with the change. and me cauntry is € is possibol modification ?
Did you change the field types in the database when you replaced the files? If not, you'll need to modify them. If you use my dbs file and re-run it, it will replace your auction tables as necessary.
Giumer
30 April 2010, 10:13
thx carefree snif error '80020009' /forum1/auction_my_bid.asp, line 139
use thi accaunt user test pass test
Carefree
30 April 2010, 16:16
Look for the following lines in "auction_my_bid.asp" (appx 134-145):
Code:
while not rsBuyer.EOF
intAuctionID = rsBuyer.fields.item(0) rsItem.MoveFirst rsItem.Find "auctionID = " & intAuctionID if rsItem("ImgURL") = "http://" then strImage = strImageURL+"blank.gif" else strImage=rsItem("ImgURL") end if
Response.Write " <tr>" & vbNewLine & _
Change them to say:
Code:
while not rsBuyer.EOF
intAuctionID = rsBuyer.fields.item(0) if not rsItem.EOF then rsItem.MoveFirst rsItem.Find "auctionID = " & intAuctionID if rsItem("ImgURL") = "http://" then strImage = strImageURL+"blank.gif" else strImage=rsItem("ImgURL") end if end if
Response.Write " <tr>" & vbNewLine & _
Classicmotorcycling
30 April 2010, 19:59
I have updated the code to 1.2 now as there was some issues when placing a bid with some code. I have fixed that and it works fine on MS Access and MS SQL.
Giumer
01 May 2010, 00:41
nope ! error is this : error '80020009' /forum1/auction_my_bid.asp, line 147
and line this : Response.Write " <tr>" & vbNewLine & _
Classicmotorcycling
01 May 2010, 01:27
Did you download the new version I have put up and ran the new dbs file? I get all the stuff working.
Giumer
01 May 2010, 02:52
thx for help mate link for new version not download ! give me plz link for download new version ! thx
Classicmotorcycling me test yuo mod and yuo site is ok ??? is db or file ? i have db and MYSQL is this problem ?
Classicmotorcycling
01 May 2010, 06:01
OK, I have it working on MySQL now as well, re-download the file and over write and re-run the dbs file. I noticed the error on MySQL and also noticed that if the field is an "int" the cents would not be added, so have fixed that.
Giumer
01 May 2010, 06:36
Yeaa ! is ok ! new idea for this mod and is possibol upload immage ?
Carefree
01 May 2010, 11:47
Giumer, cannot make a PayPal link without knowing the PayPal information of the seller. That is possible, though.
Could add a field for the seller to include his/her PayPal Email address at the time of placing an item in the auction. Then when the auction expires, the buyer would get a "Pay Now" button that would fill in the amount and the seller's PayPal account information.
Giumer
01 May 2010, 12:59
k mate i ,am wait finish day test for look mod , and finish day for sell and automatic botton bayout ?
Carefree
01 May 2010, 14:28
Ok, I wrote the PayPal feature in. I haven't used the other one you referred to and don't know the format of it's payment link. For those who use PayPal, this will work.
Zip File
kyodai
01 May 2010, 17:32
Have added this to my forums and it's looking very good. How about some "Delete auction" button if mLev > 1 (So moderators and above can delete an auction)? I would like to help with that but i am always having tough fights with SQL statements when it comes to stuff like this...
Another idea by me would be a "Buy it now" price along with a BIN button. And maybe some additional table for feedback (So you can see like "Ewww this guy has a feedback score of -5, i wont buy from him).
Another good idea would be to disallow users to bid on their own item.
Also maybe show the seller name or - in future maybe - his auction feedback. I think it is important to know from whom you are buying something.
EDIT: Found a bug, a quite serious one. Try putting like "I don't care" in the auction description. SPOILER: The problem here seems to be the ' character. It smashes the whole SQL query. I SMELL SQL INJECTION!
How can such stuff be properly escaped?
Carefree
02 May 2010, 06:20
Most important first. In "auction_save.asp", look for the following line (appx line 96):
The delete auction capability already exists for the person placing the auction. Note: I made a programming error on the initial version of this, please replace the code. To add moderator & admin ability, follow instructions below. To add admin only, change the mLev number from 3 to 4:
Code:
In "auction_edititem.asp", look for the following line (appx 131):
strSql="DELETE * FROM "& strTablePrefix & "AUCTIONITEMS WHERE AUCTIONID="&AuctionID&" AND (SELLER="&SELLER&" OR SELLER="&intAdminMemberID&")"
Change it to say:
if mLev < 3 then strSql="DELETE * FROM "& strTablePrefix & "AUCTIONITEMS WHERE AUCTIONID=" & AuctionID & " AND (SELLER=" & SELLER & ")" else strSql="DELETE * FROM "& strTablePrefix & "AUCTIONITEMS WHERE AUCTIONID=" & AuctionID end if
Then look for the following line (appx 88):
strSql="SELECT * FROM "& strTablePrefix & "AUCTIONITEMS WHERE AUCTIONID=" & AuctionID & " AND (SELLER=" & SELLER & " OR SELLER=" & intAdminMemberID & ")"
Change it to say:
if mLev < 3 then strSql="SELECT * FROM "& strTablePrefix & "AUCTIONITEMS WHERE AUCTIONID=" & AuctionID & " AND (SELLER=" & SELLER & ")" else strSql="SELECT * FROM "& strTablePrefix & "AUCTIONITEMS WHERE AUCTIONID=" & AuctionID end if
Then, in "auction_my_bid.asp", look for the following line (appx 105):
if strBuyer > "" or MemberID = intAdminMemberID then
Change it to say:
if strBuyer > "" or mLev > 2 then
[/code]
To prevent a user from bidding on their own auction:
Code:
In "auction_biditem.asp", look for the following line (appx 79):
Application.Lock
ABOVE IT, insert the following:
' Prevent Seller from Bidding strSql="SELECT SELLER FROM " & strTablePrefix & "AUCTIONITEMS WHERE AUCTIONID=" & intAuctionID set rsCheck=my_Conn.Execute(strSql) if not rsCheck.EOF then intSeller=cIint(rsCheck("SELLER")) rsCheck.Close end if set rsCheck = Nothing if intSeller = MEMBERID then Response.Write "<table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _ " <tr>" & vbNewLine & _ " <td align=""center"">" & vbNewLine & _ " <font color=""" & strDefaultFontColor & """ size=""" & strDefaultFontSize & """ face=""" & strDefaultFontFace & """>" & strLang_Auction_00517 & "" & vbNewLine & _ " </font>" & vbNewLine & _ " </td>" & vbNewLine & _ " </tr>" & vbNewLine & _ "</table>" & vbNewLine & _ "<meta http-equiv=""Refresh"" content=""3; URL=auction.asp"">" & vbNewLine Response.End end if
Then, in "auction_language.asp", look for the following line (appx 130):
strLang_Auction_00516 = "reserves the right to refuse or delete any auction listing at any time"
Below it, insert the following:
strLang_Auction_00517 = "Cannot bid on own auction."
To make a "buy it now" option, we'll have to add another field to the auction table to specify a minimum amount for which the seller will be satisfied. That won't be too difficult, but I don't have time now.
As for feedback, that's a whole additional project.
I have updated the zip file in my first reply with the code changes.
bobby131313
02 May 2010, 08:07
OK, how tough would a "watch" function be? I see there is an outbid email that goes out so hopefully not too hard.
By "watch," I mean a non-bidding member is interested and clicks the watch button, then they get an email when there are bids.
kyodai
02 May 2010, 12:39
Thanks for the update carefree.
I have tried it out but i only see the delete button in "Auctions I am selling", so although i am admin i can only delete my own auctions. Or did i miss the delete button? How do i delete another users auction?
Feedback would be cool, definitely would make the whole thing better.
How about the sellers name in the auction? I think that would be quite easy, right?
Also cool would be like "All auctions from (Seller name)" as a link or button.
Anyways, good work on this.
Carefree
03 May 2010, 07:34
Originally posted by bobby131313 OK, how tough would a "watch" function be? I see there is an outbid email that goes out so hopefully not too hard.
By "watch," I mean a non-bidding member is interested and clicks the watch button, then they get an email when there are bids.
I'm travelling now, so I won't be writing mods for a bit, but that wouldn't be too difficult ... a simple modification of the subscription routine.
Carefree
03 May 2010, 07:36
Originally posted by kyodai Thanks for the update carefree.
I have tried it out but i only see the delete button in "Auctions I am selling", so although i am admin i can only delete my own auctions. Or did i miss the delete button? How do i delete another users auction?
Feedback would be cool, definitely would make the whole thing better.
How about the sellers name in the auction? I think that would be quite easy, right?
Also cool would be like "All auctions from (Seller name)" as a link or button.
Anyways, good work on this.
You need to look at the "my auction items" page to see the controls. But if you used the latest changes, admins should have edit and delete access to all auctions.
Displaying the seller's name would be very simple & a list of auctions is also fairly easy. When I get to my next destination, I'll try and get these done if nobody else has.
kyodai
03 May 2010, 19:42
Here is a mini update i made to auction_item.asp
It now shows the time left and the current forum time at the bottom of the page as users frquently asked what the current time is, which time zone and stuff. This looks bad and its displaying the time left in seconds (which is not that great looking if its like 7 days left), but maybe something to base on?
Here it is:
http://www.tankraider.com/userup/1273013335.zip
Edit: i think there might be a difference between "NOW" and the forum time. However, i used "now" as it seemed easy to be used. I am sure some pros here know how to make it better.
Todd
03 May 2010, 22:35
I'm looking forward to seeing how this mod progresses. It's a great start.
I did find one bug. If you edit an auction, it resets the end time again to the length of the auction. It might also be good to limit the amount of editing by a time limit and the auction should display if it's edited, maybe it does that already, I didn't notice.
Some nice additions would be a live "time remaining" display, and a bidder list.
I noticed this behaves differently than ebay as far as your bids go and I know it's by design. I do however like how ebay works as far as bidding.
Your work is great and truly appreciated.
kyodai
04 May 2010, 15:55
Another mini update: Now shows the seller name with a link to his profile even before the auction has ended.
http://www.tankraider.com/userup/1273074082.zip
bobby131313
04 May 2010, 16:03
Do we have three different people doing zips now?
kyodai
04 May 2010, 16:14
looks like it.
bobby131313
04 May 2010, 16:37
Sure makes it hard to follow.
kyodai
04 May 2010, 19:09
Well i can stop posting my stuff, it's far below par anyways compared to the other guys contributions.
On a side-note: The mail popup didn't work (The one after the auction finished).
Unfortunately i had been busy with other stuff, but i think imma take a look at that additional feedback table. I thought like "FeedBack_ID" (As unique identifier or however thats called), "Auction_ID", "Seller_ID", "Buyer_ID", "Message", "Score". That should be sufficient for basic stuff. As a score i thought like 1-5, i originally thought to make it just -1, 0 and 1 (negative, neutral, positive) to have it easier to calculate (Just add all values WHERE Seller_ID = XXX). But i am not sure if it is a good idea to have negative values in the table. is that okay?
kyodai
04 May 2010, 19:21
Another important info: I just messaged my lucky buyer who won an auction for 18 USD (it started at 1 USD) and he said he only did the initial bid of 2 USD. Normally i would have said "OMG LIAR, IMMA REPORT U TO EBAY", but in this case i fear it might be a bug. That possible?
bobby131313
04 May 2010, 19:55
I just realized I may have come off as ungrateful, I certainly didn't mean to. I'm very grateful for the poeple that write the mods.
It's just that with 3 different people now making thier own changes and zipping them on thier own... how do we know who included what and where...
Classicmotorcycling
05 May 2010, 03:13
Well, I am going to step away from making MODs now as everytime I do, people do exactly that, end up with multiple zips and getting confused from what I originally wanted for the MOD.
So I am going to let the others carry on with it. At least when I made changes to others MODs, it was after asking them if it was OK and not just "upset" the original person who made it. (my little dummy spit)
bobby131313
05 May 2010, 09:05
I didn't figure you'd be too happy about it.
kyodai
05 May 2010, 12:09
Sorry if it was me who got the whole thing crashing here. I never intended to insult confuse or betray anyone. I am this kinda idiot guy who really thought it would help this mod if i showed interest and at least TRIED to be part of it and though my asp abilities are rather ridiculous somehow contribute towards it. I really thought it was a good idea and give this mod some "community" feeling like i knew it from other open source projects. Must be my curse that i have reached the exact opposite of that and even if it's too late now I'd like to apologize for that. I really didn't have any evil or malicious intentions, i hope at least some of you can believe me.
Todd
06 May 2010, 23:35
It's a shame this seems to be dropped right now. I hope the author has a change of heart. I think so many people were just very very excited to finally see something like this and jumped right onto it.
Classicmotorcycling
07 May 2010, 08:23
When and if I decide to go back to it, I will only be using the MOD on my sites and with selected people that I think would not take it away from what it was meant to be.
The MOD was not meant to be a replacement for "eBay" as some have asked for by wanting a feedback and giving users a score and some of those functions will simply not work in "Classic ASP". Also there is a "Watch" function in the current release for MS SQL and MS Access users, as it shows Items that you have placed a bid on.
As for editing the Auction item and the time changing, it is only fair that the Auction restarts from that time as you have then changed the rules by changing the items details, be it the description or the price, but it is not that hard to add that if the time goes say an hour past it being added, it is not to be edited again.
Todd
07 May 2010, 21:54
Good luck with it on your forum. I'm going to take it off mine as I'm not nearly the coding type many of you are. Sorry to have upset you with my suggestions.
kyodai
08 May 2010, 23:09
David, i can only apologize for what i have done. I hope you can forgive me, I am just a stupid noob who yet has only asked a handfull of asp questions and learned a lot by his own. I admit that i did not think enough about what you want the mod to be. I apologize from my whole heart for being such an egocentric and not reading enough around here to know how thinks work. I really didn't intend to break your mods integrity and my additions were badly coded anyways.
I also would love to see more of this mod. I have had so much fun with it, i made many additions for it with much work, i barely ever learned so much asp as when working with this mod. I still totally love it. I just finished a rating system, very very basic in 1 table as it has only a score of 1-5, a comment and displays the average for a user as seller, buyer and in total. And i made it so eneded auctions are displayed in red and saying ENDED: before the date. And i took much time to make a good function that displays time left for an auction as DD:HH:MM, this was sooo hard for me to get working as it should. I also made a fix as it displayed the wrong bid as a winner in an auction.
I am currently working to make the last 5 comments as a buyer and seller displayed on the feedback page. Next imma integrate an image uploader from my backend php site (I have a cheap php backend host for file, video and image uploads). I think i might also look into a buy-it-now button.
I must admit i am a really bad coder as i didn't use the language system, i only have english on my site anyways. I wish i was better at webdesign, my stuff works but it looks terrible i must admit. I already turned it from "MG" to "Yuck" by adjusting fonts and size, but I am not that good to make it look nice and tidy like on ebay or so.
Don't worry i will not post a zip file or so. I did not only learn in term of asp, but also on netiquette here. =) If you want i can send you the files, but i would understand if you don't after how clumsy i have been.
Classicmotorcycling
09 May 2010, 07:42
Look guys (gals), it is over and done, had my little spit. I have got the categories working and just about to work on the admin side of it, so an Admin can go and edit/delete not only the items listed, but the categories.
I have it running here: Classic Motorcycling Australia (not the test site)
I have a test site here: Testing MySQL (you can set up an account to test if you like)
Both of these have the categories, no admin yet.
kyodai
09 May 2010, 17:59
David, i have finished the feedback system. Had to weed out loads of bugs today, but it's working fine, I have learned so much when making this i am already a little bit proud on it.
I know it is probably not fitting for your mod - you said you dont want a second ebay, but i think it would make other people happy as well to have feedback in their auctions. At least my users liked the idea and i think it helps making trades a little bit safer.
So my question is - if you don't want this for your mod - can i post it as an addon or "hack" of your mod in a seperate thread? I am still sorry for hijacking your mod and now i still want to give something back to this great community but do it better than in my previous attempt. I would like to ask for your permission for doing so.
Carefree
17 June 2010, 22:49
Cannot reach the server where the original zip file was stored (it will be offline until sometime in July), so I stuck a copy on MediaFire.
There is a necessary change to auction_item.asp to enable paypal link, etc. to function.
Code:
<% '################################################################################# '## Snitz Forums 2000 v3.4.07 '################################################################################# '## Copyright (C) 2000-06 Michael Anderson, Pierre Gorissen, '## Huw Reddick and Richard Kinser '## '## This program is free software; you can redistribute it and/or '## modify it under the terms of the GNU General Public License '## as published by the Free Software Foundation; either version 2 '## of the License, or (at your option) any later version.
'## '## All copyright notices regarding Snitz Forums 2000 '## must remain intact in the scripts and in the outputted HTML '## The "powered by" text/logo with a link back to '## http://forum.snitz.com in the footer of the pages MUST '## remain visible when the pages are viewed on the internet or intranet.
'## '## This program is distributed in the hope that it will be useful, '## but WITHOUT ANY WARRANTY; without even the implied warranty of '## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the '## GNU General Public License for more details.
'## '## You should have received a copy of the GNU General Public License '## along with this program; if not, write to the Free Software '## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'## '## Support can be obtained from our support forums at: '## http://forum.snitz.com '## '## Correspondence and Marketing Questions can be sent to: '## manderson@snitz.com '## '################################################################################# '## MOD: Auction Mod v1.2 for Snitz Forums v3.4.07 '## Author: David Greening (Classicmotorcycling) '## '## File: auction_item.asp '## '## Get the latest version of this MOD at '## http://www.snitzbitz.com/mods/ '################################################################################# %> <!--#INCLUDE FILE="config.asp"--> <!--#INCLUDE FILE="inc_sha256.asp"--> <!--#INCLUDE FILE="inc_header.asp" --> <!--#INCLUDE FILE="inc_func_posting.asp"--> <!--#INCLUDE FILE="auction_language.asp" --> <% Response.Write "<table border=""0"" width=""100%"" cellpadding=""4"" cellspacing=""1"">" & vbNewLine & _ " <tr>" & vbNewLine & _ " <td colspan=""2"" valign=""top"" nowrap>" & vbNewLine & _ " <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _ " " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " <a href=""auction.asp"">" & strLang_Auction_00000 & "</a><br />" & vbNewLine & _ " " & getCurrentIcon(strIconBlank,"","") & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " " & strLang_Auction_00400 & "</font>" & vbNewLine & _ " </td>" & vbNewLine & _ " </tr>" & vbNewLine & _ "</table>" & vbNewLine
Given that version 1.2 has been taken over by 2.0 and avaliable at SnitzBitz, and now are 2 copies of the mod floating about, I will not be doing any more modifications, so Carefree do with it what you like as you are anyway.
Carefree
19 June 2010, 22:04
I incorporated the feedback function from Kyodai and image upload support, both internationalized. Zip File
Classicmotorcycling
20 June 2010, 03:14
Feedback function was already in Version 2
Originally posted by Carefree I incorporated the feedback function from Kyodai and image upload support, both internationalized. Zip File