SimplePortal
Development => Feature Requests => Topic started by: ARG on November 30, 2011, 12:20:51 PM
-
I was not sure where to post this since I am not allowed to start a new topic in Block Modifications and Custom Coding seemed to have similar topics redirected here.
Is there something that can be done to insert staff members horizontally and in ID order such as for use in a Footer block?
Example in attachment.
;)
-
That seems a natural request, now that we've got that wider bottom block.
That should certainly be possible. The template for that is right in PortalBlocks.php.
I wonder if I can interest any of our customizers in this?
-
Now that I know where it is maybe I can come up with something. If i do I will post it here.
Thanx. ;)
-
I'll consider this as an improvement to the Staff List block. Here's how you can change it now:
Sources/PortalBlocks.php
echo '
<table class="sp_fullwidth">';
foreach ($staff_list as $staff)
echo '
<tr>
<td class="sp_staff sp_center">', !empty($staff['avatar']['href']) ? '
<a href="' . $scripturl . '?action=profile;u=' . $staff['id'] . '"><img src="' . $staff['avatar']['href'] . '" alt="' . $staff['name'] . '" width="40" /></a>' : '', '
</td>
<td class="sp_staff_info', $staff_count != ++$count ? ' sp_staff_divider' : '', '">
', sp_embed_image($icons[$staff['type']]), ' ', $staff['link'], '<br />
', $staff['group'], '
</td>
</tr>';
echo '
</table>';
echo '
<table>
<tr>';
foreach ($staff_list as $staff)
echo '
<td class="sp_staff sp_center">', !empty($staff['avatar']['href']) ? '
<a href="' . $scripturl . '?action=profile;u=' . $staff['id'] . '"><img src="' . $staff['avatar']['href'] . '" alt="' . $staff['name'] . '" width="40" /></a>' : '', '
</td>
<td class="sp_staff_info">
', sp_embed_image($icons[$staff['type']]), ' ', $staff['link'], '<br />
', $staff['group'], '
</td>';
echo '
</tr>
</table>';
-
Lol, it took me a while but that is almost same thing that I came up with only I added a center align.
http://associationamerica.com/index.php?action=forum
You're just too quick. :D
echo '
<table border="0" align="center">
<tr>';
foreach ($staff_list as $staff)
echo '
<td class="sp_staff sp_center">', !empty($staff['avatar']['href']) ? '
<a href="' . $scripturl . '?action=profile;u=' . $staff['id'] . '"><img src="' . $staff['avatar']['href'] . '" alt="' . $staff['name'] . '" width="40" /></a>' : '', '
</td>
<td class="sp_staff_info">
', sp_embed_image($icons[$staff['type']]), ' ', $staff['link'], '<br />
', $staff['group'], '
</td>';
echo '
</tr>
</table>';
Edit: Oh, plus I removed the dotted border at the bottom to clean it up a bit.
-
Oh my!!! You are just too true to be good. How do you manage to write and research on such wonderful things? You have inspired me to work harder now. I shall try as much as possible to enjoy life to the fullest and be satiated with the wonderful things that are around me, which I have been unaware of until now.