|
|
Joined: Jan 2005
Posts: 39
User
|
User
Joined: Jan 2005
Posts: 39 |
I would like to add a scroller to one of my [/u]custombox#pal.php[/u] file(s), like the ShoutBox has. Is this possible to do? And if so, can someone post the script? Thank You!
|
|
|
|
Joined: Jan 2005
Posts: 39
User
|
User
Joined: Jan 2005
Posts: 39 |
I would like to thank whoever rated this post, but that's not what I need right now. I need an answer.
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
depends on the script you are placing in the customebox.. its either gonna be an html way or a javascript way
|
|
|
|
Joined: Jan 2005
Posts: 39
User
|
User
Joined: Jan 2005
Posts: 39 |
[] scroungr said:depends on the script you are placing in the customebox.. its either gonna be an html way or a javascript way [/] I want to display a custombox that will show the names of the members who donated to our forum - the list is quite long. This is why I need that scroll-bar like you see on the ShoutBox. I haven't the foggiest idea on how to do it, this is why I'm requesting assistance from one of you guys/gals...
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
ok so what your gonna do is pull from a mysql table the names? or from a flat file? non the less you will probably be doing it in php script.. using some html perhaps?
Since scrollbars (horiz & vert) are added automatically if the option's text is larger than the select's size...
<select name="MyList" size="7"> <option value="1">Name 1</option> <option value="2">Name 2</option> <option value="3">Name 3</option> <option value="4">Name 4</option> <option value="5">Name 5</option> <option value="6">Name 6</option> <option value="7">Name 7</option> <option value="8">Name 8</option> <option value="9">Name 9</option> <option value="10">Name 10</option> <option value="11">Name 11</option> <option value="12">Name 12</option> </select>
in this example the 7 thru 12 wouldn't be shown and a scroll bar would appear then you could scroll down if you wish..
you could make the above a php script with a for and a loop statement or you could do it as the shoutbox does
$query = " SELECT contributorname FROM {$config['tbprefix']}mylist ORDER BY contribution DESC LIMIT 0,10 "; $sth = $dbh -> do_query($query); while ( list($contributorname) = $dbh -> fetch_array($sth)) { $contributors = "<tr><td align="left" title="-" >$contributorname</td></tr>"; }
echo <<<UBBTPRINT <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Contributor List</title> <script language="javascript" type="text/javascript" src="{$config['phpurl']}/pals/java/javapal.php"></script> $myLang $styleLink <style type="text/css"> body { margin: 0px; padding: 0px; } </style> </head> <body onload="window.scrollTo(0,99999)"> <table style="table-layout: fixed" width="100%" border="0" cellspacing="0" cellpadding="2"> $contributors </table> UBBTPRINT;
couple of ways to do it..
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 1,157
Joined: July 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|