Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: glennmckenna on October 03, 2015, 10:32:33 AM

Title: looking for a way to fetch most poular posts and most recent posts
Post by: glennmckenna on October 03, 2015, 10:32:33 AM
hello everyone,
today i'm looking to find a way to fetch recent posts and popular posts, these will be both on the same page but apart (two different blocs)
for the recent posts i was hoping for something like on this forum
http://fs-uk.com/forum/index.php
and then for popular topics something like the recent posts part on this page
http://fs-uk.com/
i was wondering weather the was a way for me to "cheat" by using the SSI.php like i'll be doing to get the theme
or will i have to create my own script ? if so please could omeone point me in the direction as of how to go ahead for creating that
my i also just add that would like them to auto update every so often, maybe a reload time that can be set some were in the code
i would also like the option to set it for only one section of the forum but i'm not sure on that yet)
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: Kindred on October 03, 2015, 04:23:41 PM
Have you bothered to read the ssi faq? Or looked at ssi_examples.php on your own site?
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: glennmckenna on October 08, 2015, 03:49:12 PM
Quote from: Kindred on October 03, 2015, 04:23:41 PM
Have you bothered to read the ssi faq? Or looked at ssi_examples.php on your own site?
that's what i thought that there is something that existed
but is there any way to restyle them a bit for the home page (forgot to add that little information)
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: Kindred on October 08, 2015, 04:48:44 PM
Yes..  read the ssi faq..  specifically use array instead of echo for the function call type
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: glennmckenna on October 09, 2015, 04:17:16 PM
Quote from: Kindred on October 08, 2015, 04:48:44 PM
Yes..  read the ssi faq..  specifically use array instead of echo for the function call type
okay many thanks
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: glennmckenna on May 15, 2016, 08:27:16 AM
sorry for the late reply

i've been looking at this i've been able to get a list of what i want
http://beta.mdl-palissy.fr/ (http://beta.mdl-palissy.fr/)

but i can't figure out how to add css to it
do i have to do like the topic cretor did in this topic
http://www.simplemachines.org/community/index.php?topic=208011.0 (http://www.simplemachines.org/community/index.php?topic=208011.0)

i've tried looking in the faq but i wasn't able to find how to do it using arrays rather that echo

(i bet that it was right under my nose the page)
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: glennmckenna on May 15, 2016, 09:20:29 AM
ok i've found the topic
http://www.simplemachines.org/community/index.php?topic=13016.0 (http://www.simplemachines.org/community/index.php?topic=13016.0)
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: Kindred on May 15, 2016, 03:40:51 PM
or you could have looked in the obvious place...


http://wiki.simplemachines.org/smf/Category:Integrating_SMF
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: glennmckenna on May 15, 2016, 04:38:51 PM
Quote from: Kindred on May 15, 2016, 03:40:51 PM
or you could have looked in the obvious place...


http://wiki.simplemachines.org/smf/Category:Integrating_SMF
just as i said right under my nose thanks

right so if i've understood correctly this is what i need to type for the recent topics

$rec = ssi_recentTopics();

foreach ($rec as $recent)
{
echo '
<table border="0" class="ssi_table">
                             <tbody>
<tr>
<td><b>', $recent['section'], '</b></td>
<td><b>', $recent['subject'], '</b></td>
<td><b>', $recent['date'], '</b></td>
                                </tr>
                             </tbody>
</table>';
}


or is that wrong ?
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: Kindred on May 15, 2016, 05:31:08 PM
$rec = ssi_recentTopics(10,NULL, NULL,'array');
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: glennmckenna on May 16, 2016, 07:46:51 AM
Quote from: Kindred on May 15, 2016, 05:31:08 PM
$rec = ssi_recentTopics(10,NULL, NULL,'array');
thanks for the answer bu all i'm getting is the subject, not the section nore the date
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: Kindred on May 16, 2016, 07:50:33 AM
look in ssi.php for the actual variable names....   I am fairly certain that section is not the correct variable since we don't use that term anywhere else in the code....   date is probably wrong as well
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: Arantor on May 16, 2016, 08:55:14 AM
Do a print_r on $rec to see what you get back.
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: glennmckenna on May 16, 2016, 09:13:57 AM
i've followed what was written in the ssi exaple.php file and this is the code that i copied

