collapse

* User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Who's Online

  • Dot Guests: 43
  • Dot Hidden: 0
  • Dot Users: 1
  • Dot Users Online:

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: WOW> I'm so impressed at the developer involvement here at SP. Great stuff. Thank you!
    Yesterday at 11:42:03 PM
  • [SiNaN]: Feel free to customize it to your liking, however, this is the best we can currently offer.
    Yesterday at 08:19:04 AM
  • xeon365: ie where username profile link.. its just getting the membergroup color directly and adding it as inline style.. would be better if it instead just added the membergroup as a css class that can be styled by the theme
    October 29, 2014, 11:00:10 PM
  • xeon365: omg why isn't membergroup got proper css class.. not dumping inline css style
    October 29, 2014, 10:58:03 PM
  • BurkeKnight: [SiNaN] old friend. Great Job. I can't wait to see what you add next. :)
    October 13, 2014, 04:13:53 PM
  • [SiNaN]: Thank you everyone, for the kind words and support. For those who are interested, check out our Donators Program: [link]
    October 13, 2014, 11:57:44 AM
  • {OCS}MasterSeal: Glad to be here, glad to use your amazing portal THank you!
    October 13, 2014, 11:33:35 AM
  • Mike Vail: I'd like to donate to you for all your wonderful work. Do you guys have a place on your site to do that? THANKS FOR EVERYTHING!
    October 13, 2014, 11:12:16 AM
  • Mstcool: Yay, an update! :D
    October 12, 2014, 01:39:17 AM
  • stanyy: You're right. I have no idea how I got to the "Archived" index. It looks too similar.
    October 03, 2014, 11:38:32 AM
  • [SiNaN]: SimplePortal 2.3.5 package is listed in Stable SimplePortal Packages category in Downloads area.
    October 03, 2014, 06:08:01 AM
  • stanyy: SP 2.3.5 is not available in the downloads section?? The big download link on the homepage points newcomers to the downloads section who then download 2.3.4. Not good.
    October 03, 2014, 03:54:21 AM
  • Mulwa: if simpleportal team could make some of the blocks like articles to display photos just like how ebay does, it would be very great for shopping
    September 27, 2014, 08:24:14 AM
  • Mulwa: everybody is busy, no help for us this time
    September 26, 2014, 05:00:07 PM
  • [SiNaN]: That shows how simple but powerful SimplePortal is!
    September 26, 2014, 06:56:41 AM
  • oNLy1: thought the 'Blocks In Blocks' was going to be complicated - easy peasy - and was exactly what my site needed - ty
    September 20, 2014, 01:13:44 PM
  • P flex: Xup guys
    September 18, 2014, 08:29:06 AM
  • P flex: Xup
    September 18, 2014, 08:28:38 AM
  • Mstcool: :p *
    September 13, 2014, 07:55:49 PM
  • Mstcool: so when is a new version coming out? :o
    September 13, 2014, 07:55:45 PM

* Recent Posts

Re: Random member block? by Bullet
[Yesterday at 05:57:59 PM]


Random member block? by Tarista
[Yesterday at 12:17:13 PM]


Re: Blocks and Pages have completely disappeared. by meemo
[October 29, 2014, 08:51:08 AM]


Re: shoutbox chat direction (newbie question) by teamhft
[October 27, 2014, 06:15:53 PM]


Re: Board News; style topic based on the board id it was from by Bullet
[October 27, 2014, 06:13:55 PM]

Thanks for having an interest with our portal. If you have any requests for features, have a look at the Feature Requests board.

Author Topic: Recent topic with popup  (Read 3773 times)

0 Members and 1 Guest are viewing this topic.

Offline rocknroller

  • Jr. Member
  • **
  • Posts: 55
  • Gender: Male
  • Simple portal is great
    • Mini Chat - Domaca Pricaonica
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Recent topic with popup
« on: June 25, 2011, 02:20:49 AM »
..::Recent Topic with avatar and popup preview::..
Verson 1.2


Code: [Select]
/**
 * Recent Topic with avatar and popup preview
 * Version 1.2
 * @author logooff.net
 */
 
//SETUP

$number_of_posts =10; // here you can change number of posts
$default_avatar = 'http://www.pohrani.com/f/45/mu/1bzggGqq/noavatar.png'; // enter URL of default avatar you want. Like this 'http://www.url.com/image.jpg'

