News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

help where is this array created $category['link']

Started by tbobker, July 06, 2006, 11:53:55 AM

Previous topic - Next topic

tbobker

Im trying to change the colors of the catagory links, but as im doing it sometimes it works most of the time not. I noticed that the links dont have a class or id, so i want to add one.

i found the main reference to them near the top in Boardindex.php but i cant see where the array is created.

here is the code that i found.

// Show the "Board name      Topics  Posts    Last Post" header.
echo '
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor">
<tr class="titlebg">
<td colspan="2">', $txt[20], '</td>
<td width="6%" align="center">', $txt[330], '</td>
<td width="6%" align="center">', $txt[21], '</td>
<td width="22%" align="center">', $txt[22], '</td>
</tr>';

/* Each category in categories is made up of:
id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down iamge),
and boards. (see below.) */
foreach ($context['categories'] as $category)
{
// Show the category's name, and let them collapse it... if they feel like it.
echo '
<tr>
<td colspan="5" class="catbg" height="18">';

// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])
echo '
<a href="', $category['collapse_href'], '">', $category['collapse_image'], '</a>';

echo '
', $category['link'], '
</td>
</tr>';

Advertisement: