Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Seeking applications ...
Author Message
Argus
Client


Joined: Oct 06, 2003
Posts: 81

PostPosted: Mon Oct 06, 2003 1:50 pm Reply with quote

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
 
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Mon Oct 06, 2003 1:58 pm Reply with quote

Find this line in the block
Code:
$sql = "SELECT sid, title, comments, counter FROM ".$prefix."_stories $querylang ORDER BY sid DESC LIMIT 0,5";
and modify it to
Code:
$sql = "SELECT sid, title, comments, counter FROM ".$prefix."_stories $querylang ORDER BY sid DESC LIMIT 0,10";
 
View user's profile Send private message
Argus
PostPosted: Mon Oct 06, 2003 2:51 pm Reply with quote

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
PostPosted: Mon Oct 06, 2003 3:03 pm Reply with quote

Try clicking my Topics link and see if that's more of what you're after.
 
Argus
PostPosted: Mon Oct 06, 2003 3:11 pm Reply with quote

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
PostPosted: Mon Oct 06, 2003 7:00 pm Reply with quote

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
PostPosted: Mon Oct 06, 2003 7:13 pm Reply with quote

Laughing That was the nuke basic one. i forgot to move the one I was using over. Try it now.
 
Argus
PostPosted: Mon Oct 06, 2003 8:48 pm Reply with quote

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
PostPosted: Mon Oct 06, 2003 8:51 pm Reply with quote

Shouldn't be too difficult at all.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Seeking applications ...

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©