PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.

#1 2013-04-16 19:18:35

Koos
Administrator
Registered: 2007-01-14
Posts: 525
Website

Auto Auction 1.0

Code:

##
##        Mod title:  Auto Auction
##
##      Mod version:  1.0.2
##   Works on PunBB:  1.2.*
##     Release date:  2013-09-18
##           Author:  Koos (pampoen10@yahoo.com)
##
##      Description:  Allows users to post auctions.
##
##   Affected files:  moderate.php
##                    profile.php
##                    search.php
##                    viewforum.php
##                    viewtopic.php
##                    include/functions.php
##
##       Affects DB:  Yes
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##

Download here

Offline

 

#2 2013-04-16 19:22:00

Koos
Administrator
Registered: 2007-01-14
Posts: 525
Website

Re: Auto Auction 1.0

Note: this mod works best with the Geo Selector and Private Messaging System 1.3 mods installed.

I have set up a package that installs PunBB 1.2.50, Geo Selector 1.0, Private Messaging System 1.3.0 and the Auto Auction 1.0.2 mod in one go. You can download it here.

--------

About this mod
I created this mod a few years ago for a popular punbb forum and it was based on the excellent SMFBuy Pro mod (which has since been rewritten and renamed to SMFBay - but I liked the older SMFBuy mod better). I also added many additional features as time went along.

Some points to take note of
1. This mod integrates with the private message system. E.g. when a listing has ended, the user who posted the auction receives a notification. If a user who has made a previous bid in an action has been outbid, he also receives a pm notification. There is a option in the auctions admin cp called 'Disable sending PM when someone place a bid higher of its own in recent' that related to this, but I'm not sure how it works.

2. There are some options in the auctions admin cp that are marked in red with:
"This function not available yet."
-> so no matter what you select for those options, it would make no difference, since these functions are not available in my punbb conversion yet.

3. If you go to a user's profile there are two new links: 'Show all listings' and 'Show all feedback'. There is also a new 'Auctions' section in the profile which lists all your "buy" and "sell" items.

Bidding policy
I tried to get the bidding system to work in the same way as ebay. Just remember, with the new system, as with ebay:
"If 2 separate bidders place the same maximum bid, the one who placed it first is the winner (given that they are the equal top bid at the end of auction)."

Also note the following tip for bidding (following referring to ebay, but your auction system will now work the same):

Bidding Tip
Your maximum bid has nothing to do with the minimum bid increment. That only applies to the current high bid.

Example -

    * Your maximum bid is $30.00
    * The minimum increment bid is $1.00
    * The current high bid is $16.00
    * To beat the current bid another bidder would have to bid at least $17.00.

Now here is where it gets tricky. Let's say that bidder decided to put his maximum bid $30.01.What happens? You lose the auction by a penny!
That is why it is a good idea not to put your maximum bid in at a predictable amount. If your maximum bid is $30 you would want to put it in as $30.63 or some off number. Many eBay auctions have been lost by a dime, nickle or penny.

Changelog
Auto Auction 1.0.2 (2013-09-18)
1. Fixed two sql queries that were causing errors in newer versions of MySQL.
2. Only show the option "Sort by Location" in viewforum if the Geo Selector mod is installed.

Auto Auction 1.0.1 (2013-06-04)
1. Fixed a couple of issues causing "Undefined index" notices.

Auto Auction 1.0 (2013-04-16)
1. Fixed viewing permissions in auction.php and also when viewing a list of a particular user's auctions. Previously users could view auctions in forums for which they did not have viewing permission.
2. Escape the email address in auction._post.php.
3. Added blank index.html file to img/auction/thumbs
4. In the auction admin plugin, auction forums can now be select using tick boxes instead of entering the forum ids in a comma seperated list.
5. Added field_exists function to auction_functions.php
6. Now detects whether GeoMod is install, and if so, displays the user's country and state/province info with auction listings.

Auto Auction 1.0 beta21 (2011-05-29)
1. Delete/reset confirmation messages only displayed for 'Feedback as seller' comments (when admin tries to delete/reset them), and not for 'Feedback as buyer' comments. Fixed.
2. Fixed a bug that caused 'Return to topic' link not to be displayed when admin delete/reset comments. Fixed.

