Pop Top Mod 30 Entries Showing

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Pop Top Mod 30 Entries Showing
DKasler
CZ Super Newbie
DKasler has been a member for over 20 year's 20 Year Member
usa.gif newyork.gif
Age: 44
Gender: Male
Website:
Status: Offline
Joined: Jan 29, 2004
0.01 posts per day
Posts: 44
Points: 7,006
AIM Address Yahoo Messenger MSN Messenger ICQ Number
In my Pop Top Mod, 30 entries on each side are showing. Not 5.

Forum address: [ Register or login to view links on this board. ]

PHPNuke Vr: 6.5

Any suggestions?

PS. I had to temp. disable the script. Since it was nearly doubling the length of my forums.




_________________
:: [ Register or login to view links on this board.] :: [ Register or login to view links on this board.] ::
Back to top Reply with quote
#2   re: Pop Top Mod 30 Entries Showing
DKasler
CZ Super Newbie
DKasler has been a member for over 20 year's 20 Year Member
usa.gif newyork.gif
Age: 44
Gender: Male
Website:
Status: Offline
Joined: Jan 29, 2004
0.01 posts per day
Posts: 44
Points: 7,006
AIM Address Yahoo Messenger MSN Messenger ICQ Number
Any suggestions?




_________________
:: [ Register or login to view links on this board.] :: [ Register or login to view links on this board.] ::
Back to top Reply with quote
#3   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
I see nothing at the link you provided. Double check your installation also post these 2 pages you had to alter:

## modules/Forums/index.php
## themes/YOUR_THEME/forums/index_body.tpl




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#4   re: Pop Top Mod 30 Entries Showing
DKasler
CZ Super Newbie
DKasler has been a member for over 20 year's 20 Year Member
usa.gif newyork.gif
Age: 44
Gender: Male
Website:
Status: Offline
Joined: Jan 29, 2004
0.01 posts per day
Posts: 44
Points: 7,006
AIM Address Yahoo Messenger MSN Messenger ICQ Number
Ok here are the pages I had to mod.

The reason you didnt see anything on my forum was I had to turn off the mod because it was doubling the length of my forums

"The Extension tpl is not allowed"
"The Extension php is not allowed"

so heres the code:


Index_Body.tpl
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
  <tr>
   <th width="50%" colspan="2" class="thTop" nowrap="nowrap"> ;;{L_TOPICSPOPULAR} ;;</th>
   <th width="50%" colspan="2" class="thTop" nowrap="nowrap"> ;;{L_TOPICSPOPULARVIEW} ;;</th>
  </tr>
  <!-- BEGIN topicrecentpopular -->
  <tr>
   <td width="44%" class="row2" align="left" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULAR}</span></td>
   <td width="6%" class="row2" align="center" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULARC}</span></td>
   <td width="44%" class="row2" align="left" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULARVIEW}</span></td>
   <td width="6%" class="row2" align="center" valign="middle"><span class="gensmall">{topicrecentpopular.TOPICSPOPULARVIEWC}</span></td>
  </tr>
  <!-- END topicrecentpopular -->
</table>
<br />
<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center" class="tableicon">
  <tr>
   <td align="left" valign="bottom"><span class="gensmall">
   <!-- BEGIN switch_user_logged_in -->
   {LAST_VISIT_DATE}<br />
   <!-- END switch_user_logged_in -->
   {CURRENT_TIME}<br /></span><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
   <td align="right" valign="bottom" class="gensmall">
      <!-- BEGIN switch_user_logged_in -->
      <a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br /><a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
      <!-- END switch_user_logged_in -->
      <a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a></td>
  </tr>
</table>