$rec = ssi_recentTopics(10, NULL, NULL,'array');

foreach ($rec as $recent)
{
    echo '<pre>', print_r($topic), '</pre>';
    echo '
<li><a href="', $topic['href'], '">', $topic['subject'], '</a> ', $txt['by'], ' ', $topics[$i]['poster']['link'], '</li>';

}


but all i'm getting is :
beta.mdl-palissy.fr (http://beta.mdl-palissy.fr)
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: Shambles on May 16, 2016, 11:58:44 AM
I think this is what Arantor meant:

$rec = ssi_recentTopics(10, NULL, NULL,'array');
echo '<pre>'; print_r($rec); echo '</pre>';
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: glennmckenna on May 16, 2016, 12:06:26 PM
Quote from: Shambles on May 16, 2016, 11:58:44 AM
I think this is what Arantor meant:

$rec = ssi_recentTopics(10, NULL, NULL,'array');
echo '<pre>'; print_r($rec); echo '</pre>';

ah yes stupid me
here you go
http://beta.mdl-palissy.fr/

and here is what it returned:
Array
(
    [0] => Array
        (
            [board] => Array
                (
                    [id] => 2
                    [name] => Sorties
                    [href] => http://beta.mdl-palissy.fr/forum/index.php?board=2.0
                    [link] => Sorties
                )

            [topic] => 26
            [poster] => Array
                (
                    [id] => 1
                    [name] => mdladmin
                    [href] => http://beta.mdl-palissy.fr/forum/index.php?action=profile;u=1
                    [link] => mdladmin
                )

            [subject] => video test
            [replies] => 0
            [views] => 10
            [short_subject] => video test
            [preview] =>
            [time] => mai 05, 2016, 09:21:00 pm
            [timestamp] => 1462476060
            [href] => http://beta.mdl-palissy.fr/forum/index.php?topic=26.msg29;topicseen#new
            [link] => video test
            [new] => 1
            [is_new] =>
            [new_from] => 0
            [icon] => xx
        )

    [1] => Array
        (
            [board] => Array
                (
                    [id] => 2
                    [name] => Sorties
                    [href] => http://beta.mdl-palissy.fr/forum/index.php?board=2.0
                    [link] => Sorties
                )

            [topic] => 13
            [poster] => Array
                (
                    [id] => 1
                    [name] => mdladmin
                    [href] => http://beta.mdl-palissy.fr/forum/index.php?action=profile;u=1
                    [link] => mdladmin
                )

            [subject] => ask-test_02-modified
            [replies] => 1
            [views] => 51
            [short_subject] => ask-test_02-modified
            [preview] => gsfbgd
            [time] => avril 10, 2016, 07:37:16 pm
            [timestamp] => 1460309836
            [href] => http://beta.mdl-palissy.fr/forum/index.php?topic=13.msg24;topicseen#new
            [link] => ask-test_02-modified
            [new] => 1
            [is_new] =>
            [new_from] => 0
            [icon] => xx
        )

    [2] => Array
        (
            [board] => Array
                (
                    [id] => 2
                    [name] => Sorties
                    [href] => http://beta.mdl-palissy.fr/forum/index.php?board=2.0
                    [link] => Sorties
                )

            [topic] => 12
            [poster] => Array
                (
                    [id] => 1
                    [name] => mdladmin
                    [href] => http://beta.mdl-palissy.fr/forum/index.php?action=profile;u=1
                    [link] => mdladmin
                )

            [subject] => AK-Test_01
            [replies] => 0
            [views] => 15
            [short_subject] => AK-Test_01
            [preview] => AK-Test_01
            [time] => février 23, 2016, 08:50:33 pm
            [timestamp] => 1456257033
            [href] => http://beta.mdl-palissy.fr/forum/index.php?topic=12.msg14;topicseen#new
            [link] => AK-Test_01
            [new] => 1
            [is_new] =>
            [new_from] => 0
            [icon] => xx
        )

    [3] => Array
        (
            [board] => Array
                (
                    [id] => 2
                    [name] => Sorties
                    [href] => http://beta.mdl-palissy.fr/forum/index.php?board=2.0
                    [link] => Sorties
                )

            [topic] => 11
            [poster] => Array
                (
                    [id] => 1
                    [name] => mdladmin
                    [href] => http://beta.mdl-palissy.fr/forum/index.php?action=profile;u=1
                    [link] => mdladmin
                )

            [subject] => 456123789
            [replies] => 0
            [views] => 13
            [short_subject] => 456123789
            [preview] => 456123789
            [time] => février 23, 2016, 12:08:31 am
            [timestamp] => 1456182511
            [href] => http://beta.mdl-palissy.fr/forum/index.php?topic=11.msg13;topicseen#new
            [link] => 456123789
            [new] => 1
            [is_new] =>
            [new_from] => 0
            [icon] => xx
        )

    [4] => Array
        (
            [board] => Array
                (
                    [id] => 2
                    [name] => Sorties
                    [href] => http://beta.mdl-palissy.fr/forum/index.php?board=2.0
                    [link] => Sorties
                )

            [topic] => 10
            [poster] => Array
                (
                    [id] => 1
                    [name] => mdladmin
                    [href] => http://beta.mdl-palissy.fr/forum/index.php?action=profile;u=1
                    [link] => mdladmin
                )

            [subject] => 987
            [replies] => 0
            [views] => 15
            [short_subject] => 987
            [preview] => 987
            [time] => février 22, 2016, 11:55:42 pm
            [timestamp] => 1456181742
            [href] => http://beta.mdl-palissy.fr/forum/index.php?topic=10.msg12;topicseen#new
            [link] => 987
            [new] => 1
            [is_new] =>
            [new_from] => 0
            [icon] => xx
        )

    [5] => Array
        (
            [board] => Array
                (
                    [id] => 2
                    [name] => Sorties
                    [href] => http://beta.mdl-palissy.fr/forum/index.php?board=2.0
                    [link] => Sorties
                )

            [topic] => 9
            [poster] => Array
                (
                    [id] => 1
                    [name] => mdladmin
                    [href] => http://beta.mdl-palissy.fr/forum/index.php?action=profile;u=1
                    [link] => mdladmin
                )

            [subject] => 123456789
            [replies] => 0
            [views] => 8
            [short_subject] => 123456789
            [preview] => 123456789
            [time] => février 22, 2016, 11:49:35 pm
            [timestamp] => 1456181375
            [href] => http://beta.mdl-palissy.fr/forum/index.php?topic=9.msg11;topicseen#new
            [link] => 123456789
            [new] => 1
            [is_new] =>
            [new_from] => 0
            [icon] => xx
        )

    [6] => Array
        (
            [board] => Array
                (
                    [id] => 2
                    [name] => Sorties
                    [href] => http://beta.mdl-palissy.fr/forum/index.php?board=2.0
                    [link] => Sorties
                )

            [topic] => 8
            [poster] => Array
                (
                    [id] => 1
                    [name] => mdladmin
                    [href] => http://beta.mdl-palissy.fr/forum/index.php?action=profile;u=1
                    [link] => mdladmin
                )

            [subject] => 123
            [replies] => 0
            [views] => 8
            [short_subject] => 123
            [preview] => 123
            [time] => février 22, 2016, 11:47:19 pm
            [timestamp] => 1456181239
            [href] => http://beta.mdl-palissy.fr/forum/index.php?topic=8.msg10;topicseen#new
            [link] => 123
            [new] => 1
            [is_new] =>
            [new_from] => 0
            [icon] => xx
        )

    [7] => Array
        (
            [board] => Array
                (
                    [id] => 2
                    [name] => Sorties
                    [href] => http://beta.mdl-palissy.fr/forum/index.php?board=2.0
                    [link] => Sorties
                )

            [topic] => 7
            [poster] => Array
                (
                    [id] => 1
                    [name] => mdladmin
                    [href] => http://beta.mdl-palissy.fr/forum/index.php?action=profile;u=1
                    [link] => mdladmin
                )

            [subject] => test1
            [replies] => 0
            [views] => 14
            [short_subject] => test1
            [preview] => test1
            [time] => février 15, 2016, 11:16:50 am
            [timestamp] => 1455531410
            [href] => http://beta.mdl-palissy.fr/forum/index.php?topic=7.msg9;topicseen#new
            [link] => test1
            [new] => 1
            [is_new] =>
            [new_from] => 0
            [icon] => xx
        )

    [8] => Array
        (
            [board] => Array
                (
                    [id] => 2
                    [name] => Sorties
                    [href] => http://beta.mdl-palissy.fr/forum/index.php?board=2.0
                    [link] => Sorties
                )

            [topic] => 6
            [poster] => Array
                (
                    [id] => 1
                    [name] => mdladmin
                    [href] => http://beta.mdl-palissy.fr/forum/index.php?action=profile;u=1
                    [link] => mdladmin
                )

            [subject] => test
            [replies] => 0
            [views] => 17
            [short_subject] => test
            [preview] => test
            [time] => février 15, 2016, 11:04:15 am
            [timestamp] => 1455530655
            [href] => http://beta.mdl-palissy.fr/forum/index.php?topic=6.msg8;topicseen#new
            [link] => test
            [new] => 1
            [is_new] =>
            [new_from] => 0
            [icon] => xx
        )

    [9] => Array
        (
            [board] => Array
                (
                    [id] => 2
                    [name] => Sorties
                    [href] => http://beta.mdl-palissy.fr/forum/index.php?board=2.0
                    [link] => Sorties
                )

            [topic] => 5
            [poster] => Array
                (
                    [id] => 1
                    [name] => mdladmin
                    [href] => http://beta.mdl-palissy.fr/forum/index.php?action=profile;u=1
                    [link] => mdladmin
                )

            [subject] => 12
            [replies] => 0
            [views] => 15
            [short_subject] => 12
            [preview] => 123
            [time] => février 09, 2016, 06:28:30 pm
            [timestamp] => 1455038910
            [href] => http://beta.mdl-palissy.fr/forum/index.php?topic=5.msg7;topicseen#new
            [link] => 12
            [new] => 1
            [is_new] =>
            [new_from] => 0
            [icon] => xx
        )

)
1
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: Kindred on May 16, 2016, 08:57:55 PM
Right..   As I said, section and date are not names of variables that you can use...   From the array that you show there, you should be able to see the names that you need to use.
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: glennmckenna on June 01, 2016, 05:12:44 AM
right i'm now getting some were
http://beta.mdl-palissy.fr/ (http://beta.mdl-palissy.fr/)

but what i 'm now after a way to fetch the profil picture
post what they posted
i assume that this can be done with SSI.php
but how

edit:
all i need is the profil picture
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: Kindred on June 01, 2016, 06:35:57 AM
that becomes more complicated since you have to do a database query using a JOIN...
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: glennmckenna on June 01, 2016, 11:39:48 AM
Quote from: Kindred on June 01, 2016, 06:35:57 AM
that becomes more complicated since you have to do a database query using a JOIN...
that's what i thought
could you expain more please or hint the code i need
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: glennmckenna on June 01, 2016, 04:15:20 PM
may i ask were could i find the link to the profil image in the database ?

would it be possible to do it by just using php ?
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: Arantor on June 01, 2016, 04:40:26 PM
There's several different possible URLs depending on user choice and your configuration, it really isn't particularly simple to just do.
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: Kindred on June 01, 2016, 11:54:40 PM
And to your question on php...  You would HAVE to pull the data from the database, since it is not loaded into the php arrays for the code that you already have,.
Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: glennmckenna on July 12, 2016, 03:59:08 PM
i seem to be getting a problem , when ever i run this part of the code:

$pop = ssi_topTopics(NULL, NULL,'array');
i get this error :
The database value you're trying to insert does not exist: limit
i assume that it's somthing i'm doing wrong with the arguments ?

here is a copy of the code for the page:
<?php
require_once('scripts/SSI-link.php');

$context['page_title_html_safe'] = '';
if (empty(
$context['html_headers']))
    
$context['html_headers'] = '';


template_header();
//votre code vas ici sous format html
echo '
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
  <!-- Indicators -->
  <ol class="carousel-indicators">
    <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
    <li data-target="#carousel-example-generic" data-slide-to="1"></li>
    <li data-target="#carousel-example-generic" data-slide-to="2"></li>
  </ol>

  <!-- Wrapper for slides -->
  <div class="carousel-inner" role="listbox">
    <div class="item active">
      <img src="images/placeholder-image-wide.png" alt="...">
      <div class="carousel-caption">
        ...
      </div>
    </div>
    <div class="item">
      <img src="images/placeholder-image-wide.png" alt="...">
      <div class="carousel-caption">
        ...
      </div>
    </div>
  </div>

  <!-- Controls -->
  <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
    <span class="sr-only">Previous</span>
  </a>
  <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </a>
</div>



<div class="col-md-6 col-xs-12">
    <a class="twitter-timeline" href="https://twitter.com/MDLPalissy" data-widget-id="706827167091576833" width="100%">Tweets de @MDLPalissy</a>
      <script>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>'
;
//ssi_topTopics();
$rec ssi_recentTopics(10NULLNULL,'array');
$pop ssi_topTopicsViews(NULLNULL,'array');
echo 
'
<div class="col-md-6 col-xs-12">
    <table class="table_list">
        <tbody class="header">
            <tr>
                <td colspan="4">
                    <div class="cat_bar">
                        <h3 class="catbg">
                           '
,$txt['recent_posts'],'
                        </h3>
                    </div>
                </td>
            </tr>
        </tbody>
        <tbody class="header">
            <tr>
                <td colspan="4">
                    <div class="cat_bar">
                        <h3 class="catbg">
                           '
,$txt['recent_posts'],'
                        </h3>
                    </div>
                </td>
            </tr>
        </tbody>    
        <tbody class="content">
            <tr class="windowbg4">
    '
;
                    foreach (
$rec as $recent)
                    {
                        echo 
'
                         <tr class="windowbg4">
                            <td class="icon" style="height:40px;"> 
                                
                            </td>
                            <td class="info">'
;
                                echo 
'
                                <a class="subject" href="'
$recent['board']['href'], '">'$recent['board']['name'], '</a>';
                                echo
'
                                <p><a href="'
$recent['href'], '">'$recent['link'],'</a> '$txt['by'];
                                echo
'
                                <a href="'
$recent['poster']['href'],'">'$recent['poster']['name'],'</a> </p>
                            </td>
                            <td class="date">
                                <p>'
,$recent['time'],'</p>
                            </td>
                            <td class="icon lastpost-1">
                                <a href="'
$recent['href'], '"><img src="'$settings['images_url'], '/'$context['theme_variant_url'], '/icons/last_post.gif" alt="'$txt['latest_post'], '" title="'$txt['latest_post'], '" /></a>
                            </td>
                         </tr>'
;
                    }

                    echo 
'
                
            </tr>
        </tbody>

        <tbody class="divider">
            <tr>
                <td colspan="4"></td>
            </tr>
        </tbody>

         <tbody class="divider">
            <tr>
                <td colspan="4"></td>
            </tr>
        </tbody>
    </table>
    <table class="table_list">
        <tbody class="header">
            <tr>
                <td colspan="5">
                    <div class="cat_bar">
                        <h3 class="catbg">
                           '
,$txt['recent_posts'],'
                        </h3>
                    </div>
                </td>
            </tr>
        </tbody>    
        <tbody class="content">
            <tr class="windowbg4">
    '
;


                    echo 
'
            </tr>
        </tbody>
        <tbody class="divider">
            <tr>
                <td colspan="4"></td>
            </tr>
        </tbody>
    </table>
    </div>'
;

template_footer() ;
?>

Title: Re: looking for a way to fetch most poular posts and most recent posts
Post by: glennmckenna on July 14, 2016, 12:41:10 PM
right i've fixed the problem
here's the fixed code
<?php
require_once('scripts/SSI-link.php');

$context['page_title_html_safe'] = '';
if (empty(
$context['html_headers']))
    
$context['html_headers'] = '';


template_header();
//votre code vas ici sous format html
echo '
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
  <!-- Indicators -->
  <ol class="carousel-indicators">
    <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
    <li data-target="#carousel-example-generic" data-slide-to="1"></li>
    <li data-target="#carousel-example-generic" data-slide-to="2"></li>
  </ol>

  <!-- Wrapper for slides -->
  <div class="carousel-inner" role="listbox">
    <div class="item active">
      <img src="images/placeholder-image-wide.png" alt="...">
      <div class="carousel-caption">
        ...
      </div>
    </div>
    <div class="item">
      <img src="images/placeholder-image-wide.png" alt="...">
      <div class="carousel-caption">
        ...
      </div>
    </div>
  </div>

  <!-- Controls -->
  <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
    <span class="sr-only">Previous</span>
  </a>
  <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </a>
</div>



<div class="col-md-6 col-xs-12">
    <a class="twitter-timeline" href="https://twitter.com/MDLPalissy" data-widget-id="706827167091576833" width="100%">Tweets de @MDLPalissy</a>
      <script>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>'
;
$rec ssi_recentTopics(10NULLNULL,'array');
$pop ssi_topTopicsReplies(10'array');
echo 
'
<div class="col-md-6 col-xs-12">
    <table class="table_list">
        <tbody class="header">
            <tr>
                <td colspan="4">
                    <div class="cat_bar">
                        <h3 class="catbg">
                           '
,$txt['recent_posts'],'
                        </h3>
                    </div>
                </td>
            </tr>
        </tbody>    
        <tbody class="content">
            <tr class="windowbg4">
    '
;
                    foreach (
$rec as $recent)
                    {
                        echo 
'
                         <tr class="windowbg4">
                            <td class="icon" style="height:40px;"> 
                                
                            </td>
                            <td class="info">'
;
                                echo 
'
                                <a class="subject" href="'
$recent['board']['href'], '">'$recent['board']['name'], '</a>';
                                echo
'
                                <p><a href="'
$recent['href'], '">'$recent['link'],'</a> '$txt['by'];
                                echo
'
                                <a href="'
$recent['poster']['href'],'">'$recent['poster']['name'],'</a> </p>
                            </td>
                            <td class="date">
                                <p>'
,$recent['time'],'</p>
                            </td>
                            <td class="icon lastpost-1">
                                <a href="'
$recent['href'], '"><img src="'$settings['images_url'], '/'$context['theme_variant_url'], '/icons/last_post.gif" alt="'$txt['latest_post'], '" title="'$txt['latest_post'], '" /></a>
                            </td>
                         </tr>'
;
                    }

                    echo 
'
                
            </tr>
        </tbody>

        <tbody class="divider">
            <tr>
                <td colspan="4"></td>
            </tr>
        </tbody>

         <tbody class="divider">
            <tr>
                <td colspan="4"></td>
            </tr>
        </tbody>
    </table>
    <table class="table_list">
        <tbody class="header">
            <tr>
                <td colspan="5">
                    <div class="cat_bar">
                        <h3 class="catbg">
                           '
,$txt['recent_posts'],'
                        </h3>
                    </div>
                </td>
            </tr>
        </tbody>    
        <tbody class="content">
            <tr class="windowbg4">
    '
;
foreach (
$pop as $popu)
{
echo 
'
                         <tr class="windowbg4">
                            <td class="icon" style="height:40px;"> 
                                
                            </td>
                            <td class="info">
                                <a class="subject" href="'
$popu['href'],'">'$popu['subject'], '</a>
                            </td>
                            <td class="date">
                                <p>'
,$popu['num_views'],'</p>
                            </td>
                            <td class="date">
                                <p>'
,$popu['num_replies'],'</p>
                            </td>
                            <td class="icon lastpost-1">
                                <a href="'
$popu['href'], '"><img src="'$settings['images_url'], '/'$context['theme_variant_url'], '/icons/last_post.gif" alt="'$txt['latest_post'], '" title="'$txt['latest_post'], '" /></a>
                            </td>
                         </tr>'
;
}
                    echo 
'
            </tr>
        </tbody>
        <tbody class="divider">
            <tr>
                <td colspan="4"></td>
            </tr>
        </tbody>
    </table>
    </div>'
;

template_footer() ;
?>