» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 46
0 members and 46 guests
No Members online
Most users ever online was 611, 03-21-2008 at 11:10 PM.
» .::.
Web Hosting - web hosting, dedicated servers and web design services
Online Degree - search for 1000+ online degrees, online colleges & online universities.
Tattoo - we are a group of tattoo enthusiasts
Gexa Energy - your absolute best choice in electric service
Texas electricity - save on electric rates
Oral Chelation - initial cleansing of your veins & arteries

Register Now! Contact Us

About this Page
This is a discussion on How to: List images in sections in a drop down menu within the Purged Topics forums, part of the NM Staff category; I'm wanting to make a dropdown menu for images in sections so the adminstrators of sections, may choose from ...


Go Back   Nukemods Forum » NM Staff » Purged Topics

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-16-2003, 03:34 AM
Moderator
 
Join Date: Nov 2002
Posts: 737
How to: List images in sections in a drop down menu
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 08:53 AM
Drop Down _Menu doneandoner Site design 1 11-04-2004 02:57 PM
Sections Block Cyber-Freak Purged Topics 2 06-28-2003 02:06 PM
Cookies - Looking for a way to drop cookie. exxxpress Purged Topics 0 06-12-2003 11:32 AM
How do I change the icons for the news sections? vittala Purged Topics 0 04-17-2003 12:21 PM


All times are GMT -5. The time now is 08:15 AM.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.

LinkBacks Enabled by vBSEO 3.1.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