PDA

View Full Version : Sort by "First Post Date"?


DerTobi75
01-31-2006, 01:03 PM
Hi,

I am thinking about some kind of a news forum and would like to do this with GARS!

So, is it possible to sort threads by the first post date and not by the last reply date?!

Tobi

The Geek
01-31-2006, 09:47 PM
Not by default, however Ill see if I can add the feature.

DerTobi75
02-01-2006, 11:33 AM
That would be great, can you say how long that might take to add such a feature?! Just for my information, I do not want to hurry you ;)

Tobi

DerTobi75
02-01-2006, 01:05 PM
Uh, and btw way, I played a bit with the templates! Is it possible to get the date of the first post of a thread and show it in GARS_forumdisplay?!

Tobi

The Geek
02-01-2006, 06:02 PM
Cant promise anything right now. Its not too much trouble to work in though so theoretically it could be next week.

Off the top of my head, you want to look at the GARS_threadbit template :)

DerTobi75
02-02-2006, 01:01 PM
Cant promise anything right now. Its not too much trouble to work in though so theoretically it could be next week.
Ok, would be cool ;)


Off the top of my head, you want to look at the GARS_threadbit template :)
Right, but I also thought about a design like:

Date 02.02.06
--------------------------------------------
Title G
Synopsis G

Title F
Synopsis F


Date 31.01.06
--------------------------------------------
Title E
Synopsis E


Date 29.01.06
--------------------------------------------
Title D
Synopsis D

Title C
Synopsis C

Title B
Synopsis B


Date 28.01.06
--------------------------------------------
Title A
Synopsis A

And so on, and for that, I guess, it might be easier to modify GARS_forumdisplay instead of GARS_threadbit?!

Regards,

Tobi

The Geek
02-02-2006, 04:36 PM
You want to group the threadbits by date? If so, thats a bit more work as you will need some logic (code) to do that for you.

DerTobi75
02-02-2006, 05:41 PM
If possible, yes I would like to group threadbits by date!

Can this be done using vBs PlugIn System or do I need to make file chances within your code?!

Tobi

The Geek
02-02-2006, 06:38 PM
I think you are looking at a potentially complex plug in. There isnt really a hook clause to add a group by command in the SQL (which would be the easiest) though it could still be tweaked.

I dont think it would be very straight forward :(

DerTobi75
02-02-2006, 07:04 PM
Hrm, I never thought of something complex, but something really simple!

My english is killing me, but I will try to explain it ;)

When it is possible just to get the first post date, I could compare dates!

So, let's say we got a couple of news (threads) which are orderd by their "first post date", not grouped!

You have a mysql query and to work out the result, you are using while...

For the first thread there is nothing to compare, so I set $show_date = $thread['first_post_date']! At the template I set a conditional, if $show_date is set, show it. And then set $temp_date = $thread['first_post_date']!

The loop goes on, second thread! And now I can compare $temp_date with $thread['first_post_date'] for the second thread. If the dates are equal, $show_date is empty, if the dates are not equal $show_date = $thread['first_post_date'] and because of the template conditional it will be shown!

I hope, that is not to naiv and can be done somehow ;)

Tobi

DerTobi75
02-09-2006, 09:55 AM
Hi,

I do not need that feature anymore, we choose Joomla for our Newssite!

Tobi