ronaldo99 Posted April 8, 2010 Share Posted April 8, 2010 Im building a website where i would like area where users can post bargains and users can rate and comment on them! Much like phpfreaks homepage, how they present it would be ideal! (ive looked at phpbb but my needs arent as demanding plus i am extremly new to php) simply a user can post and others comment and rate! Plse any suggestions or links would be appreciated. THANKYOU in advance [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
ialsoagree Posted April 8, 2010 Share Posted April 8, 2010 This isn't a small task, if you're not comfortable building something like this on your own, then finding a package solution would be a better option. phpBB is free, but it's forum hosting software, similar to the forums phpfreaks use (although not the same). phpBB has a free mod called phpBB Portal, but I'm not sure if it possesses the feature you've described. In any event, your feature requires user to be able to register and login, and votes and comments to be stored and related to topic posts. All in all, this is quite a bit of work to start from scratch. Using a solution, such as phpBB and phpBB Portal, even if it didn't solve your problem outright, would give you the foundation to add in the features you want without having to build an entire system. But phpBB is not the only solution out there either. It is a free solution, but you may be able to find other free solutions or other commercial solutions that more directly solve your problem. Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted April 8, 2010 Share Posted April 8, 2010 Try yourself first, I could possibly fix you up with comments, a rating system I've never looked in to. That's the biggest task I believe and I odn't have time withi t. Quote Link to comment Share on other sites More sharing options...
ronaldo99 Posted April 9, 2010 Author Share Posted April 9, 2010 cheers for help! i've sorted it all out! just developed it from a simple post script! Quote Link to comment Share on other sites More sharing options...
ronaldo99 Posted April 9, 2010 Author Share Posted April 9, 2010 just one thing i cant seem to get a order my posts by date or rating! $getdeals = mysql_query("SELECT * FROM posttable ORDER BY thedate DESC") or die (mysql_error()); Im using the above so its when users post they automatically are displayed in date order. BUT how will i let the user order post by either date or the rating! With a button or somesort! THANKS FOR ANYHELP! Quote Link to comment Share on other sites More sharing options...
MatthewJ Posted April 9, 2010 Share Posted April 9, 2010 Append the sort order to the url as a $_GET variable and check for it when the page loads, then use it in the query... like www.page.com?sort=rating&order=ASC Quote Link to comment Share on other sites More sharing options...
ronaldo99 Posted April 9, 2010 Author Share Posted April 9, 2010 thanks but sorry dnt quite understand that! bit of a newbie! Quote Link to comment Share on other sites More sharing options...
ronaldo99 Posted April 9, 2010 Author Share Posted April 9, 2010 do u mean create further pages where it is ordered by rating, then another ordered by name etc! Quote Link to comment Share on other sites More sharing options...
MatthewJ Posted April 9, 2010 Share Posted April 9, 2010 No, you just append the stuff to the url like I showed... so the headers for the columns would be links with their column as the parameter.. Let's say you had a column called birthdate... the header of the table would be a link like www.thesamepage.com?sort=birthdate&order=ASC So when they click it, the page will reload and you then get those values for use in the query, so the query would be like "SELECT * FROM table ORDER BY {$_GET['sort']} $order" Quote Link to comment Share on other sites More sharing options...
ronaldo99 Posted April 9, 2010 Author Share Posted April 9, 2010 thanks a lot mate! will give it a go Quote Link to comment Share on other sites More sharing options...
the182guy Posted April 9, 2010 Share Posted April 9, 2010 "SELECT * FROM table ORDER BY {$_GET['sort']} $order" This is bad. You need to check that the value matches an (predefined) allowed sort field before allowing it into the query like that. Quote Link to comment Share on other sites More sharing options...
MatthewJ Posted April 11, 2010 Share Posted April 11, 2010 I gave him an idea of how to do it, I'm not responsible for his security Quote Link to comment Share on other sites More sharing options...
ronaldo99 Posted April 11, 2010 Author Share Posted April 11, 2010 cheers for help! got it all sorted now! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.