<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
  <tr>
   <th colspan="2" class="row1" height="25" nowrap="nowrap"> ;;{L_FORUM} ;;</th>
   <th width="50" class="row1" nowrap="nowrap"> ;;{L_TOPICS} ;;</th>
   <th width="50" class="row1" nowrap="nowrap"> ;;{L_POSTS} ;;</th>
   <th class="row1" nowrap="nowrap"> ;;{L_LASTPOST} ;;</th>
  </tr>
  <!-- BEGIN catrow -->
  <tr>
   <td class="row3" colspan="2" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td>
   <td class="row3" colspan="3" align="right"> ;;</td>
  </tr>
  <!-- BEGIN forumrow -->
  <tr>
   <td class="row2" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
   <td class="row2" width="100%" height="50" onMouseOver=this.style.backgroundColor="#849AB5" onMouseOut=this.style.backgroundColor="#3d3d3d"  onclick="window.location.href='{catrow.forumrow.U_VIEWFORUM}'"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br />
     </span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br />
     </span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>
   <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td>
   <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.POSTS}</span></td>
   <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>
  </tr>
  <!-- END forumrow -->
  <!-- END catrow -->
</table>

<table width="100%" cellspacing="0" border="0" align="center" cellpadding="2" class="tableicon">
  <tr>
   <td align="left"><span class="gensmall"><a href="{U_MARK_READ}" class="gensmall">{L_MARK_FORUMS_READ}</a></span></td>
   <td align="right"><span class="gensmall">{S_TIMEZONE}</span></td>
  </tr>
</table>

<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
  <tr>
   <td class="row3" colspan="2" height="28"><span class="cattitle"><a href="{U_VIEWONLINE}" class="cattitle">{L_WHO_IS_ONLINE}</a></span></td>
  </tr>
  <tr>
   <td class="row1" align="center" valign="middle" rowspan="2"><img src="themes/ClanMtS/forums/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
   <td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span>
   </td>
  </tr>
  <tr>
   <td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE}  ;; [ {L_WHOSONLINE_ADMIN} ]  ;; [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
  </tr>
</table>

<table width="100%" cellpadding="1" cellspacing="1" border="0" class="tableicon">
   <td align="left" valign="top"><span class="gensmall">{L_ONLINE_EXPLAIN}</span></td>
</table>

<!-- BEGIN switch_user_logged_out -->
<form method="post" action="{S_LOGIN_ACTION}">
  <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
   <tr>
     <td class="catHead" height="28"><a name="login"></a><span class="cattitle">{L_LOGIN_LOGOUT}</span></td>
   </tr>
   <tr>
     <td class="row1" align="center" valign="middle" height="28"><span class="gensmall">{L_USERNAME}:
      <input class="post" type="text" name="username" size="10" />
       ;; ;; ;;{L_PASSWORD}:
      <input class="post" type="password" name="password" size="10" />
       ;; ;;  ;; ;;{L_AUTO_LOGIN}
      <input class="text" type="checkbox" name="autologin" />
       ;; ;; ;;
      <input type="submit" class="mainoption" name="login" value="{L_LOGIN}" />
      </span> </td>
   </tr>
  </table>
</form>
<!-- END switch_user_logged_out -->



<table cellspacing="3" border="0" align="center" cellpadding="0" class="forumline" width=100%>
  <tr>
   <td width="33.3%" align="center"><img src="themes/ClanMtS/forums/images/folder_new.gif" alt="{L_NEW_POSTS}"/>
   <span class="gensmall"> ;;{L_NEW_POSTS}</span></td>
   
   <td width="33.3%" align="center"><img src="themes/ClanMtS/forums/images/folder.gif" alt="{L_NO_NEW_POSTS}" />
   <span class="gensmall"> ;;{L_NO_NEW_POSTS}</span></td>
   
   <td width="33.3%" align="center"><img src="themes/ClanMtS/forums/images/folder_lock.gif" alt="{L_FORUM_LOCKED}" />
   <span class="gensmall"> ;;{L_FORUM_LOCKED}</span></td>
  </tr>
</table>


Index.php
if (!eregi("modules.php", $_SERVER['PHP_SELF']))
    {
        die ("You can't access this file directly...");
    }
if ($popup != "1")
    {
        $module_name = basename(dirname(__FILE__));
        require("modules/".$module_name."/nukebb.php");
    }
    else
    {
        $phpbb_root_path = 'modules/Forums/';
    }
define('IN_PHPBB', true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX, $nukeuser);
init_userprefs($userdata);
//
// End session management
//

$viewcat = ( !empty($HTTP_GET_VARS[POST_CAT_URL]) ) ? $HTTP_GET_VARS[POST_CAT_URL] : -1;

if( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) )
{
        $mark_read = ( isset($HTTP_POST_VARS['mark']) ) ? $HTTP_POST_VARS['mark'] : $HTTP_GET_VARS['mark'];
}
else
{
        $mark_read = '';
}

