Webmaster общности: Predpriemach.com | SearchEngines.bg

    Файлове във форумите

    Автор: PhantoM

    МОД ОПИСАНИЕ: Показва файловете във форумите (Нужен ви е attach_mod)
    МОД АВТОР: morpheus2matrix < morpheus@2037.biz > (Morpheus) http://morpheus.2037.biz

    МОД ВЕРСИЯ: 1.0.4

    Трудност: Лесно
    Време за инсталация: 3 минути
    Файлове за промяна: 5
    viewforum.php
    index.php
    language/lang_english/lang_main_attach.php
    templates/subSilver/viewforum_body.tpl
    templates/subSilver/index_body.tpl

    #-----[ ОТВОРИ ]------------------------------------------------
    #
    viewforum.php
    
    #
    #-----[ НАМЕРИ ]------------------------------------------------
    #
    'L_REPLIES' => $lang['Replies'],
    
    #
    #-----[ ДОБАВИ СЛЕД ТОВА ]------------------------------------------
    #
    
    // Display Total Attachments MOD Start
    'L_ATTACHMENT_NUMBER' => $lang['Number_Attachments'],
    // Display Total Attachments MOD End
    
    #
    #-----[ НАМЕРИ ]------------------------------------------------
    #
    
    $views = $topic_rowset[$i]['topic_views'];
    
    #
    #-----[ ДОБАВИ СЛЕД ТОВА ]------------------------------------------
    #
    
    // Display Total Attachments MOD Start
    $sql = "SELECT post_id
    FROM " . POSTS_TABLE . "
    WHERE topic_id = $topic_id
    GROUP BY post_id";
    
    if ( !($result = $db->sql_query($sql)) )
    {
    message_die(GENERAL_ERROR, 'Could not query post information', '', __LINE__, __FILE__, $sql);
    }
    
    $post_ids = '';
    while ( $row = $db->sql_fetchrow($result) )
    {
    $post_ids .= ($post_ids == '') ? $row['post_id'] : ', ' . $row['post_id'];
    }
    
    if ( $post_ids != '' )
    {
    $sql = "SELECT attach_id as total_attachment
    FROM " . ATTACHMENTS_TABLE . "
    WHERE post_id IN (" . $post_ids . ")";
    
    if ( !($result2 = $db->sql_query($sql)) )
    {
    message_die(GENERAL_ERROR, 'Could not query attachment information', '', __LINE__, __FILE__, $sql);
    }
    
    $attach_num = $db->sql_numrows($result2);
    }
    else
    {
    $attach_num = 0;
    }
    // Display Total Attachments MOD End
    
    #
    #-----[ НАМЕРИ ]------------------------------------------------
    #
    
    'GOTO_PAGE' => $goto_page,
    
    #
    #-----[ ДОБАВИ СЛЕД ТОВА ]------------------------------------------
    #
    
    // Display Total Attachments MOD Start
    'NB_ATTACHMENTS' => $attach_num,
    // Display Total Attachments MOD End
    
    #
    #-----[ ОТВОРИ ]------------------------------------------------
    #
    index.php
    
    #
    #-----[ НАМЕРИ ]------------------------------------------------
    #
    'L_ONLINE_EXPLAIN' => $lang['Online_explain'],
    
    #
    #-----[ ДОБАВИ СЛЕД ТОВА ]------------------------------------------
    #
    // Display Total Attachments MOD Start
    'L_ATTACHMENT_NUMBER' => $lang['Number_Attachments'],
    // Display Total Attachments MOD End
    
    #
    #-----[ НАМЕРИ ]------------------------------------------------
    #
    $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
    
    #
    #-----[ ДОБАВИ СЛЕД ТОВА ]------------------------------------------
    #
    // Display Total Attacments MOD Start
    $sql = "SELECT post_id
    FROM " . POSTS_TABLE . "
    WHERE forum_id = $forum_id
    GROUP BY post_id";
    
    if ( !($result = $db->sql_query($sql)) )
    {
    message_die(GENERAL_ERROR, 'Could not query post information', '', __LINE__, __FILE__, $sql);
    }
    
    $post_ids = '';
    while ( $row = $db->sql_fetchrow($result) )
    {
    $post_ids .= ($post_ids == '') ? $row['post_id'] : ', ' . $row['post_id'];
    }
    
    if ( $post_ids != '' )
    {
    $sql = "SELECT attach_id as total_attachment
    FROM " . ATTACHMENTS_TABLE . "
    WHERE post_id IN (" . $post_ids . ")";
    
    if ( !($result2 = $db->sql_query($sql)) )
    {
    message_die(GENERAL_ERROR, 'Could not query attachment information', '', __LINE__, __FILE__, $sql);
    }
    
    $attach_num = $db->sql_numrows($result2);
    }
    else
    {
    $attach_num = 0;
    }
    // Display Total Attacments MOD End
    
    #
    #-----[ НАМЕРИ ]------------------------------------------------
    #
    'MODERATORS' => $moderator_list,
    
    #
    #-----[ ДОБАВИ СЛЕД ТОВА ]------------------------------------------
    #
    // Display Total Attachments MOD Start
    'NB_ATTACHMENTS' => $attach_num,
    // Display Total Attachments MOD End
    
    #
    #-----[ ОТВОРИ ]------------------------------------------------
    #
    templates/subSilver/index_body.tpl
    
    #
    #-----[ НАМЕРИ ]------------------------------------------------
    #
    <th colspan="2" class="thCornerL" height="25" nowrap="nowrap"> {L_FORUM} </th>
    
    #
    #-----[ ДОБАВИ СЛЕД ТОВА ]------------------------------------------
    #
    <th width="50" align="center" class="thTop" nowrap="nowrap"> {L_ATTACHMENT_NUMBER} </th>
    
    #
    #-----[ НАМЕРИ ]------------------------------------------------
    #
    <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.NB_ATTACHMENTS}</span></td>
    
    #
    #-----[ ОТВОРИ ]------------------------------------------------
    #
    templates/subSilver/viewforum_body.tpl
    
    #
    #-----[ НАМЕРИ ]------------------------------------------------
    #
    <th colspan="2" align="center" height="25" class="thCornerL" nowrap="nowrap"> {L_TOPICS} </th>
    
    #
    #-----[ ДОБАВИ СЛЕД ТОВА ]------------------------------------------
    #
    
    <th width="50" align="center" class="thTop" nowrap="nowrap"> {L_ATTACHMENT_NUMBER} </th>
    
    #
    #-----[ НАМЕРИ ]------------------------------------------------
    #
    
    {topicrow.GOTO_PAGE}</span></td>
    
    #
    #-----[ ДОБАВИ СЛЕД ТОВА ]------------------------------------------
    #
    
    <td class="row3" align="center" valign="middle"><span class="postdetails">{topicrow.NB_ATTACHMENTS}</span></td>
    
    #
    #-----[ НАМЕРИ ]------------------------------------------------
    #
    
    <td class="catBottom" align="center" valign="middle" colspan="6" height="28">
    
    #
    #-----[ НА СЪЩИЯТ РЕД НАМЕРИ ]------------------------------------------------
    #
    colspan="6"
    
    #
    #-----[ ЗАМЕНИ СЪС ]------------------------------------------------
    #
    colspan="7"
    
    #
    #-----[ ОТВОРИ ]-------------------------------------------------
    #
    language/твоят език/lang_main_attach.php
    
    #
    #-----[ НАМЕРИ ]-------------------------------------------------
    #
    ?>
    
    #
    #-----[ ДОБАВИ ПРЕДИ ТОВА ]------------------------------------------
    #
    
    // Display Total Attachments MOD Start
    $lang['Number_Attachments'] = 'ФАЙЛОВЕ;
    // Display Total Attachments MOD End
    
    #
    #-----[ ЗАПАЗИ/ЗАТВОРИ ВСИЧКИ ФАЙЛОВЕ ]---------------------------------
    #
    # Край
    

    Оставете коментар