//SETUP END
global $contex, $txt, $settings;
$array = ssi_recentTopics($number_of_posts, null, null, 'array');
echo '
<table class="side_class_row">';
foreach ($array as $post)
{
global $memberContext;
      loadMemberData($post['poster']['id']);
      loadMemberContext($post['poster']['id']);
echo '
  <tr>
<td class="side_class_replies">', $post['replies'], '</td>
            <td  class="side_class_new">';
                if (!empty($post['new']) )
                    echo'';
                else
                    echo'
                    <img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="new" />';
             echo'
            </td>
            <td></td>
    <td><div class="triangle-isosceles" id="a', $post['topic'], '" style="display: none">', $post['preview'], '</div>
                    <a href="'. $post['href']. '" target="_self" onmouseover="document.getElementById(\'a', $post['topic'], '\').style.display = \'block\'" onmouseout="document.getElementById(\'a', $post['topic'], '\').style.display = \'none\'">', $post['short_subject'], '</a>
             </td>
<td>';
            if (!empty($memberContext[$post['poster']['id']]['avatar']['href'])){
echo '<img src="' . $memberContext[$post['poster']['id']]['avatar']['href'] . '" width="30" height="30" alt="', $post['poster']['name'], '" />';
                    }           
            else {
echo '<img src="' . $default_avatar .'" alt="default_avatar" width="30" height="30" />';
                }
        echo'
            </td>
            <td></td>
    </tr>
        <tr>
            <td colspan="6"><p class="side_class_poster"><span class="floatleft">', $txt['replies'], '</span> ', $post['poster']['link'], ' </p><hr class="side_hr" /></td>
        </tr>';
}
echo '
    </table>
<style type="text/css">
.side_class_poster
{
     font-size:10px;
     margin: 0;
     padding: 0;
     text-align: right;
}
table.side_class_row hr
     margin: 0;
     padding: 0;
}
.side_class_row
{
     padding:4px;
     width: 100%;
}
td.side_class_replies
{
     text-align:center;
     width:3%;
}
td.side_class_new
{
     text-align:center;
     width:3%;
}
.triangle-isosceles {
    position: fixed;
    top: 300px;
    left: 400px;
    padding:15px;
    margin:1em 0 3em;
    color:#fff;
    max-width: 400px;
    border: 1px solid #222222;
    -moz-border-radius:10px;
    -webkit-border-radius:10px;
    border-radius:10px;
    -moz-box-shadow: 3px 3px 39px 2px #222222;
    -webkit-box-shadow: 3px 3px 39px 2px #222222;
    box-shadow: 3px 3px 39px 2px #222222;
    background: -moz-linear-gradient(top, rgba(41,137,216,0.9) 0%, rgba(30,87,153,0.9) 94%, rgba(30,87,153,0.9) 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(41,137,216,0.9)), color-stop(94%,rgba(30,87,153,0.9)), color-stop(100%,rgba(30,87,153,0.9)));
    background: -webkit-linear-gradient(top, rgba(41,137,216,0.9) 0%,rgba(30,87,153,0.9) 94%,rgba(30,87,153,0.9) 100%);
    background: -o-linear-gradient(top, rgba(41,137,216,0.9) 0%,rgba(30,87,153,0.9) 94%,rgba(30,87,153,0.9) 100%);
    background: -ms-linear-gradient(top, rgba(41,137,216,0.9) 0%,rgba(30,87,153,0.9) 94%,rgba(30,87,153,0.9) 100%);
    background: linear-gradient(top, rgba(41,137,216,0.9) 0%,rgba(30,87,153,0.9) 94%,rgba(30,87,153,0.9) 100%);
    }
</style>';
Enjoy!


29.08.2011
Version 1.2
  • Added Setupable avatar


16.07.2011
  • Added avatar (thanx to blue)
  • Fixed XHTML validation
  • Added setup for number of posts
« Last Edit: August 29, 2011, 10:03:41 AM by rocknroller »
Tražite li mjesto za opuštanje, zabavu, Besplatno Upoznavanje, brbljanje i pricanje tu je Mini Chat HR, Domaci sajt sadrži sobe za druženje tj. chat za mobitel, isto kao i za stolna racunala. I to bez prijave email adrese, najbolje pricaonice su MiniChatHR.com

Offline Blue

  • Customizer
  • *
  • Posts: 378
  • Gender: Male
  • Block Maker? =P
Re: Recent topic with popup
« Reply #1 on: July 03, 2011, 07:59:47 AM »
Here, try this:

Code: [Select]
<?php

$array 
ssi_recentTopics(10nullnull'array');
global 
$contex$txt$settings;
echo 
'
<table class="side_class_row">
        <thead>
            <tr>
                <td>'
$txt['replies'], '</td>
                <td></td>
                <td></td>