//
// Handle marking posts
//
if( $mark_read == 'forums' )
{
        if( $userdata['session_logged_in'] )
        {
                setcookie($board_config['cookie_name'] . '_f_all', time(), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
        }

        $template->assign_vars(array(
                "META" => '<meta http-equiv="refresh" content="3;url='  .append_sid("index.$phpEx") . '">')
        );

        $message = $lang['Forums_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a> ');

        message_die(GENERAL_MESSAGE, $message);
}
//
// End handle marking posts
//

$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) : array();
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) : array();

//
// If you don't use these stats on your index you may want to consider
// removing them
//
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
$newest_uid = $newest_userdata['user_id'];

if( $total_posts == 0 )
{
        $l_total_post_s = $lang['Posted_articles_zero_total'];
}
else if( $total_posts == 1 )
{
        $l_total_post_s = $lang['Posted_article_total'];
}
else
{
        $l_total_post_s = $lang['Posted_articles_total'];
}

if( $total_users == 0 )
{
        $l_total_user_s = $lang['Registered_users_zero_total'];
}
else if( $total_users == 1 )
{
        $l_total_user_s = $lang['Registered_user_total'];
}
else
{
        $l_total_user_s = $lang['Registered_users_total'];
}


//
// Start page proper
//
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
        FROM " . CATEGORIES_TABLE . " c
        ".(($userdata['user_level']!=ADMIN)? "WHERE c.cat_title<>\"global_announcement\"" :"" )."
        ORDER BY c.cat_order";
if( !($result = $db->sql_query($sql)) )
{
        message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql);
}

while( $category_rows[] = $db->sql_fetchrow($result) );