Auto Auction 1.0 beta20 (2011-05-26)
1. Added feature that allows admin to reset comments. This allows the user to resubmit a comment.
2. Feedback percentages sometimes didn't add up to 100% (sometimes 99%). To fix this, I used round() instead of floor().
3. Added feature that allows admin to delete the latest bid in an auction. This is useful in case someone accidentally bids on an auction.
4. Fixed a bug where "End time" is still displayed after "BuyItNow" items are bought. It should display
End time: [time item was bought]. Fixed.
5. A couple of layout and tag fixes when displaying the input boxes for entering auction feedback comments. Caused auction box to become way too big in Internet Explorer. Fixed.
6. In Profile->Auctions, sections "Sell - sold" and "Sell - unsold" did not sort correctly (by date). Fixed.
7. Added feature that asks for confirmation when admin tries to delete/reset comments, or delete bids.
8. A couple of other minor changes, e.g. replace <br> with <br /> and remove redundant </div> tag in auction.php etc.

Auto Auction 1.0 beta19 (2011-04-04)
1. Made a little change related to the changes made in beta18: Now a message will be displayed if the user attempts to submit more than one feedback comment for an item bought/sold. The message says: "You have already left feedback for this item."

Auto Auction 1.0 beta18 (2011-03-31)
1. Fixed a bug that allowed a user to submit multiple feedback comments for a single item by using the browser back button and entering another comment. Now it is only possible for a user to submit a single feedback comment per item bought/sold.

Auto Auction 1.0 beta17 (2011-03-04)
1. Fixed a bug which resulted in some buyer's feedback comments not being inserted into the database.
2. Fixed a few security vulnerabilities.

Auto Auction 1.0 beta16 (2011-02-18)
1. Fixed a bug that resulted in an auction being closed when the bidder bids exactly the same as the maximum bid amount (as set in admin cp).
2. Added extra 'error message' entry in lang file.
3. Can now set permissions for the 'Administrators' usergroup in the auction mod admin cp.

Auto Auction 1.0 beta15 (2011-01-26)
1. Auction end time now stored as a unix timestamp in the database. Previously it was calculated by using the auction start timestamp and the 'number of days' variable the auction should run.
2. Fixed a bug on the include/auction/auction_viewforum2.php page (Auction Price Mismatch error) that caused the price for 'Auction' type listings to be displayed incorrectly in the instance where the user changed the type of listing from type 'buy it now' to type 'auction' and had supplied a BuyItNowPrice when type 'buy it now' was selected.
3. Fixed some minor bugs in the include/auction/auction_functions.php file.
4. Added a missing entry to the lang file.
5. Added punbb style pagination links to the auction.php page. There is however still some work to be done to the auction.php page, e.g. don't show auctions from forums which the user doesn't have permission to view. Note that I set to the script to display only 2 items per page to test pagination.

Auto Auction 1.0 beta14 (2010-07-01)
1. Fixed a bug on the 'Show all listings' page that caused ended BuyItNow and Auction items to be sorted separately.

Auto Auction 1.0 beta13 (2010-06-29)
1. Added 'Auctions' section the user's profile, where you can view all the auctions you've bid on, won, didn't win, and your listed auctions etc.
2. The 'Show all listings' page (auction_showlistings.php?id=x) now displays the end date of auctions that have ended.
3. Can now relist your auctions that have ended.
4. New positive/neutral/negative icons
5. Added flood protection for when posting auction feedback comments
6. When items are sorted by 'ending soonest', items that have ended are now sorted in the correct order.
7. Rewrote the page showing feedback comments. Associated rating (positive/neutral/negative) is now displayed with each comment, and 'feedback as seller' and 'feedback as buyer' is shown separately.
8. User's location is now displayed in auction topics.
9. When topics and users are deleted by admin/mods, the auction's associated thumbnails are also deleted.
10. Now uses the thumbnail image on the auction.php page if it exists for the particular auction.
11. Other minor changes and improvements in the code.