<td></td>
                <td></td>
            </tr>
        <thead>'
;
foreach (
$array as $post)
{

global $memberContext;
      
loadMemberData($post['poster']['id']);
      
loadMemberContext($post['poster']['id']);


echo 
'
        <tbody>
  <tr>
<td class="side_class_replies">'
$post['replies'], '</td>
            <td  class="side_class_new">'
;
                if (!empty(
$post['new']) )
                    echo
'';
                else
                    echo
'
                    <img src="' 
$settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" />';
             echo
'
                </td>
                <td></td>
     <td>
                    <div class="triangle-isosceles" id="'
$post['topic'], '" style="display: none">'$post['preview'], '</div>
                    <a href="'
$post['href']. '" target="_self" onmouseover="document.getElementById(\''$post['topic'], '\').style.display = \'block\'" onmouseout="document.getElementById(\''$post['topic'], '\').style.display = \'none\'">'$post['short_subject'], '</a>
                </td>
<td><img src="' 
$memberContext[$post['poster']['id']]['avatar']['href'] . '" width="30px" height="30px" /></td>
                <td class="side_class_poster"><pre> '
$post['poster']['name'], ' </pre> </td>
     </tr>
            <tr>
                <td colspan="5"><hr></td>
            </tr>
        </tbody>'
;
}
echo 
'
    </table> 
<style> 
.side_class_poster pre
{
     font-size:10px;
}
.side_class_row
{
     padding:4px;
     width: 100%;
}
td.side_class_replies
{
     text-align:center;
     width:3%;
}
td.side_class_new
{
     text-align:center;
     width:3%;
}
.triangle-isosceles {
    position: fixed;
    top: 300px;
    left: 400px;
    padding:15px;
    margin:1em 0 3em;
    color:#fff;
    max-width: 400px;
    border: 1px solid #222222;
    -moz-border-radius:10px;
    -webkit-border-radius:10px;
    border-radius:10px;
    -moz-box-shadow: 3px 3px 39px 2px #222222;
    -webkit-box-shadow: 3px 3px 39px 2px #222222;
    box-shadow: 3px 3px 39px 2px #222222;
    background: -moz-linear-gradient(top, rgba(41,137,216,0.9) 0%, rgba(30,87,153,0.9) 94%, rgba(30,87,153,0.9) 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(41,137,216,0.9)), color-stop(94%,rgba(30,87,153,0.9)), color-stop(100%,rgba(30,87,153,0.9)));
    background: -webkit-linear-gradient(top, rgba(41,137,216,0.9) 0%,rgba(30,87,153,0.9) 94%,rgba(30,87,153,0.9) 100%);
    background: -o-linear-gradient(top, rgba(41,137,216,0.9) 0%,rgba(30,87,153,0.9) 94%,rgba(30,87,153,0.9) 100%);
    background: -ms-linear-gradient(top, rgba(41,137,216,0.9) 0%,rgba(30,87,153,0.9) 94%,rgba(30,87,153,0.9) 100%);
    background: linear-gradient(top, rgba(41,137,216,0.9) 0%,rgba(30,87,153,0.9) 94%,rgba(30,87,153,0.9) 100%);
    }
</style>'
;

?>
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Offline agent47

  • Jr. Member
  • **
  • Posts: 63
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Recent topic with popup
« Reply #2 on: July 03, 2011, 09:19:48 AM »
Wow this looks so awesome.... I wish someone would implement this for this mod. It'll look so awesome.

Offline Blue

  • Customizer
  • *
  • Posts: 378
  • Gender: Male
  • Block Maker? =P
Re: Recent topic with popup
« Reply #3 on: July 03, 2011, 09:32:40 AM »
I have to re-do that block since that was my first block ever  ;P

Maybe, when I start I'll ask rocknroller if I can use his code.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Offline rocknroller

  • Jr. Member
  • **
  • Posts: 55
  • Gender: Male
  • Simple portal is great
    • Mini Chat - Domaca Pricaonica
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Recent topic with popup
« Reply #4 on: July 03, 2011, 09:44:25 AM »
I have to re-do that block since that was my first block ever  ;P

Maybe, when I start I'll ask rocknroller if I can use his code.

tnx friend for avatar, sure you can use it. I'm glad that someone like this code.  :D
Tražite li mjesto za opuštanje, zabavu, Besplatno Upoznavanje, brbljanje i pricanje tu je Mini Chat HR, Domaci sajt sadrži sobe za druženje tj. chat za mobitel, isto kao i za stolna racunala. I to bez prijave email adrese, najbolje pricaonice su MiniChatHR.com

