Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jan 2003
Posts: 43
Member
Member
Offline
Joined: Jan 2003
Posts: 43
Hi,

I'm looking to have someone code a little hack for me to integrate UBB with an auction system I bought. The auction uses flat files, and obviously, has a different format for user records. I want my UBB to create an auction account whenever someone registers. In addition to this, I need a one time script to run through all my current members and create the necessary auction accounts.

The auction makes use of .dat files (plaintext), and creates two files for every user. One file stores the account information, and the other stores billing info. The script needs to create these two files from information submitted in the UBB registration phase. Information includes username, password, address, and a couple of other irrelevant fields. The system is running on Win 2000 with IIS as far as file level access goes.

I am interested in hearing from anyone interested in working on this with me. Please send an estimate of how long you expect it to take and your billing rate.

BTW: This is for the Bidflux auction package, I'm sure there may be other people who would be interested in this sort of hack.

Thanks!

Attached is a sample of the files, very basic stuff:


User account file:
-----------------------
xxxx (password)
[email protected] (email)
Josh (real name)
NY (address)
NY (city state)
212-xxx-xxxx (phone number
192.168.1.120 (logged IP)
other (referral info)
NONE (referred by)
drygoods31073081972 (open auctions, this will be blank for new users)

Billing file:
---------------------
New Account Created:::Sun Dec 28, 05:12 PM:::0.00:::New Account Created:::0.00
New Registration Credit:::Sun Dec 28, 05:12 PM:::+0.00:::New Registration Credit:::0.00


The two files are located in two different directories under my cgi-bin.

Sponsored Links
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
This isn't much of a "small" hack...

My first thought (for the benefit of whoever ends up taking this job) would be hijacking WriteMemberProfile to write out the user account file... that would ensure that all changes would always be reflected.

Then the billing file could be written by the registration routine...

So, what happens when a user gets deleted from UBB?


UBB.classic: Love it or hate it, it was mine.
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
I'd be interested at looking at the files and giving an estimate, but I'd need the UBB version number that you're planning to run it on as well a copy of the auction software to see how practical it'd actually be.

Also, be sure to check with the creator to be sure that they allow you access to hiring users to apply modifications to their code, some creators get a little anal about mod's...

Go ahead and give me an email at owned[at]undergroundnews[dot]com


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Jan 2003
Posts: 43
Member
Member
Offline
Joined: Jan 2003
Posts: 43
I decided to go ahead and do this myself.

I have completed the initial script that creates all of the user files.

Can you tell me where the WriteMemberProfile is so I can jack a little bit of code in to do the updates?

Does this sub handle both account creation and edits?

Thanks for helping me out.

Joined: Jan 2003
Posts: 43
Member
Member
Offline
Joined: Jan 2003
Posts: 43
OK, I figured out where to put in the new code:

open( OUT , "> F:\www.mysite.com\cgi-bin\auctiondata\reg\test2\$username.dat ");
print OUT "$new_passwordn$emailn$public_namen";
print OUT &CensorCheck($in{location});
print OUT "n";
print OUT &CensorCheck($in{location});
print OUT "n000-000-0000n$ipaddynothernNONEn";

Just before:
&WriteMemberProfile($user_number, @user_profile);

In ubb_profile.cgi.

Are there any other places where I need to put it, or is every change to user accounts called through sub update_profile?

Sponsored Links
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
There are a few problems with that code.

First, the username is not guaranteed to contain sane characters. Unexpected problems may result if you use the username as the filename, including a major security risk. You should run the username through some filtering before using it, if you have no other choice but to use it as the filename.

Second... please use the internal file handling routines to ensure proper file locking. I'll provide demo code below.

Third... update_profile is local only to ubb_profile.cgi. You can find WriteMemberProfile itself in ubb_lib_files.cgi.

Here's some sample code, assuming @profile is the array passed to WriteMemberProfile:

Code
&WriteFileAsArray("/path/to/new/file", 
$profile[1], $profile[2], ($profile[15] || $profile[0]),
$profile[6], $profile[6], "000-000-0000",
&GetIPAddress, "other", "NONE", undef);
);
$profile[6] being the user location, which is filtered through the censor automagically. The undef at the end ensures that a newline is inserted after the "NONE".


UBB.classic: Love it or hate it, it was mine.
Joined: Jan 2003
Posts: 43
Member
Member
Offline
Joined: Jan 2003
Posts: 43
Wow!

Thanks Charles. This is my first attempt at hacking UBB, I had no idea that kind of functionality was there. You condensed my 30 line code into one line!

That works like a charm at the end of the ubb_profile.cgi, however when I try to put it in the ubb_lib_files.cgi, I get errors due to the profile array not being available (I assume).

I'm obviously a beginner, so if you could give me any direction on the recommended methods for making this data accessible in the second file, that would be great.

Also, those are the only two places where user info is entered or edited?

Thanks again!

-Josh

Joined: Feb 2004
Posts: 1
Junior Member
Junior Member
Offline
Joined: Feb 2004
Posts: 1
Quote
Originally posted by joshsaul:

BTW: This is for the Bidflux auction package, I'm sure there may be other people who would be interested in this sort of hack.
Hi,

If possible, could you PM me about BidFlux? I'd like to get someone's personal experience into account before I decide to purchase the software or not.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)