![]() |
|
|
Thread Tools |
|
#1
|
||||
|
||||
|
Hi,
I'm doing some modding of my forum home page - as I'm modding the forum to be a Q&A site, I want to be able to have the forum home page list the most recent "questions" (i.e. the most recent topics / threads that have been opened) AND NOT the most recent posts. Short of doing a query on the whole database, is there a list I can pull back of most recent threads or would I have to mysql (this is pseudo code here)
? I mean, if I did it this way, surely I'd have to bring back every single thread, sort it by date, and then do some post processing in PHP to pick out the first 20 from the list. If my forum gets big, this is a hefty query to be doing. And if posts dates stretch across multiple months, I don't really want to have to do a qualifying cut-off like (less than 30 days). Can anyone help me out here? Maybe with the appropriate SQL query or even some ideas about the way the vb database stores the thread meta information? No members have liked this post.
|
||||
|
#2
|
||||
|
||||
|
What exactly are you trying to post on your home page? Just a link to the 20 most recent threads? You can just use javascript for that.
See these threads for methods to pull threads via javascript: [HowTo] Display your latest threads on an external page using an RSS2 feed [HowTo] Display your latest threads on an external page using an XML feed [HowTo] Display your latest threads on an external page using an RSS feed
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
|
#3
|
||||
|
||||
|
MySQL 5.0 Reference Manual: SELECT syntax.
No members have liked this post.
|
||||
|
#4
|
||||||||
|
||||||||
|
Originally Posted by Lancerforhire
Thanks, you got the jist of what I'm after. a bientot good sir.
--------------- Added 27 Mar 2011 at 02:08 --------------- just to confirm, the table value
is the start date for the thread right? Why choose "dateline" as a table value? I mean, why confuse people and not just have "created_date" or something? Who the hell says "dateline"? No members have liked this post.
Last edited by downloadsuk : 27 Mar 2011 at 02:08. Reason: Auto-Merged DoublePost |
||||||||
|
#5
|
||||
|
||||
|
The schema has been verbose for a while now; not saying it's good (it is not), but because vB is a giant bowl of spaghetti code and third-party add-ons use the column name "dateline", it would not be very easy to change it.
Also, vBulletin is quite old and making column names descriptive/friendly is a more modern thing. No members have liked this post.
Last edited by vbresults : 03 Apr 2011 at 21:42. |
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
| Thread Tools | |
|
|
| New To Site? | Need Help? |
All times are GMT. The time now is 08:49.



