SimplePortal

Customization => Custom Coding => Topic started by: necrit on April 28, 2009, 06:48:33 PM

Title: Modified Board News Block
Post by: necrit on April 28, 2009, 06:48:33 PM
The current version of simple portal is hands down amazing.  No other competitor even comes close :D.

Is there a configuration i missed or what do i need to modify to have the board news block show a custom title as its header and put each topic as a small section header inside the content itself?

For example an announcements board as well as a tailored news board (all are separated by different board id's) well they would individually post on the front page to users based on board settings.  This block's Script appears to show its output and layout design, yet by looking at the code i cannot see where to actually change its appears on the admin page to alter its configuration behavior. 
(I'm just getting used to Simple Portal...why the heck i didn't scrap my old joomla portal earlier i dunno )

OK figured it out on my own.  Had to frankenstein several snippets from boards all over.  This is not mine just more put together from your um.....competitor..but at least the code is here now.
Find this...
Code: [Select]
ssi_recentTopics('1', NULL, array('2'), 'array')

Replace with 1 being the number of topics to show and array('2',num,num,etc) being any number of boards you wish to INCLUDE.  I cannot tell you how excited i am to find that SMF 2.0 changed to allow an inclusion list.

Code: [Select]

global $scripturl;

echo '
                        <table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor"> ';
       $what=ssi_recentTopics('1', NULL, array('2'), 'array');


        foreach ($what as $topic)
        {
                echo '
                                <tr>
                                        <td class="windowbg" valign="middle">
                                                ', $topic['link'];

                // Is this topic new? (assuming they are logged in!)
                if (!$topic['new'] && $context['user']['is_logged'])
                        echo '
                                                <a href="', $scripturl, '?topic=', $topic['topic'], '.from', $topic['new_from'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';

                echo '
                                        </td>
                                        <td class="windowbg2" valign="middle" width="20%">
                                                ', $topic['poster']['link'], '
                                        </td>
                                        <td class="windowbg2" valign="middle" width="35%">';
                if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif'))
                        echo '
                                        <a href="', $topic['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt[111], '" title="', $txt[111], '" border="0" style="float: right;" /></a>';
                echo '
                                                <span class="smalltext">
                                                        ', $topic['time'], '
                                                </span>
                                        </td>
                                </tr>';
        }

        echo '
                        </table>';
SimplePortal 2.3.8 © 2008-2024, SimplePortal