.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $5.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 2: The Ascension Wars

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old July 19th, 2004, 07:22 AM

Smauler Smauler is offline
Private
 
Join Date: Jul 2004
Location: Ipswich, UK
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Smauler is on a distinguished road
Default Re: Forum Topic Messages in Chronological Order

Sorry for bringing up and old topic, this bugs me though.

I've got no idea why it should be difficult to revert to the standard oldest post first method if the backend is database driven. I've written a forum in the past (in php, mySQL back end), and all it did when looking at a topic was to get all Posts for that topic, order by date, then loop through them. The SQL looked something like this (technicalities like escaping quotes removed):

$sql = "SELECT * FROM Posts WHERE topicid="(topicid)" ORDER BY date ASC"

The you just for loop through the Posts, outputting them. There are other complications, like Posts per page, links to other things (edit, user profile, etc), but it should not be much more complex than this. Anyway, the way it is now, it looks like there is a "DESC" instead of an "ASC" in the SQL. That would be _very_ easy to fix, since the output array would be identical the other way around, the output code would not have to be changed.

Also, if this is not the case, and there's some other reason for the order, it should not be difficult to change either. I assume there will be a loop for outputting the Posts, one by one. All you'd have to do would be to reverse that loop. For example, if the current loop is :
for (x=0; x<$number_of_Posts; x++)
you'd change it to
for (x=$number_of_Posts; x>0; x--)

That should work in most cases with a bit of tweaking. Anyway, sorry for rambling on, and bringing an old post back fromn the dead. If I've made a stupid mistake in the code, it's 7am and my minds not fully operational yet . I know this is not a php board, but it's probably SQL based (I'm not that familiar with UltimateBB), and that php code is pretty self-explanatory. I've just ordered Dominions II btw, been playing the demo for most of the weekend. I'm still really crap though .
Reply With Quote
 

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:24 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.