Changeset 1657 in ExiteCMS


Ignore:
Timestamp:
08/19/08 17:07:21 (3 years ago)
Author:
hverton
Message:

updated the theads list body panel to use the new forum setting to limit forum message visibility for guests

Location:
modules/common/forum_threads_list_panel/php-files/modules/forum_threads_list_panel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • modules/common/forum_threads_list_panel/php-files/modules/forum_threads_list_panel/forum_threads_list_panel.php

    r865 r1657  
    1818require_once PATH_INCLUDES."forum_functions_include.php"; 
    1919 
     20// check if there is a thread time limit defined for guests 
     21$thread_limit = iMEMBER ? 0 : (time() - $settings['forum_guest_limit'] * 86400); 
     22 
    2023// get the list of latest threads 
    2124$result = dbquery( 
     
    2427    INNER JOIN ".$db_prefix."posts tp USING(thread_id) 
    2528    INNER JOIN ".$db_prefix."users tu ON tt.thread_lastuser=tu.user_id 
    26     WHERE ".groupaccess('forum_access')." GROUP BY thread_id ORDER BY thread_lastpost DESC LIMIT 0,".$settings['numofthreads'] 
     29    WHERE ".groupaccess('forum_access').($thread_limit==0?"":" AND tt.thread_lastpost > ".$thread_limit)." 
     30    GROUP BY tt.thread_id ORDER BY tt.thread_lastpost DESC LIMIT 0,".$settings['numofthreads'] 
    2731); 
    2832 
  • modules/common/forum_threads_list_panel/php-files/modules/forum_threads_list_panel/module_installer.php

    r1250 r1657  
    1717$mod_title = "Forum threads body panel"; 
    1818$mod_description = "Shows the latest threads in a body panel, with links to my posts, my threads and new posts panels"; 
    19 $mod_version = "1.1.0"; 
     19$mod_version = "1.1.1"; 
    2020$mod_developer = "WanWizard"; 
    2121$mod_email = "wanwizard@gmail.com"; 
     
    6060$localestrings = array(); 
    6161 
     62$localestrings['en'] = array(); 
     63$localestrings['en']['ftlp01'] = "For guest users, only the active threads of the last %s are visible. Please consider becoming a member"; 
     64 
     65$localestrings['nl'] = array(); 
     66$localestrings['nl']['ftlp01'] = "Voor gasten zijn alleen de topics van de laatste %s zichtbaar. Wordt lid om alles te kunnen zien"; 
     67 
    6268/*---------------------------------------------------+ 
    6369| commands to execute when installing this module    | 
     
    8793            case "1.1.0": 
    8894                // upgrade to ExiteCMS v7.1. no upgrade actions for this release 
     95            case "1.1.1": 
     96                // added the forum thread filter, and the locale strings for the filter message 
    8997            default: 
    9098                // do this at every upgrade 
  • modules/common/forum_threads_list_panel/php-files/modules/forum_threads_list_panel/templates/modules.forum_threads_list_panel.tpl

    r1403 r1657  
    4444    {/section} 
    4545</table> 
     46<div style='text-align:center;'> 
    4647{if $smarty.const.iMEMBER} 
    47 <div style='text-align:center;'> 
    4848    {buttonlink name=$locale.027a link=$smarty.const.BASEDIR|cat:"forum/viewposts.php"} 
    4949    {buttonlink name=$locale.026 link=$smarty.const.MODULES|cat:"forum_threads_list_panel/my_threads.php"}&nbsp; 
     
    5151    {buttonlink name=$locale.028|cat:" ("|cat:$locale.031|cat:")" link=$smarty.const.MODULES|cat:"forum_threads_list_panel/new_posts.php"}&nbsp; 
    5252    {buttonlink name=$locale.028 link=$smarty.const.MODULES|cat:"forum_threads_list_panel/new_posts_detail.php"} 
     53{else} 
     54    {if $settings.forum_guest_limit} 
     55        <span class='small' style='font-size:90%;font-weight:bold;'> 
     56            {if $settings.forum_guest_limit == 1}{$locale.ftlp01|sprintf:$locale.074}{else}{assign var=days value=$settings.forum_guest_limit|cat:" "|cat:$locale.075}{$locale.ftlp01|sprintf:$days}{/if} 
     57        </span> 
     58    {/if} 
     59{/if} 
    5360</div> 
    54 {/if} 
    5561{include file="_closetable_x.tpl"} 
    5662{***************************************************************************} 
Note: See TracChangeset for help on using the changeset viewer.