[DEV] Auction Mod/Add-on - 80% DONE - hit a "snag"

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
SixthSphere
Registered User
Posts: 116
Joined: Fri Aug 08, 2003 4:32 pm

Post by SixthSphere » Fri Aug 26, 2005 4:29 pm

i'm no longer working on this mod.

theres a working auction mod on phpbbhacks
Are you a Saturn Car Enthusiast?
Check out www.SixthSphere.com!

jschrader
Registered User
Posts: 1
Joined: Fri Dec 10, 2004 4:11 pm
Contact:

Anyone working on this?

Post by jschrader » Mon Jun 26, 2006 2:58 pm

O.k. don't guess Patrick has this auction mod anymore... FR. Are you still working on this?

anyone else know of any auction tools out there?

fortberry
Registered User
Posts: 88
Joined: Wed Oct 01, 2008 7:07 am

Re: [DEV] Auction Mod/Add-on - 80% DONE - hit a "snag"

Post by fortberry » Mon Oct 20, 2008 7:56 am

I'm editing/updating my post for the benefit of others who may be interested (and much thanks to Lumpy, Brf and poyntesm for pointing me in the right directions):
update: now that the phpbb-auction.com site is back up, I'm developing this idea and an attempted patch for "reserves" on that site, here and here. Any inputs would be much appreciated.

situation:
the business model I'm trying to use is that I would receive a commission only if an item sells (i.e. I get paid after someone has used the service).

The MOD isn't set up to guarantee that will work, so I have to hotwire it - for this to work I need two things sorted out:
1. Payment: I get paid by the buyer, I ask seller to ship merchandise, I then transfer his share of payment to him
2. Security: I need to prevent buyer and seller from exchanging full contact details before close of sale, otherwise I could get cut out from receiving payment.

possible solutions:
Here's where I need help:
1. to receive the payment, I want to make my moneybookers account a fixed "answer" in the field which asks auction users which payment method they accept when they register a new auction item for uploading (i.e. my email address would be hardcoded in there / no editing possible). Ideally I would like a way of qualifying the hardcoding with a permission level (i.e. Admins and "preferred customers" would be permitted to edit that field).

2. to prevent buyers and sellers from seeing each others contact details, I used the steps in this thread to make emails, ICQ, etc. visible only to Admins and Mods in certain files. To turn that "if" command into a compound one (which allows more than 1 user_level) poyntesm supplied me with the code below and Lumpy pointed out that the user_level names are as per phpbb2's fixed nomenclature - "ADMIN" and "MOD" (the command must reference the names just like that; ignore any special names assigned in the auction mod or in phpbb2 rank controls):

Code: Select all

if ( $userdata['user_level'] == ADMIN || $userdata['user_level'] == MOD )
the full implementation of the code would be like this - and applied to all the types of contact info called up in the files - ICQ, websites, msn, etc.:

Code: Select all

if ( $userdata['user_level'] == ADMIN || $userdata['user_level'] == MOD )
{
$email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL .'=' . $auction_offer_row['user_id']) : 'mailto:' . $sellerrow[0]['user_email'];

             $email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
             $email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
		}
		else
		{
			$email_img = '&nbsp;';
			$email = '&nbsp;';
		}
As far as I've found, the phpbb2 files which need this censoring are:
memberlist.php
viewtopic.php
privmsg.php
profile.php
groupcp.php
includes/usercp_viewprofile.php

And from the auction mod:
auction_offer.php
auction_offer_view.php

That 2nd file also includes a text link to the seller's email ("email the seller"). I added a clumsy disable into the file which controls that field (languages/lang_en/lang_auction.php): I'd tried to use the user_level condition above in the lang_auction file, but it doesn't seem to work there - the text link at the moment is disable regardless of which user_level accesses the page.

* I also installed the Private Message Admin mod (to prevent exhange of contact details by PM; I mention that in the site's T&C's so users know PMs are monitored)

I'll update this post with more developments/improvements as they come in. I think this is a great mod - if only I can tweak it a little...

fortberry
Registered User
Posts: 88
Joined: Wed Oct 01, 2008 7:07 am

question about making a user_id switch

Post by fortberry » Fri Oct 31, 2008 10:44 am

I want to make a switch so that in a template screen, only the user himself can see certain data fields about himself.

The critical condition is this:

Code: Select all

if ( $auction_offer_row['FK_auction_offer_user_id'] == $userdata['user_id'] )
And the raw SQL query which calls up the relevant field I need (plus some others I don't need) is posted below fyi.

Code: Select all

                 $sql = "SELECT FK_auction_offer_user_id,
                                auction_offer_state,
                                auction_offer_direct_sell_price,
                                auction_offer_title
                         FROM " . AUCTION_OFFER_TABLE . "
                         WHERE PK_auction_offer_id= " . $HTTP_GET_VARS[POST_AUCTION_OFFER_URL] . "";

                 if( !($result = $db->sql_query($sql)) )
                     {
                          message_die(GENERAL_ERROR, 'Could not query auction-start and stop date', '', __LINE__, __FILE__, $sql);
                     }
                 $auction_offer_row = $db->sql_fetchrow($result);

                 if ( $auction_offer_row['FK_auction_offer_user_id'] == $userdata['user_id'] )
Unless I'm wrong I, need to create the switch commands in "page_header.php" - but there already exists an SQL command referencing a different table there. Is there any problem if I add this one in there too?

...and, can anyone help me with how I would script the switch related to the condition I mentioned above?

Post Reply

Return to “[2.0.x] MODs in Development”