PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Argus
Client


Joined: Oct 06, 2003
Posts: 81

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

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: 16987
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
Argus
Client


Joined: Oct 06, 2003
Posts: 81

PostPosted: Mon Oct 06, 2003 2:51 pm Reply with quote Back to top

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


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Mon Oct 06, 2003 3:03 pm Reply with quote Back to top

Try clicking my Topics link and see if that's more of what you're after.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Argus
Client


Joined: Oct 06, 2003
Posts: 81

PostPosted: Mon Oct 06, 2003 3:11 pm Reply with quote Back to top

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
View user's profile Send private message
Argus
Client


Joined: Oct 06, 2003
Posts: 81

PostPosted: Mon Oct 06, 2003 7:00 pm Reply with quote Back to top

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


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Mon Oct 06, 2003 7:13 pm Reply with quote Back to top

Laughing That was the nuke basic one. i forgot to move the one I was using over. Try it now.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Argus
Client


Joined: Oct 06, 2003
Posts: 81

PostPosted: Mon Oct 06, 2003 8:48 pm Reply with quote Back to top

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


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Mon Oct 06, 2003 8:51 pm Reply with quote Back to top

Shouldn't be too difficult at all.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum