News:

Wondering if this will always be free?  See why free is better.

Main Menu

2.1 empty table column header question

Started by vbgamer45, September 08, 2021, 03:06:34 PM

Previous topic - Next topic

vbgamer45

Was working on updating a mod for SMF
Had this code
<table border="0" width="100%" class="windowbg">
<tr class="titlebg">
<td>&nbsp;</td>
<td>' , $txt['SMFQuiz_Common']['Quiz'] , '</td>
<td>' , $txt['SMFQuiz_Common']['Plays'] , '</td>
</tr>


What I found is it hid that column from showing even if there was data in it. In this case just an image.

if (isset($context['SMFQuiz']['popularQuizes']))
foreach ($context['SMFQuiz']['popularQuizes'] as $popularQuizRow)
{
echo ' <tr class="' , $counter % 2 == 1 ? 'windowbg' : 'windowbg' , '">
<td><img width="25" height="25" src="' , !empty($popularQuizRow['image']) ? $settings["default_images_url"] . '/quiz_images/Quizes/' . $popularQuizRow['image'] : $settings["default_images_url"] . '/quiz_images/Quizes/Default-64.png' , '"/></td>
<td width="100%"><table border="0" cellpadding="0" cellspacing="0"><tr><td><a href="' , $scripturl , '?action=SMFQuiz;sa=categories;id_quiz=' , $popularQuizRow['id_quiz'] , '">' , format_string($popularQuizRow['title']) , '</a>
';
if ($popularQuizRow['updated'] > $newDate)
echo '<td>&nbsp;<img src="' , $settings['default_images_url'] , '/quiz_images/new.gif"/></td>';

echo '
</td></tr></table></td>
<td align="center" class="nobr" >' , $popularQuizRow['quiz_plays'] , '</td>
</tr>
';
$counter++;
}

In order to fix. I had to add text to the column header.

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: