SMF Support > SMF 2.0.x Support

[Request] Code replace custom from punbb to SMF

(1/3) > >>

MoneyMan87:
HI! i am fresh member and this is my first post :D
I have a script and this script has now custom codes from punbb like the smf has the SSI so i want if can someone replace a code from punbb to smf please.


--- Code: ---<?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 '&nbsp;';
                else
                echo '&nbsp;';
                echo '<a href="'.forum_link($forum_url['topic'], array($cur_topic['id'], sef_friendly($cur_topic['subject']))).'">', $cur_topic['subject'], '</a>';

                echo '</li>';
            }

            ?>
--- End code ---

Thanks in advance!

Arantor:
Um, what's that code supposed to do?

(Remember: most people here don't know PunBB)

MoneyMan87:
this is the link from punbb like SSI.php but some items get it from punbb db

Arantor:
...what items are you expecting to get, exactly?

I'm not interested in how the code works. I want to know what you're trying to get at the end of it, because it's going to be completely different in SMF.

MoneyMan87:
Can i give you my team viewer id and login on my computer and see please?

Navigation

[0] Message Index

[#] Next page

Go to full version