The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#5
|
||||
|
||||
![]()
I was getting help from stack overflow. This looks like it might work, have not tried it yet. The poster indicated that code needs to be changed to get this to work in a widget. What do I need to change in the following code to get it to work, along with where to I place the css file (additional.css)??? Thanks.
Code:
<?php $count = 0; $input = 'https://www.fdic.gov/bank/individual/failed/banklist.csv'; echo "<html><body><table width='250' class='TFtable' >"; echo "<tr>"; echo "<th bgcolor=#222937><FONT COLOR=WHITE SIZE=3>Bank Name</FONT></th>"; echo "<th bgcolor=#222937><FONT COLOR=WHITE SIZE=3>City</FONT></th>"; echo "<th bgcolor=#222937><FONT COLOR=WHITE SIZE=3>Acq. Institution</FONT></th>"; echo "<th bgcolor=#222937><FONT COLOR=WHITE SIZE=3>Closing Date</FONT></th>"; echo "</tr>"; if (false !== ($ih = fopen($input, 'r'))) { fgetcsv($ih); while (false !== ($data = fgetcsv($ih))) { $outputData = array($data[0], $data[1], $data[4], $data[5]); echo "<tr>"; foreach ($outputData as $row) { echo "<td><FONT COLOR=D3AB04 SIZE=2>" . htmlspecialchars($row) . "</FONT></td>"; $count++; } echo "</tr>"; } fclose($ih); echo "</table></body></html>"; } ?> Code:
<style type="text/css"> .TFtable{ width:100%; border-collapse:collapse; } .TFtable td{ padding:7px; border:#4e95f4 1px solid; } /* provide some minimal visual accomodation for IE8 and below */ .TFtable tr{ background: #b8d1f3; } /* Define the background color for all the ODD background rows */ .TFtable tr:nth-child(odd){ background: #b8d1f3; } /* Define the background color for all the EVEN background rows */ .TFtable tr:nth-child(even){ background: #dae5f4; } </style> Quote:
Ok, thanks. That is what someone on stackoverflow did. Could you please let me know what I need to change in the above code to get it to work in the widget? You mentioned something about the object? Also, how do I get the css to work? Thanks again! --------------- Added [DATE]1432184792[/DATE] at [TIME]1432184792[/TIME] --------------- Hey that worked nice!!! How do I get rid of the borders? ALso, what do I need to change in the code to get it to run in a widget? Thanks again! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|