if( ( $total_categories = count($category_rows) ) )
{
        //
        // Define appropriate SQL
        //
        switch(SQL_LAYER)
        {
                case 'postgresql':
                        $sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
                                FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
                                WHERE p.post_id = f.forum_last_post_id
                                        AND u.user_id = p.poster_id
                                        UNION (
                                                SELECT f.*, NULL, NULL, NULL, NULL
                                                FROM " . FORUMS_TABLE . " f
                                                WHERE NOT EXISTS (
                                                        SELECT p.post_time
                                                        FROM " . POSTS_TABLE . " p
                                                        WHERE p.post_id = f.forum_last_post_id
                                                )
                                        )
                                        ORDER BY cat_id, forum_order";
                        break;

                case 'oracle':
                        $sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
                                FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
                                WHERE p.post_id = f.forum_last_post_id(+)
                                        AND u.user_id = p.poster_id(+)
                                ORDER BY f.cat_id, f.forum_order";
                        break;

                default:
                        $sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
                                FROM (( " . FORUMS_TABLE . " f
                                LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
                                LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id )
                                ORDER BY f.cat_id, f.forum_order";
                        break;
        }
        if ( !($result = $db->sql_query($sql)) )
        {
                message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
        }

        $forum_data = array();
        while( $row = $db->sql_fetchrow($result) )
        {
                $forum_data[] = $row;
        }

        if ( !($total_forums = count($forum_data)) )
        {
                message_die(GENERAL_MESSAGE, $lang['No_forums']);
        }

        //
        // Obtain a list of topic ids which contain
        // posts made since user last visited
        //
        if ( $userdata['session_logged_in'] )
        {
                $sql = "SELECT t.forum_id, t.topic_id, p.post_time
                        FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p
                        WHERE p.post_id = t.topic_last_post_id
                                AND p.post_time > " . $userdata['user_lastvisit'] . "
                                AND t.topic_moved_id = 0";
                if ( !($result = $db->sql_query($sql)) )
                {
                        message_die(GENERAL_ERROR, 'Could not query new topic information', '', __LINE__, __FILE__, $sql);
                }

                $new_topic_data = array();
                while( $topic_data = $db->sql_fetchrow($result) )
                {
                        $new_topic_data[$topic_data['forum_id']][$topic_data['topic_id']] = $topic_data['post_time'];
                }
        }

        //
        // Obtain list of moderators of each forum
        // First users, then groups ... broken into two queries
        //
        $sql = "SELECT aa.forum_id, u.user_id, u.username
                FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g, " . USERS_TABLE . " u
                WHERE aa.auth_mod = " . TRUE . "
                        AND g.group_single_user = 1
                        AND ug.group_id = aa.group_id
                        AND g.group_id = aa.group_id
                        AND u.user_id = ug.user_id
                GROUP BY u.user_id, u.username, aa.forum_id
                ORDER BY aa.forum_id, u.user_id";
        if ( !($result = $db->sql_query($sql)) )
        {
                message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
        }

        $forum_moderators = array();
        while( $row = $db->sql_fetchrow($result) )
        {
                $forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $row['username'] . '</a>';
        }

        $sql = "SELECT aa.forum_id, g.group_id, g.group_name
                FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g
                WHERE aa.auth_mod = " . TRUE . "
                        AND g.group_single_user = 0
                        AND g.group_type <> " . GROUP_HIDDEN . "
                        AND ug.group_id = aa.group_id
                        AND g.group_id = aa.group_id
                GROUP BY g.group_id, g.group_name, aa.forum_id
                ORDER BY aa.forum_id, g.group_id";
        if ( !($result = $db->sql_query($sql)) )
        {
                message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
        }

        while( $row = $db->sql_fetchrow($result) )
        {
                $forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $row['group_id']) . '">' . $row['group_name'] . '</a>';
        }

        //
        // Find which forums are visible for this user
        //
        $is_auth_ary = array();
        $is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);

        //
        // Start output of page
        //
        define('SHOW_ONLINE', true);
        $page_title = $lang['Index'];
        include("includes/page_header.php");

        $template->set_filenames(array(
                'body' => 'index_body.tpl')
        );
    //
    // START MOD: Avatar On Index  - AbelaJohnB
    //
    $avatar_img = '';
    if ( $userdata['user_avatar_type'] && $userdata['user_allowavatar'] )
    {
        switch( $userdata['user_avatar_type'] )
        {
            case USER_AVATAR_UPLOAD:
                $avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
                break;
            case USER_AVATAR_REMOTE:
                $avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
                break;
            case USER_AVATAR_GALLERY:
                $avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
                break;
        }
    }
    if ($avatar_img == '')
    {
        $avatar_img = '<img src="templates/subSilver/images/whosonline.gif" >';
    }
    // Check For Anonymous User
    if ($userdata['user_id'] != '-1')
    {
        $name_link = '<a href="' . append_sid("profile.$phpEx?mode=editprofile&amp;amp;" . $userdata['user_id']) . '" />' . $userdata['username'] . '</a>';
    }
    else
    {
        $name_link = $lang['Guest'];
    }
    //
    // END MOD: Avatar On Index  - AbelaJohnB
    //
        $template->assign_vars(array(
                'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
                'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
                'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'),

                'FORUM_IMG' => $images['forum'],
                'FORUM_NEW_IMG' => $images['forum_new'],
                'FORUM_LOCKED_IMG' => $images['forum_locked'],
        //
        // START MOD: Avatar On Index  - AbelaJohnB
        //
        'L_NAME_WELCOME' => $lang['Welcome'],
        'U_NAME_LINK' => $name_link,
        'AVATAR_IMG' => $avatar_img,
        //
        // END MOD: Avatar On Index  - AbelaJohnB
        //
                'L_FORUM' => $lang['Forum'],
                'L_TOPICS' => $lang['Topics'],
                'L_REPLIES' => $lang['Replies'],
                'L_VIEWS' => $lang['Views'],
                'L_POSTS' => $lang['Posts'],
                'L_LASTPOST' => $lang['Last_Post'],
                'L_NO_NEW_POSTS' => $lang['No_new_posts'],
                'L_NEW_POSTS' => $lang['New_posts'],
                'L_NO_NEW_POSTS_LOCKED' => $lang['No_new_posts_locked'],
                'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'],
                'L_ONLINE_EXPLAIN' => $lang['Online_explain'],

                'L_MODERATOR' => $lang['Moderators'],
                'L_FORUM_LOCKED' => $lang['Forum_is_locked'],
                'L_MARK_FORUMS_READ' => $lang['Mark_all_forums'],

                'U_MARK_READ' => append_sid("index.$phpEx?mark=forums"))
        );

        //
        // Okay, let's build the index
        //
        for($i = 0; $i < $total_categories; $i++)
        {
                $cat_id = $category_rows[$i]['cat_id'];
               
          //
   // Okay, let's build the topic recent and popular
   //
   
$active_topics_sql="SELECT a.topic_id,a.topic_title,  a.topic_replies,  a.topic_last_post_id, c.post_time
         FROM nuke_bbtopics a, nuke_users b,nuke_bbposts c,nuke_bbforums d
         where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id
            and d.forum_id=a.forum_id
            and d.auth_view=0
         ORDER BY topic_last_post_id DESC
         LIMIT 5";
$active_topics = $db->sql_query($active_topics_sql);

$active_topics_sql2="SELECT a.topic_id,a.topic_title,  a.topic_replies,  a.topic_last_post_id, c.post_time
         FROM nuke_bbtopics a, nuke_users b, nuke_bbposts c, nuke_bbforums d
         where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id
            and d.forum_id=a.forum_id
            and d.auth_view=0
         ORDER BY topic_replies DESC
         LIMIT 5";
$active_topics2 = $db->sql_query($active_topics_sql2);

$active_topics_sql3="SELECT a.topic_id,a.topic_title,  a.topic_views, a.topic_replies,  a.topic_last_post_id, c.post_time
         FROM nuke_bbtopics a, nuke_users b, nuke_bbposts c, nuke_bbforums d
         where a.topic_last_post_id=c.post_id and b.user_id=c.poster_id
            and d.forum_id=a.forum_id
            and d.auth_view=0
         ORDER BY topic_views DESC
         LIMIT 5";
$active_topics3 = $db->sql_query($active_topics_sql3);

   while (($line = mysql_fetch_array($active_topics)) and ($line2 = mysql_fetch_array($active_topics2)) and ($line3 = mysql_fetch_array($active_topics3)))
   {
      if (strlen($line['topic_title']) > 40)
      {
         $line_topic_title = substr($line['topic_title'], 0, 40)." ...";
      }
      else
      {
         $line_topic_title = $line['topic_title'];
      }
      if (strlen($line2['topic_title']) > 40)
      {
         $line_topic_title2 = substr($line2['topic_title'], 0, 40)." ...";
      }
      else
      {
         $line_topic_title2 = $line2['topic_title'];
      }
      if (strlen($line3['topic_title']) > 40)
      {
         $line_topic_title3 = substr($line3['topic_title'], 0, 40)." ...";
      }
      else
      {
         $line_topic_title3 = $line3['topic_title'];
      }
      $lastpost = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_TOPIC_URL . '=' . $line['topic_id']) . '">' . $line_topic_title . '</a>';
      $poppost = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_TOPIC_URL . '=' . $line2['topic_id']) . '">' . $line_topic_title2 . '</a>';
      $poppostc = $line2['topic_replies'];
      $popviewpost = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_TOPIC_URL . '=' . $line3['topic_id']) . '">' . $line_topic_title3 . '</a>';
      $popviewpostc = $line3['topic_views'];
      $template->assign_block_vars('topicrecentpopular', array(
         'TOPICSPOPULAR' => $poppost,
         'TOPICSPOPULARC' => $poppostc,
         'TOPICSPOPULARVIEW' => $popviewpost,
         'TOPICSPOPULARVIEWC' => $popviewpostc,
         'TOPICSRECENT' => $lastpost)
      );
   }

                //
                // Should we display this category/forum set?
                //
                $display_forums = false;
                for($j = 0; $j < $total_forums; $j++)
                {
                        if ( $is_auth_ary[$forum_data[$j]['forum_id']]['auth_view'] && $forum_data[$j]['cat_id'] == $cat_id )
                        {
                                $display_forums = true;
                        }
                }

                //
                // Yes, we should, so first dump out the category
                // title, then, if appropriate the forum list
                //
                if ( $display_forums )
                {
                        $template->assign_block_vars('catrow', array(
                                'CAT_ID' => $cat_id,
                                'CAT_DESC' => $category_rows[$i]['cat_title'],
                                'U_VIEWCAT' => append_sid("index.$phpEx?" . POST_CAT_URL . "=$cat_id"))
                        );

                        if ( $viewcat == $cat_id || $viewcat == -1 )
                        {
                                for($j = 0; $j < $total_forums; $j++)
                                {
                                        if ( $forum_data[$j]['cat_id'] == $cat_id )
                                        {
                                                $forum_id = $forum_data[$j]['forum_id'];

                                                if ( $is_auth_ary[$forum_id]['auth_view'] )
                                                {
                                                        if ( $forum_data[$j]['forum_status'] == FORUM_LOCKED )
                                                        {
                                                                $folder_image = $images['forum_locked'];
                                                                $folder_alt = $lang['Forum_locked'];
                                                        }
                                                        else
                                                        {
                                                                $unread_topics = false;
                                                                if ( $userdata['session_logged_in'] )
                                                                {
                                                                        if ( !empty($new_topic_data[$forum_id]) )
                                                                        {
                                                                                $forum_last_post_time = 0;

                                                                                while( list($check_topic_id, $check_post_time) = @each($new_topic_data[$forum_id]) )
                                                                                {
                                                                                        if ( empty($tracking_topics[$check_topic_id]) )
                                                                                        {
                                                                                                $unread_topics = true;
                                                                                                $forum_last_post_time = max($check_post_time, $forum_last_post_time);

                                                                                        }
                                                                                        else
                                                                                        {
                                                                                                if ( $tracking_topics[$check_topic_id] < $check_post_time )
                                                                                                {
                                                                                                        $unread_topics = true;
                                                                                                        $forum_last_post_time = max($check_post_time, $forum_last_post_time);
                                                                                                }
                                                                                        }
                                                                                }

                                                                                if ( !empty($tracking_forums[$forum_id]) )
                                                                                {
                                                                                        if ( $tracking_forums[$forum_id] > $forum_last_post_time )
                                                                                        {
                                                                                                $unread_topics = false;
                                                                                        }
                                                                                }

                                                                                if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
                                                                                {
                                                                                        if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time )
                                                                                        {
                                                                                                $unread_topics = false;
                                                                                        }
                                                                                }

                                                                        }
                                                                }

                                                                $folder_image = ( $unread_topics ) ? $images['forum_new'] : $images['forum'];
                                                                $folder_alt = ( $unread_topics ) ? $lang['New_posts'] : $lang['No_new_posts'];
                                                        }

                                                        $posts = $forum_data[$j]['forum_posts'];
                                                        $topics = $forum_data[$j]['forum_topics'];

                                                        if ( $forum_data[$j]['forum_last_post_id'] )
                                                        {
                                                                $last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);

                                                                $last_post = $last_post_time . '<br />';

                                                                $last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '='  . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';

                                                                $last_post .= '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
                                                        }
                                                        else
                                                        {
                                                                $last_post = $lang['No_Posts'];
                                                        }

                                                        if ( count($forum_moderators[$forum_id]) > 0 )
                                                        {
                                                                $l_moderators = ( count($forum_moderators[$forum_id]) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];
                                                                $moderator_list = implode(', ', $forum_moderators[$forum_id]);
                                                        }
                                                        else
                                                        {
                                                                $l_moderators = '&nbsp;';
                                                                $moderator_list = '&nbsp;';
                                                        }

                                                        $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
                                                        $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

                                                        $template->assign_block_vars('catrow.forumrow',        array(
                                                                'ROW_COLOR' => '#' . $row_color,
                                                                'ROW_CLASS' => $row_class,
                                                                'FORUM_FOLDER_IMG' => $folder_image,
                                                                'FORUM_NAME' => $forum_data[$j]['forum_name'],
                                                                'FORUM_DESC' => $forum_data[$j]['forum_desc'],
                                                                'POSTS' => $forum_data[$j]['forum_posts'],
                                                                'TOPICS' => $forum_data[$j]['forum_topics'],
                                                                'LAST_POST' => $last_post,
                                                                'MODERATORS' => $moderator_list,

                                                                'L_MODERATOR' => $l_moderators,
                                                                'L_FORUM_FOLDER_ALT' => $folder_alt,

                                                                'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))
                                                        );
                                                }
                                        }
                                }
                        }
                }
        } // for ... categories

}// if ... total_categories
else
{
        message_die(GENERAL_MESSAGE, $lang['No_forums']);
}