Auto Auction 1.0 beta12 (2010-04-27)
1. If a reserve price was specified for an auction, and the auction ends with the reserve price not being met, the seller now has the option to close such an auction himself. This would prevent buyer/seller feedback for the particular auction.
2. Now, when a feedback comment is deleted (only admin can delete feedback comments), the whole row will be deleted from the database, and the relevant feedback rating counter (positive/neutral/negative) will be decremented.
3. Added a statistics section to the auction mod's admin cp.
4. Now all auctions (whether they are active, has ended, was closed etc) will count towards a user’s auction listing limit.
5. Added a 'Show all feedback' link to the profile

Auto Auction 1.0 beta11 (2010-04-13)
1. When posting a new auction, the poster's country and state must be known.

Auto Auction 1.0 beta10 (2010-04-13)
1. Bug fix: system should not check for correct bid increment if it's the first bid in an auction.
2. Applied 'Mark Topics as Read' mod to auction type forums (i.e. all auctions already viewed will now be marked as read in auction type forums).

Auto Auction 1.0 beta9 (2010-04-12)
1. Added the ability for user to specify a maximum bid (max price user is willing to pay for the item). I made an effort to try and get it to work as close as possible to the ebay bidding system. Even the bid history is displayed in the same way as with ebay.
2. Can now specify in the auction admin cp which forums should de displayed with auction specific headings.
3. Restyled the auction history page (auction_history.php).
4. Restyled the user auction listings page (auction_showlistings.php).
5. Fixed and improved the bid increments feature. Now you've got a choice between the following bid increments: 0.01, 0.10, 0.25, 0.50, 1.00, 2.00, 5.00
6. Now displays your bid status (in a green/red box) in the auction you've bid on.
7. Made some changes to the lang file.

Auto Auction 1.0 beta8 (2010-02-02)
1. Better imagelink validation.
2. Fixed imagelink bug ([IMG] now converted automatically to lower case [img]).
3. Auctions that were manually closed by the poster/admin were not marked as 'Ended' in viewforum.php. Fixed.

Auto Auction 1.0 beta7 (2010-01-24)
1. Uses an alternative and much more efficient method of checking whether a forum has auctions.
2. Now you can only post a new item for sale if you've selected your country and state in your profile.
3. Now before auctions items are displayed in viewforum.php, all auctions are checked whether they've expired, and if so, they are closed automatically.
4. Removed background color for states displayed in viewforum.php.

Auto Auction 1.0 beta6 (2010-01-06)
1. Auction images are now cached (a 80x80 pixel image for viewforum.php and 150x150 pixel image for viewtopic.php) and stored in the 'img/auction/thumbs' folder. This makes for quicker loading of those pages.
2. Can no longer submit a blank comment when leaving feedback. Previously one could for example give a positive rating without typing in a text comment. Now a text comment is required.
3. viewforum.php modified to display auction column headings for auction type forums. If a forum contains active listings, then this new heading format will be used. Otherwise the original one (showing last post, number of replies etc.) will be used.
4. User's location is now shown below the topic title in auction type forums. If he is from the United States, the State is shown as his location. Otherwise the country will be shown.

Auto Auction 1.0 beta5 (2009-11-14)
1. Bid increment bug fixed: http://www.monotiz.com/smf/index.php?topic=132.0
2. 'Show Feedback' page now contains link back to the topic, if visited from a topic.
3. Can specify default auction image in auction settings (displayed if no auction image was used).
4. Added extra 'Post topics' option in the auction settings (shown in green in the auction settings).
5. Edited the auction.php page to allow you to select a specific forum's auctions in a drop down menu.

Auto Auction 1.0 beta4 (2009-10-24)
1. Added two extra columns to the 'buy_comment' table. One column showing whether the feedback was for a seller or buyer, and the other column for the rating given with the comment (positive, negative or neutral).

Auto Auction 1.0 beta3 (2009-09-25)
1. Fixed a little bug in auction_post.php .
2. Made update to limit the number of auctions a user can post in a 30 day period. Note that auctions that have been closed (using the 'close listing' link) will not be counted. Note: A user can only close a listing if the auction has not received any bids (or nobody has bought it in case of buyitnow items). Admin on the other had can close any auction at any time.