Offline Blue

  • Customizer
  • *
  • Posts: 378
  • Gender: Male
  • Block Maker? =P
Re: Recent topic with popup
« Reply #5 on: July 03, 2011, 10:01:39 AM »
Glad I could help ;)
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Offline agent47

  • Jr. Member
  • **
  • Posts: 63
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Recent topic with popup
« Reply #6 on: July 03, 2011, 10:07:23 AM »
You guys rule!

Offline S@ffz

  • Jr. Member
  • **
  • Posts: 58
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Recent topic with popup
« Reply #7 on: August 11, 2011, 07:26:28 PM »
I have to re-do that block since that was my first block ever  ;P

Maybe, when I start I'll ask rocknroller if I can use his code.

Are you still going too Blue?
 is it possible to reduce the amount of topics displayed?
« Last Edit: August 11, 2011, 07:30:36 PM by saffz »

Offline rocknroller

  • Jr. Member
  • **
  • Posts: 55
  • Gender: Male
  • Simple portal is great
    • Mini Chat - Domaca Pricaonica
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Recent topic with popup
« Reply #8 on: August 16, 2011, 03:18:41 PM »
I have to re-do that block since that was my first block ever  ;P

Maybe, when I start I'll ask rocknroller if I can use his code.

Are you still going too Blue?
is it possible to reduce the amount of topics displayed?

Edited first post.. :)
Tražite li mjesto za opuštanje, zabavu, Besplatno Upoznavanje, brbljanje i pricanje tu je Mini Chat HR, Domaci sajt sadrži sobe za druženje tj. chat za mobitel, isto kao i za stolna racunala. I to bez prijave email adrese, najbolje pricaonice su MiniChatHR.com

Offline S@ffz

  • Jr. Member
  • **
  • Posts: 58
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Recent topic with popup
« Reply #9 on: August 28, 2011, 03:59:00 PM »
Thanks rocknroller

