Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 52
3 members and 49 guests
buynm6ymobcha8b, cliaw9cckhereto, int5nwernetmarx
Most users ever online was 611, 03-21-2008 at 10:10 PM.
» .::.
» .:.

Go Back   Nukemods Forum > NM Staff > Purged Topics

Reply
 
LinkBack Thread Tools Display Modes
How to: List images in sections in a drop down menu
Old
  (#1 (permalink))
Moderator
 
Status: Offline
Posts: 737
Join Date: Nov 2002
How to: List images in sections in a drop down menu - 02-16-2003, 02:34 AM

I'm wanting to make a dropdown menu for images in sections so the adminstrators of sections, may choose from the uploaded images, rather then having to enter the name manually.

I looked in admin/sections.php and I think I have the code to edit, and I think I know what needs to go in there, I'm just not sure of the order of it.

This is the portion of code I believe has to be edited. Starting at line 106

Code:
    OpenTable();
    echo "<center><font class=\"option\">"._ADDSECTION."</font></center>
"
	."<form action=\"admin.php\" method=\"post\">
"
	.""._SECTIONNAME.":
"
	."<input type=\"text\" name=\"secname\" size=\"40\" maxlength=\"40\">

"
	.""._SECTIONIMG."
<font class=\"tiny\">"._SECIMGEXAMPLE."</font>
"
	."<input type=\"text\" name=\"image\" size=\"40\" maxlength=\"50\">

"
	."<input type=\"hidden\" name=\"op\" value=\"sectionmake\">"
	."<INPUT type=\"submit\" value=\""._ADDSECTIONBUT."\">"
	."</form>";
    CloseTable();
There is another area of similar code starting at line 201.

Code:
     $result = sql_query("select secid, secname, image from ".$prefix."_sections where secid=$secid", $dbi);
    list($secid, $secname, $image) = sql_fetch_array($result, $dbi);
    $result2 = sql_query("select artid from ".$prefix."_seccont where secid=$secid", $dbi);
    $number = sql_num_rows($result2, $dbi);
    OpenTable();
    echo "<img src=\"images/sections/$image\" border=\"0\" alt=\"\">

"
	."<font class=\"option\">"._EDITSECTION.": $secname</font>"
	."
("._SECTIONHAS." $number "._ARTICLESATTACH.")"
	."

"
	."<form action=\"admin.php\" method=\"post\">"
	.""._SECTIONNAME."
<font class=\"tiny\">"._40CHARSMAX."</font>
"
	."<input type=\"text\" name=\"secname\" size=\"40\" maxlength=\"40\" value=\"$secname\">

"
	.""._SECTIONIMG."
<font class=\"tiny\">"._SECIMGEXAMPLE."</font>
"
	."<input type=\"text\" name=\"image\" size=\"40\" maxlength=\"50\" value=\"$image\">

"
	."<input type=\"hidden\" name=\"secid\" value=\"$secid\">"
	."<input type=\"hidden\" name=\"op\" value=\"sectionchange\">"
	."<input type=\"submit\" value=\""._SAVECHANGES."\"> [ <a href=\"admin.php?op=sectiondelete&amp;secid=$secid&amp;ok=0\">"._DELETE."</a> ]"
	."</form>";
This is what I think I need to insert, but I'm not sure where it goes.
Code:
         $result = sql_query("select image from ".$prefix."_sections where secid=$secid", $dbi);
    list($image) = sql_fetch_row($result, $dbi);
    echo "<table border=\"0\" width=\"70%\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"$bgcolor2\" align=\"center\"><tr><td>"
	."<table border=\"0\" width=\"100%\" cellpadding=\"8\" cellspacing=\"1\" bgcolor=\"$bgcolor1\"><tr><td>"
	."<img src=\"<img src=\"images/sections/$image\" border=\"0\" alt=\"\">";
The first portion of code, doesn't have any reference to to the image, but the sql does query the same table, so I'm wondering if adding the image query to the existing one and inserting the table values for the dropdown would be enough there.

Does the code I want to insert look right? Does anyone know where to put it? :?

Thanks for your help
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
The Elektro theme not in drop menu - any way to get it ? Daisyfan22 Theme packs 1 03-18-2005 07:53 AM
Drop Down _Menu doneandoner Site design 1 11-04-2004 01:57 PM
Sections Block Cyber-Freak Purged Topics 2 06-28-2003 01:06 PM
Cookies - Looking for a way to drop cookie. exxxpress Purged Topics 0 06-12-2003 10:32 AM
How do I change the icons for the news sections? vittala Purged Topics 0 04-17-2003 11:21 AM




vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31