Auto Auction 1.0 beta2 (2009-09-24)
1. Deadline date was replaced with time left (as with ebay)
2. Can now use bbcode (taken from either the thumb or image bbcode in the image upload tool) in imagelink. I played around a bit with regex taken from the parser, and the image url will now be automatically extracted if you used bbcode.
3. There is now a limit to the number of auctions a user can run concurrently (default for all users: 3).
4. Styled the auction box in viewtopic.
5. When a pm is sent using the pm link in an auction, 'Auction question' is added to the subject automatically, and the message contains a link back to the auction topic.
6. Changed some lang file entries. e.g. '(no subject)' changed to 'You have been outbid' etc.
7. Fixed some small bugs.

Auto Auction 1.0 beta1 (2009-09-22)
1. Initial release based on SMFBuy.

Last edited by Koos (2013-09-18 22:41:01)

Offline

 

#3 2013-04-16 22:57:34

doki
Member
Registered: 2007-04-30
Posts: 225

Re: Auto Auction 1.0

Hi koos,

Is this mod works with flux 1.5.x?

Thanks

Offline

 

#4 2013-04-17 21:14:02

Koos
Administrator
Registered: 2007-01-14
Posts: 525
Website

Re: Auto Auction 1.0

No, but it would not be too hard to make it compatible with FluxBB 1.5. I might release a version compatible with FluxBB 1.5 later on.

Offline

 

#5 2013-04-18 07:59:48

doki
Member
Registered: 2007-04-30
Posts: 225

Re: Auto Auction 1.0

no problem koos. by the way the auction image, it is possible that poster can upload image directly during posting? not just link of image?

Last edited by doki (2013-04-18 16:59:50)

Offline

 

#6 2013-04-18 23:00:28

Koos
Administrator
Registered: 2007-01-14
Posts: 525
Website

Re: Auto Auction 1.0

When you add an image link when posting an auction, auction thumbnails are automatically created and saved to the img/auction/thumbs directory. I might add the ability to upload your own auction images in a future release. Maybe in the mean time the user can make use of the Automatic Image Upload mod to upload the auction image and then just link to that.

Offline

 

#7 2013-04-19 00:33:03

doki
Member
Registered: 2007-04-30
Posts: 225

Re: Auto Auction 1.0

thanks for considering my suggestion. uploading their own picture is very easy in the user side since they can upload the pictures and post auction in one process.

Offline

 

#8 2013-05-22 12:38:46

doki
Member
Registered: 2007-04-30
Posts: 225

Re: Auto Auction 1.0

hi koos i got this error when saving the settings.

http://i39.tinypic.com/2zebdj6.jpg

im using punbb version 1.2.50

Offline

 

#9 2013-06-04 20:56:02

Koos
Administrator
Registered: 2007-01-14
Posts: 525
Website

Re: Auto Auction 1.0

I've fixed this in v1.0.1 - and also a couple of other issues causing "Undefined index" notices.

Offline

 

#10 2013-06-05 01:36:52

doki
Member
Registered: 2007-04-30
Posts: 225

Re: Auto Auction 1.0

Thanks koos for fixing the error.

Last edited by doki (2013-06-06 22:25:11)

Offline

 

#11 2013-09-18 22:36:31

Koos
Administrator
Registered: 2007-01-14
Posts: 525
Website

Re: Auto Auction 1.0

Auto Auction 1.0.2 now available.

Here are the changes made:

1. Fixed two sql queries that were causing errors in newer versions of MySQL.

2. Only show the option "Sort by Location" in viewforum if the Geo Selector mod is installed.

Offline

 

#12 2013-09-18 23:00:57

doki
Member
Registered: 2007-04-30
Posts: 225

Re: Auto Auction 1.0

hi koos, how to update from previous version? Just replace all the files with this version? I don't see any changes in readme from previous version.

Offline

 

#13 2013-09-19 22:47:16

Koos
Administrator
Registered: 2007-01-14
Posts: 525
Website

Re: Auto Auction 1.0

Yes, you can just upload all the new version's files to update.

Offline

 

#14 2013-09-25 23:48:54

doki
Member
Registered: 2007-04-30
Posts: 225

Re: Auto Auction 1.0

thanks!

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.