SimplePortal

Customization => Custom Coding => Topic started by: Dzonny on October 13, 2013, 08:28:05 PM

Title: Top Topics style
Post by: Dzonny on October 13, 2013, 08:28:05 PM
Heya there! :)

I would like to have this block showing 6 topics inside two columns (2 columns x 3 topics) and I'm having trouble making it work...
I removed number of views/replies, as I don't need it, and need some help with changing PortalBlocks.php file.
Attached is sample preview of what i'd like block to looks like.

Thanks! :)
Title: Re: Top Topics style
Post by: Dzonny on October 14, 2013, 04:05:02 PM
Any suggestions please? :)
Title: Re: Top Topics style
Post by: [SiNaN] on October 14, 2013, 04:16:32 PM
Sources/PortalBlocks.php

Code: (Find) [Select]
echo '
<ul class="sp_list">';

foreach ($topics as $topic)
echo '
<li class="sp_list_top">', sp_embed_image('topic'), ' ', $topic['link'], '</li>
<li class="sp_list_indent', empty($topic['is_last']) ? ' sp_list_bottom' : '', ' smalltext">', $txt['replies'], ': ', $topic['num_replies'], ' | ', $txt['views'], ': ', $topic['num_views'], '</li>';

Code: (Replace) [Select]
echo '
<ul class="sp_list sp_two_column_list">';

foreach ($topics as $topic)
echo '
<li>', $topic['link'], '</li>';

Themes/default/css/portal.css

Code: (Add to end) [Select]
.sp_two_column_list li
{
float: left;
width: 50%;
}
Title: Re: Top Topics style
Post by: Dzonny on October 14, 2013, 05:34:22 PM
That's it, thanks! :)

Now I see that I'll stick with SP for sure :)
SimplePortal 2.3.8 © 2008-2024, SimplePortal