NukeXchange Network

          

Nuke Sites Link Directory
Nuke Fixes · NukeForums · NukeZone Hosting · NukeUnited · Nuke Sites · Nuke Skins · NukeLance
Nuke Resources
 :: Home  :: Downloads  :: Your Account  :: Forums  :: Advertise :: 
Login or Register
Main Menu
General
 Main
 AvantGo
 Banner_Clients
 cfaq
 Donations
 Downloads
 Forums
 Members_List
 Private_Messages
 Search
 Stories_Archive
 Submit_News
 Surveys
 Topics
 Web_Links
 Your_Account

Your Account
 Login
 Register
 Lost Pass

Modules
Quick Links
· CMS Focus
· Domain Names
. Game Quest
· Learning Linux
. MateMaker
· NukeFixes
· NukeForums
· NukeLance
· Nuke Sites
· Nuke Skins
· NukeZone Hosting
. SearchDevil
Other Options

Download Resources
· Nuke Downloads
· Add a Link
· New Files
· Top Rated
· Most Popular

Web Site Resources
· Nuke Sites
· Add A Site
· New Sites
· Top Rated
· Most Popular

Support
· NukeZone Hosting
· NukeSkins.com
· NukeForums.com
· phpnuke.org
· NukeFixes.com
Information
NukeForums
·decompressing EN-Book-Nuke.tar.tar
·How to allow spaces/gaps/"-" in allowed usernames
·How to Setup PHPNUKE on win2k
·cannot save changes
·voting?
·Nuke forum picture problem
·How to change smtp port on wampserver and windows
·yet another 301 redirect problem
·Image display? - newbie
·php nuke help

read more...
Top10 Links
· 1: Nuke Forums
· 2: PHPNukeFiles
· 3: NukeSkins
· 4: Nuke Templates
· 5: EcomJunk
· 6: MDesign
· 7: Windows Installation: PHP
· 8: FLASH-FOR-NUKE
· 9: Dezina
· 10: Global Dream News Sharing Portal!
Site Visitors
User Login:

Nickname:
Password:
Security Code: Security Code
Type Security Code Here:

Members List Membership:
Latest: GiLli
Today: 2
Yesterday: 1
Overall: 15104

Visitation:
Guests: 497
Members: 1
Total: 498


You are Anonymous user. You can register for free by clicking here
Sponsor Links
Nuke Sites Link Directory
Nuke Sites Link Directory

NukeResources :: View topic - Old Articles
NukeResources Forum Index

NukeResources Forum Index -> Random Thoughts -> Old Articles
Post new topic  Reply to topic    View previous topic :: View next topic 
Old Articles
PostPosted: Fri May 09, 2003 8:19 pm Reply with quote
Mithoron
Resource Seeker
Resource Seeker
 
Joined: May 08, 2003
Posts: 4




In PHP-Nuke 5, you can have the Old Articles block, but it defaults to the last x days that you have showing on your homepage. Does anybody know of any blocks that let you show only a limited number of days?

For example, this site has the last 5 days of old articles, even though the main page shows 10 articles...
View user's profile Send private message
Re: Old Articles
PostPosted: Fri May 09, 2003 10:39 pm Reply with quote
chatserv
Site Admin
Site Admin
 
Joined: Apr 21, 2002
Posts: 1732
Location: Puerto Rico




Found this code by a friend called Raven:

If you would like to limit the old articles by the date age, in addition to the number of articles controlled by the Preferences setting, try this.
Find these lines in blocks/block-Old_Articles.php
Code:
$sql = "SELECT sid, title, time, comments FROM ".$prefix."_stories $querylang ORDER BY time DESC LIMIT $storynum, $oldnum";

Try changing them to this.
Code:
define("_CUTOFFDAYS",60);
$cutoffDate = time()-(_CUTOFFDAYS*86400);
if (isset($cutoffDate)) $querylang .= " AND (unix_timestamp(time) >= $cutoffDate)";
$sql = "SELECT sid, title, time, comments FROM ".$prefix."_stories $querylang ORDER BY time DESC LIMIT $storynum, $oldnum";

The '60' is 60 days. Make it whatever you want. Let me know if this works or not.

_________________
NukeResources | ScriptHeaven
View user's profile Send private message Visit poster's website
Re: Old Articles
PostPosted: Fri May 09, 2003 10:43 pm Reply with quote
Mithoron
Resource Seeker
Resource Seeker
 
Joined: May 08, 2003
Posts: 4




Hehehe, yeah, if you read that full thread, Raven wrote the code for me...unfortunately, for some odd reason it doesn't work for my system.

The only thing we could figure out (I runn IIS 5.0, PHP-Nuke 6.5) is that it has something to do with the %T parameter in PHP not working on my setup. When I post news stories and use the %T option in the lang-english file for the dates, it coms up blank...I end up having to use %I%M %p parameters.

Was hoping somebody had a different suggestions.

What block does this site use? It isn't the default Old Articles block, so was just wondering...

Thanx tho! Appreciate the time!
View user's profile Send private message
Old Articles
 NukeResources Forum Index -> Random Thoughts
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
All times are GMT - 4 Hours  
Page 1 of 1  

  
  
 Post new topic  Reply to topic     



Powered by phpBB © 2001-2005 phpBB Group.     Theme created by Vjacheslav Trushkin.
There have been 131 unique hit(s) in the past 24 hours.
Forums ©
Nuke Sites Link Directory


Best viewed with a Browser
All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2001 - 2007 by NukeResources.com
You can syndicate our news using the file .backend.php or ultramode.txt
PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.23 Seconds

:: Eos phpbb2 style by Cyberalien :: PHP-Nuke theme by www.nukemods.com ::