One more Question how can I tidy the contents displayed in the block as they are very space apart and almost looks
bare.   As you can see from the attached image 5 post are displayed and there is a scroll bar at the bottom.   :(
and I don't know how or where to tidy this block.  Any help would be much appreciated.

Offline rocknroller

  • Jr. Member
  • **
  • Posts: 55
  • Gender: Male
  • Simple portal is great
    • Mini Chat - Domaca Pricaonica
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Recent topic with popup
« Reply #10 on: August 29, 2011, 09:24:31 AM »
Thanks rocknroller

One more Question how can I tidy the contents displayed in the block as they are very space apart and almost looks
bare.   As you can see from the attached image 5 post are displayed and there is a scroll bar at the bottom.   :(
and I don't know how or where to tidy this block.  Any help would be much appreciated.

i was changed code in first post today with newer version, first change the code and is still have problem send me link of your forum, so can check with firebug. :)
« Last Edit: August 29, 2011, 10:05:18 AM by rocknroller »
Tražite li mjesto za opuštanje, zabavu, Besplatno Upoznavanje, brbljanje i pricanje tu je Mini Chat HR, Domaci sajt sadrži sobe za druženje tj. chat za mobitel, isto kao i za stolna racunala. I to bez prijave email adrese, najbolje pricaonice su MiniChatHR.com

Offline S@ffz

  • Jr. Member
  • **
  • Posts: 58
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Recent topic with popup
« Reply #11 on: October 19, 2011, 03:14:27 AM »
Great block guys

thanks  ;D
« Last Edit: October 19, 2011, 03:19:48 AM by saffz »

Offline FrizzleFried

  • Full Member
  • ***
  • Posts: 114
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Re: Recent topic with popup
« Reply #12 on: April 04, 2012, 12:41:50 AM »
Was wondering if there is a way to limit the forums this block looks for... I have a NSFW forum i want it to ignore.

Offline fapencio

  • Semi Newbie
  • *
  • Posts: 47
  • Gender: Male
    • boomboxmania
  • SMF Version: 2.0.7
  • SP Version: 2.3.5
Re: Recent topic with popup
« Reply #13 on: April 04, 2014, 08:26:04 PM »
awesome! thanks  :thumbsup: :applause:
Theme: Default

Offline Schnuffeltier

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Female
  • SMF Version: 2.0.7
  • SP Version: 2.3.5
Re: Recent topic with popup
« Reply #14 on: April 06, 2014, 11:48:53 AM »
Wow! This is really fantastic! I like the popups very much!

Would it be possible to add the popups to this code?

Code: [Select]
global $context, $settings, $scripturl, $txt;
global $user_info, $modSettings, $smcFunc, $posts;
global $color_profile;

$exclude_boards = null;
$num_recent = !empty($parameters[0]) ? $parameters[0] :  (isset($_GET['limit']) ? (int) $_GET['limit'] : 20);

if ($exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)
$exclude_boards = array($modSettings['recycle_board']);
else
$exclude_boards = empty($exclude_boards) ? array() : $exclude_boards;

$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

// Find all the posts in distinct topics.  Newer ones will have higher IDs.
$request = $smcFunc['db_query']('','
SELECT
m.poster_time, ms.subject, m.id_topic, m.id_member, m.id_msg, b.id_board, t.num_replies, t.num_views, b.name AS bName,
IFNULL(mem.real_name, m.poster_name) AS poster_name, ' . ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' : '
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ', LEFT(m.body, 384) AS body, m.smileys_enabled, mf.icon
FROM ({db_prefix}messages AS m, {db_prefix}topics AS t, {db_prefix}boards AS b, {db_prefix}messages AS ms)
INNER JOIN {db_prefix}messages AS mf ON (mf.id_msg = t.id_first_msg)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)' . (!$user_info['is_guest'] ? '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:id_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:id_member})' : '') . '
WHERE t.ID_LAST_MSG >= ' . ($modSettings['maxMsgID'] - 35 * min($num_recent, 5)) . '
AND t.id_last_msg = m.id_msg
AND b.id_board = t.id_board' . (empty($exclude_boards) ? '' : '
AND b.id_board NOT IN ({array_int:exclude_boards})'). '
AND {raw:query_see_board}
AND ms.id_msg = t.id_last_msg
ORDER BY t.id_last_msg DESC
LIMIT {int:limit}',
array(
'id_member' => $user_info['id'],
'exclude_boards' => $exclude_boards,
'query_see_board' => $user_info['query_wanna_see_board'],
'limit' => (int) $num_recent,
)
);
$posts = array();
$colorids = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
$row['body'] = strip_tags(strtr(parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']), array('<br />' => '')));
if ($smcFunc['strlen']($row['body']) > 128)
$row['body'] = $smcFunc['substr']($row['body'], 0, 128) . '...';

// Censor the subject.
                  $row['subject'] = preg_replace('/^' . preg_quote($txt['response_prefix']) . '/', '', $row['subject']);
censorText($row['subject']);
censorText($row['body']);

//Collect the color ids :)
$colorids[$row['id_member']] = $row['id_member'];

if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
$icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif') ? 'images_url' : 'default_images_url';

// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['id_board'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['id_board'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['id_board'] . '.0">' . $row['bName'] . '</a>'
),
'topic' => $row['id_topic'],
'poster' => array(
'id' => $row['id_member'],
'name' => $row['poster_name'],
'href' => empty($row['id_member']) ? '' : $scripturl . '?action=profile;u=' . $row['id_member'],
'link' => empty($row['id_member']) ? $row['poster_name'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['poster_name'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => shorten_subject($row['subject'], 25),
'preview' => $row['body'],
'time' => timeformat($row['poster_time']),
'timestamp' => forum_time(true, $row['poster_time']),
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . ';topicseen#new',
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#new">' . $row['subject'] . '</a>',
'new' => !empty($row['is_read']),
'new_from' => $row['new_from'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
'views' => $row['num_views'],
'replies' => $row['num_replies'],
);
}
$smcFunc['db_free_result']($request);

// Load recent topic posts colors =)
if(!empty($colorids) && sp_loadColors($colorids) !== false)
foreach($posts as $k => $p)
if(!empty($color_profile[$p['poster']['id']]['link']))
$posts[$k]['poster']['link'] = $color_profile[$p['poster']['id']]['link'];

$context['recent_topics']=$posts;

// Just return it.
if (empty($posts))
return $posts;

echo '
<div class="tborder">
<table cellspacing="0" width="100%">
<tr class="catbg">

</tr>
<tr>
<td style="padding: 5px;">
</td> ';
foreach ($posts as $post)
echo '
<tr>
<td align="center" valign="middle" nowrap="nowrap">
', $post['icon'], '
</td>
<td valign="middle" width="%100">
<div style="font-size: 11px;"><b>
<a href="', $post['href'], '">', $post['subject'], '</a>
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt['new'] . '" border="0" /></a>', '</b></div><div style="font-size: 9px;">von ', $post['poster']['link'], ' in ', $post['board']['link'], ' </br> ', $post['time'], '

| Klicks: ', $post['views'], ' | Antworten: ', $post['replies'], '</font><hr>
</td>
</tr>';
echo '
</table></div>';