Skocz do zawartości
"Idzie nowe..." - o zmianach i nie tylko ×
Przeniesienie zakupów z IPS Marketplace / Moving bought items from IPS Marketplace ×

(DP30) Forum Icons


DawPi

Rekomendowane odpowiedzi

w czym moze lezec problem ?

W niektorych działa dogrywa mi a w niektorych nie ...

problem wystepuja i wylacznie na stronie glownej.

po wejsciu w daną kategorie jest wszedzie natomiast na stronie glownej nie jest niestety wszedzie.

Edytowane przez Stranek
Odnośnik do komentarza
Udostępnij na innych stronach

  • Manager

W tym co zwykle - błędna edycja plików/skina.

Dla potomnych: mod działa. Instalowałem go ze sto razy - działał i działa do tej pory.

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Odnośnik do komentarza
Udostępnij na innych stronach

Prawidlowo sa oznaczone ikonki w subforach natomiast na stronie glownej ikonki oznaczone jako działy przeczytane już maja stara ikonke natomiast na subforach działa normalnie

Sprawdzałem pare razy już w plikach wszystko jest ok Forum przeczytane maja stara ikonke nieprzeczytane nowa taka jak ustalam w ACP

Edytowane przez Stranek
Odnośnik do komentarza
Udostępnij na innych stronach

Jak moge zablokowac te ikony tak aby po przeczytaniu tematu pozostaly?

mialem odobnie w wersji 2.3.6 tylko ze tam ustawilem sobie ikony

przeczytane tematy ikona1

nie przeczytane tematy ikona2

a tu chcial bym by zamiast standardowej ikony po przeczytanym temacie zostala ta z modyfikacji.

b_350_20_692108_381007_FFFFFF_000000.png

Je ne suis pas d'écrire correctement en Polonais

comprendre S.V.P !!

Odnośnik do komentarza
Udostępnij na innych stronach

też tak mam

poprawnie wszystko zrobiłem

dodałem ikona.gif i ikona_off.gif

a po przeczytaniu wszystkich tematów w danym forum ikona znika

Amazing Game Website Templates for those who want to stand out from others.

Professional IPS Themes - Gaming Invision Community Themes, Forum Skins and Game UI Templates.

Forum Templates for Clans and Guilds, Web and Game Developers.

Odnośnik do komentarza
Udostępnij na innych stronach

nie nie

to jest cos nie tak

na starszej wersji ikona _off odpowiadala wygladu dzialu z przeczytanymi postami

teraz ikona _off jest zamieniana na ikone standardowa

DawPi bedzie wiedzial co z tym zrobic

b_350_20_692108_381007_FFFFFF_000000.png

Je ne suis pas d'écrire correctement en Polonais

comprendre S.V.P !!

Odnośnik do komentarza
Udostępnij na innych stronach

  • Manager

Po prostu - jeśli ktoś ma problem z tym modem, to na 99% jest to błędna edycja ew. niedokładny opis problemu - możesz go właśnie przepisać jeszcze raz? Jakieś screeny również są pomocne.

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Odnośnik do komentarza
Udostępnij na innych stronach

na forum wersji 2,3,6 mialem zainstalowana modyfikacje i tam na ikony nie dalo sie kliknac by odznaczyc forum jako przeczytane. tam byly ikony stale chyba ze podmienilem ikone _off na inna to wtedy byly ikony inne na nieprzeczytanym i przeczytanym dziale .

na forum wersji 3,1,4 ikony da sie kliknac i odznaczyc jako forum przeczytane i ikona robi sie wtedy standardowa jak byla orginalna w skinie

przed kiknieciem

post-931-0-96883100-1295814778_thumb.png

i po kliknieciu

post-931-0-82552700-1295814816_thumb.png

wszystko jednak jest ustawione

post-931-0-65325700-1295814859_thumb.png

nie wiem czy da sie to jakos przestawic czy nie

daje jeszcze fragmety plikow ktore edytowalem

plik: admin/applications/forums/modules_admin/forums/forums.php

	# Trim the form for categories...
	$form['addnew_type']			= $addnew_type;
	$this->request['type']          = $addnew_type;
	$form['addnew_type_upper']		= ucwords($addnew_type);

	$form['convert_button'] 		=& $convert;
	//-----------------------------------------
	// (DP30) Forum Icons --START--
	//-----------------------------------------		

	$dh = opendir( IPS_PUBLIC_PATH . 'forumicons' );
	$icons = array();
	$icons[] = array("", $this->lang->words['dp30_forum_icons_default'] );
	while ($icon = readdir($dh)) {
		if((preg_match("/(.gif)/",$icon) || preg_match("/(.jpg)/",$icon) || preg_match("/(.jpeg)/",$icon) || preg_match("/(.png)/",$icon)) && !preg_match("/(_off)/",$icon)) {
			if($icon != '.' || $icon != '..') {
			$iconname = str_replace(".gif","",$icon);
			$icons[] = array($iconname, $iconname);
			}
		}
	}
	closedir($dh);


	//-----------------------------------------
	// Generate form items
	//-----------------------------------------	

'hide_last_info'		   => intval( $this->request['hide_last_info'] ),
					 						 'icon'					   => ( isset( $this->request['icon'] ) AND strlen( $this->request['icon'] ) ) ? $this->request['icon'] : '0',

					 'disable_sharelinks'	   => intval( $this->request['disable_sharelinks'] ),

plik: admin/applications/forums/skin_cp/cp_skin_forums.php

$IPBHTML .= <<<HTML
	 	<li>
	   		<label>{$this->lang->words['frm_f_desc']}<span class='desctext'>{$this->lang->words['frm_f_desc_info']}</span></label>
	   		{$form['description']}
	 	</li>

		<li>
			<label>{$this->lang->words['dp30_forum_icons_title']}<span class='desctext'>{$this->lang->words['dp30_forum_icons_descr']}</span></label>
			{$form['icon']}
		</li>			

	 	<li>
	   		<label>{$this->lang->words['frm_f_parent']}</label>
	   		{$form['parent_id']}
	 	</li>

fragment edyownego skina

boardIndexTemplate

		{$this->lang->words['rd_hits']}: {parse format_number="$forum_data['redirect_hits']"}
									</td>
								</tr>
							<else />
								<tr class='{parse striping="catTable"}'>
									<td class='altrow'>
										<if test="unreadicon:|:$forum_data['img_new_post'] != 'f_locked' && strstr( $forum_data['img_new_post'], 'unread' )">
											<a id='forum_img_{$forum_data['id']}' href="{parse url="app=forums&module=forums&section=markasread&marktype=forum&forumid={$forum_data['id']}&returntoforumid={$this->request['f']}&i=1" base="public"}" title="{$this->lang->words['bi_markread']}" class='forum_marker'>
												                                             <if test="$forum_data['icon'] != '' AND $forum_data['icon'] !='0'">
							             <center><img src='{$this->settings['board_url']}/public/forumicons/{$forum_data['icon']}.gif' /></center>
							             <else />											
							                												<if test="$forum_data['icon'] != '' AND $forum_data['icon'] !='0'">
	<center><img src='{$this->settings['board_url']}/public/forumicons/{$forum_data['icon']}_off.gif' /></center>
											<else />
													{parse replacement="{$forum_data['img_new_post']}"}										
											</if>													
												</if>
											</a>

											</a>
											<script type='text/javascript'>
												ipb.global.registerMarker( "forum_img_{$forum_data['id']}", "{$forum_data['img_new_post']}", markerURL + "&forumid={$forum_data['id']}" );
											</script>

forumIndexTemplate

		{$this->lang->words['rd_hits']}: {$forum_data['redirect_hits']}
							</td>
						</tr>
					<else />
						<tr class='{parse striping="catTable"}'>
							<td class='altrow'>
								<a id='forum_img_{$forum_data['id']}' href="{parse url="app=forums&module=forums&section=markasread&marktype=forum&forumid={$forum_data['id']}&returntoforumid={$this->request['f']}" base="public"}" title="{$this->lang->words['bi_markread']}" class='forum_marker'><if test="$forum_data['icon'] != '' AND $forum_data['icon'] !='0'">
							             <center><img src='{$this->settings['board_url']}/public/forumicons/{$forum_data['icon']}.gif' /></center>
							             <else />											
							                {parse replacement="{$forum_data['img_new_post']}"}
							             </if>
											</a>


								<script type='text/javascript'>
									ipb.global.registerMarker( 'forum_img_{$forum_data['id']}', "{$forum_data['img_new_post']}", markerURL + "&forumid={$forum_data['id']}" );
								</script>

b_350_20_692108_381007_FFFFFF_000000.png

Je ne suis pas d'écrire correctement en Polonais

comprendre S.V.P !!

Odnośnik do komentarza
Udostępnij na innych stronach

  • Manager

A ja pisze chyba o tym 100 raz - wiem o tym, bo to akcja ajaxowa. W nowej wersji będzie to poprawione.

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Odnośnik do komentarza
Udostępnij na innych stronach

  • 4 tygodnie później...
  • Manager

Mod w pełni działa. Z jednym wyjątkiem - którym wspominałem wyżej. A tak mod działa znakomicie.

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Odnośnik do komentarza
Udostępnij na innych stronach

  • 3 tygodnie później...

Wszystko wykonałem jak trzeba - może skin nie chce z tym działać...

Plik forums.php w /admin/applications/forums/modules_admin/forums/

<?php

/**

* <pre>

* Invision Power Services

* IP.Board v3.1.4

* Forum management

* Last Updated: $Date: 2010-11-08 15:39:48 -0500 (Mon, 08 Nov 2010) $

* </pre>

*

* @author $Author: ips_terabyte $

* @copyright © 2001 - 2009 Invision Power Services, Inc.

* @package IP.Board

* @subpackage Forums

* @since Tuesday 17th August 2004

* @version $Revision: 7117 $

*/

if ( ! defined( 'IN_ACP' ) )

{

print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";

exit();

}

class admin_forums_forums_forums extends ipsCommand

{

/**

* Skin HTML object

*

* @var object

*/

private $html;

/**

* Forum functions object

*

* @var object

*/

private $forum_functions;

/**

* Main entry point

*

* @param object ipsRegistry reference

* @return void Outputs to screen

*/

public function doExecute( ipsRegistry $registry )

{

/* Forum functions set up */

require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php" );

$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/admin_forum_functions.php", 'admin_forum_functions', 'forums' );

$this->forum_functions = new $classToLoad( $registry );

$this->forum_functions->forumsInit();

$this->request['showall'] = intval( $this->request['showall'] );

//-----------------------------------------

// Load skin & lang

//-----------------------------------------

$this->html = $this->registry->output->loadTemplate( 'cp_skin_forums' );

$this->html->form_code = 'module=forums&section=forums&';

$this->html->form_code_js = 'module=forums&section=forums&';

$this->lang->loadLanguageFile( array( 'admin_forums' ) );

//-----------------------------------------

// LOAD HTML

//-----------------------------------------

$this->forum_functions->html =& $this->html;

//-----------------------------------------

// To do...

//-----------------------------------------

switch( $this->request['do'] )

{

case 'forum_add':

case 'new':

$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_add' );

$this->forumForm( 'new' );

break;

case 'donew':

$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_add' );

$this->forumSave( 'new' );

break;

//------------------- ----------------------

case 'edit':

$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_edit' );

$this->forumForm( 'edit' );

break;

case 'doedit':

$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_edit' );

$this->forumSave( 'edit' );

break;

//-----------------------------------------

case 'pedit':

$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_permissions' );

$this->permEditForm();

break;

case 'pdoedit':

$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_permissions' );

$this->permDoEdit();

break;

//-----------------------------------------

case 'doreorder':

$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_reorder' );

$this->doReorder();

break;

//-----------------------------------------

case 'delete':

$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_delete' );

$this->deleteForm();

break;

case 'dodelete':

$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_delete' );

$this->doDelete();

break;

//-----------------------------------------

case 'recount':

$this->recount();

break;

//-----------------------------------------

case 'empty':

$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_empty' );

$this->emptyForum();

break;

case 'doempty':

$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_empty' );

$this->doEmpty();

break;

//-----------------------------------------

case 'frules':

$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_rules' );

$this->showRules();

break;

case 'dorules':

$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_rules' );

$this->doRules();

break;

//-----------------------------------------

case 'skinedit':

$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_skins' );

$this->skinEdit();

break;

case 'doskinedit':

$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'forums_skins' );

$this->doSkinEdit();

break;

//-----------------------------------------

case 'forums_overview':

default:

$this->request['do'] = 'forums_overview';

$this->showForums();

break;

}

//-----------------------------------------

// Pass to CP output hander

//-----------------------------------------

$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();

$this->registry->output->sendOutput();

}

/**

* Edit skins assigned to forums

*

* @return void Outputs to screen

*/

public function skinEdit()

{

/* INI */

$this->request['f'] = intval( $this->request['f'] );

if( $this->request['f'] == "" )

{

$this->registry->output->showError( $this->lang->words['for_noid'], 1131 );

}

/* Forum Data */

$forum = $this->forum_functions->forum_by_id[ $this->request['f'] ];

/* Check the forum */

if ( ! $forum['id'] )

{

$this->registry->output->showError( $this->lang->words['for_noid'], 1132 );

}

if ( ! $forum['skin_id'] )

{

$forum['skin_id'] = -1;

}

/* Skins */

$skin_list = array_merge( array( array( -1, $this->lang->words['for_noneall'] ) ), $this->registry->output->generateSkinDropdown() );

/* Form Data */

$forum['fsid'] = $this->registry->output->formDropdown( 'fsid', $skin_list, $forum['skin_id'] );

$forum['apply_to_children'] = $this->registry->output->formYesNo( 'apply_to_children' );

/* Output */

$this->registry->output->html .= $this->html->forumSkinOptions( $this->request['f'], $forum );

}

/**

* Save the skin assigned to the forum

*

* @return void Outputs to screen

*/

public function doSkinEdit()

{

/* INI */

$this->request['f'] = intval( $this->request['f'] );

/* Check the forum */

if ($this->request['f'] == "")

{

$this->registry->output->showError( $this->lang->words['for_noid'], 1133 );

}

/* Forum Data */

$forum = $this->forum_functions->forum_by_id[ $this->request['f'] ];

/* Update the forum */

$this->DB->update( 'forums', array( 'skin_id' => $this->request['fsid'] ), 'id='.$this->request['f'] );

/* Apply to children */

if( $this->request['apply_to_children'] )

{

$ids = $this->forum_functions->forumsGetChildren( $this->request['f'] );

if ( count( $ids ) )

{

$this->DB->update( 'forums', array( 'skin_id' => $this->request['fsid'] ), 'id IN ('.implode(",",$ids).')' );

}

}

$this->registry->output->global_message = $this->lang->words['for_skinup'];

$this->recacheForums();

$this->forum_functions->forumsInit();

/* Bounce */

$this->request['f'] = $this->forum_functions->forum_by_id[ $this->request['f'] ]['parent_id'];

$this->showForums();

}

/**

* Show the form to edit rules

*

* @return void Outputs to screen

*/

public function showRules()

{

/* INI */

$this->request['f'] = intval( $this->request['f'] );

if( ! $this->request['f'] )

{

$this->registry->output->showError( $this->lang->words['for_noid'], 1134 );

}

$this->DB->build( array( 'select' => 'id, name, show_rules, rules_title, rules_text, rules_raw_html', 'from' => 'forums', 'where' => "id=".$this->request['f'] ) );

$this->DB->execute();

//-----------------------------------------

// Make sure we have a legal forum

//-----------------------------------------

if ( ! $this->DB->getTotalRows() )

{

$this->registry->output->showError( $this->lang->words['for_noid'], 1135 );

}

$forum = $this->DB->fetch();

//-----------------------------------------

// Load and config the std/rte editors

//-----------------------------------------

IPSText::getTextClass( 'bbcode' )->bypass_badwords = 1;

IPSText::getTextClass( 'bbcode' )->parse_smilies = 0;

IPSText::getTextClass( 'bbcode' )->parse_html = 1;

IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1;

IPSText::getTextClass( 'bbcode' )->parsing_section = 'rules';

/* Form Fields */

$forum['_show_rules'] = $this->registry->output->formDropdown( "show_rules", array(

array( '0' , $this->lang->words['for_rulesdont'] ),

array( '1' , $this->lang->words['for_ruleslink'] ),

array( '2' , $this->lang->words['for_rulesfull'] )

), $forum['show_rules'] );

$forum['_title'] = $this->registry->output->formInput( "title", IPSText::stripslashes( str_replace( "'", ''', $forum['rules_title'] ) ) );

if ( IPSText::getTextClass( 'editor' )->method == 'rte' )

{

$forum['rules_text'] = IPSText::getTextClass( 'bbcode' )->convertForRTE( $forum['rules_text'] );

}

else

{

$forum['rules_text'] = IPSText::getTextClass( 'bbcode' )->preEditParse( $forum['rules_text'] );

}

$forum['_editor'] = IPSText::getTextClass( 'editor' )->showEditor( $forum['rules_text'], 'body' );

$forum['rules_raw_html'] = $this->registry->output->formCheckbox( 'rules_raw_html', $forum['rules_raw_html'] );

/* Output */

$this->registry->output->html .= $this->html->forumRulesForm( $forum['id'], $forum );

}

/**

* Save the forum rules

*

* @return void Outputs to screen

*/

public function doRules()

{

/* INI */

$this->request['f'] = intval( $this->request['f'] );

if( $this->request['f'] == "" )

{

$this->registry->output->showError( $this->lang->words['for_noid'], 1136 );

}

if( ! $this->request['rules_raw_html'] )

{

//-----------------------------------------

// Load editor/bbcode

//-----------------------------------------

$_POST[ 'body' ] = IPSText::getTextClass( 'editor' )->processRawPost( 'body' );

IPSText::getTextClass( 'bbcode' )->bypass_badwords = 1;

IPSText::getTextClass( 'bbcode' )->parse_smilies = 0;

IPSText::getTextClass( 'bbcode' )->parse_html = 1;

IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1;

IPSText::getTextClass( 'bbcode' )->parsing_section = 'rules';

$_POST[ 'body' ] = IPSText::getTextClass( 'bbcode' )->preDbParse( $_POST[ 'body' ] );

}

$rules = array(

'rules_title' => IPSText::stripslashes( $_POST['title'] ),

'rules_text' => IPSText::stripslashes( $_POST['body'] ),

'show_rules' => $this->request['show_rules'],

'rules_raw_html' => intval($this->request['rules_raw_html']),

);

$this->DB->update( 'forums', $rules, 'id='.$this->request['f'] );

$this->recacheForums();

$this->registry->output->global_message = $this->lang->words['for_rulesup'];

//-----------------------------------------

// Bounce back to parent...

//-----------------------------------------

$this->request['f'] = $this->forum_functions->forum_by_id[ $this->request['f'] ]['parent_id'];

$this->showForums();

}

/**

* Recount the forum

*

* @param integer [optional] Forum id

* @return void Outputs to screen

*/

public function recount($f_override="")

{

if ($f_override != "")

{

// Internal call, remap

ipsRegistry::$request[ 'f'] = $f_override ;

}

$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/moderate.php', 'moderatorLibrary', 'forums' );

$modfunc = new $classToLoad( $this->registry );

$modfunc->forumRecount($this->request['f']);

$this->recacheForums();

$this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['for_recountedlog'], $this->forum_functions->forum_by_id[$this->request['f']]['name'] ) );

$this->registry->output->global_message = $this->lang->words['for_resynched'];

//-----------------------------------------

// Bounce back to parent...

//-----------------------------------------

ipsRegistry::$request[ 'f'] = $this->forum_functions->forum_by_id[ $this->request['f'] ]['parent_id'] ;

$this->showForums();

}

/**

* Show the form to empty a forum

*

* @return void Outputs to screen

*/

public function emptyForum()

{

/* INI */

$this->request['f'] = intval( $this->request['f'] );

$form_array = array();

if( $this->request['f'] == "" )

{

$this->registry->output->showError( $this->lang->words['for_noid'], 1137 );

}

$this->DB->build( array( 'select' => 'id, name', 'from' => 'forums', 'where' => "id=".$this->request['f'] ) );

$this->DB->execute();

//-----------------------------------------

// Make sure we have a legal forum

//-----------------------------------------

if ( !$this->DB->getTotalRows() )

{

$this->registry->output->showError( $this->lang->words['for_noid'], 1138 );

}

$forum = $this->DB->fetch();

//-----------------------------------------

$this->registry->output->html .= $this->html->forumEmptyForum( $this->request['f'], $forum );

}

/**

* Empty a forum

*

* @return void Outputs to screen

*/

public function doEmpty()

{

/* INI */

$this->request['f'] = intval( $this->request['f'] );

$soFar = intval($this->request['sofar']);

$thisCycle = 0;

//-----------------------------------------

// Get module

//-----------------------------------------

$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/moderate.php', 'moderatorLibrary', 'forums' );

$modfunc = new $classToLoad( $this->registry );

if( $this->request['f'] == "" )

{

$this->registry->output->showError( $this->lang->words['for_noid_source'], 1139 );

}

//-----------------------------------------

// Check to make sure its a valid forum.

//-----------------------------------------

$forum = $this->DB->buildAndFetch( array( 'select' => 'id, name, posts, topics', 'from' => 'forums', 'where' => "id=" . $this->request['f'] ) );

if( !$forum['id'] )

{

$this->registry->output->showError( $this->lang->words['for_nodetails'], 11310 );

}

$this->DB->build( array( 'select' => 'tid', 'from' => 'topics', 'where' => "forum_id=" . $this->request['f'], 'limit' => array( 0, 200 ) ) );

$outer = $this->DB->execute();

//-----------------------------------------

// What to do..

//-----------------------------------------

while( $t = $this->DB->fetch($outer) )

{

$modfunc->topicDelete( $t['tid'] );

$thisCycle++;

}

//-----------------------------------------

// Rebuild stats and cache if we're done

//-----------------------------------------

if( !$thisCycle )

{

$modfunc->forumRecount( $this->request['f'] );

$modfunc->statsRecount();

$this->recacheForums();

$this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['for_emptiedlog'], $forum['name'] ) );

$this->request['f'] = $this->forum_functions->forum_by_id[ $this->request['f'] ]['parent_id'];

$this->registry->output->global_message = $this->lang->words['for_emptied'];

$this->showForums();

}

else

{

$soFar = $soFar + $thisCycle;

$this->registry->output->redirect( $this->settings['base_url'] . $this->html->form_code . "&do=doempty&f={$this->request['f']}&sofar={$soFar}", sprintf( $this->lang->words['emptyforum_sofarcycle'], $soFar ), 1 );

}

}

/**

* Show the form to delete a form

*

* @return void Outputs to screen

*/

public function deleteForm()

{

/* INI */

$this->request['f'] = intval( $this->request['f'] );

$form_array = array();

if ( ! $this->request['f'] )

{

$this->registry->output->showError( $this->lang->words['for_noid_delete'], 11311 );

}

$this->DB->build( array( 'select' => 'id, name, parent_id', 'from' => 'forums', 'order' => 'position' ) );

$this->DB->execute();

//-----------------------------------------

// Make sure we have more than 1

// forum..

//-----------------------------------------

if( $this->DB->getTotalRows() < 2 )

{

$this->registry->output->showError( $this->lang->words['for_lastforum'], 11312 );

}

while( $r = $this->DB->fetch() )

{

if( $r['id'] == $this->request['f'] )

{

$name = $r['name'];

$is_cat = $r['parent_id'] > 0 ? 0 : 1;

continue;

}

}

$form_array = $this->forum_functions->adForumsForumList( 1 );

//-----------------------------------------

// Count the number of topics

//-----------------------------------------

$posts = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'topics', 'where' => 'forum_id='.$this->request['f'] ) );

//-----------------------------------------

// Start form

//-----------------------------------------

/* Move dropds */

if( $posts['count'] )

{

$move = $this->registry->output->formDropdown( "MOVE_ID", $form_array );

}

/* Output */

$this->registry->output->html .= $this->html->forumDeleteForm( $this->request['f'], $name, $move, $is_cat );

}

/**

* Delete a forum

*

* @return void Outputs to screen

*/

public function doDelete()

{

//-----------------------------------------

// Auth check...

//-----------------------------------------

$this->registry->adminFunctions->checkSecurityKey();

//-----------------------------------------

// Continue

//-----------------------------------------

$this->request['f'] = intval( $this->request['f'] );

$this->request['MOVE_ID'] = intval( $this->request['MOVE_ID'] );

$this->request['new_parent_id'] = intval( $this->request['new_parent_id'] );

$forum = $this->registry->class_forums->forum_by_id[ $this->request['f'] ];

if( ! $forum['id'] )

{

$this->registry->output->showError( $this->lang->words['for_noid_source'], 11313 );

}

if( ! $this->request['new_parent_id'] )

{

$this->request['new_parent_id'] = -1;

}

else

{

if( $this->request['new_parent_id'] == $this->request['f'] )

{

$this->registry->output->global_message = $this->lang->words['for_child_no_parent'];

$this->deleteForm();

return;

}

}

//-----------------------------------------

// Would deleting this category orphan the only

// remaining forums?

//-----------------------------------------

if( $forum['parent_id'] == -1 )

{

$otherParent = 0;

foreach( $this->registry->class_forums->forum_by_id as $id => $data )

{

if( $data['parent_id'] == -1 )

{

$otherParent = $id;

break;

}

}

if( !$otherParent )

{

$this->registry->output->showError( $this->lang->words['nodelete_last_cat'], 11364 );

}

}

//-----------------------------------------

// Get library

//-----------------------------------------

$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/moderate.php', 'moderatorLibrary', 'forums' );

$modfunc = new $classToLoad( $this->registry );

//-----------------------------------------

// Move stuff

//-----------------------------------------

if( $this->request['MOVE_ID'] )

{

if( $this->request['MOVE_ID'] == $this->request['f'] )

{

$this->registry->output->global_message = $this->lang->words['for_wherewhatwhy'];

$this->deleteForm();

}

//-----------------------------------------

// Move topics...

//-----------------------------------------

$this->DB->update( 'topics', array( 'forum_id' => $this->request['MOVE_ID'] ), 'forum_id='.$this->request['f'] );

//-----------------------------------------

// Move polls...

//-----------------------------------------

$this->DB->update( 'polls', array( 'forum_id' => $this->request['MOVE_ID'] ), 'forum_id='.$this->request['f'] );

//-----------------------------------------

// Move voters...

//-----------------------------------------

$this->DB->update( 'voters', array( 'forum_id' => $this->request['MOVE_ID'] ), 'forum_id='.$this->request['f'] );

$modfunc->forumRecount( $this->request['MOVE_ID'] );

}

//-----------------------------------------

// Delete the forum

//-----------------------------------------

$this->DB->delete( 'forums', "id=".$this->request['f'] );

$this->DB->delete( 'permission_index', "app='forums' AND perm_type='forum' AND perm_type_id=".$this->request['f'] );

//-----------------------------------------

// Remove moderators from this forum

//-----------------------------------------

$this->DB->build( array( 'select' => '*', 'from' => 'moderators', 'where' => "forum_id LIKE '%,{$this->request['f']},%'" ) );

$outer = $this->DB->execute();

while( $r = $this->DB->fetch($outer) )

{

$forums = explode( ',', IPSText::cleanPermString( $r['forum_id'] ) );

$newForums = array();

foreach( $forums as $aForumId )

{

if( $aForumId != $this->request['f'] )

{

$newForums[] = $aForumId;

}

}

if( !count($newForums) )

{

$this->DB->delete( 'moderators', "mid=" . $r['mid'] );

}

else

{

$this->DB->update( 'moderators', array( 'forum_id' => ',' . implode( ',', $newForums ) . ',' ), 'mid=' . $r['mid'] );

}

}

//-----------------------------------------

// Delete forum subscriptions

//-----------------------------------------

$this->DB->delete( 'forum_tracker', "forum_id=".$this->request['f'] );

//-----------------------------------------

// Update children

//-----------------------------------------

$this->DB->update( 'forums', array( 'parent_id' => $this->request['new_parent_id'] ), "parent_id=" . $this->request['f'] );

//-----------------------------------------

// Rebuild forum cache

//-----------------------------------------

$this->recacheForums();

//-----------------------------------------

// Rebuild moderator cache

//-----------------------------------------

$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'forums' ) . '/modules_admin/forums/moderator.php', 'admin_forums_forums_moderator' );

$moderator = new $classToLoad();

$moderator->makeRegistryShortcuts( $this->registry );

$moderator->rebuildModeratorCache();

$this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['for_removedlog'], $forum['name'] ) );

$this->registry->output->doneScreen($this->lang->words['for_removed'], $this->lang->words['for_control'], $this->form_code, 'redirect' );

}

/**

* Show the form to edit a forum

*

* @param string [new|edit]

* @param boolean Whether to change forum to category/back

* @return void Outputs to screen

*/

public function forumForm( $type='edit', $changetype=0 )

{

//-----------------------------------------

// INIT

//-----------------------------------------

$addnew_type = ( isset( $this->request['type'] ) ) ? $this->request['type'] : 'forum';

$form = array();

$forum = array();

$forum_id = $this->request['f'] ? intval( $this->request['f'] ) : 0;

$parentid = intval( $this->request['p'] ) ? intval( $this->request['p'] ) : -1;

$cat_id = $this->request['c'] ? intval( $this->request['c'] ) : 0;

$f_name = $this->request['name'] ? $this->request['name'] : '';

$subcanpost = $cat_id == 1 ? 0 : 1;

$perm_matrix = "";

$dd_state = array( 0 => array( 1, $this->lang->words['for_active'] ), 1 => array( 0, $this->lang->words['for_readonly'] ) );

$dd_moderate = array(

0 => array( 0, $this->lang->words['for_no'] ),

1 => array( 1, $this->lang->words['for_modall'] ),

2 => array( 2, $this->lang->words['for_modtop'] ),

3 => array( 3, $this->lang->words['for_modrep'] ),

);

$dd_prune = array(

0 => array( 1, $this->lang->words['for_today'] ),

1 => array( 5, $this->lang->words['for_last5'] ),

2 => array( 7, $this->lang->words['for_last7'] ),

3 => array( 10, $this->lang->words['for_last10'] ),

4 => array( 15, $this->lang->words['for_last15'] ),

5 => array( 20, $this->lang->words['for_last20'] ),

6 => array( 25, $this->lang->words['for_last25'] ),

7 => array( 30, $this->lang->words['for_last30'] ),

8 => array( 60, $this->lang->words['for_last60'] ),

9 => array( 90, $this->lang->words['for_last90'] ),

10=> array( 100, $this->lang->words['for_showall'] ),

);

$dd_order = array(

0 => array( 'last_post', $this->lang->words['for_s_last'] ),

1 => array( 'title' , $this->lang->words['for_s_topic'] ),

2 => array( 'starter_name', $this->lang->words['for_s_name'] ),

3 => array( 'posts' , $this->lang->words['for_s_post'] ),

4 => array( 'views' , $this->lang->words['for_s_view'] ),

5 => array( 'start_date', $this->lang->words['for_s_date'] ),

6 => array( 'last_poster_name' , $this->lang->words['for_s_poster'] )

);

$dd_by = array(

0 => array( 'Z-A', $this->lang->words['for_desc'] ),

1 => array( 'A-Z', $this->lang->words['for_asc'] )

);

$dd_filter = array(

0 => array( 'all', $this->lang->words['for_all'] ),

1 => array( 'open', $this->lang->words['for_open'] ),

2 => array( 'hot', $this->lang->words['for_hot'] ),

3 => array( 'poll', $this->lang->words['for_poll'] ),

4 => array( 'locked', $this->lang->words['for_locked'] ),

5 => array( 'moved', $this->lang->words['for_moved'] ),

6 => array( 'istarted', $this->lang->words['for_istarted'] ),

7 => array( 'ireplied', $this->lang->words['for_ireplied'] ),

);

//-----------------------------------------

// EDIT

//-----------------------------------------

if ( $type == 'edit' )

{

//-----------------------------------------

// Check

//-----------------------------------------

if ( ! $forum_id )

{

$this->registry->output->showError( $this->lang->words['for_noforumselected'], 11314 );

}

//-----------------------------------------

// Do not show forum in forum list

//-----------------------------------------

$this->forum_functions->exclude_from_list = $forum_id;

//-----------------------------------------

// Get this forum

//-----------------------------------------

$forum = $this->DB->buildAndFetch( array(

'select' => 'f.*',

'from' => array( 'forums' => 'f' ),

'where' => 'f.id='.$this->request['f'],

'add_join' => array(

array(

'select' => 'p.*',

'from' => array( 'permission_index' => 'p' ),

'where' => "p.perm_type_id=f.id AND p.app='forums' AND p.perm_type='forum'",

'type' => 'left',

)

),

) );

//-----------------------------------------

// Check

//-----------------------------------------

if ($forum['id'] == "")

{

$this->registry->output->showError( $this->lang->words['for_noid'], 11315 );

}

//-----------------------------------------

// Set up code buttons

//-----------------------------------------

$addnew_type = $forum['parent_id'] == -1 ? 'category' : 'forum';

if( $changetype )

{

$addnew_type = $addnew_type == 'category' ? 'forum' : 'category';

}

if( $addnew_type == 'category' )

{

$title = sprintf( $this->lang->words['for_editcat'], $forum['name'] );

$button = $this->lang->words['for_editcat_button'];

$code = "doedit";

}

else

{

$title = sprintf( $this->lang->words['for_editfor'], $forum['name'] );

$button = $this->lang->words['for_editfor_button'];

$code = "doedit";

}

if( $addnew_type == 'category' )

{

$convert = "<input type='submit' class='realbutton' onclick='ACPForums.convert()' value='{$this->lang->words['for_changefor']}' />";

}

else

{

$convert = "<input type='submit' class='realbutton' onclick='ACPForums.convert()' value='{$this->lang->words['for_changecat']}' />";

}

}

//-----------------------------------------

// NEW

//-----------------------------------------

else

{

# Ensure there is an ID

$this->request['f'] = 0;

if( $changetype )

{

$addnew_type = $addnew_type == 'category' ? 'forum' : 'category';

}

if( $addnew_type == 'category' )

{

$forum = array(

'sub_can_post' => $subcanpost,

'name' => $f_name ? $f_name : $this->lang->words['for_newcat'],

'parent_id' => $parentid,

'use_ibc' => 1,

'quick_reply' => 1,

'allow_poll' => 1,

'prune' => 100,

'topicfilter' => 'all',

'sort_key' => 'last_post',

'sort_order' => 'Z-A',

'inc_postcount' => 1,

'description' => '',

'status' => 0,

'redirect_url' => '',

'password' => '',

'password_override' => '',

'redirect_on' => 0,

'redirect_hits' => 0,

'permission_showtopic' => '',

'permission_custom_error' => '',

'use_html' => 0,

'allow_pollbump' => 0,

'forum_allow_rating' => 0,

'preview_posts' => 0,

'notify_modq_emails' => 0,

'can_view_others' => 1,

);

$title = $this->lang->words['for_addcat'];

$button = $this->lang->words['for_addcat'];

$code = "donew";

}

else

{

$forum = array(

'sub_can_post' => $subcanpost,

'name' => $f_name ? $f_name : $this->lang->words['for_newfor'],

'parent_id' => $parentid,

'use_ibc' => 1,

'quick_reply' => 1,

'allow_poll' => 1,

'prune' => 100,

'topicfilter' => 'all',

'sort_key' => 'last_post',

'sort_order' => 'Z-A',

'inc_postcount' => 1,

'description' => '',

'status' => 1,

'redirect_url' => '',

'password' => '',

'password_override' => '',

'redirect_on' => 0,

'redirect_hits' => 0,

'permission_showtopic' => '',

'permission_custom_error' => '',

'use_html' => 0,

'allow_pollbump' => 0,

'forum_allow_rating' => 0,

'preview_posts' => 0,

'notify_modq_emails' => 0,

'min_posts' => 0,

'hide_last_info' => 0,

'can_view_others' => 1,

);

$title = $this->lang->words['for_addfor'];

$button = $this->lang->words['for_addfor'];

$code = "donew";

}

if( $addnew_type == 'category' )

{

$convert = "<input type='submit' class='realbutton' onclick='ACPForums.convert()' value='{$this->lang->words['for_changefor']}' />";

}

else

{

$convert = "<input type='submit' class='realbutton' onclick='ACPForums.convert()' value='{$this->lang->words['for_changecat']}' />";

}

}

//-----------------------------------------

// Build forumlist

//-----------------------------------------

$forumlist = $this->forum_functions->adForumsForumList();

//-----------------------------------------

// Build group list

//-----------------------------------------

$mem_group = array();

foreach( $this->caches['group_cache'] as $g_id => $group )

{

$mem_group[] = array( $g_id , $group['g_title'] );

}

//-----------------------------------------

// Page title...

//-----------------------------------------

//$this->registry->output->html_help_title = $title;

//-----------------------------------------

// Generate form items

//-----------------------------------------

# Main settings

$form['name'] = $this->registry->output->formInput( 'name' , IPSText::parseCleanValue( ( isset( $_POST['name'] ) AND $_POST['name'] ) ? $_POST['name'] : $forum['name'] ) );

$form['description'] = $this->registry->output->formTextarea("description" , IPSText::br2nl( ( isset( $_POST['description']) AND $_POST['description'] ) ? $_POST['description'] : $forum['description'] ) );

$form['parent_id'] = $this->registry->output->formDropdown("parent_id" , $forumlist, ( isset($_POST['parent_id'] ) AND $_POST['parent_id'] ) ? $_POST['parent_id'] : $forum['parent_id'] );

$form['status'] = $this->registry->output->formDropdown("status" , $dd_state , ( isset($_POST['status'] ) AND $_POST['status'] ) ? $_POST['status'] : $forum['status'] );

$form['sub_can_post'] = $this->registry->output->formYesNo( 'sub_can_post', ( isset($_POST['sub_can_post']) AND $_POST['sub_can_post'] ) ? $_POST['sub_can_post'] : ( $forum['sub_can_post'] == 1 ? 0 : 1 ) );

# Redirect options

$form['redirect_url'] = $this->registry->output->formInput( 'redirect_url' , ( isset($_POST['redirect_url']) AND $_POST['redirect_url'] ) ? $_POST['redirect_url'] : $forum['redirect_url'] );

$form['redirect_on'] = $this->registry->output->formYesNo('redirect_on' , ( isset($_POST['redirect_on']) AND $_POST['redirect_on'] ) ? $_POST['redirect_on'] : $forum['redirect_on'] );

$form['redirect_hits'] = $this->registry->output->formInput( 'redirect_hits', ( isset($_POST['redirect_hits']) AND $_POST['redirect_hits'] ) ? $_POST['redirect_hits'] : $forum['redirect_hits'] );

# Permission settings

$form['permission_showtopic'] = $this->registry->output->formYesNo( 'permission_showtopic' , ( isset($_POST['permission_showtopic']) AND $_POST['permission_showtopic'] ) ? $_POST['permission_showtopic'] : $forum['permission_showtopic'] );

$form['permission_custom_error'] = $this->registry->output->formTextarea("permission_custom_error", IPSText::br2nl( ( isset($_POST['permission_custom_error']) AND $_POST['permission_custom_error'] ) ? $_POST['permission_custom_error'] : $forum['permission_custom_error'] ) );

# Forum settings

$form['use_html'] = $this->registry->output->formYesNo('use_html' , ( isset($_POST['use_html']) AND $_POST['use_html'] ) ? $_POST['use_html'] : $forum['use_html'] );

$form['use_ibc'] = $this->registry->output->formYesNo('use_ibc' , ( isset($_POST['use_ibc']) AND $_POST['use_ibc'] ) ? $_POST['use_ibc'] : $forum['use_ibc'] );

$form['quick_reply'] = $this->registry->output->formYesNo('quick_reply' , ( isset($_POST['quick_reply']) AND $_POST['quick_reply'] ) ? $_POST['quick_reply'] : $forum['quick_reply'] );

$form['allow_poll'] = $this->registry->output->formYesNo('allow_poll' , ( isset($_POST['allow_poll']) AND $_POST['allow_poll'] ) ? $_POST['allow_poll'] : $forum['allow_poll'] );

$form['allow_pollbump'] = $this->registry->output->formYesNo('allow_pollbump' , ( isset($_POST['allow_pollbump']) AND $_POST['allow_pollbump'] ) ? $_POST['allow_pollbump'] : $forum['allow_pollbump'] );

$form['inc_postcount'] = $this->registry->output->formYesNo('inc_postcount' , ( isset($_POST['inc_postcount']) AND $_POST['inc_postcount'] ) ? $_POST['inc_postcount'] : $forum['inc_postcount'] );

$form['forum_allow_rating'] = $this->registry->output->formYesNo('forum_allow_rating', ( isset($_POST['forum_allow_rating']) AND $_POST['forum_allow_rating'] ) ? $_POST['forum_allow_rating'] : $forum['forum_allow_rating'] );

$form['min_posts_post'] = $this->registry->output->formInput('min_posts_post' , ( isset($_POST['min_posts_post']) AND $_POST['min_posts_post'] ) ? $_POST['min_posts_post'] : $forum['min_posts_post'] );

$form['min_posts_view'] = $this->registry->output->formInput('min_posts_view' , ( isset($_POST['min_posts_view']) AND $_POST['min_posts_view'] ) ? $_POST['min_posts_view'] : $forum['min_posts_view'] );

$form['can_view_others'] = $this->registry->output->formYesNo('can_view_others' , ( isset($_POST['can_view_others']) AND $_POST['can_view_others'] ) ? $_POST['can_view_others'] : $forum['can_view_others'] );

$form['hide_last_info'] = $this->registry->output->formYesNo('hide_last_info' , ( isset($_POST['hide_last_info']) AND $_POST['hide_last_info'] ) ? $_POST['hide_last_info'] : $forum['hide_last_info'] );

$form['disable_sharelinks'] = $this->registry->output->formYesNo('disable_sharelinks' , ( isset($_POST['disable_sharelinks']) AND $_POST['disable_sharelinks'] ) ? $_POST['disable_sharelinks'] : $forum['disable_sharelinks'] );

# Mod settings

$form['preview_posts'] = $this->registry->output->formDropdown( "preview_posts" , $dd_moderate, ( isset($_POST['preview_posts']) AND $_POST['preview_posts'] ) ? $_POST['preview_posts'] : $forum['preview_posts'] );

$form['notify_modq_emails'] = $this->registry->output->formInput( 'notify_modq_emails' , ( isset($_POST['notify_modq_emails']) AND $_POST['notify_modq_emails'] ) ? $_POST['notify_modq_emails'] : $forum['notify_modq_emails'] );

$form['password'] = $this->registry->output->formInput( 'password' , ( isset($_POST['password']) AND $_POST['password'] ) ? $_POST['password'] : $forum['password'] );

$form['password_override'] = $this->registry->output->formMultiDropdown( 'password_override[]' , $mem_group, ( isset($_POST['password_override']) AND $_POST['password_override'] ) ? $_POST['password_override'] : explode( ",", $forum['password_override'] ) );

# Sorting settings

$form['prune'] = $this->registry->output->formDropdown("prune" , $dd_prune, ( isset($_POST['prune']) AND $_POST['prune'] ) ? $_POST['prune'] : $forum['prune'] );

$form['sort_key'] = $this->registry->output->formDropdown("sort_key" , $dd_order, ( isset($_POST['sort_key']) AND $_POST['sort_key'] ) ? $_POST['sort_key'] : $forum['sort_key'] );

$form['sort_order'] = $this->registry->output->formDropdown("sort_order", $dd_by , ( isset($_POST['sort_order']) AND $_POST['sort_order'] ) ? $_POST['sort_order'] : $forum['sort_order'] );

$form['topicfilter'] = $this->registry->output->formDropdown("topicfilter", $dd_filter, ( isset($_POST['topicfilter']) AND $_POST['topicfilter'] ) ? $_POST['topicfilter'] : $forum['topicfilter'] );

# Trim the form for categories...

$form['addnew_type'] = $addnew_type;

$this->request['type'] = $addnew_type;

$form['addnew_type_upper'] = ucwords($addnew_type);

$form['convert_button'] =& $convert;

//-----------------------------------------

// (DP30) Forum Icons --START--

//-----------------------------------------

$dh = opendir( IPS_PUBLIC_PATH . 'forumicons' );

$icons = array();

$icons[] = array("", $this->lang->words['dp30_forum_icons_default'] );

while ($icon = readdir($dh)) {

if((preg_match("/(.gif)/",$icon) || preg_match("/(.jpg)/",$icon) || preg_match("/(.jpeg)/",$icon) || preg_match("/(.png)/",$icon)) && !preg_match("/(_off)/",$icon)) {

if($icon != '.' || $icon != '..') {

$iconname = str_replace(".gif","",$icon);

$icons[] = array($iconname, $iconname);

}

}

}

closedir($dh);

//-----------------------------------------

// Generate form items

//-----------------------------------------

$form['icon'] = $this->registry->output->formDropdown( "icon" , $icons, ( isset($_POST['icon'] ) AND $_POST['icon'] ) ? $_POST['icon'] : $forum['icon'] );

// (DP30) Forum Icons --END--

//-----------------------------------------

// Show permission matrix

//-----------------------------------------

if ( $type != 'edit' OR $addnew_type == 'category' )

{

/* Permission Class */

$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php', 'classPublicPermissions' );

$permissions = new $classToLoad( ipsRegistry::instance() );

if( $addnew_type == 'category' )

{

$perm_matrix = $permissions->adminPermMatrix( 'forum', $forum, 'forums', 'view' );

}

else

{

$perm_matrix = $permissions->adminPermMatrix( 'forum', $forum );

}

}

/* Application Tabs */

$form['tabStrip'] = '';

$form['tabContent'] = '';

$tabsUsed = 2;

$firsttab = false;

foreach( ipsRegistry::$applications as $app_dir => $app_data )

{

if ( ! IPSLib::appIsInstalled( $app_dir ) )

{

continue;

}

if ( file_exists( IPSLib::getAppDir( $app_dir ) . '/extensions/admin/forum_form.php' ) )

{

$_class = IPSLib::loadLibrary( IPSLib::getAppDir( $app_dir ) . '/extensions/admin/forum_form.php', 'admin_forum_form__'.$app_dir, $app_dir );

if ( class_exists( $_class ) )

{

$_object = new $_class( $this->registry );

$data = $_object->getDisplayContent( $forum, $tabsUsed );

$form['tabContent'] .= $data['content'];

$form['tabStrip'] .= $data['tabs'];

$tabsUsed = $data['tabsUsed'] ? ( $tabsUsed + $data['tabsUsed'] ) : ( $tabsUsed + 1 );

if ( $this->request['_initTab'] == $app_dir )

{

$firsttab = $tabsUsed;

}

}

}

}

//-----------------------------------------

// Show form...

//-----------------------------------------

$this->registry->output->html .= $this->html->forumForm( $form, $button, $code, $title, $forum, $perm_matrix );

//-----------------------------------------

// Nav and print

//-----------------------------------------

//ipsRegistry::getClass('adminOuput')->nav[] = array( $this->form_code, 'Manage Forums' );

//ipsRegistry::getClass('adminOuput')->nav[] = array( '', 'Add/Edit '.ucwords($addnew_type) );

}

/**

* Save the forum

*

* @param string [new|edit]

* @return void Outputs to screen

*/

public function forumSave($type='new')

{

//-----------------------------------------

// Converting the type?

//-----------------------------------------

if( $this->request['convert'] )

{

$this->forumForm( $type, 1 );

return;

}

//-----------------------------------------

// INIT

//-----------------------------------------

$this->request['name'] = trim( $this->request['name'] );

$this->request['f'] = intval( $this->request['f'] );

$forum_cat_lang = intval( $this->request['parent_id'] ) == -1 ? $this->lang->words['for_iscat_y'] : $this->lang->words['for_iscat_n'];

//-----------------------------------------

// Auth check...

//-----------------------------------------

$this->registry->adminFunctions->checkSecurityKey();

//-----------------------------------------

// Check

//-----------------------------------------

if( $this->request['name'] == "" )

{

$this->registry->output->global_message = sprintf( $this->lang->words['for_entertitle'], strtolower( $forum_cat_lang ) );

$this->forumForm( $type );

return;

}

//-----------------------------------------

// Are we trying to do something stupid

// like running with scissors or moving

// the parent of a forum into itself

// spot?

//-----------------------------------------

if( $this->request['parent_id'] != $this->forum_functions->forum_by_id[ $this->request['f'] ]['parent_id'] )

{

$ids = $this->forum_functions->forumsGetChildren( $this->request['f'] );

$ids[] = $this->request['f'];

if ( in_array( $this->request['parent_id'], $ids ) )

{

$this->registry->output->global_error = $this->lang->words['for_whymovethere'];

$this->forumForm( $type );

return;

}

}

if( $this->request['parent_id'] < 1 )

{

$this->request['sub_can_post'] = 1;

}

//-----------------------------------------

// Save array

//-----------------------------------------

$save = array ( 'name' => IPSText::getTextClass('bbcode')->xssHtmlClean( nl2br( IPSText::stripslashes( $_POST['name'] ) ) ),

'name_seo' => IPSText::makeSeoTitle( $this->request['name'] ),

'description' => IPSText::getTextClass('bbcode')->xssHtmlClean( nl2br( IPSText::stripslashes( $_POST['description'] ) ) ),

'use_ibc' => intval($this->request['use_ibc']),

'use_html' => intval($this->request['use_html']),

'status' => intval($this->request['status']),

'password' => $this->request['password'],

'password_override' => is_array($this->request['password_override']) ? implode( ",", $this->request['password_override'] ) : '',

'sort_key' => $this->request['sort_key'],

'sort_order' => $this->request['sort_order'],

'prune' => intval($this->request['prune']),

'topicfilter' => $this->request['topicfilter'],

'preview_posts' => intval($this->request['preview_posts']),

'allow_poll' => intval($this->request['allow_poll']),

'allow_pollbump' => intval($this->request['allow_pollbump']),

'forum_allow_rating' => intval($this->request['forum_allow_rating']),

'inc_postcount' => intval($this->request['inc_postcount']),

'parent_id' => intval($this->request['parent_id']),

'sub_can_post' => ( intval($this->request['sub_can_post']) == 1 ? 0 : 1 ),

'quick_reply' => intval($this->request['quick_reply']),

'redirect_on' => intval($this->request['redirect_on']),

'redirect_hits' => intval($this->request['redirect_hits']),

'redirect_url' => $this->request['redirect_url'],

'notify_modq_emails' => $this->request['notify_modq_emails'],

'permission_showtopic' => intval($this->request['permission_showtopic']),

'min_posts_post' => intval( $this->request['min_posts_post'] ),

'min_posts_view' => intval( $this->request['min_posts_view'] ),

'can_view_others' => intval( $this->request['can_view_others'] ),

'hide_last_info' => intval( $this->request['hide_last_info'] ),

'icon' => ( isset( $this->request['icon'] ) AND strlen( $this->request['icon'] ) ) ? $this->request['icon'] : '0',

'disable_sharelinks' => intval( $this->request['disable_sharelinks'] ),

'permission_custom_error' => nl2br( IPSText::stripslashes($_POST['permission_custom_error']) ) );

/* Save data from application tabs */

foreach( ipsRegistry::$applications as $app_dir => $app_data )

{

if ( ! IPSLib::appIsInstalled( $app_dir ) )

{

continue;

}

if ( file_exists( IPSLib::getAppDir( $app_dir ) . '/extensions/admin/forum_form.php' ) )

{

$_class = IPSLib::loadLibrary( IPSLib::getAppDir( $app_dir ) . '/extensions/admin/forum_form.php', 'admin_forum_form__'.$app_dir, $app_dir );

$_object = new $_class( $this->registry );

$remote = $_object->getForSave();

$save = array_merge( $remote, $save );

}

}

//-----------------------------------------

// ADD

//-----------------------------------------

if ( $type == 'new' )

{

$this->DB->build( array( 'select' => 'MAX(id) as top_forum', 'from' => 'forums' ) );

$this->DB->execute();

$row = $this->DB->fetch();

if ( $row['top_forum'] < 1 )

{

$row['top_forum'] = 0;

}

$row['top_forum']++;

/* Forum Information */

//$save['id'] = $row['top_forum'];

$save['position'] = $row['top_forum'];

$save['topics'] = 0;

$save['posts'] = 0;

$save['last_post'] = 0;

$save['last_poster_id'] = 0;

$save['last_poster_name'] = "";

/* Insert the record */

$this->DB->insert( 'forums', $save );

$forum_id = $this->DB->getInsertId();

/* Permissions */

$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php', 'classPublicPermissions' );

$permissions = new $classToLoad( ipsRegistry::instance() );

$permissions->savePermMatrix( $this->request['perms'], $forum_id, 'forum' );

if( !$save['can_view_others'] )

{

$this->DB->update( 'permission_index', array( 'owner_only' => 1 ), "app='forums' AND perm_type='forum' AND perm_type_id={$forum_id}" );

}

/* Done */

$this->registry->output->global_message = $forum_cat_lang . $this->lang->words['for__created'];

$this->registry->adminFunctions->saveAdminLog( $forum_cat_lang . " '" . $this->request['name'] . "'" . strtolower ( $this->lang->words['for__created'] ) );

}

else

{

if ( $this->request['parent_id'] == -1 )

{

$save['can_view_others'] = 1;

/* Permissions */

$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php', 'classPublicPermissions' );

$permissions = new $classToLoad( ipsRegistry::instance() );

$permissions->savePermMatrix( $this->request['perms'], $this->request['f'], 'forum' );

if( ! $save['can_view_others'] )

{

$this->DB->update( 'permission_index', array( 'owner_only' => 1 ), "app='forums' AND perm_type='forum' AND perm_type_id={$this->request['f']}" );

}

else

{

$this->DB->update( 'permission_index', array( 'owner_only' => 0 ), "app='forums' AND perm_type='forum' AND perm_type_id={$this->request['f']}" );

}

}

$this->DB->update( 'forums', $save, "id=" . $this->request['f'] );

$this->registry->output->global_message = $forum_cat_lang.$this->lang->words['for__edited'];

$this->registry->adminFunctions->saveAdminLog( $forum_cat_lang." '" . $this->request['name'] . "' " . strtolower ( $this->lang->words['for__edited'] ) );

}

$this->recacheForums();

$this->request['f'] = '';

if( $save['parent_id'] > 0 )

{

$this->request['f'] = $save['parent_id'];

}

$this->forum_functions->forumsInit();

$this->showForums();

}

/**

* Show the form to edit permissions

*

* @return void Outputs to screen

*/

public function permEditForm()

{

//-----------------------------------------

// INIT

//-----------------------------------------

$this->request['f'] = intval( $this->request['f'] );

//-----------------------------------------

// check..

//-----------------------------------------

if ( ! $this->request['f'] )

{

$this->registry->output->showError( $this->lang->words['for_noid'], 11316 );

}

//-----------------------------------------

// Get this forum details

//-----------------------------------------

$forum = $this->forum_functions->forum_by_id[ $this->request['f'] ];

if( $this->request['copyForumPerms'] )

{

$forumToCopy = $this->forum_functions->forum_by_id[ $this->request['copyForumPerms'] ];

foreach( array( 'perm_view', 'perm_2', 'perm_3', 'perm_4', 'perm_5', 'perm_6' ) as $field )

{

$forum[ $field ] = $forumToCopy[ $field ];

}

}

//-----------------------------------------

// Next id...

//-----------------------------------------

$relative = $this->getNextId( $this->request['f'] );

//-----------------------------------------

// check...

//-----------------------------------------

if ( ! $forum['id'] )

{

$this->registry->output->showError( $this->lang->words['for_noid'], 11317 );

}

//-----------------------------------------

// HTML

//-----------------------------------------

$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php', 'classPublicPermissions' );

$permissions = new $classToLoad( ipsRegistry::instance() );

if( $forum['parent_id'] != 'root' )

{

$perm_matrix = $permissions->adminPermMatrix( 'forum', $forum );

}

else

{

$perm_matrix = $permissions->adminPermMatrix( 'forum', $forum, 'forums', 'view' );

}

$forumCopyDropdown = $this->registry->output->formDropdown( 'copyForumPerms', $this->forum_functions->adForumsForumList() );

$this->registry->output->html .= $this->html->forumPermissionForm( $forum, $relative, $perm_matrix, $forum, $forumCopyDropdown );

}

/**

* Get the id of the next forum

*

* @param integer Last forum id

* @return void Outputs to screen

*/

public function getNextId($fid)

{

$nextid = 0;

$ids = array();

$index = 0;

$count = 0;

foreach( $this->forum_functions->forum_cache['root'] as $forum_data )

{

$ids[ $count ] = $forum_data['id'];

if ( $forum_data['id'] == $fid )

{

$index = $count;

}

$count++;

if ( isset($this->forum_functions->forum_cache[ $forum_data['id'] ]) AND is_array( $this->forum_functions->forum_cache[ $forum_data['id'] ] ) )

{

foreach( $this->forum_functions->forum_cache[ $forum_data['id'] ] as $forum_data )

{

$children = $this->forum_functions->forumsGetChildren( $forum_data['id'] );

$ids[ $count ] = $forum_data['id'];

if ( $forum_data['id'] == $fid )

{

$index = $count;

}

$count++;

if ( is_array($children) and count($children) )

{

foreach( $children as $kid )

{

$ids[ $count ] = $kid;

if ( $kid == $fid )

{

$index = $count;

}

$count++;

}

}

}

}

}

return array( 'next' => $ids[ $index + 1 ], 'previous' => $ids[ $index - 1 ] );

}

/**

* Recache the forums

*

* @return void

* @deprecated We're moving away from forum cache

*/

public function recacheForums()

{

//$this->registry->class_forums->updateForumCache();

}

/**

* Save the permissions

*

* @return void Outputs to screen

*/

public function permDoEdit()

{

/* INI */

$perms = array();

$this->request['f'] = intval( $this->request['f'] );

/* Security Check */

$this->registry->adminFunctions->checkSecurityKey();

/* Save the permissions */

$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/class_public_permissions.php', 'classPublicPermissions' );

$permissions = new $classToLoad( ipsRegistry::instance() );

$permissions->savePermMatrix( $this->request['perms'], $this->request['f'], 'forum' );

/* Log */

$this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['for_permeditedin'], $this->request['name'] ) );

$this->recacheForums();

/* Previous Forum */

if ( $this->request['doprevious'] AND $this->request['doprevious'] and $this->request['previd'] > 0 )

{

$this->registry->output->global_message = $this->lang->words['for_permedited'];

$this->request['f'] = $this->request['previd'];

$this->registry->output->silentRedirect( "{$this->settings['base_url']}{$this->html->form_code}do=pedit&f=" . $this->request['f'] );

}

/* Next Forum */

else if ( $this->request['donext'] AND $this->request['donext'] and $this->request['nextid'] > 0 )

{

$this->registry->output->global_message = $this->lang->words['for_permedited'];

$this->request['f'] = $this->request['nextid'];

$this->registry->output->silentRedirect( "{$this->settings['base_url']}{$this->html->form_code}do=pedit&f=" . $this->request['f'] );

}

/* Reload */

else if ( $this->request['reload'] AND $this->request['reload'] )

{

$this->registry->output->silentRedirect( "{$this->settings['base_url']}{$this->html->form_code}do=pedit&f=" . $this->request['f'] );

}

/* Done */

else

{

$this->registry->output->doneScreen( $this->lang->words['for_permedited2'], $this->lang->words['for_control'], $this->html->form_code, 'redirect' );

}

}

/**

* Reorder the child forums

*

* @return void Outputs to screen

*/

public function doReorder()

{

//-----------------------------------------

// INIT

//-----------------------------------------

$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' );

$ajax = new $classToLoad();

//-----------------------------------------

// Checks...

//-----------------------------------------

if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false )

{

$ajax->returnString( $this->lang->words['postform_badmd5'] );

exit();

}

//-----------------------------------------

// Save new position

//-----------------------------------------

$position = 1;

if( is_array($this->request['forums']) AND count($this->request['forums']) )

{

foreach( $this->request['forums'] as $this_id )

{

$this->DB->update( 'forums', array( 'position' => $position ), 'id=' . $this_id );

$position++;

}

}

$this->recacheForums();

$ajax->returnString( 'OK' );

exit();

}

/**

* List the forums

*

* @return void Outputs to screen

*/

public function showForums()

{

//-----------------------------------------

// INIT

//-----------------------------------------

$this->request['f'] = intval( $this->request['f'] );

//-----------------------------------------

// Nav

//-----------------------------------------

if( $this->request['f'] )

{

$nav = $this->forum_functions->forumsBreadcrumbNav( $this->request['f'], '&'.$this->form_code.'&f=' );

if( is_array( $nav ) and count( $nav ) > 1 )

{

//array_shift( $nav );

}

}

//-----------------------------------------

// Grab the moderators

//-----------------------------------------

$this->forum_functions->moderators = array();

$this->DB->build( array(

'select' => 'm.*',

'from' => array( 'moderators' => 'm' ),

'add_join'=> array(

array(

'select' => 'mm.members_display_name',

'from' => array( 'members' => 'mm' ),

'where' => 'mm.member_id=m.member_id AND m.is_group=0',

'type' => 'left'

)

)

) );

$this->DB->execute();

while( $r = $this->DB->fetch() )

{

$this->forum_functions->moderators[] = $r;

}

//-----------------------------------------

// Print screen

//-----------------------------------------

$this->forum_functions->type = 'manage';

$this->registry->output->html .= $this->html->renderForumHeader( $nav );

$this->forum_functions->forumsListForums();

$choose = "<select name='roots' class='realbutton'>";

if( is_array($this->forum_functions->forum_cache['root']) AND count($this->forum_functions->forum_cache['root']) )

{

foreach( $this->forum_functions->forum_cache['root'] as $fid => $fdata )

{

$choose .= "<option value='{$fid}'>{$fdata['name']}</option>\n";

}

}

$choose .= "</select>";

//-----------------------------------------

// Member groups

//-----------------------------------------

$mem_group = "<select name='group'>";

$this->DB->build( array( 'select' => 'g_id, g_title', 'from' => 'groups', 'order' => "g_title" ) );

$this->DB->execute();

while ( $r = $this->DB->fetch() )

{

$mem_group .= "<option value='{$r['g_id']}'>{$r['g_title']}</option>\n";

}

$mem_group .= "</select>";

//-----------------------------------------

// Add footer

//-----------------------------------------

$this->registry->output->html .= $this->html->renderForumFooter( $choose, $mem_group );

}

}

Teraz admin/applications/forums/skin_cp/cp_skin_forums.php

<?php

/**

* <pre>

* Invision Power Services

* IP.Board v3.1.4

* Forums skin functions

* Last Updated: $LastChangedDate: 2010-11-08 15:39:48 -0500 (Mon, 08 Nov 2010) $

* </pre>

*

* @author $Author: ips_terabyte $

* @copyright © 2001 - 2009 Invision Power Services, Inc.

* @package IP.Board

* @subpackage Forums

* @since 14th May 2003

* @version $Rev: 7117 $

*/

class cp_skin_forums extends output

{

/**

* Prevent our main destructor being called by this class

*

* @access public

* @return void

*/

public function __destruct()

{

}

/**

* Forum wrapper

*

* @access public

* @param string Content

* @param array Forum data

* @param bool Show buttons or not

* @return string HTML

*/

public function forumWrapper( $content, $r, $show_buttons=1 ) {

$IPBHTML = "";

//--starthtml--//

$IPBHTML .= <<<HTML

<div class='tableborder isDraggable' id='cat_{$r['id']}' style='margin-bottom: 10px;'>

<div class='tableheaderalt'>

HTML;

$IPBHTML .= <<<HTML

<table class='header'>

<tr>

<td align='left' width='95%' title='{$this->lang->words['frm_id']}{$r['id']}'>

HTML;

if( !$this->request['showall'] )

{

$IPBHTML .= <<<HTML

<div class='draghandle'><img src='{$this->settings['skin_acp_url']}/_newimages/drag_icon.png' alt='drag' /></div>

HTML;

}

$IPBHTML .= <<<HTML

{$r['name']}

</td>

<td align='right' width='5%' nowrap='nowrap'>

HTML;

if ( $show_buttons )

{

$IPBHTML .= <<<HTML

<img class='ipbmenu' id="menum-{$r['id']}" src='{$this->settings['skin_acp_url']}/_newimages/menu_open.png' alt='{$this->lang->words['frm_options']}' />  

<ul class='acp-menu' id='menum-{$r['id']}_menucontent'>

<li class='icon add'><a href='{$this->settings['base_url']}{$this->form_code}do=forum_add&p={$r['id']}'>{$this->lang->words['frm_newforum']}</a></li>

<li class='icon edit'><a href='{$this->settings['base_url']}{$this->form_code}do=edit&f={$r['id']}'>{$this->lang->words['frm_editsettings']}</a></li>

<li class='icon info'><a href='{$this->settings['base_url']}{$this->form_code}do=pedit&f={$r['id']}'>{$this->lang->words['frm_permissions']}</a></li>

<li class='icon delete'><a href='{$this->settings['base_url']}{$this->form_code}do=delete&f={$r['id']}'>{$this->lang->words['frm_deletecat']}</a></li>

<li class='icon view'><a href='{$this->settings['base_url']}{$this->form_code}do=skinedit&f={$r['id']}'>{$this->lang->words['frm_skinopt']}</a></li>

</ul>

HTML;

}

$IPBHTML .= <<<HTML

</td>

</tr>

</table>

</div>

<div id='cat_{$r['id']}_container'>

{$content}

</div>

<script type="text/javascript">

dropItLikeItsHot{$r['id']} = function( draggableObject, mouseObject )

{

var options = {

method : 'post',

parameters : Sortable.serialize( 'cat_{$r['id']}_container', { tag: 'div', name: 'forums' } )

};

new Ajax.Request( "{$this->settings['base_url']}&{$this->form_code_js}&do=doreorder&md5check={$this->registry->adminFunctions->getSecurityKey()}".replace( /&/g, '&' ), options );

return false;

};

Sortable.create( 'cat_{$r['id']}_container', { tag: 'div', only: 'isDraggable', revert: true, format: 'forum_([0-9]+)', onUpdate: dropItLikeItsHot{$r['id']}, handle: 'draghandle' } );

</script>

</div>

HTML;

//--endhtml--//

return $IPBHTML;

}

/**

* Display forum header

*

* @access public

* @return string HTML

*/

public function renderForumHeader( $nav ) {

$IPBHTML = "";

//--starthtml--//

if( is_array( $nav ) && count( $nav ) )

{

$IPBHTML .= <<<HTML

<div class='navstrip'>

<a href='{$this->settings['base_url']}{$this->form_code}'>{$this->lang->words['for_forumscap']}</a>

HTML;

foreach( $nav as $n )

{

$IPBHTML .= <<<HTML

> <a href='{$this->settings['base_url']}{$this->form_code}{$n[1]}'>{$n[0]}</a>

HTML;

}

$IPBHTML .= <<<HTML

</div><br />

HTML;

}

$IPBHTML .= <<<HTML

<div class='section_title'>

<h2>{$this->lang->words['for_title']}</h2>

<ul class='context_menu'>

<li>

<a href='{$this->settings['base_url']}{$this->form_code}module=forums&do=forum_add&forum_id={$this->request['f']}&type=forum'>

<img src='{$this->settings['skin_acp_url']}/_newimages/icons/add.png' alt='' />

{$this->lang->words['forums_context_add_forum']}

</a>

</li>

<li>

<a href='{$this->settings['base_url']}{$this->form_code}module=forums&do=forum_add&forum_id={$this->request['f']}&type=category'>

<img src='{$this->settings['skin_acp_url']}/_newimages/icons/folder_add.png' alt='' />

{$this->lang->words['forums_context_add_category']}

</a>

</li>

</ul>

</div>

<script type='text/javascript' src='{$this->settings['js_app_url']}acp.forums.js'></script>

<div class='taboff'>

HTML;

if ( ipsRegistry::$request['showall'] )

{

$IPBHTML .= <<<HTML

<a href='{$this->settings['base_url']}&{$this->form_code}&showall=0'>{$this->lang->words['frm_showtier']}</a>

HTML;

}

else

{

$IPBHTML .= <<<HTML

<a href='{$this->settings['base_url']}&{$this->form_code}&showall=1'>{$this->lang->words['frm_showall']}</a>

HTML;

}

$IPBHTML .= <<<HTML

</div>

<div class='taboff'><a href='#' onclick='return ACPForums.toggleModOptions();' id='togglemod'>{$this->lang->words['frm_modshow']}</a></div>

<br clear='all' />

<div class='acp-box' id='forum_wrapper'>

HTML;

//--endhtml--//

return $IPBHTML;

}

/**

* Display single forum moderator entry

*

* @access public

* @param array Moderator data

* @param integer Forum ID

* @return string HTML

*/

public function renderModeratorEntry( $data='', $forum_id=0 ) {

$return_id = intval( $this->request['f'] );

$IPBHTML = "";

//--starthtml--//

$IPBHTML .= <<<HTML

<div class='ipbmenu realbutton' style='float:left;width:auto;white-space:nowrap;margin-right:3px;' id="modmenu{$data['randId']}">{$data['_fullname']} <img src='{$this->settings['skin_acp_url']}/_newimages/menu_open.png' alt='{$this->lang->words['frm_options']}' /></div>

<ul class='acp-menu' id='modmenu{$data['randId']}_menucontent'>

<li class='icon delete'><a href='#' onclick='return acp.confirmDelete("{$this->settings['base_url']}section=moderator&act=mod&do=remove&mid={$data['mid']}&fid=all");'>{$this->lang->words['frm_modremoveall']}</a></li>

<li class='icon delete'><a href='#' onclick='return acp.confirmDelete("{$this->settings['base_url']}section=moderator&act=mod&do=remove&mid={$data['mid']}&fid={$forum_id}");'>{$this->lang->words['frm_modremove']}</a></li>

<li class='icon edit'><a href='{$this->settings['base_url']}section=moderator&act=mod&do=edit&mid={$data['mid']}&return_id={$return_id}'>{$this->lang->words['frm_modedit']}</a></li>

</ul>

HTML;

//--endhtml--//

return $IPBHTML;

}

/**

* Display forum footer

*

* @access public

* @param string Forum dropdown

* @param string Options HTML for member groups

* @return string HTML

*/

public function renderForumFooter( $choose="", $mem_group ) {

$return_id = intval( $this->request['f'] );

$IPBHTML = "";

//--starthtml--//

$IPBHTML .= <<<HTML

</div>

<script type="text/javascript">

dropItLikeItsHot = function( draggableObject, mouseObject )

{

var options = {

method : 'post',

parameters : Sortable.serialize( 'forum_wrapper', { tag: 'div', name: 'forums' } )

};

new Ajax.Request( "{$this->settings['base_url']}&{$this->form_code_js}&do=doreorder&md5check={$this->registry->adminFunctions->getSecurityKey()}".replace( /&/g, '&' ), options );

return false;

};

Sortable.create( 'forum_wrapper', { tag: 'div', only: 'isDraggable', revert: true, format: 'cat_([0-9]+)', onUpdate: dropItLikeItsHot, handle: 'draghandle' } );

</script>

<form method='post' action='{$this->settings['base_url']}module=forums&section=moderator&do=add' onsubmit='return ACPForums.submitModForm()'>

<input type='hidden' name='_admin_auth_key' value='{$this->registry->adminFunctions->getSecurityKey()}' />

<input type='hidden' name='modforumids' id='modforumids' />

<input type='hidden' name='return_id' value='{$return_id}' />

<div class='tableborder'>

<table width='100%' class='tablerow1'>

<tr>

<td valign='middle'>{$this->lang->words['frm_modaddtxt']}</td>

<td>{$this->lang->words['frm_modname']}<input class='realbutton nohand' type='text' name='name' id='modUserName' size='20' value='' /> {$this->lang->words['frm_modorgroup']} {$mem_group}</td>

<td width='1%' valign='middle'><input type='submit' class='realbutton' value='{$this->lang->words['frm_gogogadgetflow']}' /></td>

</tr>

</table>

</div>

</form>

HTML;

//--endhtml--//

return $IPBHTML;

}

/**

* Render a forum row

*

* @access public

* @param string Description

* @param array Forum data

* @param string Depth guide

* @param string Skin used

* @return string HTML

*/

public function renderForumRow( $desc, $r, $depth_guide, $skin ) {

$IPBHTML = "";

//--starthtml--//

if( $depth_guide )

{

$IPBHTML .= <<<HTML

<div class='isDraggable forum_row subforum' id='forum_{$r['id']}'>

HTML;

}

else

{

$IPBHTML .= <<<HTML

<div class='isDraggable forum_row' id='forum_{$r['id']}'>

HTML;

}

$IPBHTML .= <<<HTML

<table style='width: 100%' cellspacing='0' class='double_pad'>

<tr>

HTML;

if( !$this->request['showall'] )

{

$IPBHTML .= <<<HTML

<td style='width: 2%'>

<div class='draghandle'><img src='{$this->settings['skin_acp_url']}/_newimages/drag_icon.png' alt='drag' /></div>

</td>

HTML;

}

if( $depth_guide )

{

$IPBHTML .= <<<HTML

<td style='padding-left: 14px'>

{$depth_guide}

</td>

HTML;

}

$IPBHTML .= <<<HTML

<td style='width: 90%'>

HTML;

if ( $r['id'] == $this->settings['forum_trash_can_id'] )

{

$IPBHTML .= <<<HTML

<img src='{$this->settings['skin_acp_url']}/images/acp_trashcan.gif' title='{$this->lang->words['frm_thistrash']}' />

HTML;

}

$IPBHTML .= <<<HTML

<strong class='forum_name'>{$r['name']}</strong>

HTML;

if( $desc )

{

$IPBHTML .= <<<HTML

<br /><span class='forum_desc'>{$desc}</span>

HTML;

}

if ( ($r['skin_id'] != "") and ($r['skin_id'] > 0) )

{

$IPBHTML .= <<<HTML

<br />[ {$this->lang->words['using_skin_set']} {$skin} ]

HTML;

}

$IPBHTML .= <<<HTML

HTML;

if ( $r['_modstring'] != "" )

{

$IPBHTML .= <<<HTML

<div style='display:none' class='moddiv'><fieldset style='padding:4px;height:45px'><legend>{$this->lang->words['frm_moderators']}</legend>{$r['_modstring']}</fieldset></div>

HTML;

}

$IPBHTML .= <<<HTML

</td>

<td style='width:5%' nowrap='nowrap'>

<input type='checkbox' title='{$this->lang->words['frm_modcheck']}' id='id_{$r['id']}' value='1' />

<img class='ipbmenu' id="menu{$r['id']}" src='{$this->settings['skin_acp_url']}/_newimages/menu_open.png' alt='{$this->lang->words['frm_options']}' />

<ul class='acp-menu' id='menu{$r['id']}_menucontent'>

<li class='icon edit'><a href='{$this->settings['base_url']}&{$this->form_code}&do=edit&f={$r['id']}'>{$this->lang->words['frm_editsettings']}</a></li>

<li class='icon info'><a href='{$this->settings['base_url']}&{$this->form_code}&do=pedit&f={$r['id']}'>{$this->lang->words['frm_permissions']}</a></li>

<li class='icon delete'><a href='{$this->settings['base_url']}&{$this->form_code}&do=empty&f={$r['id']}'>{$this->lang->words['frm_emptyforum']}</a></li>

<li class='icon delete'><a href='{$this->settings['base_url']}&{$this->form_code}&do=delete&f={$r['id']}'>{$this->lang->words['frm_deleteforum']}</a></li>

<li class='icon edit'><a href='{$this->settings['base_url']}&{$this->form_code}&do=frules&f={$r['id']}'>{$this->lang->words['frm_forumrules']}</a></li>

<li class='icon edit'><a href='{$this->settings['base_url']}&module=tools&section=tools&do=clearforumsubs&f={$r['id']}'>{$this->lang->words['m_clearsubs']}</a></li>

<li class='icon view'><a href='{$this->settings['base_url']}&{$this->form_code}&do=skinedit&f={$r['id']}'>{$this->lang->words['frm_skinopt']}</a></li>

<li class='icon info'><a href='{$this->settings['base_url']}&{$this->form_code}&do=recount&f={$r['id']}'>{$this->lang->words['frm_resync']}</a></li>

</ul>

</td>

</tr>

</table>

</div>

HTML;

//--endhtml--//

return $IPBHTML;

}

/**

* Display "no forums" row

*

* @access public

* @param integer Parent ID

* @return string HTML

*/

public function renderNoForums( $parent_id ) {

$IPBHTML = "";

//--starthtml--//

$IPBHTML .= <<<HTML

<tr>

<td class='tablerow1' width='100%' colspan='2'>

{$this->lang->words['frm_noforums']}

<div class='graytext'><a href='{$this->settings['base_url']}&{$this->form_code}&do=forum_add&p={$parent_id}'>{$this->lang->words['frm_noforumslink']}</a></div>

</td>

</tr>

HTML;

//--endhtml--//

return $IPBHTML;

}

/**

* Display forum permissions matrix

*

* @access public

* @param array Forum data

* @param array Relative links

* @param string Matrix HTML

* @param array ..of Forum Data

* @return string HTML

*/

public function forumPermissionForm( $forum, $relative, $perm_matrix, $forumData=array(), $forumCopyDropDown ) {

$IPBHTML = "";

//--starthtml--//

$title = urlencode($forum['name']);

$IPBHTML .= <<<HTML

<div class='section_title'>

<h2>{$this->lang->words['head_forum_permissions']} {$forumData['name']}</h2>

</div>

<div style='float:right;'>

<form name='permCopyForm' id='permCopyForm' action='{$this->settings['base_url']}&{$this->form_code}&do=pedit&f={$this->request['f']}' method='post'>

{$this->lang->words['copy_perms_from']} {$forumCopyDropDown}

<input type='submit' name='submit' value='{$this->lang->words['copy_perms_go']}' class='button primary' />

</form>

</div>

<br style='clear: right;' /><br />

<form name='theAdminForm' id='adminform' action='{$this->settings['base_url']}&{$this->form_code}&do=pdoedit&f={$this->request['f']}&name={$title}&nextid={$relative['next']}&previd={$relative['previous']}' method='post'>

<input type='hidden' name='_admin_auth_key' value='{$this->registry->adminFunctions->getSecurityKey()}' />

{$perm_matrix }

<div class='acp-box'>

<div class='acp-actionbar'>

<div class='centeraction'>

HTML;

if ( $relative['next'] > 0 )

{

$IPBHTML .= <<<HTML

<input type='submit' name='donext' value='{$this->lang->words['frm_savenext']}' class='button primary' />

HTML;

}

$IPBHTML .= <<<HTML

<input type='submit' value='{$this->lang->words['frm_saveonly']}' class='button primary' />

<input type='submit' name='reload' value='{$this->lang->words['frm_savereload']}' class='button primary' />

HTML;

if ( $relative['next'] > 0 )

{

$IPBHTML .= <<<HTML

<input type='submit' name='doprevious' value='{$this->lang->words['frm_saveprev']}' class='button primary' />

HTML;

}

$IPBHTML .= <<<HTML

</div>

</div>

</div>

</form>

HTML;

//--endhtml--//

return $IPBHTML;

}

/**

* Display forum rules form

*

* @access public

* @param integer Forum ID

* @param array Forum data

* @return string HTML

*/

public function forumRulesForm( $id, $data )

{

$IPBHTML = "";

//--starthtml--//

$IPBHTML .= <<<HTML

<div class='section_title'>

<h2>{$this->lang->words['forum_rules_head']} '{$data['name']}'</h2>

</div>

<form action='{$this->settings['base_url']}{$this->form_code}' method='post' name='theAdminForm' onclick='return ValidateForm();' id='postingform'>

<input type='hidden' name='do' value='dorules' />

<input type='hidden' name='f' value='{$id}' />

<input type='hidden' name='_admin_auth_key' value='{$this->registry->adminFunctions->getSecurityKey()}' />

<div class='acp-box'>

<h3>{$this->lang->words['frm_rulessetup']}</h3>

<ul class='acp-form alternate_rows'>

<li>

<label>{$this->lang->words['frm_rulesdisplay']}</label>

{$data['_show_rules']}

</li>

<li>

<label>{$this->lang->words['frm_rulestitle']}</label>

{$data['_title']}

</li>

<li>

<label>{$this->lang->words['frm_rulestext']}</label>

</li>

<li>{$data['_editor']}</li>

<li>

<label>{$this->lang->words['frm_rule_raw_html_title']}<span class='desctext'>{$this->lang->words['frm_rule_raw_html_desc']}</span></label>

{$data['rules_raw_html']}

</li>

</ul>

<div class='acp-actionbar'>

<div class='centeraction'>

<input type='submit' value='{$this->lang->words['frm_rulesbutton']}' class='button primary' accesskey='s'>

</div>

</div>

</div>

</form>

HTML;

//--endhtml--//

return $IPBHTML;

}

/**

* Display forum skin options form

*

* @access public

* @param integer Forum id

* @param array Forum data

* @return string HTML

*/

public function forumSkinOptions( $id, $data )

{

$IPBHTML = "";

//--starthtml--//

$IPBHTML .= <<<HTML

<div class='section_title'>

<h2>{$this->lang->words['modify_skin_head']}</h2>

</div>

<form action='{$this->settings['base_url']}{$this->form_code}' method='post' name='theAdminForm' id='theAdminForm'>

<input type='hidden' name='do' value='doskinedit' />

<input type='hidden' name='f' value='{$id}' />

<input type='hidden' name='_admin_auth_key' value='{$this->registry->adminFunctions->getSecurityKey()}' />

<div class='acp-box'>

<h3>{$this->lang->words['frm_skinchoice']}{$data['name']}</h3>

<ul class='acp-form alternate_rows'>

<li>

<label>{$this->lang->words['frm_skinapply']}</label>

{$data['fsid']}

</li>

<li>

<label>{$this->lang->words['frm_skinsub']}</label>

{$data['apply_to_children']}

</li>

</ul>

<div class='acp-actionbar'>

<div class='centeraction'>

<input type='submit' value='{$this->lang->words['frm_skinbutton']}' class='button primary' accesskey='s'>

</div>

</div>

</div>

</form>

HTML;

//--endhtml--//

return $IPBHTML;

}

/**

* Display form to empty a forum

*

* @access public

* @param integer Forum id

* @param array Forum data

* @return string HTML

*/

public function forumEmptyForum( $id, $forum )

{

$IPBHTML = "";

//--starthtml--//

$IPBHTML .= <<<HTML

<div class='section_title'>

<h2>{$this->lang->words['frm_emptytitle']} '{$forum['name']}'</h2>

</div>

<p class='message error'>

{$this->lang->words['for_empty_msg']}

</p>

<form action='{$this->settings['base_url']}{$this->form_code}' method='post' name='theAdminForm' id='theAdminForm'>

<input type='hidden' name='do' value='doempty' />

<input type='hidden' name='f' value='{$id}' />

<input type='hidden' name='_admin_auth_key' value='{$this->registry->adminFunctions->getSecurityKey()}' />

<div class='acp-box'>

<h3>{$this->lang->words['frm_emptytitle']}'{$forum['name']}'</h3>

<ul class='acp-form alternate_rows'>

<li>

<label>{$this->lang->words['frm_emptywhich']}</label>

{$forum['name']}

</li>

</ul>

<div class='acp-actionbar'>

<div class='centeraction'>

<input type='submit' value='{$this->lang->words['frm_emptybutton']}' class='button primary' accesskey='s'>

</div>

</div>

</div>

</form>

HTML;

//--endhtml--//

return $IPBHTML;

}

/**

* Display form to delete a forum

*

* @access public

* @param integer Forum ID

* @param string Name

* @param string Options HTML for move to dropdown

* @param integer [Category=1|Forum=0]

* @return string HTML

*/

public function forumDeleteForm( $id, $name, $move, $is_cat )

{

$IPBHTML = "";

//--starthtml--//

$text = $is_cat ? $this->lang->words['for_iscat_y'] : $this->lang->words['for_iscat_n'];

$title = sprintf( $this->lang->words['for_removing'], $text, $name );

$IPBHTML .= <<<HTML

<div class='section_title'>

<h2>{$title}</h2>

</div>

<form action='{$this->settings['base_url']}{$this->form_code}' method='post' name='theAdminForm' id='theAdminForm'>

<input type='hidden' name='do' value='dodelete' />

<input type='hidden' name='f' value='{$id}' />

<input type='hidden' name='_admin_auth_key' value='{$this->registry->adminFunctions->getSecurityKey()}' />

<div class='acp-box'>

<h3>{$this->lang->words['frm_deletetitle']}{$name}</h3>

<ul class='acp-form alternate_rows'>

<li>

<label>{$this->lang->words['frm_deletewhich']}</label>

{$name}

</li>

HTML;

if( $move )

{

$IPBHTML .= <<<HTML

<li>

<label>{$this->lang->words['frm_deletemove']}</label>

{$move}

</li>

HTML;

}

$IPBHTML .= <<<HTML

</ul>

<div class='acp-actionbar'>

<div class='centeraction'>

<input type='submit' value='{$this->lang->words['frm_deletebutton']}' class='redbutton realbutton' accesskey='s'>

</div>

</div>

</div>

</form>

HTML;

//--endhtml--//

return $IPBHTML;

}

/**

* Display form to add/edit a forum

*

* @access public

* @param array Form fields

* @param string Button text

* @param string Action code

* @param string Title

* @param string Button text (again?)

* @param array Forum data

* @param string Permissions matrix

* @return string HTML

*/

public function forumForm( $form, $button, $code, $title, $forum, $perm_matrix ) {

$IPBHTML = "";

//--starthtml--//

$_forUrl = urlencode($forum['name']);

$IPBHTML .= <<<HTML

<div class='section_title'>

<h2>{$title}</h2>

</div>

<ul id='tabstrip_forumForm' class='tab_bar no_title'>

<li id='tabtab-FORUMS|1'>{$this->lang->words['frm_f_basic']}</li>

HTML;

if( $form['addnew_type'] != 'category' )

{

$IPBHTML .= <<<HTML

<li id='tabtab-FORUMS|2'>{$this->lang->words['from_f_postable_settings']}</li>

HTML;

}

if ( $perm_matrix )

{

$IPBHTML .= <<<HTML

<li id='tabtab-FORUMS|3'>{$this->lang->words['from_f_perms']}</li>

HTML;

}

if( $form['addnew_type'] != 'category' )

{

$IPBHTML .= <<<HTML

{$form['tabStrip']}

HTML;

}

$IPBHTML .= <<<HTML

</ul>

<script type="text/javascript">

//<![CDATA[

document.observe("dom:loaded",function()

{

ipbAcpTabStrips.register('tabstrip_forumForm');

ipbAcpTabStrips.doToggle($('tabtab-FORUMS|1'));

});

//]]>

</script>

<script type='text/javascript' src='{$this->settings['js_app_url']}acp.forums.js'></script>

<form name='theAdminForm' id='adminform' action='{$this->settings['base_url']}&{$this->form_code}&do={$code}&f={$this->request['f']}&name={$_forUrl}' method='post'>

<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']}' />

<div id='tabpane-FORUMS|1'>

<div class='acp-box'>

<ul class='acp-form alternate_rows'>

<li><label class='head'>{$this->lang->words['frm_f_basic']}</label></li>

<li>

<label>{$this->lang->words['frm_f_name_' . $form['addnew_type'] ]}</label>

{$form['name']}

</li>

HTML;

if( $form['addnew_type'] != 'category' )

{

$IPBHTML .= <<<HTML

<li>

<label>{$this->lang->words['frm_f_desc']}<span class='desctext'>{$this->lang->words['frm_f_desc_info']}</span></label>

{$form['description']}

</li>

<li>

<label>{$this->lang->words['dp30_forum_icons_title']}<span class='desctext'>{$this->lang->words['dp30_forum_icons_descr']}</span></label>

{$form['icon']}

</li>

<li>

<label>{$this->lang->words['frm_f_parent']}</label>

{$form['parent_id']}

</li>

<li>

<label>{$this->lang->words['frm_f_state']}</label>

{$form['status']}

</li>

<li>

<label>{$this->lang->words['frm_f_ascat']}<span class='desctext'>{$this->lang->words['frm_f_ascat_info']}</span></label>

{$form['sub_can_post']}

</li>

<li><label class='head'>{$this->lang->words['frm_f_redirect']}</label></li>

<li>

<label>{$this->lang->words['frm_f_redirect_url']}</label>

{$form['redirect_url']}

</li>

<li>

<label>{$this->lang->words['frm_f_redirect_en']}<span class='desctext'>{$this->lang->words['frm_f_redirect_en_info']}</span></label>

{$form['redirect_on']}

</li>

<li>

<label>{$this->lang->words['frm_f_redirect_num']}</label>

{$form['redirect_hits']}

</li>

<li><label class='head'>{$this->lang->words['frm_f_perm_title']}</label></li>

<li>

<label>{$this->lang->words['disable_sharelinks']}<span class='desctext'>{$this->lang->words['disable_sharelinks_desc']}</span></label>

{$form['disable_sharelinks']}

</li>

<li>

<label>{$this->lang->words['frm_f_perm_hide']}<span class='desctext'>{$this->lang->words['frm_f_perm_hide_info']}</span></label>

{$form['hide_last_info']}

</li>

<li>

<label>{$this->lang->words['frm_f_perm_list']}<span class='desctext'>{$this->lang->words['frm_f_perm_list_info']}</span></label>

{$form['permission_showtopic']}

</li>

<li>

<label>{$this->lang->words['frm_f_perm_cust']}<span class='desctext'>{$this->lang->words['frm_f_perm_cust_info']}</span></label>

{$form['permission_custom_error']}

</li>

</ul>

</div>

</div>

<div id='tabpane-FORUMS|2'>

<div class='acp-box'>

<ul class='acp-form alternate_rows'>

<li><label class='head'>{$this->lang->words['frm_f_post_title']}</label></li>

<li>

<label>{$this->lang->words['frm_f_post_html']}<span class='desctext'>{$this->lang->words['frm_f_post_html_info']}</span></label>

{$form['use_html']}

</li>

<li>

<label>{$this->lang->words['frm_f_post_bb']}</label>

{$form['use_ibc']}

</li>

<li>

<label>{$this->lang->words['frm_f_post_qreply']}</label>

{$form['quick_reply']}

</li>

<li>

<label>{$this->lang->words['frm_f_post_poll']}</label>

{$form['allow_poll']}

</li>

<li>

<label>{$this->lang->words['frm_f_post_bump']}<span class='desctext'>{$this->lang->words['frm_f_post_bump_info']}</span></label>

{$form['allow_pollbump']}

</li>

<li>

<label>{$this->lang->words['frm_f_post_rate']}</label>

{$form['forum_allow_rating']}

</li>

<li>

<label>{$this->lang->words['frm_f_post_inc']}<span class='desctext'>{$this->lang->words['frm_f_post_inc_info']}</span></label>

{$form['inc_postcount']}

</li>

<li>

<label>{$this->lang->words['frm_f_min_posts_post']}<span class='desctext'>{$this->lang->words['frm_f_min_posts_post_info']}</span></label>

{$form['min_posts_post']}

</li>

<li>

<label>{$this->lang->words['frm_f_min_posts_view']}<span class='desctext'>{$this->lang->words['frm_f_min_posts_view_info']}</span></label>

{$form['min_posts_view']}

</li>

<li>

<label>{$this->lang->words['frm_canviewothers']}</label>

{$form['can_view_others']}

</li>

<li><label class='head'>{$this->lang->words['frm_f_mod_title']}</label></li>

<li>

<label>{$this->lang->words['frm_f_mod_en']}<span class='desctext'>{$this->lang->words['frm_f_mod_en_info']}</span></label>

{$form['preview_posts']}

</li>

<li>

<label>{$this->lang->words['frm_f_mod_email']}<span class='desctext'>{$this->lang->words['frm_f_mod_email_info']}</span></label>

{$form['notify_modq_emails']}

</li>

<li>

<label>{$this->lang->words['frm_f_mod_pass']}<span class='desctext'>{$this->lang->words['frm_f_mod_pass_info']}</span></label>

{$form['password']}

</li>

<li>

<label>{$this->lang->words['frm_f_mod_exempt']}<span class='desctext'>{$this->lang->words['frm_f_mod_exempt_info']}</span></label>

{$form['password_override']}

</li>

<li><label class='head'>{$this->lang->words['frm_f_sort_title']}</label></li>

<li>

<label>{$this->lang->words['frm_f_sort_cutoff']}</label>

{$form['prune']}

</li>

<li>

<label>{$this->lang->words['frm_f_sort_key']}</label>

{$form['sort_key']}

</li>

<li>

<label>{$this->lang->words['frm_f_sort_order']}</label>

{$form['sort_order']}

</li>

<li>

<label>{$this->lang->words['frm_f_sort_filter']}</label>

{$form['topicfilter']}

</li>

</ul>

</div>

</div>

HTML;

}

if ( $perm_matrix )

{

if( $form['addnew_type'] == 'category' )

{

$IPBHTML .= <<<HTML

</ul>

</div>

</div>

HTML;

}

$IPBHTML .= <<<HTML

<div id='tabpane-FORUMS|3'>

<div class='acp-box'>

{$perm_matrix}

</div>

</div>

HTML;

}

if( $form['addnew_type'] != 'category' )

{

$IPBHTML .= <<<HTML

{$form['tabContent']}

HTML;

}

else

{

$IPBHTML .= <<<HTML

<input type='hidden' name='parent_id' value='-1' />

<input type='hidden' name='sub_can_post' value='0' />

<input type='hidden' name='permission_showtopic' value='1' />

HTML;

}

$IPBHTML .= <<<HTML

<div class='acp-actionbar'>

<div class='rightaction'>

<input type='submit' class='button primary' value='{$button}' /> {$this->lang->words['frm_or']}  {$form['convert_button']}

</div>

</div>

</form>

HTML;

//--endhtml--//

return $IPBHTML;

}

/**

* Select a moderator gateway page

*

* @access public

* @param integer Forum ID

* @param string Dropdown options of members

* @return string HTML

*/

public function moderatorSelectForm( $fid, $member_drop ) {

$return_id = intval( $this->request['return_id'] );

$IPBHTML = "";

//--starthtml--//

$IPBHTML .= <<<HTML

<form action='{$this->settings['base_url']}{$this->form_code}' method='post' name='theAdminForm' id='theAdminForm'>

<input type='hidden' name='do' value='add_final' />

<input type='hidden' name='fid' value='{$fid}' />

<input type='hidden' name='return_id' value='{$return_id}' />

<input type='hidden' name='_admin_auth_key' value='{$this->registry->adminFunctions->getSecurityKey()}' />

<div class='acp-box'>

<h3>{$this->lang->words['frm_m_search']}</h3>

<ul class='acp-form alternate_rows'>

<li>

<label>{$this->lang->words['frm_m_choose']}</label>

{$member_drop}

</li>

</ul>

<div class='acp-actionbar'>

<div class='centeraction'>

<input type='submit' value='{$this->lang->words['frm_m_choosebutton']}' class='button primary' accesskey='s'>

</div>

</div>

</div>

</form>

HTML;

//--endhtml--//

return $IPBHTML;

}

/**

* Display moderator add/edit form

*

* @access public

* @param array Form fields

* @param string Action code

* @param integer Member ID

* @param string Searched member text

* @param string Type

* @param integer Group ID

* @param string Group name

* @param string Button text

* @return string HTML

*/

public function moderatorPermissionForm( $form, $form_code, $mid, $mem, $type, $gid, $gname, $button ) {

$return_id = intval( $this->request['return_id'] );

$IPBHTML = "";

//--starthtml--//

if( $form_code == 'doedit' )

{

$title = $this->lang->words['mod_edit'];

}

else if ( $this->request['group'] )

{

$title = $this->lang->words['mod_addgroup'];

}

else

{

$title = $this->lang->words['mod_add'];

}

$IPBHTML .= <<<HTML

<div class='section_title'>

<h2>{$title}</h2>

</div>

<form action='{$this->settings['base_url']}{$this->form_code}' method='post' name='theAdminForm' id='theAdminForm'>

<input type='hidden' name='do' value='{$form_code}' />

<input type='hidden' name='mid' value='{$mid}' />

<input type='hidden' name='mem' value='{$mem}' />

<input type='hidden' name='mod_type' value='{$type}' />

<input type='hidden' name='gid' value='{$gid}' />

<input type='hidden' name='gname' value='{$gname}' />

<input type='hidden' name='return_id' value='{$return_id}' />

<input type='hidden' name='_admin_auth_key' value='{$this->registry->adminFunctions->getSecurityKey()}' />

<div class='acp-box'>

<h3>{$this->lang->words['frm_m_genset']}</h3>

<table class='acp-form alternate_rows'>

<tr>

<td width='51%'>

<strong>{$this->lang->words['frm_mod_forums']}</strong>

</td>

<td>

{$form['forums']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['frm_m_edit']}</strong>

</td>

<td>

{$form['edit_post']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['frm_m_topic']}</strong>

</td>

<td>

{$form['edit_topic']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['frm_m_delete']}</strong>

</td>

<td>

{$form['delete_post']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['frm_m_deletetop']}</strong>

</td>

<td>

{$form['delete_topic']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['gf_bw_soft_delete']}</strong>

<div class='desctext'>{$this->lang->words['soft_delete_info']}</div>

</td>

<td>

{$form['bw_mod_soft_delete']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['gf_bw_un_soft_delete']}</strong>

<div class='desctext'>{$this->lang->words['soft_delete_info']}</div>

</td>

<td>

{$form['bw_mod_un_soft_delete']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['gf_bw_soft_delete_see']}</strong>

<div class='desctext'>{$this->lang->words['gbw_soft_delete_see_d']}</div>

</td>

<td>

{$form['bw_mod_soft_delete_see']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['gf_bw_soft_delete_topic']}</strong>

<div class='desctext'>{$this->lang->words['soft_delete_info']}</div>

</td>

<td>

{$form['bw_mod_soft_delete_topic']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['gf_bw_un_soft_delete_topic']}</strong>

<div class='desctext'>{$this->lang->words['soft_delete_info']}</div>

</td>

<td>

{$form['bw_mod_un_soft_delete_topic']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['gf_bw_soft_delete_topic_see']}</strong>

<div class='desctext'>{$this->lang->words['gbw_soft_delete_topic_see_d']}</div>

</td>

<td>

{$form['bw_mod_soft_delete_topic_see']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['gf_bw_soft_delete_reason']}</strong>

<div class='desctext'>{$this->lang->words['soft_delete_info']}</div>

</td>

<td>

{$form['bw_mod_soft_delete_reason']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['gf_bw_soft_delete_see_post']}</strong>

<div class='desctext'>{$this->lang->words['gbw_soft_delete_see_post_d']}</div>

</td>

<td>

{$form['bw_mod_soft_delete_see_post']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['frm_m_ip']}</strong>

</td>

<td>

{$form['view_ip']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['frm_m_open']}</strong>

</td>

<td>

{$form['open_topic']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['frm_m_close']}</strong>

</td>

<td>

{$form['close_topic']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['frm_m_move']}</strong>

</td>

<td>

{$form['move_topic']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['frm_m_pin']}</strong>

</td>

<td>

{$form['pin_topic']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['frm_m_unpin']}</strong>

</td>

<td>

{$form['unpin_topic']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['frm_m_split']}</strong>

</td>

<td>

{$form['split_merge']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['frm_m_opentime']}</strong>

</td>

<td>

{$form['mod_can_set_open_time']}

</td>

</tr>

<tr>

<td>

<strong>{$this->lang->words['frm_m_closetime']}</strong>

</td>

<td>

{$form['mod_can_set_close_time']}

</td>

</tr>

</table>

</div>

<br />

<div class='acp-box'>

<h3>{$this->lang->words['frm_m_msettings']}</h3>

<ul class='acp-form alternate_rows'>

<li>

<label>{$this->lang->words['frm_m_massmove']}</label>

{$form['mass_move']}

</li>

<li>

<label>{$this->lang->words['frm_m_massprune']}</label>

{$form['mass_prune']}

</li>

<li>

<label>{$this->lang->words['frm_m_visible']}</label>

{$form['topic_q']}

</li>

<li>

<label>{$this->lang->words['frm_m_visiblepost']}</label>

{$form['post_q']}

</li>

</ul>

</div>

<br />

<div class='acp-box'>

<h3>{$this->lang->words['frm_m_asettings']}</h3>

<ul class='acp-form alternate_rows'>

<li>

<label>{$this->lang->words['frm_m_warn']}<span class='desctext'>{$this->lang->words['frm_m_warn_info']}</span></label>

{$form['allow_warn']}

</li>

<li>

<label>{$this->lang->words['frm_m_spam']}</label>

{$form['bw_flag_spammers']}

</li>

<li>

<label>{$this->lang->words['frm_m_mm']}<span class='desctext'>( <a href='#' onClick="window.open('{$this->settings['_base_url']}app=core&module=help&id=mod_mmod','Help','width=250,height=400,resizable=yes,scrollbars=yes'); return false;">{$this->lang->words['frm_m_mm_info']}</a> )</span></label>

{$form['can_mm']}

</li>

</table>

<div class='acp-actionbar'>

<div class='centeraction'>

<input type='submit' value='{$button}' class='button primary' accesskey='s'>

</div>

</div>

</div>

</form>

HTML;

//--endhtml--//

return $IPBHTML;

}

}

TERAZ SKIN - Wygląd -> Look & Feel -> Manage Skin Sets & Templates -> [wybór skina] -> Zarządzaj szablonami i CSS-em -> Strona główna -> boardIndexTemplate

{parse js_module="board"}

{parse js_module="hooks"}

{parse variable="sidebar_enabled" default="$show_side_blocks"}

<script type='text/javascript'>

//<![CDATA[

ipb.global.boardMarkers = $H({

'f_cat_unread': "{parse replacement="f_cat_read"}",

'f_unread': "{parse replacement="f_read"}",

'f_pass_unread': "{parse replacement="f_pass_read"}"

});

var markerURL = "{parse url="app=forums&module=ajax&section=markasread&secure_key={$this->member->form_hash}&i=1&forumid=" base="public"}"; // Ajax URL so don't use &

//]]>

</script>

<if test="sideBarEnabled:|:$this->templateVars['sidebar_enabled']">

<a href='{parse url="app=forums&module=extras&section=toggle" base="public"}' id='close_sidebar' class='sidebar_toggle' <if test="sidebaropen:|:IPSCookie::get('hide_sidebar') != '1'">style='display: none'</if>><img src='{$this->settings['img_url']}/sidebar_close.png' alt='{$this->lang->words['sidebar_close']}' /></a>

<a href='{parse url="app=forums&module=extras&section=toggle" base="public"}' id='open_sidebar' class='sidebar_toggle' <if test="sidebarclosed:|:IPSCookie::get('hide_sidebar') == '1'">style='display: none'</if>><img src='{$this->settings['img_url']}/sidebar_open.png' alt='{$this->lang->words['sidebar_open']}' /></a>

</if>

<h2 class='hide'>{$this->lang->words['board_index_title']}</h2>

<div id='board_index' class='clearfix'>

<if test="sideBarEnabled2:|:$this->templateVars['sidebar_enabled']">

<div id='index_stats' class='right clearfix' <if test="sidebarclosed2:|:IPSCookie::get('hide_sidebar') == '1'">style='display: none'</if>>

<foreach loop="side_blocks:$side_blocks as $block">

{$block}

</foreach>

</div>

</if>

<div id='categories' class='<if test="nosidebar:|:IPSCookie::get('hide_sidebar') == '1' || !$this->templateVars['sidebar_enabled']">no_sidebar</if> clearfix'>

<if test="latestNews:|:is_array($news_data) AND count($news_data)">

<div id='latest_news' class='row2'><strong>{$this->lang->words['newslink']}</strong> <a href='{parse url="showtopic={$news_data['id']}" template="showtopic" seotitle="{$news_data['seo_title']}" base="public"}' title='{$this->lang->words['newslink']}'>{$news_data['title']}</a></div>

</if>

<!-- CATS AND FORUMS -->

<if test="cats_forums:|:is_array( $cat_data ) AND count( $cat_data )">

<foreach loop="categories:$cat_data as $_data">

<if test="cat_has_forums:|:is_array( $_data['forum_data'] ) AND count( $_data['forum_data'] )">

{parse striping="catTable" classes="row1,row2"}

<div class='category_block block_wrap'>

<h3 id='category_{$_data['cat_data']['id']}' class='maintitle'><a class='toggle right' href='#' title='{$this->lang->words['toggle_cat']}'>{$this->lang->words['toggle_cat']}</a> <a href="{parse url="showforum={$_data['cat_data']['id']}" seotitle="{$_data['cat_data']['name_seo']}" template="showforum" base="public"}" title='{$this->lang->words['view_cat']}'>{$_data['cat_data']['name']}</a></h3>

<div class='border'><table cellspacing='0' class='ipb_table' summary="{$this->lang->words['forums_in_cat']} '{$_data['cat_data']['name']}'">

<tr class='header'>

<th scope='col' class='col_c_icon'> </th>

<th scope='col' class='col_c_forum'>{$this->lang->words['cat_name']}</th>

<th scope='col' class='col_c_stats stats'>{$this->lang->words['topics']}</th>

<th scope='col' class='col_c_stats stats'>

{$this->lang->words['replies']}</th>

<th scope='col' class='col_c_post'>{$this->lang->words['last_post_info']}</th>

</tr>

<!-- / CAT HEADER -->

<foreach loop="forums:$_data['forum_data'] as $forum_id => $forum_data">

<if test="forumRedirect:|:$forum_data['redirect_on']">

<tr class='{parse striping="catTable"} redirect_forum'>

<td class='altrow'>{parse replacement="f_redirect"}</td>

<td>

<h4><a href="{parse url="showforum={$forum_data['id']}" seotitle="{$forum_data['name_seo']}" template="showforum" base="public"}" title='{$this->lang->words['go_to_forum']}'>{$forum_data['name']}</a></h4>

<p class='desc'>{$forum_data['description']}</p>

</td>

<td colspan='2'>

{$this->lang->words['rd_hits']}: {parse format_number="$forum_data['redirect_hits']"}

</td>

</tr>

<else />

<tr class='{parse striping="catTable"}'>

<td>

<!-- SKINNOTE: this URL is wrong, needs updating -->

<if test="unreadicon:|:$forum_data['img_new_post'] != 'f_locked' && strstr( $forum_data['img_new_post'], 'unread' )">

<a id='forum_img_{$forum_data['id']}' href="{parse url="app=forums&module=forums&section=markasread&marktype=forum&forumid={$forum_data['id']}&returntoforumid={$this->request['f']}&i=1" base="public"}" title="{$this->lang->words['bi_markread']}" class='forum_marker'>

<if test="$forum_data['icon'] != '' AND $forum_data['icon'] !='0'">

<center><img src='{$this->settings['board_url']}/public/forumicons/{$forum_data['icon']}.gif' /></center>

<else />

{parse replacement="{$forum_data['img_new_post']}"}

</if>

</a>

<script type='text/javascript'>

ipb.global.registerMarker( "forum_img_{$forum_data['id']}", "{$forum_data['img_new_post']}", markerURL + "{$forum_data['id']}" );

</script>

<else />

<if test="$forum_data['icon'] != '' AND $forum_data['icon'] !='0'">

<center><img src='{$this->settings['board_url']}/public/forumicons/{$forum_data['icon']}_off.gif' /></center>

<else />

{parse replacement="{$forum_data['img_new_post']}"}

</if>

</if>

</td>

<td>

<h4><a href="{parse url="showforum={$forum_data['id']}" seotitle="{$forum_data['name_seo']}" template="showforum" base="public"}" title='{$this->lang->words['go_to_forum']}'>{$forum_data['name']}</a></h4>

<p class='desc'>{$forum_data['description']}</p>

<if test="showSubForums:|:$forum_data['show_subforums'] AND count( $forum_data['subforums'] ) AND $forum_data['show_subforums']">

<h5 class='hide'>{$this->lang->words['subforums']}</h5>

<ol class='subforums'>

<foreach loop="subforums:$forum_data['subforums'] as $__id => $__data">

<if test="showSubForumsLit:|:$__data[3]"><li class='newposts'><else /><li></if><a href="{parse url="showforum={$__data[0]}" seotitle="{$__data[2]}" template="showforum" base="public"}" title='{$this->lang->words['go_to_forum']}'>{$__data[1]}</a></li>

</foreach>

</ol>

</if>

<!-- Skinnote: Clean up queued stuff -->

<if test="hasQueuedAndCanSeeIcon:|:!empty($forum_data['_has_queued_and_can_see_icon'])">

<em class='moderated'><a href='{parse url="showforum={$forum_data['id']}&modfilter=all" seotitle="{$forum_data['name_seo']}" template="showforum" base="public"}' title='{$this->lang->words['view_unapproved']}'>{parse expression="sprintf( $this->lang->words['f_queued'], $forum_data['queued_topics'], $forum_data['queued_posts'])"}</a></em>

</if>

</td>

<td class='altrow stats'><ul><ul>

<li>{$forum_data['topics']} </li></ul> </td>

<td class='altrow stats'>

<ul>

<li>{$forum_data['posts']} </li>

</ul>

</td>

<td class='altrow'>

<ul class='last_post'>

<if test="hideLastInfo:|:$forum_data['hide_last_info']">

<li>{$this->lang->words['f_protected']}</li>

<else />

<if test="hideDateUrl:|:$forum_data['_hide_last_date']">

<li>{parse date="$forum_data['last_post']" format="LONG"}</li>

<else />

<li><a href='{parse url="showtopic={$forum_data['last_id']}&view=getlastpost" base="public" template="showtopic" seotitle="{$forum_data['seo_last_title']}"}' title='{$this->lang->words['view_last_post']}'>{parse replacement="f_lastpost"}</a> <a href='{parse url="showtopic={$forum_data['last_id']}&view=getlastpost" base="public" template="showtopic" seotitle="{$forum_data['seo_last_title']}"}' title='{$this->lang->words['view_last_post']}'>{parse date="$forum_data['last_post']" format="LONG"}</a></li>

</if>

<li><strong>{$this->lang->words['in']} {$forum_data['last_topic_title']}</strong></li>

<li>

{$this->lang->words['by']}

<if test="lastPosterName:|:isset($forum_data['last_poster_name']) AND $forum_data['last_poster_name']">

<if test="lastPosterID:|:$forum_data['last_poster_id']">

<a href='{parse url="showuser={$forum_data['last_poster_id']}" template="showuser" seotitle="{$forum_data['seo_last_name']}" base="public"}' title='{$this->lang->words['view_profile']}'>{$forum_data['last_poster_name']}</a>{parse template="user_popup" group="global" params="$forum_data['last_poster_id'], $forum_data['seo_last_name']"}

<else />

{$this->settings['guest_name_pre']}{$forum_data['last_poster_name']}{$this->settings['guest_name_suf']}

</if>

<else />

{$this->lang->words['f_none']}

</if>

</li>

</if>

</ul>

</td>

</tr>

</if>

</foreach>

</table></div>

</div>

</if>

</foreach>

</if>

</div>

</div>

<ul id='stat_links' class='filter_bar rounded'>

<li><a href="{parse url="app=core&module=search&do=active" base="public"}" title="{$this->lang->words['today_active_cont']}">{$this->lang->words['new_active_cont']}</a></li>

<li><a href="{parse url="app=forums&module=extras&section=stats&do=leaders" base="public"}" title="{$this->lang->words['sm_forum_leaders_title']}">{$this->lang->words['sm_forum_leaders']}</a></li>

<li><a href="{parse url="app=forums&module=extras&section=stats" base="public"}" title="{$this->lang->words['sm_all_posters_title']}">{$this->lang->words['sm_today_posters']}</a></li>

<li><a href="{parse url="app=members&section=view&module=list&max_results=20&sort_key=posts&sort_order=desc&filter=ALL" base="public"}" title="{$this->lang->words['sm_overall_posters_title']}">{$this->lang->words['sm_overall_posters']}</a></li>

</ul>

<div id='board_statistics' class='statistics general_box clearfix'>

<if test="showTotals:|:$this->settings['show_totals']">

<div id='stats'>

<h2>{$this->lang->words['board_stats']}</h2>

<dl>

<dt>{$this->lang->words['total_posts']}</dt>

<dd>{$stats['info']['total_posts']}</dd>

<dt>{$this->lang->words['total_members']}</dt>

<dd>{$stats['info']['mem_count']}</dd>

<dt>{$this->lang->words['newest_member']}</dt>

<dd><a href='{$stats['info']['last_mem_link']}' title='{$this->lang->words['view_profile']}'>{$stats['info']['last_mem_name']}</a>{parse template="user_popup" group="global" params="$stats['info']['last_mem_id'],$stats['info']['last_mem_seo']"} </dd>

<dt>{$this->lang->words['online_at_once']}</dt>

<dd>{$stats['info']['most_online']}<br /><span class='extra'> {$stats['info']['most_time']}</span></dd>

<if test="boardLCHook:|:1===1"></if>

</dl>

</div>

</if>

<if test="showActive:|:$this->settings['show_active']">

<div id='active_users' class='stats_list'>

<h2>

{$stats['TOTAL']} {$this->lang->words['active_users_text']} <span>{$this->lang->words['active_users']}</span><br />

<span class='desc'>{$stats['MEMBERS']} {$this->lang->words['members']}, {$stats['GUESTS']} {$this->lang->words['guests']}, {$stats['ANON']} {$this->lang->words['anon_users']} | {$this->lang->words['show_by']}: <a href='{parse url="app=members&module=online&sort_order=desc" base="public"}'>{$this->lang->words['oul_click']}</a> {$this->lang->words['or']} <a href='{parse url="app=members&module=online&sort_key=name&sort_order=asc&show_mem=reg" base="public"}'>{$this->lang->words['oul_name']}</a></span>

</h2>

<if test="activeNames:|:count($stats['NAMES'])">

<p>

<span class='name'>{parse expression="implode( ",</span> <span class='name'>", $stats['NAMES'] )"}</span>

</p>

</if>

</div>

</if>

<if test="calendarEventsOuter:|:$calendar_events">

<div id='cal_events' class='stats_list'>

<h2>{$this->lang->words['upcoming_events']}</h2>

<if test="calendarEventsInner:|:is_array( $calendar_events )">

<p>

<span class='name'>{parse expression="implode( ",</span> <span class='name'>", $calendar_events )"}</span>

</p>

<else />

<p>{$calendar_events}</p>

</if>

</div>

</if>

<if test="birthdays:|:$birthdays !== FALSE AND is_array( $birthdays['users'] ) AND count( $birthdays['users'] )">

<div id='cal_bdays' class='stats_list'>

<h2>{$birthdays['count']} {$this->lang->words['birthdays_today']}</h2>

<p>

<span class='name'>{parse expression="implode( ",</span> <span class='name'>", $birthdays['users'] )"}</span>

</p>

</div>

<else />

<if test="showBirthdaysAlways:|:$this->settings['show_birthdays'] AND !$this->settings['autohide_bday']">

<div id='cal_bdays' class='stats_list'>

<h2>0 {$this->lang->words['birthdays_today']}</h2>

<p>{$this->lang->words['no_birth_users']}</p>

</div>

</if>

</if>

</div>

<if test="autodst:|:$this->memberData['members_auto_dst'] == 1 AND $this->settings['time_dst_auto_correction']">

<script type='text/javascript'>

ipb.vars['dst_on'] = parseInt("{$this->memberData['dst_in_use']}");

ipb.board.checkDST();

</script>

</if>

Forum View -> forumIndexTemplate

{parse js_module="forums"}

<script type="text/javascript">

//<![CDATA[

//Search Setup

ipb.vars['search_type'] = 'forum';

ipb.vars['search_type_id'] = {$this->request['showforum']};

ipb.templates['topic_rename'] = new Template("<input type='text' id='#{inputid}' value='#{value}' class='input_text' maxlength='{$this->settings['topic_title_max_len']}' /> <input type='submit' value='{$this->lang->words['rename_topic_update']}' class='input_submit' id='#{submitid}' /> <a href='#' id='#{cancelid}' class='cancel' title='{$this->lang->words['cancel']}'>{$this->lang->words['cancel']}</a>");

ipb.global.boardMarkers = ({

'f_cat_unread': "{parse replacement="f_cat_read"}",

'f_unread': "{parse replacement="f_read"}",

'f_pass_unread': "{parse replacement="f_pass_read"}"

});

var markerURL = "{parse url="app=forums&module=ajax&section=markasread" base="public"}"; // Ajax URL so don't use &

// Delete stuff set up

ipb.forums.deleteUrls['hardDelete'] = new Template("{parse url="app=forums&module=moderate&section=moderate&f={$forum_data['id']}&st={$this->request['st']}&auth_key={$this->member->form_hash}&do=08&t=#{tid}" base="public"}");

ipb.forums.deleteUrls['softDelete'] = new Template("{parse url="app=forums&module=moderate&section=moderate&f={$forum_data['id']}&st={$this->request['st']}&auth_key={$this->member->form_hash}&do=sdelete&t=#{tid}" base="public"}");

// Add perm data

ipb.forums.deletePerms = { 'canDelete' : {parse expression="intval($this->memberData['g_is_supmod'] == 1 || $this->memberData['forumsModeratorData'][ $forum_data['id'] ]['delete_topic'])"}, 'canSoftDelete' : {parse expression="intval($forum_data['permissions']['TopicSoftDelete'])"} };

//]]>

</script>

<if test="rulesinline:|:$forum_data['show_rules'] == 2">

<div class='message unspecific forum_rules'>

<h3>{$forum_data['rules_title']}</h3>

{$forum_data['rules_text']}

</div>

</if>

<if test="ruleslink:|:$forum_data['show_rules'] == 1">

<div class='message unspecific forum_rules'>

<a href='{parse url="app=forums&module=forums&section=rules&f={$forum_data['id']}" base="public"}' title='{$this->lang->words['view_forum_rules']}'><strong>{$forum_data['rules_title']}</strong></a>

</div>

</if>

<!-- __-SUBFORUMS-__ -->

<if test="hassubforums:|:is_array( $sub_forum_data ) AND count( $sub_forum_data )">

<div class='category_block block_wrap'>

<h3 class='maintitle'>{$forum_data['name']} {$this->lang->words['sub_forum_title']}</h3>

<table class='ipb_table' summary="{$this->lang->words['cat_subforums']} '{$forum_data['name']}'">

<tr class='header'>

<th scope='col' class='col_c_icon'> </th>

<th scope='col' class='col_c_forum'>{$this->lang->words['cat_name']}</th>

<th scope='col' class='col_c_stats stats'>{$this->lang->words['forum_stats']}</th>

<th scope='col' class='col_c_post'>{$this->lang->words['last_post_info']}</th>

</tr>

<!-- / CAT HEADER -->

<foreach loop="subforums:$sub_forum_data as $_data">

<if test="subforumdata:|:is_array( $_data['forum_data'] ) AND count( $_data['forum_data'] )">

{parse striping="catTable" classes="row1,row2"}

<foreach loop="forums:$_data['forum_data'] as $forum_id => $forum_data">

<if test="isredirect:|:$forum_data['redirect_on']">

<tr class='{parse striping="catTable"} redirect_forum'>

<td class='altrow'>{parse replacement="f_redirect"}</td>

<td>

<h4><a href="{parse url="showforum={$forum_data['id']}" seotitle="{$forum_data['name_seo']}" template="showforum" base="public"}" title='{$this->lang->words['goto_forum']}'>{$forum_data['name']}</a></h4>

<p class='desc'>{$forum_data['description']}</p>

</td>

<td colspan='2'>

{$this->lang->words['rd_hits']}: {parse format_number="$forum_data['redirect_hits']"}

</td>

</tr>

<else />

<tr class='{parse striping="catTable"}'>

<td class='altrow'>

<a id='forum_img_{$forum_data['id']}' href="{parse url="app=forums&module=forums&section=markasread&marktype=forum&forumid={$forum_data['id']}&returntoforumid={$this->request['f']}" base="public"}" title="{$this->lang->words['bi_markread']}" class='forum_marker'>{parse replacement="{$forum_data['img_new_post']}"}</a>

<script type='text/javascript'>

ipb.global.registerMarker( 'forum_img_{$forum_data['id']}', "{$forum_data['img_new_post']}", markerURL + "&forumid={$forum_data['id']}" );

</script>

</td>

<td>

<h4><a href="{parse url="showforum={$forum_data['id']}" seotitle="{$forum_data['name_seo']}" template="showforum" base="public"}" title='{$this->lang->words['goto_forum']}'>{$forum_data['name']}</a></h4>

<p class='desc'>{$forum_data['description']}</p>

<if test="showsubforums:|:$forum_data['show_subforums'] AND count( $forum_data['subforums'] ) AND $forum_data['show_subforums']">

<h5 class='hide'>{$this->lang->words['subforums']}</h5>

<ol class='subforums' id='subforums_{$forum_data['id']}'>

<foreach loop="sub_subforums:$forum_data['subforums'] as $__id => $__data">

<if test="showSubForumsLit:|:$__data[3]"><li class='newposts'><else /><li></if><a href="{parse url="showforum={$__data[0]}" seotitle="{$__data[2]}" template="showforum" base="public"}" title='{$this->lang->words['go_to_forum']}'>{$__data[1]}</a></li>

</foreach>

</ol>

</if>

<!-- Skinnote: Clean up queued stuff -->

<if test="seequeuedicon:|:$forum_data['_has_queued_and_can_see_icon']">

<em class='moderated'><a href='{parse url="showforum={$forum_data['id']}&modfilter=all" seotitle="{$forum_data['name_seo']}" template="showforum" base="public"}' title='{$this->lang->words['view_unapproved']}'>{parse expression="sprintf( $this->lang->words['f_queued'], $forum_data['queued_topics'], $forum_data['queued_posts'])"}</a></em>

</if>

</td>

<td class='altrow stats'>

<ul>

<li>{$forum_data['topics']} {$this->lang->words['topics']}</li>

<li>{$forum_data['posts']} {$this->lang->words['replies']}</li>

</ul>

</td>

<td>

<ul class='last_post'>

<if test="hidelastinfo:|:$forum_data['hide_last_info']">

<li>{$this->lang->words['f_protected']}</li>

<else />

<li><a href='{parse url="showtopic={$forum_data['last_id']}&view=getlastpost" base="public" template="showtopic" seotitle="{$forum_data['seo_last_title']}"}' title='{$this->lang->words['view_last_post']}'>{parse replacement="f_lastpost"}</a> <a href='{parse url="showtopic={$forum_data['last_id']}&view=getlastpost" base="public" template="showtopic" seotitle="{$forum_data['seo_last_title']}"}' title='{$this->lang->words['view_last_post']}'>{parse date="$forum_data['last_post']" format="LONG"}</a></li>

<li><strong>{$this->lang->words['in_last_topic']}</strong> {$forum_data['last_topic_title']}</li>

<li>

<strong>{$this->lang->words['forum_by']}</strong>

<if test="lastpostername:|:isset($forum_data['last_poster_name']) AND $forum_data['last_poster_name']">

<if test="lastposterid:|:$forum_data['last_poster_id']">

<a href='{parse url="showuser={$forum_data['last_poster_id']}" seotitle="{$forum_data['seo_last_name']}" template="showuser" base="public"}'>{$forum_data['last_poster_name']}</a>{parse template="user_popup" group="global" params="$forum_data['last_poster_id'],$forum_data['seo_last_name']"}

<else />

{$this->settings['guest_name_pre']}{$forum_data['last_poster_name']}{$this->settings['guest_name_suf']}

</if>

<else />

{$this->lang->words['f_none']}

</if>

</li>

</if>

</ul>

</td>

</tr>

</if>

</foreach>

</if>

</foreach>

</table>

</div>

<br />

</if>

<if test="showtopics:|:$forum_data['sub_can_post']">

<div class='topic_controls'>

{$forum_data['SHOW_PAGES']}

<ul class='topic_buttons'>

<if test="usercanpost:|:$forum_data['_user_can_post']">

<li><a href='{parse url="module=post&section=post&do=new_post&f={$forum_data['id']}" base="publicWithApp"}' title='{$this->lang->words['topic_start']}' accesskey='s'><img src='{$this->settings['img_url']}/page_white_add.png' alt='{$this->lang->words['topic_start']}' /> {$this->lang->words['topic_start']}</a></li>

<else />

<li class='disabled'><span>{$this->lang->words['forum_no_start_topic']}</span></li>

</if>

<if test="watchismember:|:$this->memberData['member_id']">

<if test="stopwatching:|:$this->settings['cpu_watch_update'] AND ( is_array( $this->memberData['_cache'] ) AND is_array( $this->memberData['_cache']['watchedForums'] ) AND in_array( $forum_data['id'], $this->memberData['_cache']['watchedForums'] ) )">

<li><a href='{parse url="app=core&module=usercp&tab=forums&area=updateWatchForums&do=saveIt&authKey={$this->member->form_hash}&forumIDs[{$forum_data['id']}]=1&trackchoice=unsubscribe&forumReturn={$forum_data['id']}" base="public"}' title='{$this->lang->words['ft_title']}'>{parse replacement="watch_forum_on"} {$this->lang->words['ft_title_stop']}</a></li>

<else />

<li><a href='{parse url="app=core&module=usercp&tab=forums&area=watch&do=watch&watch=forum&fid={$forum_data['id']}" base="public"}' title='{$this->lang->words['ft_title']}'>{parse replacement="watch_forum_off"} {$this->lang->words['ft_title']}</a></li>

</if>

</if>

</ul>

</div>

<div class='category_block block_wrap'>

<table class='ipb_table topic_list' summary='{$this->lang->words['forum_topic_list']} "{$forum_data['name']}"' id='forum_table'>

<caption class='maintitle'>

<span class='main_forum_title'>{$forum_data['name']}</span><span class='desc'><a href='{parse url="app=forums&module=forums&section=markasread&marktype=forum&forumid={$forum_data['id']}&returntoforumid={$forum_data['id']}" base="public"}' title='{$this->lang->words['mark_as_read']}'>({$this->lang->words['mark_as_read']})</a></span></caption>

<tr class='header'>

<th scope='col' class='col_f_icon'> </th>

<th scope='col' class='col_f_topic'>{$this->lang->words['forum_topic']}</th>

<th scope='col' class='col_f_starter short'>{$this->lang->words['forum_started_by']}</th>

<th scope='col' class='col_f_views stats'>{$this->lang->words['forum_stats']}</th>

<th scope='col' class='col_f_post'>{$this->lang->words['forum_last_post_info']}</th>

<if test="topicsismod:|:$this->memberData['is_mod'] == 1">

<th scope='col' class='col_f_mod short'><input type='checkbox' id='tmod_all' class='input_check' title='{$this->lang->words['topic_select_all']}' value='1' /></th>

</if>

</tr>

<!-- ANNOUNCEMENTS -->

<if test="hasannouncements:|:is_array( $announce_data ) AND count( $announce_data )">

<foreach loop="announcements:$announce_data as $aid => $adata">

<tr class='row2 announcement' id='arow_{$adata['announce_id']}'>

<td class='short altrow'>{parse replacement="t_announcement"}</td>

<if test="topicsismod:|:$this->memberData['is_mod'] == 1">

<td colspan='5'>

<else />

<td colspan='4'>

</if>

<span class='topic_prefix'>{$this->lang->words['announce_row']}</span> 

<php>$_seoTitle = $adata['announce_seo_title'] ? $adata['announce_seo_title'] : "%%{$adata['announce_title']}%%";</php>

<a href="{parse url="showannouncement={$adata['announce_id']}&f={$forum_data['id']}" seotitle="{$_seoTitle}" template="showannouncement" base="public"}" title='{$this->lang->words['view_announcement']}'>{$adata['announce_title']}</a><br />

<span class='desc'>{$this->lang->words['posted_by']} <strong><a href="{parse url="showuser={$adata['member_id']}" seotitle="{$adata['members_seo_name']}" template="showuser" base="public"}" title='{$this->lang->words['view_profile']}'>{$adata['member_name']}</a> {parse template="user_popup" group="global" params="$adata['member_id'], $adata['members_seo_name']"}</strong>

<if test="announcedates:|:$adata['announce_start'] AND $adata['announce_start'] != '--'">, {$adata['announce_start']}</if>

</span>

</td>

</tr>

</foreach>

<tr class='subhead altbar'>

<th scope='col' colspan='<if test="endannouncements:|:$this->memberData['is_mod'] == 1">6<else />5</if>'>

{$this->lang->words['forum_topic_list']}

</th>

</tr>

</if>

<!-- BEGIN TOPICS -->

<if test="hastopics:|:is_array( $topic_data ) AND count( $topic_data )">

{parse striping="forumTable" classes="row1,row2"}

<foreach loop="topics:$topic_data as $tid => $data">

<if test="queuedtopic:|:($this->memberData['is_mod'] AND ! $data['approved']) OR $data['_isDeleted']">

<tr class='{parse striping="forumTable"} moderated' id='trow_{$data['tid']}'>

<else />

<tr class='{parse striping="forumTable"}' id='trow_{$data['tid']}'>

</if>

<td class='short altrow'>{parse replacement="{$data['folder_img']}"}</td>

<td class='__topic __tid{$data['tid']}<if test="hasmodlinks:|:$this->memberData['is_mod'] == 1 || $forum_data['permissions']['TopicSoftDelete']"> with_mod_links</if>'>

<if test="islink:|:$data['state'] != 'link'"><span class='topic_preview right'>{parse template="topic_popup" group="global" params="$data['tid']"}</span></if>

<if test="topicIsDeleted:|:$data['_isDeleted']">

<ul class='topic_moderation right rounded'>

<if test="tidRestore:|:$forum_data['permissions']['TopicSoftDeleteRestore']">

<li class='t_restore'><a href='{parse url="app=forums&module=moderate&section=moderate&f={$forum_data['id']}&t={$data['tid']}&st={$this->request['st']}&auth_key={$this->member->form_hash}&do=sundelete" base="public"}' title='{$this->lang->words['dlt_restore_topic']}'><img src='{$this->settings['img_url']}/arrow_rotate_clockwise.png' alt='{$this->lang->words['dlt_restore_topic']}' title='{$this->lang->words['dlt_restore_topic']}' /></a></li>

</if>

<if test="$this->memberData['g_is_supmod'] == 1 || $this->memberData['forumsModeratorData'][ $forum_data['id'] ]['delete_topic']">

<li class='t_restore'><a href='{parse url="app=forums&module=moderate&section=moderate&f={$forum_data['id']}&st={$this->request['st']}&t={$data['real_tid']}&auth_key={$this->member->form_hash}&do=03" base="public"}' title='{$this->lang->words['dlt_delete_topic']}'><img src='{$this->settings['img_url']}/delete.png' alt='{$this->lang->words['dlt_delete_topic']}' title='{$this->lang->words['dlt_delete_topic']}' /></a></li>

</if>

</ul>

<else />

<if test="topicmoderator:|:$this->memberData['is_mod'] == 1 || $forum_data['permissions']['TopicSoftDelete']">

<ul class='topic_moderation right rounded'>

<li class='t_rename'><a href='{parse url="app=forums&module=moderate&section=moderate&f={$forum_data['id']}&t={$data['tid']}&auth_key={$this->member->form_hash}&do=05" base="public"}' title='{$this->lang->words['topic_rename']}'><img src='{$this->settings['img_url']}/textfield_rename.png' alt='{$this->lang->words['topic_rename']}' title='{$this->lang->words['topic_rename']}' /></a></li>

<if test="$this->memberData['g_is_supmod'] == 1 || $this->memberData['forumsModeratorData'][ $forum_data['id'] ]['delete_topic'] || $forum_data['permissions']['TopicSoftDelete']">

<li class='t_delete'><a id='t_deletelink_{$data['tid']}' href='{parse url="app=forums&module=moderate&section=moderate&f={$forum_data['id']}&st={$this->request['st']}&t={$data['real_tid']}&auth_key={$this->member->form_hash}&do=03" base="public"}' title='{$this->lang->words['topic_delete']}'><img src='{$this->settings['img_url']}/delete.png' alt='{$this->lang->words['topic_delete']}' title='{$this->lang->words['topic_delete']}' /></a></li>

</if>

<if test="islink:|:$data['state'] != 'link'">

<if test="ispinned:|:$data['pinned'] && ($this->memberData['g_is_supmod'] OR $this->memberData['forumsModeratorData'][ $forum_data['id'] ]['pin_topic'])">

<li class='t_pin'><a href='{parse url="app=forums&module=moderate&section=moderate&f={$forum_data['id']}&t={$data['tid']}&st={$this->request['st']}&auth_key={$this->member->form_hash}&do=16&from=forum" base="public"}' title='{$this->lang->words['topic_unpin']}'><img src='{$this->settings['img_url']}/award_delete.png' alt='{$this->lang->words['topic_unpin']} icon' title='{$this->lang->words['topic_unpin']}' /></a></li>

<else />

<if test="issupermod:|:$this->memberData['g_is_supmod'] OR $this->memberData['forumsModeratorData'][ $forum_data['id'] ]['unpin_topic']">

<li class='t_pin'><a href='{parse url="app=forums&module=moderate&section=moderate&f={$forum_data['id']}&t={$data['tid']}&st={$this->request['st']}&auth_key={$this->member->form_hash}&do=15&from=forum" base="public"}' title='{$this->lang->words['topic_pin']}'><img src='{$this->settings['img_url']}/award.png' alt='{$this->lang->words['topic_pin']} icon' title='{$this->lang->words['topic_pin']}' /></a></li>

</if>

</if>

</if>

<if test="closedtopic:|:$data['state'] == 'closed' && $other_data['can_open_topics']">

<li class='t_lock'><a href='{parse url="app=forums&module=moderate&section=moderate&f={$forum_data['id']}&t={$data['tid']}&st={$this->request['st']}&auth_key={$this->member->form_hash}&do=01" base="public"}' title='{$this->lang->words['topic_open']}'><img src='{$this->settings['img_url']}/lock_open.png' alt='{$this->lang->words['topic_open']}' title='{$this->lang->words['topic_open']}' /></a></li>

</if>

<if test="opentopic:|:$data['state'] == 'open' && $other_data['can_close_topics']">

<li class='t_lock'><a href='{parse url="app=forums&module=moderate&section=moderate&f={$forum_data['id']}&t={$data['tid']}&st={$this->request['st']}&auth_key={$this->member->form_hash}&do=00&_from=forum" base="public"}' title='{$this->lang->words['topic_close']}'><img src='{$this->settings['img_url']}/lock.png' alt='{$this->lang->words['topic_close']}' title='{$this->lang->words['topic_close']}' /></a></li>

</if>

</ul>

</if>

</if>

{$data['prefix']}

<if test="topicreported:|: isset( $this->memberData['_cache']['report_temp']['post_marker']['topic'][$data['tid']]['gfx'] ) AND $this->memberData['_cache']['report_temp']['post_marker']['topic'][$data['tid']]['gfx'] > 0">

<a href="{parse url="app=core&module=reports&section=reports&do=findfirst&tid={$data['tid']}&cid={$this->memberData['_cache']['report_temp']['post_marker']['topic'][$data['tid']]['info']['com_id']}" base="public"}"> <img src="{$this->settings['img_url']}/reports/post_alert_{$this->memberData['_cache']['report_temp']['post_marker']['topic'][$data['tid']]['gfx']}.png" alt='' title='{$this->lang->words['view_reported_posts']}' /> </a>

</if>

<if test="gotonewpost:|:$data['go_new_post'] === true"><a href='{parse url="showtopic={$data['tid']}&view=getnewpost" template="showtopic" seotitle="{$data['title_seo']}" base="public"}' title='{$this->lang->words['first_unread_post']}'>{parse replacement="f_newpost"}</a></if>

<if test="topichasattach:|:$data['topic_hasattach']">

<a href="{parse url="app=forums&module=forums&section=attach&tid={$data['tid']}" base="public"}" title="{parse expression="intval($data['topic_hasattach'])"} {$this->lang->words['topic_attach']}" onclick="return ipb.forums.retrieveAttachments( {$data['tid']} );">{parse replacement="t_attach"}</a>

</if>

<if test="istracking:|:! empty($data['trackingTopic'])">{parse replacement="watch_small"}</if>

<a id="tid-link-{$data['tid']}" href="{parse url="showtopic={$data['tid']}" base="public" template="showtopic" seotitle="{$data['title_seo']}"}" title='{$this->lang->words['topic_started_on']} {$data['start_date']}' class='topic_title'>{$data['title']}</a>

{$data['_rate_img']}

<if test="multipages:|:isset( $data['pages'] ) AND is_array( $data['pages'] ) AND count( $data['pages'] )">

<ul class='mini_pagination'>

<foreach loop="pages:$data['pages'] as $page">

<if test="haslastpage:|:$page['last']">

<li><a href="{parse url="showtopic={$data['tid']}&st={$page['st']}" seotitle="{$data['title_seo']}" template="showtopic" base="public"}" title='{$this->lang->words['topic_goto_page']} {$page['page']}'>{$page['page']} {$this->lang->words['_rarr']}</a></li>

<else />

<li><a href="{parse url="showtopic={$data['tid']}&st={$page['st']}" seotitle="{$data['title_seo']}" template="showtopic" base="public"}" title='{$this->lang->words['topic_goto_page']} {$page['page']}'>{$page['page']}</a></li>

</if>

</foreach>

</ul>

</if>

<if test="topicDeletedReason:|:$data['_isDeleted']">

<div class='desc'>

{$this->lang->words['tdb__forumindex']} <a href='{parse url="showuser={$other_data['sdData'][ $data['tid'] ]['sdl_obj_member_id']}" base="public" template="showuser" seotitle="{$other_data['sdData'][ $data['tid'] ]['members_seo_name']}"}'>{$other_data['sdData'][ $data['tid'] ]['members_display_name']}</a>{parse template="user_popup" group="global" params="$other_data['sdData'][ $data['tid'] ]['member_id'], $other_data['sdData'][ $data['tid'] ]['members_seo_name']"} {$this->lang->words['on']} {parse date="$other_data['sdData'][ $data['tid'] ]['sdl_obj_date']" format="long"}.

<if test="showReason:|:$forum_data['permissions']['SoftDeleteReason']">

<if test="$other_data['sdData'][ $data['tid'] ]['sdl_obj_reason']">{$other_data['sdData'][ $data['tid'] ]['sdl_obj_reason']}<else />{$this->lang->words['tdb__noreasongi']}</if>

</if>

</div>

<else />

<if test="description:|:$data['description']"><br /><span class='desc'>{$data['description']}</span></if>

</if>

</td>

<td class='short altrow'>{$data['starter']}{parse template="user_popup" group="global" params="$data['starter_id'], $data['seo_first_name']"}</td>

<td class='stats<if test="queuedposts:|:($this->memberData['is_mod'] AND $data['_hasqueued']) OR ($forum_data['permissions']['PostSoftDeleteSee'] AND $data['topic_deleted_posts'])"> moderated</if>'>

<ul>

<li>

<if test="queuedpostsImg:|:($this->memberData['is_mod'] AND $data['_hasqueued'])">

<a href='{parse url="showtopic={$data['tid']}&modfilter=invisible_posts" seotitle="{$data['title_seo']}" template="showtopic" base="public"}' title='{$this->lang->words['view_uapproved_posts']}'><img src='{$this->settings['img_url']}/bullet_error.png' alt='' /></a>

</if>

<if test="deletedPostsImg:|:($forum_data['permissions']['PostSoftDeleteSee'] AND $data['topic_deleted_posts'])">

<a href='{parse url="showtopic={$data['tid']}&modfilter=deleted_posts" seotitle="{$data['title_seo']}" template="showtopic" base="public"}' title='{$this->lang->words['view_deleted_posts']}'><img src='{$this->settings['img_url']}/bullet_delete.png' alt='' /></a>

</if>

{$data['posts']} <if test="replylang:|:intval($data['__posts']) == 1">{$this->lang->words['reply']}<else />{$this->lang->words['replies']}</if>

</li>

<li class='views desc'>{$data['views']} {$this->lang->words['views']}</li>

</ul>

</td>

<td class='altrow'>

<ul class='last_post'>

<li>

<a href='{parse url="showtopic={$data['tid']}&view=getlastpost" seotitle="{$data['title_seo']}" template="showtopic" base="public"}' title='{$this->lang->words['goto_last_post']}'>{parse replacement="f_lastpost"}</a> <a href='{parse url="showtopic={$data['tid']}&view=getlastpost" seotitle="{$data['title_seo']}" template="showtopic" base="public"}' title='{$this->lang->words['goto_last_post']}'>{parse date="$data['last_post']" format="SHORT"}</a>

</li>

<li>{$this->lang->words['forum_by']} {$data['last_poster']}{parse template="user_popup" group="global" params="$data['last_poster_id'], $data['seo_last_name']"}</li>

</ul>

</td>

<if test="mmicon:|:$this->memberData['is_mod'] == 1 and $inforum == 1">

<td class='short'>

<if test="mmtidon:|:$data['tidon'] == 0">

<input type='checkbox' class='input_check topic_mod' id='tmod_{$data['real_tid']}' />

<else />

<input type='checkbox' class='input_check topic_mod' id='tmod_{$data['real_tid']}' checked='checked' />

</if>

</td>

</if>

</tr>

<if test="adCodeCheck:|:$data['_adCode']">

<tr>

<th scope='col' colspan='<if test="adCodeColSpan:|:$this->memberData['is_mod'] == 1">6<else />5</if>'>

{$data['_adCode']}

</th>

</tr>

</if>

</foreach>

<else />

<tr>

<if test="notopicsspan:|:$this->memberData['is_mod'] == 1">

<td colspan='6' class='no_messages'>

<else />

<td colspan='5' class='no_messages'>

</if>

{$this->lang->words['no_topics']}

</td>

</tr>

</if>

</table>

<if test="moderationform:|:$this->memberData['is_mod'] == 1">

<div id='topic_mod' class='moderation_bar rounded with_action clear'>

<!-- SKINNOTE: Check delete -->

<form id='modform' method="post" action="{parse url="" base="public"}">

<fieldset>

<input type="hidden" name="app" value="forums" />

<input type="hidden" name="module" value="moderate" />

<input type="hidden" name="section" value="moderate" />

<input type="hidden" name="do" value="topicchoice" />

<input type="hidden" name="st" value="{$this->request['st']}" />

<input type="hidden" name="f" value="{$forum_data['id']}" />

<input type="hidden" name="auth_key" value="{$this->member->form_hash}" />

<input type="hidden" name="modfilter" value="{$this->request['modfilter']}" />

<input type="hidden" value="{$this->request['selectedtids']}" id='selectedtids' name="selectedtids" />

<input type='button' id='forum_mod_options' value='{$this->lang->words['forum_management']}' class='input_submit alt left ipbmenu' />

<ul class='ipbmenu_content' id='forum_mod_options_menucontent'>

<if test="$this->memberData['g_is_supmod']">

<li><a href='{parse url="app=forums&module=moderate&section=moderate&do=prune_start&f={$forum_data['id']}&auth_key={$this->member->form_hash}" base="public"}' title='{$this->lang->words['mod_prumemovetopics']}'>{$this->lang->words['mod_prumemovetopics']}</a></li>

</if>

<li><a href='{parse url="app=forums&module=moderate&section=moderate&do=resync&f={$forum_data['id']}&auth_key={$this->member->form_hash}" base="public"}' title='{$this->lang->words['mod_resync']}'>{$this->lang->words['mod_resync']}</a></li>

<li><a href='{parse url="showforum={$forum_data['id']}&modfilter=invisible_topics" seotitle="{$forum_data['name_seo']}" template="showforum" base="public"}' title='{$this->lang->words['mod_hidden']}'>{$this->lang->words['mod_hidden']}</a></li>

<li><a href='{parse url="showforum={$forum_data['id']}&modfilter=invisible_posts" seotitle="{$forum_data['name_seo']}" template="showforum" base="public"}' title='{$this->lang->words['mod_hidden_posts']}'>{$this->lang->words['mod_hidden_posts']}</a></li>

</ul>

<select name="tact" id='mod_tact'>

<option value="close">{$this->lang->words['cpt_close']}</option>

<option value="open">{$this->lang->words['cpt_open']}</option>

<option value="pin">{$this->lang->words['cpt_pin']}</option>

<option value="unpin">{$this->lang->words['cpt_unpin']}</option>

<option value="move">{$this->lang->words['cpt_move']}</option>

<option value="merge">{$this->lang->words['cpt_merge']}</option>

<option value="delete">{$this->lang->words['cpt_delete']}</option>

<if test="$this->registry->class_forums->can_Un_SoftDeleteTopics( $forum_data['id'], array() )"><option value="sundelete">{$this->lang->words['cpt_undelete']}</option></if>

<option value="approve">{$this->lang->words['cpt_approve']}</option>

<option value="unapprove">{$this->lang->words['cpt_unapprove']}</option>

<if test="$forum_data['queued_topics'] AND $this->registry->class_forums->canQueuePosts( $forum_data['id'] )">

<option value="t_approve">{parse expression="sprintf( $this->lang->words['nmo_t_approve'], $forum_data['queued_topics'])"}</option>

</if>

<if test="$forum_data['queued_topics'] AND $this->registry->class_forums->canHardDeleteTopics( $forum_data['id'], array() )">

<option value="t_delete_approve">{parse expression="sprintf( $this->lang->words['nmo_t_delete_approve'], $forum_data['queued_topics'])"}</option>

</if>

<if test="$forum_data['permissions']['TopicSoftDeleteRestore'] AND $forum_data['deleted_topics']">

<option value="t_restore">{parse expression="sprintf( $this->lang->words['nmo_t_restore'], $forum_data['deleted_topics'])"}</option>

</if>

<if test="$forum_data['deleted_topics'] AND $this->registry->class_forums->canHardDeleteTopics( $forum_data['id'], array() )">

<option value="t_delete_softed">{parse expression="sprintf( $this->lang->words['nmo_t_delete_softed'], $forum_data['deleted_topics'])"}</option>

</if>

<if test="mmdata:|:is_array( $multi_mod_data ) AND count( $multi_mod_data )">

<option value="-1">------------------------------</option>

<option value="-1">{$this->lang->words['mm_title']}</option>

<option value="-1">------------------------------</option>

<foreach loop="mm:$multi_mod_data as $mm_data">

<option value="t_{$mm_data[0]}">-- {$mm_data[1]}</option>

</foreach>

</if>

</select> 

<input type="submit" name="gobutton" value="{$this->lang->words['f_go']}" class="input_submit alt" id='mod_submit' />

</fieldset>

</form>

<script type='text/javascript'>

$('modform').observe('submit', ipb.forums.submitModForm);

$('mod_tact').observe('change', ipb.forums.updateTopicModButton);

</script>

</div>

</if>

<div id='forum_filter' class='filter_bar rounded'>

<span id='show_filters' class='clickable' style='display: none'>{$this->lang->words['filter_options']}</span>

<form id='filter_form' action="{parse url="showforum={$forum_data['id']}&st={$this->request['st']}&changefilters=1" base="public" seotitle="{$forum_data['name_seo']}" template="showforum"}" method="post">

<fieldset>

<label for='topic_filter'>{$this->lang->words['filter_type']}</label> <select name="topicfilter" id='topic_filter' class='input_select'>{$footer_filter['topic_filter']}</select>

<label for='sort_by'>{$this->lang->words['filter_sort']}</label> <select name="sort_key" id='sort_by' class='input_select'>{$footer_filter['sort_by']}</select>

<label for='direction'>{$this->lang->words['filter_direction']}</label> <select name="sort_by" id='direction' class='input_select'>{$footer_filter['sort_order']}</select>

<label for='time_frame'>{$this->lang->words['filter_time']}</label> <select name="prune_day" id='time_frame' class='input_select'>{$footer_filter['sort_prune']}</select>

<input type='checkbox' value='1' name='remember' class='input_check' id='remember_filter' /> <label for='remember_filter'>{$this->lang->words['remember_options']}</label>

<input type="submit" value="{$this->lang->words['sort_submit']}" class="input_submit alt" />

</fieldset>

</form>

<script type='text/javascript'>

if( $('filter_form' ) ){

$('filter_form').hide();

$('show_filters').show();

}

</script>

</div>

<if test="forumjump:|:$forum_data['FORUM_JUMP']">

<div class='moderation_bar rounded'>

<!--<form method='post' action='{$this->settings['base_url']}app=core&module=search&do=quick_search&search_app=forums' id='context_search' class='left'>

<fieldset>

<input type='hidden' name='type' value='forum' />

<input type='hidden' name='type_id' value='{$forum_data['id']}' />

<label for='forum_search'>{$this->lang->words['search_forum']}</label>

<input type='text' id='forum_search' name='search_term' class='input_text' size='20' tabindex='8' />

<input type='submit' class='input_submit alt' value='{$this->lang->words['jmp_go']}' />

</fieldset>

</form>-->

{$forum_data['FORUM_JUMP']}

</div>

</if>

</div>

<div class='topic_controls'>

{$forum_data['SHOW_PAGES']}

<ul class='topic_buttons'>

<if test="bottomusercanpost:|:$forum_data['_user_can_post']">

<li><a href='{parse url="module=post&section=post&do=new_post&f={$forum_data['id']}" base="publicWithApp"}' title='{$this->lang->words['topic_start']}'><img src='{$this->settings['img_url']}/page_white_add.png' alt='{$this->lang->words['topic_start']}' /> {$this->lang->words['topic_start']}</a></li>

<else />

<li class='disabled'><span>{$this->lang->words['forum_no_start_topic']}</span></li>

</if>

</ul>

</div>

<div id='forum_footer' class='statistics general_box clear clearfix'>

<div id='forum_legend' class='right'>

<h2>{$this->lang->words['forum_legend']}</h2>

<dl>

<dt class='clear'>{parse replacement="t_unread"}</dt>

<dd>{$this->lang->words['pm_open_new']}</dd>

<dt>{parse replacement="t_read"}</dt>

<dd>{$this->lang->words['pm_open_no']}</dd>

<dt class='clear'>{parse replacement="t_hot_unread"}</dt>

<dd>{$this->lang->words['pm_hot_new']}</dd>

<dt>{parse replacement="t_hot_read"}</dt>

<dd>{$this->lang->words['pm_hot_no']}</dd>

<dt class='clear'>{parse replacement="t_poll_unread"}</dt>

<dd>{$this->lang->words['pm_poll']}</dd>

<dt>{parse replacement="t_poll_read"}</dt>

<dd>{$this->lang->words['pm_poll_no']}</dd>

<dt class='clear'>{parse replacement="t_closed"}</dt>

<dd>{$this->lang->words['pm_locked']}</dd>

<dt>{parse replacement="t_moved"}</dt>

<dd>{$this->lang->words['pm_moved']}</dd>

</dl>

</div>

<if test="showactiveusers:|:!$this->settings['no_au_forum']">

<div id='forum_active_users' class='active_users stats_list'>

<h2>

{parse expression="sprintf( $this->lang->words['active_users_title'], ($active_user_data['members'] + $active_user_data['guests'] + $active_user_data['anon'] ) )"}<br />

<span class='desc'>{parse expression="sprintf( $this->lang->words['active_users_detail'], $active_user_data['members'], $active_user_data['guests'], $active_user_data['anon'] )"}</span>

</h2>

<ul>

<if test="hasactiveusers:|:is_array( $active_user_data['names'] ) AND count( $active_user_data['names'] )">

<foreach loop="activeusers:$active_user_data['names'] as $p => $r">

<li>{$r['p_start']}<if test="aumemberid:|:$r['id']"><a href='{parse url="showuser={$r['id']}" seotitle="{$r['seo']}" template="showuser" base="public"}' title='{$r['p_title']}'></if>{$r['name']}<if test="aumidend:|:$r['id']"></a></if>{$r['p_end']}<if test="auaddcomma:|:$p + 1 != count( $active_user_data['names'] )">,</if></li>

</foreach>

</if>

</ul>

</div>

</if>

<if test="hasmoderators:|:is_array( $mod_data ) AND count( $mod_data )">

<div id='forum_led_by' class='active_users stats_list'>

<h2>{$this->lang->words['forum_led_by']}</h2>

<ul>

<foreach loop="moderators:$mod_data as $p => $r">

<li><a href='{$r[0]}' title='{$this->lang->words['view_profile']}'>{$r[1]}</a><if test="moderatorpopup:|:$r[2]">{parse template="user_popup" group="global" params="$r[2], IPSText::makeSeoTitle( $r[1] )"}</if><if test="moderatorscomma:|:$p + 1 != count( $mod_data )">,</if></li>

</foreach>

</ul>

</div>

</if>

</div>

<br class='clear' />

</if>

<div id='delPopUp' style='display:none'>

<h3 class='bar'>{$this->lang->words['dlt_title']}</h3>

<div class='general_box'>

<form action='#{removeUrl}' method='POST'>

<strong>{$this->lang->words['dlt_remove_from_view']}</strong>

<p class='desc'>{$this->lang->words['dlt_remove_from_view_desc']}</p>

<p style='padding:4px 0px 4px 0px'>{$this->lang->words['dlt_reason']} <input type='text' name='deleteReason' id='delPop_reason' value='' style='width:65%' /> <input type='submit' class='input_submit' value='{$this->lang->words['dlt_remove']}' /></p>

</form>

<div style='#{permaDelete}padding-top:5px'>

<strong>{$this->lang->words['dlt_delete_from_topic']}</strong>

<p class='desc'>{$this->lang->words['dlt_delete_from_topic_desc']}</p>

<p style='padding:4px 0px 4px 0px'><input type='button' class='input_submit' onclick="window.location='#{permaUrl}';" value='{$this->lang->words['dlt_delete_now']}' /></p>

</div>

</div>

</div>

Nie wiem - może gdzieś popełniłem błąd...

Odnośnik do komentarza
Udostępnij na innych stronach

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę.