BrownChiLD
Junior Member
Posts: 2
Joined: Apr 2009
Reputation: 0
|
Creating my own NEWTHREAD page... need some quick infos
Hi guys
I'm building a Buy and Sell website off MyBB forum platform and to make this website function the way I like it I'm gona need to do modifications.... I am well versed w/ PHP and "ok" in CSS, but I would like it if ya'll can give quick answers to some questions i have.. I can probably figure this out myself but it sure would save me a lot of time if you guys can point things out.
To keep my forum organized, I need to make sure users follow the format I want them to, specially since I'll be creating my own SEARCH pages that will return filtered results based on things such as the title having the "Buying" or "Selling" word in the title..
So to do this, I wanted to make my own NEW THREAD interface, with additional fields that will look like:
Title (input Box)
Buying/Selling? (check box)
Price of item (input box)
Picture (upload box)
Description (full text box)
These new fields will simply be formatted into the "standard" input expected by the forum software.. where for example:
If Author types " Washing machine, 3 months used" and ticks the check box "Selling" .. the data will be submitted as POST TITLE VARIABLE
"Selling: Washing machine, 3 months used"
I initially planned to modify myBB's "newthread.php" file to check for FORUM ID and IF forum ID is one of the buy and sell forums, modify the look of the NEW THREAD page accordingly.. but I realized that this is more complicated, and it's gona be hell to maintain things when upgrading...(Correct me if im wrong)
So I decided why not MAKE my own simple NEW THREAD page and insert the values via SQL directly..
So.. w/ that said.. I wanted to know:
1) What are the TABLES i need to update when adding threads? by glancing at the tables i'd assume the following:
mybb_threads - the basic thread details
mybb_posts - the actual post data
mybb_threadsubscriptions - for setting subscriptions for the author
what else?
(is there a simple documentation on mybb's table structure?)
2) How do I check validation of logged in user? What session / cookie variables does MyBB use? What are the values in the session do i need to extract and put into the tables?
3) How are the User passwords encrypted in mybb? is it a simple MD5?
also, in general, is this approach of mine practical? Would there be a better way to get to my goal? I basically need to make sure that thread starters follow a format such as:
Subject: FS: 1 month old washing machine
Message:
Price: $300
Warranty: Shop warranty @ best buy, 1 year
Condition: 2nd hand
...and ofcourse, when the author tries to EDIT the post, I wish there was a way to "maintain" things like this structure. im thinking my own editpost page as well
|
|
| Yesterday 03:36 AM |
|
Nickman
Manager
Posts: 1,360
Joined: May 2008
Reputation: 30
|
RE: Creating my own NEWTHREAD page... need some quick infos
When adding threads, you have to update mybb_forums (forum last post info), you have to update the cache (forgot whats in here, but there is something), you have to update mybb_users (postnum+1).
MyBB has all the current users data in $mybb. So you can do $mybb->user['uid'] to get their uid and $mybb->user['username'] for their username. Those are the main values you will need.
I believe MyBB uses md5 for their passwords, however they also add a salt to make it more secure, so you'd have to deal with that. For more info, check out inc/functions_user.php and look at the the function validate_password_from_uid.
Also, check here to get more familiar with MyBB and how it works:
http://mybbsource.com/mybbdocs/
Playstation Forums | Hoodrat Arcade | Tech news at a glance | BestVidz.net | AdminSpace: Where admins talk | Download'en
|
|
| Yesterday 03:45 AM |
|
BrownChiLD
Junior Member
Posts: 2
Joined: Apr 2009
Reputation: 0
|
RE: Creating my own NEWTHREAD page... need some quick infos
thanks for your inputs man..
more inputs welcome . :)
|
|
| Yesterday 01:46 PM |
|