Version 3.4.5

This commit is contained in:
Neo committed 2025-12-19 00:38:12 -08:00
1 parent fb6b5baabc
commit e4478369d8
1360 files changed
+228921 -179445

No files matched your search

@@ -1,493 +1,504 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Stats skin functions
* Last Updated: $LastChangedDate: 2011-05-05 12:03:47 +0100 (Thu, 05 May 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Forums
* @link http://www.invisionpower.com
* @since 14th May 2003
* @version $Rev: 8644 $
*/
class cp_skin_archive
{
/**
* Registry Object Shortcuts
*
* @var $registry
* @var $DB
* @var $settings
* @var $request
* @var $lang
* @var $member
* @var $memberData
* @var $cache
* @var $caches
*/
protected $registry;
protected $DB;
protected $settings;
protected $request;
protected $lang;
protected $member;
protected $memberData;
protected $cache;
protected $caches;
/**
* Constructor
*
* @param object $registry Registry object
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
$this->registry = $registry;
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
$this->lang = $this->registry->class_localization;
}
/**
* Overview screen
*/
public function showRestorePrefs( $restoreData ) {
$IPBHTML = "";
$lang = sprintf( $this->lang->words['restore_prefs_desc'], "<input type='text' name='restoreDays' value='{$this->settings['archive_restore_days']}' class='input_text' size='3' />" );
//--starthtml--//
$IPBHTML .= <<<HTML
<form action='{$this->settings['base_url']}{$this->form_code}&amp;do=saveRestorePrefs' id='archiveForm' method='post'>
<div class='acp-box'>
<h3>{$this->lang->words['restore_prefs_title']}</h3>
<div class='pad center'>
{$lang}
</div>
<div class='acp-actionbar'>
<input type='submit' class='button' value='{$this->lang->words['arch_update']}' />
</div>
</div>
</form>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Add members pop-up
*/
public function showAddMemberDialog($type) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='acp-box'>
<h3>{$this->lang->words['mm_title']}</h3>
<div class='pad center'>
<input type='text' id='addName' name='addName' value='' autocomplete='off' style='width:210px;' class='textinput' />
<br />
<span class='desctext'>{$this->lang->words['mm_desc_start_typing']}</span>
</div>
<div class='acp-actionbar'>
<input type='submit' class='button' data-clicklaunch="saveAddMemberDialog" data-scope="ACPArchive" data-type="{$type}" value='{$this->lang->words['arch_update']}' />
</div>
</div>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Add forum pop-up
*/
public function showAddForumDialog( $options, $type ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='acp-box'>
<h3>{$this->lang->words['sf_title']}</h3>
<div class='pad center'>
<select name='forumIds[]' id='forumIds' class='input_text' size='15' multiple='multiple' style='width:95%'>{$options}</select>
</div>
<div class='acp-actionbar'>
<input type='submit' class='button' data-clicklaunch="saveAddForumDialog" data-scope="ACPArchive" data-type="{$type}" value='{$this->lang->words['arch_update']}' />
</div>
</div>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Overview screen
*/
public function archiveDashboard( $restoreTopics, $restoreCount, $archTopics, $archCount, $possibleCounts, $connexTest ) {
$IPBHTML = "";
//--starthtml--//
$title = ( $this->settings['archive_on'] ) ? $this->lang->words['archive_title_on'] : $this->lang->words['archive_title_off'];
$button = ( $this->settings['archive_on'] ) ? $this->lang->words['archive_disable'] : $this->lang->words['archive_enable'];
$class = ( $this->settings['archive_on'] ) ? 'red' : 'green';
$IPBHTML .= <<<HTML
<script type='text/javascript' src='{$this->settings['js_app_url']}acp.archive.js'></script>
<div class='section_title'>
<h2>{$title}
<div class='ipsActionButton right {$class}'>
<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=toggleArchiving'>
<img src='{$this->settings['skin_acp_url']}/images/icons/archives.png' alt='' />
{$button}
</a>
</div>
</h2>
</div>
HTML;
if ( $archCount && $possibleCounts['count'] )
{
$percent = round( ( $archCount / $possibleCounts['total'] ) * 100, 2 );
$restoreText = sprintf( $this->lang->words['topics_to_be_unarchived'], $restoreCount );
$IPBHTML .= <<<HTML
<div class='acp-box'>
<div class='header' style='width: {$percent}%; height: 15px !important'>
&nbsp;
</div>
</div>
<div style='margin-top:-28px; padding-left: 10px;'>
<strong>{$percent}% {$this->lang->words['archived_single']} ({$archCount}/{$possibleCounts['total']})</strong>
</div>
<br /><br />
HTML;
}
if ( $connexTest !== true )
{
if ( isset( $this->lang->words['connex_error_' . $connexTest ] ) )
{
$connexTest = $this->lang->words['connex_error_' . $connexTest ];
}
$IPBHTML .= <<<HTML
<div class='warning'>
<h4>{$this->lang->words['connex_error_title']}</h4>
{$connexTest}
</div>
<br />
HTML;
}
$IPBHTML .= <<<HTML
<div class='acp-box'>
<h3>{$restoreText}</h3>
<table class='ipsTable'>
<tr>
<th width='70%'>{$this->lang->words['tbl_title']}</th>
<th width='30%'>{$this->lang->words['tbl_last_post']}</th>
</tr>
HTML;
foreach( $restoreTopics as $id => $data )
{
$navHtml = '';
$data['title'] = IPSText::truncate( $data['title'], 50 );
$lastPost = $this->lang->getDate( $data['topic_last_post'], 'SHORT' );
if ( $data['nav'] )
{
$navHtml = $this->buildForumNav( $data['nav'] );
}
$IPBHTML .= <<<HTML
<tr>
<td>{$navHtml}<a href="{$this->settings['public_url']}showtopic={$data['tid']}">{$data['title']}</a></td>
<td>{$lastPost}</td>
</tr>
HTML;
}
$descLang = sprintf( $this->lang->words['includes_manually_flagged'], $this->settings['archive_restore_days'] );
$IPBHTML .= <<<HTML
<tr>
<td colspan='2' class='acp-actionbar desctext'>
{$descLang} <a href='#' data-clicklaunch="showRestorePrefs" data-scope="ACPArchive" class='mini_button right'>{$this->lang->words['set_unarchive_prefs']}</a>
</td>
</tr>
</table>
</div>
HTML;
if ( count( $archTopics ) )
{
$archTitle = sprintf( $this->lang->words['topics_archived'], count($archTopics), $archCount );
if ( $archCount > 10 )
{
$archTitle .= ' - ' . $this->lang->words['topics_archived_last'];
}
$IPBHTML .= <<<HTML
<br />
<div class='acp-box'>
<h3>{$archTitle}</h3>
<table class='ipsTable'>
<tr>
<th width='70%'>{$this->lang->words['tbl_title']}</th>
<th width='30%'>{$this->lang->words['tbl_last_post']}</th>
</tr>
HTML;
foreach( $archTopics as $id => $data )
{
$navHtml = '';
$data['title'] = IPSText::truncate( $data['title'], 50 );
$lastPost = $this->lang->getDate( $data['topic_last_post'], 'SHORT' );
if ( $data['nav'] )
{
$navHtml = $this->buildForumNav( $data['nav'] );
}
$IPBHTML .= <<<HTML
<tr>
<td>{$navHtml}<a href="{$this->settings['public_url']}showtopic={$data['tid']}">{$data['title']}</a></td>
<td>{$lastPost}</td>
</tr>
HTML;
}
$IPBHTML .= <<<HTML
</table>
</div>
HTML;
}
//--endhtml--//
return $IPBHTML;
}
/**
* Overview screen
*/
public function archiveRules( $json='{}', $textString='' ) {
$IPBHTML = "";
//--starthtml--//
$doArchivePane = $this->archivePane( 'archive' );
$skipArchivePane = $this->archivePane( 'skip' );
$IPBHTML .= <<<HTML
<script type='text/javascript' src='{$this->settings['js_app_url']}acp.archive.js'></script>
<script tyle='text/javascript'>
ipb.ACPArchive.inSection = 'rules';
ipb.ACPArchive.ruleData = $json;
</script>
<div class='section_title'>
<h2>{$this->lang->words['archive_rules_title']}</h2>
</div>
<div class='information-box' id='archiveCount'>
{$textString}
</div>
<br />
<form action='{$this->settings['base_url']}{$this->form_code}&amp;do=saveRules' id='archiveForm' method='post'>
<div class='acp-box'>
<h3>{$this->lang->words['rules_title']}</h3>
<div id='tabstrip_archive' class='ipsTabBar with_left with_right'>
<ul>
<li id='tab_archive'>{$this->lang->words['rules_tab_archive']}</li>
<li id='tab_skip'>{$this->lang->words['rules_tab_skip']}</li>
</ul>
</div>
<div id='tabstrip_archive_content' class='ipsTabBar_content'>
<div id='tab_archive_content' class='pad row2'>
<div class='pad row1'>
{$doArchivePane}
</div>
</div>
<div id='tab_skip_content' class='pad _red'>
<div class='pad row1'>
{$skipArchivePane}
</div>
</div>
</div>
<div class='acp-actionbar'>
<input type='submit' name='submit' value='{$this->lang->words['rules_save']}' class='button primary' />
</div>
</div>
<form>
<script type='text/javascript'>
jQ("#tabstrip_archive").ipsTabBar({tabWrap: "#tabstrip_archive_content", defaultTab: "tab_archive" });
</script>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Overview screen
*/
public function archivePane( $type='archive' ) {
$IPBHTML = "";
//--starthtml--//
if ( $type == 'archive' )
{
$IPBHTML .= <<<HTML
<div class='acp-box pad row1 rule'>
{$this->lang->words['rules_topic_is']}
<select name='{$type}_field_state' id='{$type}_field_state'>
<option value='-' id='{$type}_field_state_any'>{$this->lang->words['rules_state_any']}</option>
<option value='open' id='{$type}_field_state_open'>{$this->lang->words['rules_state_open']}</option>
<option value='closed' id='{$type}_field_state_closed'>{$this->lang->words['rules_state_closed']}</option>
</select>
</div>
<br />
<div class='acp-box pad row1 rule'>
{$this->lang->words['rules_topic_is']}
<select name='{$type}_field_pinned' id='{$type}_field_pinned'>
<option value='-' id='{$type}_field_pinned_any'>{$this->lang->words['rules_pinned_any']}</option>
<option value='1' id='{$type}_field_pinned_1'>{$this->lang->words['rules_pinned_pin']}</option>
<option value='0' id='{$type}_field_pinned_0'>{$this->lang->words['rules_pinned_not']}</option>
</select>
</div>
<br />
<div class='acp-box pad row1 rule'>
{$this->lang->words['rules_topic_is']}
<select name='{$type}_field_approved' id='{$type}_field_approved'>
<option value='-' id='{$type}_field_approved_any'>{$this->lang->words['rules_approved_any']}</option>
<option value='1' id='{$type}_field_approved_1'>{$this->lang->words['rules_approved_visible']}</option>
<option value='0' id='{$type}_field_approved_0'>{$this->lang->words['rules_approved_hidden']}</option>
</select>
</div>
<br />
<div class='acp-box pad row1 rule'>
{$this->lang->words['rules_topic_has']}
<select name='{$type}_field_poll' id='{$type}_field_poll'>
<option value='-' id='{$type}_field_poll_any'>{$this->lang->words['rules_poll_any']}</option>
<option value='1' id='{$type}_field_poll_1'>{$this->lang->words['rules_poll_has']}</option>
<option value='0' id='{$type}_field_poll_0'>{$this->lang->words['rules_poll_not']}</option>
</select>
</div>
<br />
HTML;
}
$IPBHTML .= <<<HTML
<div class='acp-box pad row1 rule'>
{$this->lang->words['rules_topic_has']}
<select name='{$type}_field_post' id='{$type}_field_post'>
<option value='<' id='{$type}_field_post_less'>{$this->lang->words['rules_less_than']}</option>
<option value='>' id='{$type}_field_post_more'>{$this->lang->words['rules_more_than']}</option>
</select>
<input type='text' class='input_text' name='{$type}_field_post_text' id='{$type}_field_post_text' size='5'>
{$this->lang->words['rules_posts']}
</div>
<br />
<div class='acp-box pad row1 rule'>
{$this->lang->words['rules_topic_has']}
<select name='{$type}_field_view' id='{$type}_field_view'>
<option value='<' id='{$type}_field_view_less'>{$this->lang->words['rules_less_than']}</option>
<option value='>' id='{$type}_field_view_more'>{$this->lang->words['rules_more_than']}</option>
</select>
<input type='text' class='input_text' name='{$type}_field_view_text' id='{$type}_field_view_text' size='5'>
{$this->lang->words['rules_views']}
</div>
<br />
<div class='acp-box pad row1 rule'>
{$this->lang->words['rules_topic_rated']}
<select name='{$type}_field_rating' id='{$type}_field_rating'>
<option value='>' id='{$type}_field_rating_more'>{$this->lang->words['rules_more_than']}</option>
<option value='<' id='{$type}_field_rating_less'>{$this->lang->words['rules_less_than']}</option>
</select>
<input type='text' class='input_text' name='{$type}_field_rating_text' id='{$type}_field_rating_text' size='2'> {$this->lang->words['rules_oo_five']}
</div>
HTML;
if ( $type == 'archive' )
{
$IPBHTML .= <<<HTML
<br />
<div class='acp-box pad row1 rule'>
{$this->lang->words['rules_topic']}
<select name='{$type}_field_forum' id='{$type}_field_forum'>
<option value='+' id='{$type}_field_forum_less'>{$this->lang->words['rules_is_in_forum']}</option>
<option value='-' id='{$type}_field_forum_more'>{$this->lang->words['rules_is_not_in_forum']}</option>
</select>
<input type='button' id='{$type}_addForum' value='{$this->lang->words['rules_forum_button']}' data-clicklaunch="launchAddForumDialog" data-scope="ACPArchive" data-type="{$type}" class='mini_button' />
<div id='{$type}_forumsGoHere' class='pad' style='display:none'></div>
<input type='hidden' name='{$type}_field_forum_text' id='{$type}_field_forum_text' />
</div>
<br />
<div class='acp-box pad row1 rule'>
{$this->lang->words['rules_topic_starter']}
<select name='{$type}_field_member' id='{$type}_field_member'>
<option value='+' id='{$type}_field_member_less'>{$this->lang->words['rules_includes']}</option>
<option value='-' id='{$type}_field_member_more'>{$this->lang->words['rules_does_not_include']}</option>
</select>
<input type='button' id='{$type}_addMember' value='{$this->lang->words['rules_members_button']}' data-clicklaunch="launchAddMemberDialog" data-scope="ACPArchive" data-type="{$type}" class='mini_button' />
<div id='{$type}_membersGoHere' class='pad' style='display:none'></div>
<input type='hidden' name='{$type}_field_member_text' id='{$type}_field_member_text' />
</div>
HTML;
}
$IPBHTML .= <<<HTML
<br />
<div class='acp-box pad row1 rule'>
{$this->lang->words['rules_topic_last_post']}
<select name='{$type}_field_lastpost' id='{$type}_field_lastpost'>
<option value='<' id='{$type}_field_lastpost_less'>{$this->lang->words['rules_older_than']}</option>
<option value='>' id='{$type}_field_lastpost_more'>{$this->lang->words['rules_newer_than']}</option>
</select>
<input type='text' class='input_text' name='{$type}_field_lastpost_text' id='{$type}_field_lastpost_text' size='5'>
<select name='{$type}_field_lastpost_unit' id='{$type}_field_lastpost_unit'>
<option value='d' id='{$type}_field_lastpost_unit_d'>{$this->lang->words['rules_days']}</option>
<option value='m' id='{$type}_field_lastpost_unit_m'>{$this->lang->words['rules_months']}</option>
<option value='y' id='{$type}_field_lastpost_unit_y'>{$this->lang->words['rules_years']}</option>
</select>
</div>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Build nav
*/
function buildForumNav( $data )
{
if ( ! is_array( $data ) )
{
return '';
}
foreach( $data as $nav )
{
$navHtml .= '<a href="' . $this->settings['public_url'] . $nav[1] . '" class="desctext">' . $nav[0] . '</a> <span class="desctext">&rarr;</span>&nbsp;';
}
return $navHtml;
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* Stats skin functions
* Last Updated: $LastChangedDate: 2011-05-05 12:03:47 +0100 (Thu, 05 May 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Forums
* @link http://www.invisionpower.com
* @since 14th May 2003
* @version $Rev: 8644 $
*/
class cp_skin_archive
{
/**
* Registry Object Shortcuts
*
* @var $registry
* @var $DB
* @var $settings
* @var $request
* @var $lang
* @var $member
* @var $memberData
* @var $cache
* @var $caches
*/
protected $registry;
protected $DB;
protected $settings;
protected $request;
protected $lang;
protected $member;
protected $memberData;
protected $cache;
protected $caches;
/**
* Constructor
*
* @param object $registry Registry object
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
$this->registry = $registry;
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
$this->lang = $this->registry->class_localization;
}
/**
* Overview screen
*/
public function showRestorePrefs( $restoreData ) {
$IPBHTML = "";
$lang = sprintf( $this->lang->words['restore_prefs_desc'], "<input type='text' name='restoreDays' value='{$this->settings['archive_restore_days']}' class='input_text' size='3' />" );
//--starthtml--//
$IPBHTML .= <<<HTML
<form action='{$this->settings['base_url']}{$this->form_code}&amp;do=saveRestorePrefs' id='archiveForm' method='post'>
<div class='acp-box'>
<h3>{$this->lang->words['restore_prefs_title']}</h3>
<div class='pad center'>
{$lang}
</div>
<div class='acp-actionbar'>
<input type='submit' class='button' value='{$this->lang->words['arch_update']}' />
</div>
</div>
</form>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Add members pop-up
*/
public function showAddMemberDialog($type) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='acp-box'>
<h3>{$this->lang->words['mm_title']}</h3>
<div class='pad center'>
<input type='text' id='addName' name='addName' value='' autocomplete='off' style='width:210px;' class='textinput' />
<br />
<span class='desctext'>{$this->lang->words['mm_desc_start_typing']}</span>
</div>
<div class='acp-actionbar'>
<input type='submit' class='button' data-clicklaunch="saveAddMemberDialog" data-scope="ACPArchive" data-type="{$type}" value='{$this->lang->words['arch_update']}' />
</div>
</div>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Add forum pop-up
*/
public function showAddForumDialog( $options, $type ) {
$IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div class='acp-box'>
<h3>{$this->lang->words['sf_title']}</h3>
<div class='pad center'>
<select name='forumIds[]' id='forumIds' class='input_text' size='15' multiple='multiple' style='width:95%'>{$options}</select>
</div>
<div class='acp-actionbar'>
<input type='submit' class='button' data-clicklaunch="saveAddForumDialog" data-scope="ACPArchive" data-type="{$type}" value='{$this->lang->words['arch_update']}' />
</div>
</div>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Overview screen
*/
public function archiveDashboard( $restoreTopics, $restoreCount, $archTopics, $archCount, $possibleCounts, $connexTest ) {
$IPBHTML = "";
//--starthtml--//
$title = ( $this->settings['archive_on'] ) ? $this->lang->words['archive_title_on'] : $this->lang->words['archive_title_off'];
$button = ( $this->settings['archive_on'] ) ? $this->lang->words['archive_disable'] : $this->lang->words['archive_enable'];
$class = ( $this->settings['archive_on'] ) ? 'red' : 'green';
$IPBHTML .= <<<HTML
<script type='text/javascript' src='{$this->settings['js_app_url']}acp.archive.js'></script>
<div class='section_title'>
<h2>{$title}
<div class='ipsActionButton right {$class}'>
<a href='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=toggleArchiving'>
<img src='{$this->settings['skin_acp_url']}/images/icons/archives.png' alt='' />
{$button}
</a>
</div>
</h2>
</div>
HTML;
$restoreText = sprintf( $this->lang->words['topics_to_be_unarchived'], $restoreCount );
if ( $archCount && $possibleCounts['count'] )
{
$percent = round( ( $archCount / $possibleCounts['count'] ) * 100, 2 );
$IPBHTML .= <<<HTML
<div class='acp-box'>
<div class='header' style='width: {$percent}%; padding-right: 0px; padding-left: 0px; height: 15px !important'>
&nbsp;
</div>
</div>
<div style='margin-top:-28px; padding-left: 10px;'>
<strong>{$percent}% {$this->lang->words['archived_single']} ({$archCount}/{$possibleCounts['count']})</strong>
</div>
<br /><br />
HTML;
}
if ( $connexTest !== true )
{
if ( isset( $this->lang->words['connex_error_' . $connexTest ] ) )
{
$connexTest = $this->lang->words['connex_error_' . $connexTest ];
}
$IPBHTML .= <<<HTML
<div class='warning'>
<h4>{$this->lang->words['connex_error_title']}</h4>
{$connexTest}
</div>
<br />
HTML;
}
$IPBHTML .= <<<HTML
<div class='acp-box'>
<h3>{$restoreText}</h3>
<table class='ipsTable'>
HTML;
if (count($restoreTopics))
{
$IPBHTML .= <<<HTML
<tr>
<th width='70%'>{$this->lang->words['tbl_title']}</th>
<th width='30%'>{$this->lang->words['tbl_last_post']}</th>
</tr>
HTML;
foreach( $restoreTopics as $id => $data )
{
$navHtml = '';
$data['title'] = IPSText::truncate( $data['title'], 50 );
$lastPost = $this->lang->getDate( $data['topic_last_post'], 'SHORT' );
if ( $data['nav'] )
{
$navHtml = $this->buildForumNav( $data['nav'] );
}
$IPBHTML .= <<<HTML
<tr>
<td>{$navHtml}<a href="{$this->settings['public_url']}showtopic={$data['tid']}">{$data['title']}</a></td>
<td>{$lastPost}</td>
</tr>
HTML;
}
}
$descLang = sprintf( $this->lang->words['includes_manually_flagged'], $this->settings['archive_restore_days'] );
$IPBHTML .= <<<HTML
<tr>
<td colspan='2' class='acp-actionbar desctext'>
{$descLang} <a href='#' data-clicklaunch="showRestorePrefs" data-scope="ACPArchive" class='mini_button right'>{$this->lang->words['set_unarchive_prefs']}</a>
</td>
</tr>
</table>
</div>
HTML;
$archTitle = sprintf( $this->lang->words['topics_archived'], count($archTopics), $archCount );
if ( $archCount > 10 )
{
$archTitle .= ' - ' . $this->lang->words['topics_archived_last'];
}
$IPBHTML .= <<<HTML
<br />
<div class='acp-box'>
<h3>{$archTitle}</h3>
HTML;
if ( count( $archTopics ) )
{
$IPBHTML .= <<<HTML
<table class='ipsTable'>
<tr>
<th width='70%'>{$this->lang->words['tbl_title']}</th>
<th width='30%'>{$this->lang->words['tbl_last_post']}</th>
</tr>
HTML;
foreach( $archTopics as $id => $data )
{
$navHtml = '';
$data['title'] = IPSText::truncate( $data['title'], 50 );
$lastPost = $this->lang->getDate( $data['topic_last_post'], 'SHORT' );
if ( $data['nav'] )
{
$navHtml = $this->buildForumNav( $data['nav'] );
}
$IPBHTML .= <<<HTML
<tr>
<td>{$navHtml}<a href="{$this->settings['public_url']}showtopic={$data['tid']}">{$data['title']}</a></td>
<td>{$lastPost}</td>
</tr>
HTML;
}
$IPBHTML .= <<<HTML
</table>
</div>
HTML;
}
//--endhtml--//
return $IPBHTML;
}
/**
* Overview screen
*/
public function archiveRules( $json='{}', $textString='' ) {
$IPBHTML = "";
//--starthtml--//
$doArchivePane = $this->archivePane( 'archive' );
$skipArchivePane = $this->archivePane( 'skip' );
$IPBHTML .= <<<HTML
<script type='text/javascript' src='{$this->settings['js_app_url']}acp.archive.js'></script>
<script tyle='text/javascript'>
ipb.ACPArchive.inSection = 'rules';
ipb.ACPArchive.ruleData = $json;
</script>
<div class='section_title'>
<h2>{$this->lang->words['archive_rules_title']}</h2>
</div>
<div class='information-box' id='archiveCount'>
{$textString}
</div>
<br />
<form action='{$this->settings['base_url']}{$this->form_code}&amp;do=saveRules' id='archiveForm' method='post'>
<div class='acp-box'>
<h3>{$this->lang->words['rules_title']}</h3>
<div id='tabstrip_archive' class='ipsTabBar with_left with_right'>
<ul>
<li id='tab_archive'>{$this->lang->words['rules_tab_archive']}</li>
<li id='tab_skip'>{$this->lang->words['rules_tab_skip']}</li>
</ul>
</div>
<div id='tabstrip_archive_content' class='ipsTabBar_content'>
<div id='tab_archive_content' class='pad row2'>
<div class='pad row1'>
{$doArchivePane}
</div>
</div>
<div id='tab_skip_content' class='pad _red'>
<div class='pad row1'>
{$skipArchivePane}
</div>
</div>
</div>
<div class='acp-actionbar'>
<input type='submit' name='submit' value='{$this->lang->words['rules_save']}' class='button primary' />
</div>
</div>
<form>
<script type='text/javascript'>
jQ("#tabstrip_archive").ipsTabBar({tabWrap: "#tabstrip_archive_content", defaultTab: "tab_archive" });
</script>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Overview screen
*/
public function archivePane( $type='archive' ) {
$IPBHTML = "";
//--starthtml--//
if ( $type == 'archive' )
{
$IPBHTML .= <<<HTML
<div class='acp-box pad row1 rule'>
{$this->lang->words['rules_topic_is']}
<select name='{$type}_field_state' id='{$type}_field_state'>
<option value='-' id='{$type}_field_state_any'>{$this->lang->words['rules_state_any']}</option>
<option value='open' id='{$type}_field_state_open'>{$this->lang->words['rules_state_open']}</option>
<option value='closed' id='{$type}_field_state_closed'>{$this->lang->words['rules_state_closed']}</option>
</select>
</div>
<br />
<div class='acp-box pad row1 rule'>
{$this->lang->words['rules_topic_is']}
<select name='{$type}_field_pinned' id='{$type}_field_pinned'>
<option value='-' id='{$type}_field_pinned_any'>{$this->lang->words['rules_pinned_any']}</option>
<option value='1' id='{$type}_field_pinned_1'>{$this->lang->words['rules_pinned_pin']}</option>
<option value='0' id='{$type}_field_pinned_0'>{$this->lang->words['rules_pinned_not']}</option>
</select>
</div>
<br />
<div class='acp-box pad row1 rule'>
{$this->lang->words['rules_topic_is']}
<select name='{$type}_field_approved' id='{$type}_field_approved'>
<option value='-' id='{$type}_field_approved_any'>{$this->lang->words['rules_approved_any']}</option>
<option value='1' id='{$type}_field_approved_1'>{$this->lang->words['rules_approved_visible']}</option>
<option value='0' id='{$type}_field_approved_0'>{$this->lang->words['rules_approved_hidden']}</option>
</select>
</div>
<br />
<div class='acp-box pad row1 rule'>
{$this->lang->words['rules_topic_has']}
<select name='{$type}_field_poll' id='{$type}_field_poll'>
<option value='-' id='{$type}_field_poll_any'>{$this->lang->words['rules_poll_any']}</option>
<option value='1' id='{$type}_field_poll_1'>{$this->lang->words['rules_poll_has']}</option>
<option value='0' id='{$type}_field_poll_0'>{$this->lang->words['rules_poll_not']}</option>
</select>
</div>
<br />
HTML;
}
$IPBHTML .= <<<HTML
<div class='acp-box pad row1 rule'>
{$this->lang->words['rules_topic_has']}
<select name='{$type}_field_post' id='{$type}_field_post'>
<option value='<' id='{$type}_field_post_less'>{$this->lang->words['rules_less_than']}</option>
<option value='>' id='{$type}_field_post_more'>{$this->lang->words['rules_more_than']}</option>
</select>
<input type='text' class='input_text' name='{$type}_field_post_text' id='{$type}_field_post_text' size='5'>
{$this->lang->words['rules_posts']}
</div>
<br />
<div class='acp-box pad row1 rule'>
{$this->lang->words['rules_topic_has']}
<select name='{$type}_field_view' id='{$type}_field_view'>
<option value='<' id='{$type}_field_view_less'>{$this->lang->words['rules_less_than']}</option>
<option value='>' id='{$type}_field_view_more'>{$this->lang->words['rules_more_than']}</option>
</select>
<input type='text' class='input_text' name='{$type}_field_view_text' id='{$type}_field_view_text' size='5'>
{$this->lang->words['rules_views']}
</div>
<br />
<div class='acp-box pad row1 rule'>
{$this->lang->words['rules_topic_rated']}
<select name='{$type}_field_rating' id='{$type}_field_rating'>
<option value='>' id='{$type}_field_rating_more'>{$this->lang->words['rules_more_than']}</option>
<option value='<' id='{$type}_field_rating_less'>{$this->lang->words['rules_less_than']}</option>
</select>
<input type='text' class='input_text' name='{$type}_field_rating_text' id='{$type}_field_rating_text' size='2'> {$this->lang->words['rules_oo_five']}
</div>
HTML;
if ( $type == 'archive' )
{
$IPBHTML .= <<<HTML
<br />
<div class='acp-box pad row1 rule'>
{$this->lang->words['rules_topic']}
<select name='{$type}_field_forum' id='{$type}_field_forum'>
<option value='+' id='{$type}_field_forum_less'>{$this->lang->words['rules_is_in_forum']}</option>
<option value='-' id='{$type}_field_forum_more'>{$this->lang->words['rules_is_not_in_forum']}</option>
</select>
<input type='button' id='{$type}_addForum' value='{$this->lang->words['rules_forum_button']}' data-clicklaunch="launchAddForumDialog" data-scope="ACPArchive" data-type="{$type}" class='mini_button' />
<div id='{$type}_forumsGoHere' class='pad' style='display:none'></div>
<input type='hidden' name='{$type}_field_forum_text' id='{$type}_field_forum_text' />
</div>
<br />
<div class='acp-box pad row1 rule'>
{$this->lang->words['rules_topic_starter']}
<select name='{$type}_field_member' id='{$type}_field_member'>
<option value='+' id='{$type}_field_member_less'>{$this->lang->words['rules_includes']}</option>
<option value='-' id='{$type}_field_member_more'>{$this->lang->words['rules_does_not_include']}</option>
</select>
<input type='button' id='{$type}_addMember' value='{$this->lang->words['rules_members_button']}' data-clicklaunch="launchAddMemberDialog" data-scope="ACPArchive" data-type="{$type}" class='mini_button' />
<div id='{$type}_membersGoHere' class='pad' style='display:none'></div>
<input type='hidden' name='{$type}_field_member_text' id='{$type}_field_member_text' />
</div>
HTML;
}
$IPBHTML .= <<<HTML
<br />
<div class='acp-box pad row1 rule'>
{$this->lang->words['rules_topic_last_post']}
<select name='{$type}_field_lastpost' id='{$type}_field_lastpost'>
<option value='<' id='{$type}_field_lastpost_less'>{$this->lang->words['rules_older_than']}</option>
<option value='>' id='{$type}_field_lastpost_more'>{$this->lang->words['rules_newer_than']}</option>
</select>
<input type='text' class='input_text' name='{$type}_field_lastpost_text' id='{$type}_field_lastpost_text' size='5'>
<select name='{$type}_field_lastpost_unit' id='{$type}_field_lastpost_unit'>
<option value='d' id='{$type}_field_lastpost_unit_d'>{$this->lang->words['rules_days']}</option>
<option value='m' id='{$type}_field_lastpost_unit_m'>{$this->lang->words['rules_months']}</option>
<option value='y' id='{$type}_field_lastpost_unit_y'>{$this->lang->words['rules_years']}</option>
</select>
</div>
HTML;
//--endhtml--//
return $IPBHTML;
}
/**
* Build nav
*/
function buildForumNav( $data )
{
if ( ! is_array( $data ) )
{
return '';
}
foreach( $data as $nav )
{
$navHtml .= '<a href="' . $this->settings['public_url'] . $nav[1] . '" class="desctext">' . $nav[0] . '</a> <span class="desctext">&rarr;</span>&nbsp;';
}
return $navHtml;
}
}
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Attachments skin functions
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Forums
* @link http://www.invisionpower.com
* @since 14th May 2003
* @version $Rev: 10914 $
* @version $Rev: 10721 $
*/
class cp_skin_attachments
@@ -3,19 +3,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Forums skin functions
* Last Updated: $LastChangedDate: 2012-06-29 09:20:50 -0400 (Fri, 29 Jun 2012) $
* Last Updated: $LastChangedDate: 2013-03-21 11:03:13 -0400 (Thu, 21 Mar 2013) $
* </pre>
*
* @author $Author: ips_terabyte $
* @author $Author: mmecham $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Forums
* @link http://www.invisionpower.com
* @since 14th May 2003
* @version $Rev: 11004 $
* @version $Rev: 12100 $
*/
class cp_skin_forums
@@ -75,8 +75,8 @@ $IPBHTML = "";
//--starthtml--//
$IPBHTML .= <<<HTML
<div id='cat_{$r['id']}' class='isDraggable'>
<div class='root_item item category clearfix ipsControlRow'>
<div id='cat_{$r['id']}' class='isDraggable parentCat'>
<div class='root_item item category clearfix ipsControlRow parent'>
<div class='col_buttons right' style='white-space: nowrap'>
<ul class='ipsControlStrip'>
<li class='i_add'>
@@ -96,6 +96,7 @@ $IPBHTML .= <<<HTML
<li class='icon view'><a href='{$this->settings['base_url']}{$this->form_code}do=skinedit&amp;f={$r['id']}'>{$this->lang->words['frm_skinopt']}</a></li>
</ul>
</div>
<a href='#' class='toggle'>Toggle</a>
<div class='draghandle'>&nbsp;</div>
<div class='item_info'>
<img src='{$this->settings['skin_acp_url']}/images/icons/folder.png' />
@@ -482,15 +483,6 @@ $IPBHTML .= <<<HTML
{$data['_editor']}
</td>
</tr>
<!--<tr>
<td class='field_title'>
<strong class='title'>{$this->lang->words['frm_rule_raw_html_title']}</strong>
</td>
<td class='field_field'>
{$data['rules_raw_html']}<br />
<span class='desctext'>{$this->lang->words['frm_rule_raw_html_desc']}</span>
</td>
</tr>-->
</table>
<div class='acp-actionbar'>
<input type='submit' value='{$this->lang->words['frm_rulesbutton']}' class='button primary' accesskey='s' />
@@ -714,7 +706,7 @@ if( $code == 'donew'){
}
$IPBHTML .= <<<HTML
<form name='adminform' id='adminform' action='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do={$code}&amp;f={$this->request['f']}&amp;name={$_forUrl}' method='post' enctype='multipart/form-data'>
<form name='adminform' data-form-type="forum" id='adminform' action='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do={$code}&amp;f={$this->request['f']}&amp;name={$_forUrl}' method='post' enctype='multipart/form-data'>
<input type='hidden' name='_admin_auth_key' value='{$this->registry->adminFunctions->getSecurityKey()}' />
<input type='hidden' name='convert' id='convert' value='0' />
<input type='hidden' name='type' value='{$this->request['type']}' />
@@ -949,7 +941,37 @@ HTML;
{$form['parent_id']}
</td>
</tr>
<tr>
<td class='field_title'><strong class='title'>{$this->lang->words['sitemap_forum_priority']}</strong></td>
<td class='field_field'>
{$form['ipseo_priority']}<br />
<span class='desctext'>{$this->lang->words['sitemap_forum_priority_desc']}</span>
</td>
</tr>
HTML;
if ( $this->settings['viglink_enabled'] )
{
$IPBHTML .= <<<HTML
<tr>
<td class='field_title'><strong class='title'>{$this->lang->words['viglink_forum']}</strong></td>
<td class='field_field'>
{$form['viglink']}
</td>
</tr>
HTML;
}
$bw_enable_answers_member_checked = '';
if ( $_POST['bw_enable_answers_member'] == 1 OR $forum['bw_enable_answers_member'] == 1 )
{
$bw_enable_answers_member_checked = 'checked="checked"';
}
$IPBHTML .= <<<HTML
<tbody id='forum_redirect' style='display: none'>
<tr>
<th colspan='2'>
@@ -981,7 +1003,16 @@ HTML;
{$this->lang->words['frm_f_perm_title']}
</th>
</tr>
<tr>
<td class='field_title'>
<strong class='title'>{$this->lang->words['enable_answers']}</strong>
</td>
<td class='field_field'>
{$form['bw_enable_answers']}<br /><br />
<input type='checkbox' name='bw_enable_answers_member' value='1' {$bw_enable_answers_member_checked} /> <span class='desctext'>{$this->lang->words['bw_enable_answers_member']}</span>
<br /><br /><span class='desctext'>{$this->lang->words['enable_answers_desc']}</span>
</td>
</tr>
<tr>
<td class='field_title'>
<strong class='title'>{$this->lang->words['disable_sharelinks']}</strong>
@@ -1665,6 +1696,14 @@ $IPBHTML .= <<<HTML
{$form['mod_can_set_close_time']}
</td>
</tr>
<tr>
<td class='field_title'>
<strong class='title'>{$this->lang->words['bw_can_toggle_answered_post']}</strong>
</td>
<td class='field_field'>
{$form['bw_can_toggle_answered_post']}
</td>
</tr>
<tr>
<th colspan='2'>{$this->lang->words['frm_m_msettings']}</th>
</tr>
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Group plugin skin functions
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Forums
* @link http://www.invisionpower.com
* @since 14th May 2003
* @version $Rev: 10914 $
* @version $Rev: 10721 $
*/
class cp_skin_group_form
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Forum member form plugin
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Forums
* @link http://www.invisionpower.com
* @since 14th May 2003
* @version $Rev: 10914 $
* @version $Rev: 10721 $
*/
class cp_skin_member_form
@@ -3,19 +3,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Multimods skin functions
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2012-05-25 13:17:47 -0400 (Fri, 25 May 2012) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Forums
* @link http://www.invisionpower.com
* @since 14th May 2003
* @version $Rev: 10914 $
* @version $Rev: 10798 $
*/
class cp_skin_multimods
@@ -3,19 +3,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* RSS skin functions
* Last Updated: $LastChangedDate: 2012-06-18 11:11:25 -0400 (Mon, 18 Jun 2012) $
* Last Updated: $LastChangedDate: 2013-04-23 22:13:24 -0400 (Tue, 23 Apr 2013) $
* </pre>
*
* @author $Author: ips_terabyte $
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Forums
* @link http://www.invisionpower.com
* @since 14th May 2003
* @version $Rev: 10937 $
* @version $Rev: 12195 $
*/
class cp_skin_rss
@@ -461,7 +461,7 @@ $IPBHTML .= <<<HTML
<strong class='title'>{$this->lang->words['rss_im_poster']}</strong>
</td>
<td class='field_field'>
{$form['rss_import_mid']}<br /> <br />
{$form['rss_import_mid']}<br />
<span class='desctext'>{$this->lang->words['rss_im_poster_info']}</span>
</td>
</tr>
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Stats skin functions
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Forums
* @link http://www.invisionpower.com
* @since 14th May 2003
* @version $Rev: 10914 $
* @version $Rev: 10721 $
*/
class cp_skin_stats