How to list the Downloads in a drop down in the admin page

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   How to list the Downloads in a drop down in the admin page
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 45
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   
Standard Nuke downloads administration stinks especially when it comes to wanting to modify a download. Simple fix to be able to view them in a drop down instead of having to know the LID #.

Open your admin/modules/download.php and find

// Modify Downloads
    $result12 = $db->sql_query("SELECT * from " . $prefix . "_downloads_downloads");
    $numrows = $db->sql_numrows($result12);
    if ($numrows>0) {
    OpenTable();
    echo "<form method=\"post\" action=\"admin.php\">"
   ."<font class=\"content\"><b>" . _MODDOWNLOAD . "</b><br><br>"
   ."" . _DOWNLOADID . ": <input type=\"text\" name=\"lid\" size=\"12\" maxlength=\"11\">;"
   ."<input type=\"hidden\" name=\"op\" value=\"DownloadsModDownload\">"
   ."<input type=\"submit\" value=\"" . _MODIFY . "\">"
   ."</form>";
    CloseTable();
    echo "<br>";
    }



Replace that with

// Modify Downloads
    $result12 = $db->sql_query("SELECT * from " . $prefix . "_downloads_downloads");
    $numrows = $db->sql_numrows($result12);
    if ($numrows>0) {
    OpenTable();
    echo "<br><form method=\"post\" action=\"admin.php\">";
    echo "<font class=\"content\"><b>"._MODDOWNLOAD."</b><br /><br />";
    echo "" . _DOWNLOAD . ": <select name=\"lid\">";
     $czresult = $db->sql_query("SELECT lid, title from ".$prefix."_downloads_downloads order by title");
    while($rowcz = $db->sql_fetchrow($czresult)) {
       $lid = intval($rowcz['lid']);
       $title = $rowcz['title'];
    echo "<option value=\"$lid\">$title</option>";
    }
    echo "</select>";
    echo "<input type=\"hidden\" name=\"op\" value=\"DownloadsModDownload\">";
    echo "<input type=\"submit\" value=\""._MODIFY."\">";
    echo "</form><br>";
    CloseTable();
    echo "<br>";
    }
   




Telli



_________________
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
#2   re: How to list the Downloads in a drop down in the admin pa
Donovan
CZ Active Member
 Codezwiz Site Donator
Donovan has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Web Developer
Gender: Male
Fav. Sports Team: St Louis Cardinals
Status: Offline
Joined: Dec 03, 2003
0.02 posts per day
Posts: 160
Points: 9,216
   
I tried this but didn't get a drop down box in my downloads page. Will post my code in a little bit.


Edit/ Here is the error--

Parse error: parse error in /home/i3rd-inf/public_html/admin/modules/download.php on line 218


It throws an error at the top of this code.



&nb sp; echo "</select>";
echo "<input type=\"hidden\" name=\"op\" value=\"DownloadsModDownload\">";
echo "<input type=\"submit\" value=\""._MODIFY."\">";
echo "</form><br>";
CloseTable();
echo "<br>";
} else {
}



Back to top Reply with quote
#3   re: How to list the Downloads in a drop down in the admin pa
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 45
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   
Ok try the code above now it had some strange symbols in it.




_________________
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
#4   re: How to list the Downloads in a drop down in the admin pa
Donovan
CZ Active Member
 Codezwiz Site Donator
Donovan has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Web Developer
Gender: Male
Fav. Sports Team: St Louis Cardinals
Status: Offline
Joined: Dec 03, 2003
0.02 posts per day
Posts: 160
Points: 9,216
   
Bingo!

Thanks, works like a charm now.



Back to top Reply with quote
#5   re: How to list the Downloads in a drop down in the admin pa
Cyberian
CZ Super Newbie
Cyberian has been a member for over 20 year's 20 Year Member
usa.gif newyork.gif
Gender: Male
Status: Offline
Joined: Nov 11, 2003
0.00 posts per day
Posts: 35
Points: 15,546
   
Can this code be done on the CZ 7.0?

Here's the code I found that is Similar:

// Modify Downloads

    $result = sql_query("select * from ".$prefix."_downloads_downloads", $dbi);
    $numrows = sql_num_rows($result, $dbi);
    if ($numrows>0) {
    OpenTable();
    echo "<form method=\"post\" action=\"admin.php\">"
   ."<font class=\"content\"><b>"._MODDOWNLOAD."</b><br><br>"
   .""._DOWNLOADID.": <input type=\"text\" name=\"lid\" size=\"12\" maxlength=\"11\">&nbsp;&nbsp;"
   ."<input type=\"hidden\" name=\"op\" value=\"DownloadsModDownload\">"
   ."<input type=\"submit\" value=\""._MODIFY."\">"
   ."</form>";
    CloseTable();
    echo "<br>";
    } else {
}


Just doesn't have the dropdown menu. Looks like it should be correct.


Back to top Reply with quote
#6   re: How to list the Downloads in a drop down in the admin pa
Cyberian
CZ Super Newbie
Cyberian has been a member for over 20 year's 20 Year Member
usa.gif newyork.gif
Gender: Male
Status: Offline
Joined: Nov 11, 2003
0.00 posts per day
Posts: 35
Points: 15,546
   
Nevermind. I got it. Thanks. Sorry for the stupid post.



Back to top Reply with quote
#7   re: How to list the Downloads in a drop down in the admin pa
Killa
CZ Super Newbie
Killa has been a member for over 20 year's 20 Year Member
usa.gif newyork.gif
Gender: Male
Status: Offline
Joined: Apr 02, 2004
0.01 posts per day
Posts: 65
Points: 4,417
   
sweet i was looking for this...thx



Back to top Reply with quote
#8   re: How to list the Downloads in a drop down in the admin pa
la_zona_activa
CZ Super Newbie
la_zona_activa has been a member for over 20 year's 20 Year Member
Occupation: *^*_Webmaster_*^*
Website:
Status: Offline
Joined: Mar 20, 2004
0.01 posts per day
Posts: 46
Points: 36
AIM Address Yahoo Messenger MSN Messenger ICQ Number
U see,u will always find what u need in cz.....



Back to top Reply with quote
#9   re: How to list the Downloads in a drop down in the admin pa
DaveTomneyUK
CZ Active Member
DaveTomneyUK has been a member for over 20 year's 20 Year Member
uk.gif
Occupation: PC Technician
Age: 50
Gender: Male
Website:
Status: Offline
Joined: Oct 23, 2003
0.03 posts per day
Posts: 201
Points: 23,202
AIM Address Yahoo Messenger  
Will this work on PHP-Nuke 7.3 or olny older version?

Cheers



Back to top Reply with quote
#10   
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: 42
Gender: Male
Fav. Sports Team: NE Patriots
Website:
Status: Offline
Joined: Apr 07, 2004
0.04 posts per day
Posts: 259
Points: 19,861
  MSN Messenger 
I have it working for PHP-Nuke 7.3



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