Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Suggestions Variable amount of news per page
Slinkysam
Posted on 22 Aug 2008, 03:26:36

Access: Member
Total Posts: 12
Joined: 2008-08-21

Hi Chris,
I know you can set a global amount of news articles per page, but it would also be nice to be able to locally set how many articles are displayed per page through the include.
i.e.
$newscount = '5';

I ask this because I use my old news system not only for news postings, but as my actual website content editor and it works great for this purpose. Your version looks great and with the SQL backend, it makes things a lot easier and manageable. Great job on this project. :cool2:

-SlinkySam
#364
Chris
Posted on 22 Aug 2008, 05:00:19

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Hey Sam,

I'll certainely add this in the next version, for now you can easily add this functionality by making a small change to the index.php file

around line 302~ you'll see the following code

Code:
$sql = "SELECT nppage FROM `$newsoptions` WHERE 1";
$query = mysql_query($sql);
$nppage = mysql_result($query,0);

simply change that to

Code:
if(!$nppage){
$sql = "SELECT nppage FROM `$newsoptions` WHERE 1";
$query = mysql_query($sql);
$nppage = mysql_result($query,0);
}

then when including your news simply specify the amount you want to show by adding

Code:
<?php
$nppage 
= '10';
include 
'news/index.php';
?>
#366
Slinkysam
Posted on 22 Aug 2008, 06:55:13

Access: Member
Total Posts: 12
Joined: 2008-08-21

Chris,
That is freaking crazy. It would take me a week to come up with that mod. You have some mad skills and I appreciate your time putting this all together. Just don't get burned out on it all because your work is very clean and appreciated.

By the way, do you have a "donate" button somewhere so I can at least give back a little something? I have fun tweaking and playing with code stuff, but I have very little to offer in that realm.

-SlinkySam
#368
Chris
Posted on 22 Aug 2008, 11:37:01

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Hey Sam,
I don't have a donate button and I certainely would never ask for donations. But if you really want to (I'm not going to stop you :tongue:) my paypal account is vbchris@gmail.com
#379
Hoddzdj
Posted on 29 Sep 2008, 20:14:41

Access: Member
Total Posts: 7
Joined: 2008-09-29

Oh I think I have found exactly what I'm after. Thanks for this, I will be adding this right away!!

Definitely something that should be added in the next release, especially if it is simple like that! =]
#438
Network-13.com © 2013