Author |
Message |
Argus
Client

Joined: Oct 06, 2003
Posts: 81
|
Posted:
Mon Oct 06, 2003 1:50 pm |
|
Hey there...
I'm trying to find/create a block that displays the last 10 articles of a particular category (topic would work too). I've done quite a bit of searching and haven't been able to come up with anything. I tried to hack the Last 5 Articles block, but as I'm not really a coder, didn't get too far. Does anyone know where I could find this, and/or is it something that is easily doable? I am willing to try hacking the file again with some pointers.
Thanks,
-Arg |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Mon Oct 06, 2003 1:58 pm |
|
Find this line in the blockCode:$sql = "SELECT sid, title, comments, counter FROM ".$prefix."_stories $querylang ORDER BY sid DESC LIMIT 0,5";
| and modify it toCode:$sql = "SELECT sid, title, comments, counter FROM ".$prefix."_stories $querylang ORDER BY sid DESC LIMIT 0,10";
|
|
|
|
|
 |
Argus

|
Posted:
Mon Oct 06, 2003 2:51 pm |
|
Hey thanks for that...
That gets me ten articles, but I still have the issue of getting only stories of one category or topic.
Thanks again...
-Arg |
|
|
|
 |
Raven

|
Posted:
Mon Oct 06, 2003 3:03 pm |
|
Try clicking my Topics link and see if that's more of what you're after. |
|
|
|
 |
Argus

|
Posted:
Mon Oct 06, 2003 3:11 pm |
|
Kind of yes. I am looking for a block that would display only one category that I choose. It would be a left block. So there would be a block for example I called "Addons" and in that block would be the titles of the 10 most recent articles in that category.
Thanks...
-Arg |
|
|
|
 |
Argus

|
Posted:
Mon Oct 06, 2003 7:00 pm |
|
I was just looking at your topic module again. The code must be in there to search the db for stories by category. I could limit the # of stories quite easily. Is that a module you made or is somewhere else?
Thanks,
-Arg |
|
|
|
 |
Raven

|
Posted:
Mon Oct 06, 2003 7:13 pm |
|
That was the nuke basic one. i forgot to move the one I was using over. Try it now. |
|
|
|
 |
Argus

|
Posted:
Mon Oct 06, 2003 8:48 pm |
|
It looks quite good. Vnice module. Do you think its possible to hack the topic code to get ten stories from one topic displayed in a block? If it is, I will putz around and try to do it.
Thanks,
-Arg |
|
|
|
 |
Raven

|
Posted:
Mon Oct 06, 2003 8:51 pm |
|
Shouldn't be too difficult at all. |
|
|
|
 |
|