Jump to content

Recommended Posts

Posted

hi!

Can someone replace the code from punbb to smf but it make the same job please?

<?php
            // Get all topics
            $query = array(
             'SELECT' => 't.id, subject, t.last_post, forum_id',
             'FROM'  => 'topics AS t',
             'JOINS'  => array(
                    array(
               'INNER JOIN' => 'forums AS f',
               'ON'  => 'f.id = t.forum_id'
                    )
                ),
             'ORDER BY' => 't.posted DESC',
             'LIMIT'  => '0,10'
            );

            $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
            if (!$forum_user['is_guest'])
            $tracked_topics = get_tracked_topics();


            while ($cur_topic = $forum_db->fetch_assoc($result))
            {
                echo '<li>';

                if (!$forum_user['is_guest'] && $cur_topic['last_post'] > $forum_user['last_visit']
                    && (!isset($tracked_topics['topics'][$cur_topic['id']]) || $tracked_topics['topics'][$cur_topic['id']] < $cur_topic['last_post'])
                    && (!isset($tracked_topics['forums'][ $cur_topic['forum_id'] ]) || $tracked_topics['forums'][ $cur_topic['forum_id'] ] < $cur_topic['last_post']))
                echo ' ';
                else
                echo ' ';
                echo '<a href="'.forum_link($forum_url['topic'], array($cur_topic['id'], sef_friendly($cur_topic['subject']))).'">', $cur_topic['subject'], '</a>';

                echo '</li>';
            }

            ?>

 

Thanks in advance!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock