Admin Edit Story Mod

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Admin Edit Story Mod
JRSweets
CZ Active Member
 Codezwiz Site Donator
JRSweets has been a member for over 20 year's 20 Year Member
usa.gif massachusetts.gif
Age: 43
Gender: Male
Fav. Sports Team: NE Patriots
Website:
Status: Offline
Joined: Apr 07, 2004
0.03 posts per day
Posts: 259
Points: 19,861
  MSN Messenger 
I modified the [ Register or login to view links on this board.] (Created by Telli) in the downloads section to work with editing stories. When you goto the main admin page you would have to know the story ID to edit it. This allows for a drop down menu with the story titles.

Find this in admin.php:
if (($radminarticle==1) OR ($radminsuper==1)) {
   echo "<center>"
       ."<form action=\"admin.php\" method=\"post\">"
       .""._STORYID.": <input type=\"text\" NAME=\"sid\" SIZE=\"10\">"
       ."<select name=\"op\">"
       ."<option value=\"EditStory\" SELECTED>"._EDIT."</option>"
       ."<option value=\"RemoveStory\">"._DELETE."</option>"
       ."</select>"
       ."<input type=\"submit\" value=\""._GO."\">"
       ."</form></center>";


Replace with:
    if (($radminarticle==1) OR ($radminsuper==1)) {
   echo "<center>";
   echo "<br><form action=\"admin.php\" method=\"post\">";
   echo "" . _STORYTITLE . ": <select name=\"sid\">";
   $czresult = $db->sql_query("SELECT sid, title from ".$prefix."_stories order by title");
       while($rowcz = $db->sql_fetchrow($czresult)) {
       $sid = intval($rowcz['sid']);
       $title = $rowcz['title'];
       echo "<option value=\"$sid\">$title</option>";}
      echo "</select>";
   echo "<select name=\"op\">";
   echo "<option value=\"EditStory\" SELECTED>"._EDIT."</option>";
   echo "<option value=\"RemoveStory\">"._DELETE."</option>";
   echo "</select>";
   echo "<input type=\"submit\" value=\""._GO."\">";
   echo "</form></center>";


Find in admin/language/lang-english.php:
define("_STORYID","Story ID");


Add after:
define("_STORYTITLE","Story Title");


Hope someone else finds this of use. icon_biggrin.gif


Back to top Reply with quote
#2   re: Admin Edit Story Mod
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Great tip thank you! icon_smile.gif




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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 cannot attach files in this forum
You cannot download files in this forum