Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6
Author Message
SteveSoler
Client



Joined: Feb 03, 2005
Posts: 24
Location: New York

PostPosted: Sun Feb 06, 2005 7:35 pm Reply with quote

Please bear with me as I am very new to PHP-Nuke and will have many questions as I'm learning. I do first try to find answers in the HOW-TO and in the Forums via a search. I've even ordered the new book PHP-Nuke Garage that just came out. It should arrive in the next day or so. So I'm trying to get this on my own, but I hope you all can help out when I'm stumped. That being said, here is my question.

How do I edit or delete an old News Article/Story?

I do see that while logged into the Administration Menu there is a list (at the bottom of the page) of the Last 20 Articles. From this list I can click the edit or delete links next to any of the 20 listed articles. But what if I need to edit or delete older articles that are not in the Last 20 list?

From what I can tell, it seems as if the only way to edit or delete articles older that the Last 20 is to (while logged in as admin) navigate to the actual story and click the edit or delete links at the bottom right corner of the page (under Options / Admin). This seems to me as if it can be rather time consuming if you have many older articles you want to edit or delete.

Is there another way?

Thanks in advance!
 
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sun Feb 06, 2005 7:41 pm Reply with quote

Assuming you know the storynum, just issue this command
Code:
http://YOURDOMAIN.com/admin.php?op=RemoveStory&sid=999

where 999 is the story num.
 
View user's profile Send private message
SteveSoler







PostPosted: Sun Feb 06, 2005 7:55 pm Reply with quote

Thats good to know. Thanks for the tip. I guess this is the only other way. I better start writing down the story numbers of everything I submit.

Wink
 
Raven







PostPosted: Sun Feb 06, 2005 7:56 pm Reply with quote

No, if you just mouse over the comments or read more link, you will see the story number in the browser status bar.
 
PHrEEkie
Subject Matter Expert



Joined: Feb 23, 2004
Posts: 358

PostPosted: Sun Feb 06, 2005 10:34 pm Reply with quote

In addition, you can edit admin.php to show however many last articles you want...

Look for the function adminMain

To switch from 20 to 40, for example, search/replace the following:

SEARCH
Code:
echo "<center><b>"._LAST." 20 "._ARTICLES."</b></center><br>";

$result6 = $db->sql_query("SELECT sid, aid, title, time, topic, informant, alanguage FROM ".$prefix."_stories $queryalang ORDER BY time DESC LIMIT 0,20");


REPLACE
Code:
echo "<center><b>"._LAST." 40 "._ARTICLES."</b></center><br>";

$result6 = $db->sql_query("SELECT sid, aid, title, time, topic, informant, alanguage FROM ".$prefix."_stories $queryalang ORDER BY time DESC LIMIT 0,40");


The critical code is the second line, where you're increasing the limit (amount of items to return) from MySQL from 20 to 40. The change in the first line is only cosmetic, so it shows "Last x Articles" for the title bar.

PHrEEk
 
View user's profile Send private message
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6

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 ©