| View previous topic :: View next topic |
| Author |
Message |
Colocation Site Admin

Joined: Jan 07, 2004 Posts: 412
|
Posted: Wed Apr 21, 2004 10:02 pm Post subject: Drop Down Menu Widening |
|
|
On the add a link page the drop down menu for category selection is not currently wide enough to show the full category title.
product/product/thisisthefirst
product/product/thisisthesecond
In that case the drop down menu might only show
product/product/
Thus confusing the surfer with what appears to be duplicate categories.
I have had a look but cant find the answer for widening this menu:
| Code: |
$links_anonaddlinklock != 1 to $links_anonaddlinklock == 1 */
echo "<b>"._INSTRUCTIONS.":</b><br>"
."<strong><big>·;</big></strong> "._SUBMITONCE."<br>"
."<strong><big>·;</big></strong> "._SUBMITONCE2."<br>"
."<strong><big>·;</big></strong> "._SUBMITONCE3."<br>"
."<strong><big>·;</big></strong> "._POSTPENDING."<br>"
."<strong><big>·;</big></strong> "._USERANDIP."<br>"
."<form method=\"post\" action=\"links.html&l_op=Add\">"
.""._PAGETITLE.": <input type=\"text\" name=\"title\" size=\"90\" maxlength=\"100\"><br>"
.""._PAGEURL.": <input type=\"text\" name=\"url\" size=\"90\" maxlength=\"100\" value=\"http://\"><br>";
echo ""._CATEGORY.": <size=\"90\"><select name=\"cat\">";
$result2=sql_query("select cid, title, parentid from ".$prefix."_links_categories order by parentid,title", $dbi);
while(list($cid2, $ctitle2, $parentid2) = sql_fetch_row($result2, $dbi)) {
if ($parentid2!=0) $ctitle2=getparent($parentid2,$ctitle2);
echo "<option value=\"$cid2\">$ctitle2</option>"; |
|
|
| Back to top |
|
 |
Humpa Site Admin

Joined: Feb 05, 2004 Posts: 23
|
Posted: Wed Apr 21, 2004 11:14 pm Post subject: |
|
|
I'd have to test the code on that one.
I thought that the browser set the width for that option box. The browser sets the width of a dropdown menu depending on the length of the longest option.
I hardly look at phpnuke anymore, so I'm not so familar with it. What file is that code from?
What is this line?:
echo ""._CATEGORY.": <size=\"90\"><select name=\"cat\">";
What is the <size="90"> for ? I'm unfamilar with the size tag.
When you "view source" is the full name in there? (and not just product/product also). |
|
| Back to top |
|
 |
Colocation Site Admin

Joined: Jan 07, 2004 Posts: 412
|
Posted: Thu Apr 22, 2004 4:56 am Post subject: Further probing |
|
|
Viewing source revealed that the full product name is not there, this is how it looks:
| Code: |
| <option value="83">product/United States</option><option value="84">product/United States</option><option value="85">product/United States</option> |
When there should a third category following each.
Regarding this:
| Code: |
| echo ""._CATEGORY.": <size=\"90\"><select name=\"cat\">"; |
This code is from the modules/Web_links/index.php
The code:
I added in an attempt to elongate the menu, it had zero effect so seems irrelevant.
Thanks |
|
| Back to top |
|
 |
Colocation Site Admin

Joined: Jan 07, 2004 Posts: 412
|
Posted: Tue Apr 27, 2004 9:10 pm Post subject: Found it |
|
|
in index.php (weblinks) at the top of the file in
| Code: |
| function getparent($parentid,$title) |
look for
| Code: |
| $title=getparent($pparentid,$ptitle); |
change to
| Code: |
| $title=getparent($pparentid,$title); |
|
|
| Back to top |
|
 |
|