The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I'm having issues with 2 small things that are cosmetic related for an adminCP page.
1. I can't get the "check all" box to actually work. Checkbox elements appear, and all of the element values like name, id, value, seem to be added to them just fine. When you hover over the box, it doesn't display the value like it's supposed to and when you click the "check all" box it has no effect ![]() ![]() Code:
//lets start putting the page together with all the elements described above print_cp_header('Thread Creation'); print_table_start('download2newthreadadmin'); print_table_header("Files Without Threads - Total entries: $logs - Page: $page of $totalpages", 5); echo '<tr><td class="thead">User</td><td class="thead">File</td><td class="thead">Date</td><td class="thead">File Size</td><td class="thead"><strong>Create Thread?</strong><br /><input type="checkbox" name="allbox" title="'.$vbphrase[check_all].'" onclick="js_check_all(this.form);" /><label for="allbox">'.$vbphrase[check_all].'</label></td></tr>'; while ($filelist = $db->fetch_array($result)) { $class = fetch_row_bgclass(); echo '<tr><td class="'.$class.'"><a href="user.php?' . $vbulletin->session->vars['sessionurl'] . 'do=edit&u='.$filelist['uploaderid'].'">'.$filelist['uploader'].'</a></td><td class="'.$class.'"><a href="../downloads.php?do=file&id='.$filelist['id'].'">'.$filelist['name'].'</a></td><td class="'.$class.'"><span class="smallfont">'.vbdate($vbulletin->options['logdateformat'], $filelist['date']).'</span></td><td class="'.$class.'">'.vb_number_format($filelist['size'], 0, true).'</td><td class="'.$class.'"><input type="checkbox" name="'.$filelist['name'].'" id="'.$filelist['id'].'" value="'.$filelist['name'].'" /><label for="'.$filelist['name'].'">'.$vbphrase[yes].'</label></td></tr>'; } //end of while loop for while ($filelist = $db->fetch_array($result)) print_label_row("$firstpage $prevpage $nextpage $lastpage"); print_submit_row('Create Threads for Selected Files'); print_cp_footer(); Here's what that code produces in raw HTML with a few comments added: Code:
<table class="tborder" width="90%" cellspacing="0" cellpadding="4" border="0" align="center" style="border-collapse:separate"> <tbody> <tr> <td class="tcat" align="center" colspan="5"> <b>Files Without Threads - Total entries: 163 - Page: 1 of 33</b> </td> </tr> <tr> <td class="thead">User</td> <td class="thead">File</td> <td class="thead">Date</td> <td class="thead">File Size</td> //here's the section for the "check all" box <td class="thead"> <strong>Create Thread?</strong> <br> <input type="checkbox" onclick="js_check_all(this.form);" title="Check All" name="allbox"> <label for="allbox">Check All</label> </td> //end "check all" box </tr> // finish off the table header //here's where each entry starts, beginning of entry 1 <tr> <td class="alt1"> <a href="user.php?do=edit&u=23">patrick4588</a> </td> <td class="alt1"> <a href="../downloads.php?do=file&id=163">HiPoint 995</a> </td> <td class="alt1"> <span class="smallfont">19:36, 11th Jul 2011</span> </td> <td class="alt1">4.02 MB</td> <td class="alt1"> <input id="163" type="checkbox" value="HiPoint 995" name="HiPoint 995"> <label for="HiPoint 995">Yes</label> </td> </tr> //end of entry 1 //code repeats TR and TD tags properly for all other entries in the table, and all entries have proper info pulled from the DB and displayed. This would be entry 2 and so on.... <tr><td></td></tr> // end of entry 2 <tr><td></td></tr> // end of entry 3, blah <tr><td></td></tr> // end of entry 4, and so on //finished listing all items in the table so on to the bottom //start pagination code <tr valign="top"> <td class="alt2"> <input class="button" type="button" onclick="window.location='download2newthreadadmin.php?do=precreate&throttle=5&createtype=selectivecreate&page=2'" tabindex="1" value="Next Page >"> <input class="button" type="button" onclick="window.location='download2newthreadadmin.php?do=precreate&throttle=5&createtype=selectivecreate&page=33'" tabindex="1" value="Last Page ?"> </td> <td class="alt2"> </td> </tr> //end pagination code //buttons for "create" and "reset" <tr> <td class="tfoot" align="center" colspan="2"> <input id="submit0" class="button" type="submit" accesskey="s" value="Create Threads for Selected Files" tabindex="1"> <input id="reset0" class="button" type="reset" accesskey="r" value=" Reset " tabindex="1"> </td> </tr> //end "create" and "reset" buttons </tbody> </table> The second issue relates to the same code above and should be easy but I've had no luck. How do I get : Code:
print_label_row("$firstpage $prevpage $nextpage $lastpage"); print_submit_row('Create Threads for Selected Files'); Sorry for begging for help with such petty stuff but I've got a headache from staring at it for too long ![]() --------------- Added [DATE]1323030762[/DATE] at [TIME]1323030762[/TIME] --------------- Holy crap I'm retarded! ![]() Figured out problem one. Seems I was so focused on the actual checkboxes and element values that I completely forgot to make the elements part of a form. ![]() Adding this above print_table_header fixed it: Code:
print_form_header('download2newthreadadmin', 'createthreads'); So now I just help with colspan issue in problem #2. Thanks in advance! |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|