//
// Generate the page
//
$template->pparse('body');

include("includes/page_tail.php");

?>




_________________
:: [ Register or login to view links on this board.] :: [ Register or login to view links on this board.] ::
Back to top Reply with quote
#5   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
You added the code in the index_body.tpl in the wrong spot. Its supposed to be under the:

<!-- BEGIN catrow -->


Also if you check the link you left it is blank and goes to a page cannot be found error.



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#6   re: Pop Top Mod 30 Entries Showing
DKasler
CZ Super Newbie
DKasler has been a member for over 20 year's 20 Year Member
usa.gif newyork.gif
Age: 44
Gender: Male
Website:
Status: Offline
Joined: Jan 29, 2004
0.01 posts per day
Posts: 44
Points: 7,006
AIM Address Yahoo Messenger MSN Messenger ICQ Number
I dont have this code:
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
  <tr>
   <th colspan="2" class="thCornerL" height="25" nowrap="nowrap"> ;;{L_FORUM} ;;</th>
   <th width="50" class="thTop" nowrap="nowrap"> ;;{L_TOPICS} ;;</th>
   <th width="50" class="thTop" nowrap="nowrap"> ;;{L_POSTS} ;;</th>
   <th class="thCornerR" nowrap="nowrap"> ;;{L_LASTPOST} ;;</th>
  </tr>
  <!-- BEGIN catrow -->


In my Index_Body.tpl

So I put the code ABOVE the closest match which is:
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
  <tr>
   <th colspan="2" class="row1" height="25" nowrap="nowrap"> ;;{L_FORUM} ;;</th>
   <th width="50" class="row1" nowrap="nowrap"> ;;{L_TOPICS} ;;</th>
   <th width="50" class="row1" nowrap="nowrap"> ;;{L_POSTS} ;;</th>
   <th class="row1" nowrap="nowrap"> ;;{L_LASTPOST} ;;</th>
  </tr>
  <!-- BEGIN catrow -->


It works, and shows up, except it lists the top 5 posts over and over (6 times) [ Register or login to view links on this board. ]



_________________
:: [ Register or login to view links on this board.] :: [ Register or login to view links on this board.] ::
Back to top Reply with quote
#7   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Attach the index_body.tpl in a zip file. I will add it then you can test it and we will take it from there.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#8   re: Pop Top Mod 30 Entries Showing
DKasler
CZ Super Newbie
DKasler has been a member for over 20 year's 20 Year Member
usa.gif newyork.gif
Age: 44
Gender: Male
Website:
Status: Offline
Joined: Jan 29, 2004
0.01 posts per day
Posts: 44
Points: 7,006
AIM Address Yahoo Messenger MSN Messenger ICQ Number
Thanks for the help.



Attached Files
index_body.zip (1.55 KB, Downloaded: 5234 Time(s))



_________________
:: [ Register or login to view links on this board.] :: [ Register or login to view links on this board.] ::
Back to top Reply with quote
#9   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Attach the modules/Forums/index.php too please in a zip file.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#10   re: Pop Top Mod 30 Entries Showing
DKasler
CZ Super Newbie
DKasler has been a member for over 20 year's 20 Year Member
usa.gif newyork.gif
Age: 44
Gender: Male
Website:
Status: Offline
Joined: Jan 29, 2004
0.01 posts per day
Posts: 44
Points: 7,006
AIM Address Yahoo Messenger MSN Messenger ICQ Number
here ya go.



Attached Files
index.zip (6.03 KB, Downloaded: 5232 Time(s))



_________________
:: [ Register or login to view links on this board.] :: [ Register or login to view links on this board.] ::
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum