Ik zet hieronder het javascript voor de mod en een nodig bestand van de mod zelf. Hoogstwaarschijnlijk zal er in een van de 2 en kleine aanpassing moeten gebeuren. Als er iemand is die wat van javascript en die toestanden kent,... Be my guest

Het is een hele brok :
O ja , voor de mensen die de mod niet moesten kennen, zet ik hier even een link waar je hem kan 'bewonderen' :
http://demos.phpmix.org/dhtml_cat_hierarchy/index.php
Javascriptje :
[
Code: Selecteer alles
/*************************************************************
* DHTML Collapsible Forum Index MOD v1.1.1
*
* Copyright (C) 2004, Markus (http://www.phpmix.com)
* This script is released under GPL License.
* Feel free to use this script (or part of it) wherever you need
* it ...but please, give credit to original author. Thank you. :-)
* We will also appreciate any links you could give us.
*
* Enjoy! ;-)
*************************************************************/
//
// CFIC: Collapsible Forum Index Categories
//
function _CFIC(cat_id)
{
this.cat_id = cat_id;
this.status = 'none';
this.forums = [];
}
_CFIC.prototype.add = function(f)
{
this.forums[this.forums.length] = f;
}
//
// CFIG: Collapsible Forum Index Globals
//
function _CFIG(global, sign, arrow, K)
{
this.global = global;
this.allowed = false;
this.K = new Object();
this.K.path = K[0];
this.K.domain = K[1];
this.K.secure = Boolean(K[2]);
this.A = document.anchors;
this.T = [];
this.C = [];
this.O = 'none';
this.Q = [0, 0];
if( document.images )
{
this.sign=[new Image(),new Image()];
this.sign[0].src=sign[0];
this.sign[1].src=sign[1];
this.arrow=[new Image(),new Image()];
this.arrow[0].src=arrow[0];
this.arrow[1].src=arrow[1];
}
this.secondPassInterval = 20;
this.queueInterval = 20;
this.queuedSteps = null;
this.currentStep = 0;
return this;
}
_CFIG.prototype.getCookie = function(name)
{
var cookies = document.cookie;
var start = cookies.indexOf(name + '=');
if( start < 0 ) return null;
var len = start + name.length + 1;
var end = cookies.indexOf(';', len);
if( end < 0 ) end = cookies.length;
return unescape(cookies.substring(len, end));
}
_CFIG.prototype.setCookie = function(name, value, expires)
{
document.cookie = name + '=' + escape (value) +
((expires) ? '; expires=' + ( (expires == 'never') ? 'Thu, 31-Dec-2099 23:59:59 GMT' : expires.toGMTString() ) : '') +
((this.K.path) ? '; path=' + this.K.path : '') +
((this.K.domain) ? '; domain=' + this.K.domain : '') +
((this.K.secure) ? '; secure' : '');
}
_CFIG.prototype.delCookie = function(name)
{
if( this.getCookie(name) )
{
document.cookie = name + '=;expires=Thu, 01-Jan-1970 00:00:01 GMT' +
((this.K.path) ? '; path=' + this.K.path : '') +
((this.K.domain) ? '; domain=' + this.K.domain : '');
}
}
_CFIG.prototype.slideForums = function(cat_id)
{
var catName = 'cat_'+cat_id;
var catSign = 'icon_sign_'+cat_id;
if( !this.C[catName] ) return '';
var oCategory = this.C[catName];
var oldStatus = oCategory.status;
var newStatus = ( (oCategory.status == 'none') ? '' : 'none' );
if( document.images && document.images[catSign] )
{
document.images[catSign].src = this.sign[(newStatus=='' ? 1:0)].src;
}
if( newStatus != '' ) this.appendStep(catName, oldStatus);
this.appendStep(catName+'_foot', newStatus);
for( var i=0; i < oCategory.forums.length; i++ )
{
this.appendStep(oCategory.forums[i], newStatus);
oCategory.status = newStatus;
}
if( newStatus == '' ) this.appendStep(catName, oldStatus);
return newStatus;
}
_CFIG.prototype.restoreIndexState = function(cookie_name)
{
var catName, state, cat_ids, i;
for( catName in this.C )
{
this.C[catName].status = 'none';
}
state = this.getCookie(cookie_name);
if( state != null )
{
cat_ids = state.split(':');
if( cat_ids.length <= 0 ) return;
for( i=0; i < cat_ids.length; i++ )
{
catName = 'cat_'+cat_ids[i];
if( this.C[catName] ) this.C[catName].status = '';
}
}
this.createQueue();
for( catName in this.C )
{
this.slideForums(this.C[catName].cat_id);
}
this.execQueue();
}
_CFIG.prototype.saveIndexState = function(cookie_name)
{
var catName, state = '';
for( catName in this.C )
{
var o = this.C[catName];
if( o.status == 'none' ) state += o.cat_id + ':';
}
state = state.substring(0, state.length-1);
if( state.length > 0 )
{
var expdate = new Date(); // 72 Hours from now
expdate.setTime(expdate.getTime() + (72 * 60 * 60 * 1000));
this.setCookie(cookie_name, state, expdate);
}
else
{
this.delCookie(cookie_name);
}
}
_CFIG.prototype.cmd = function(cmd)
{
var catName, i;
switch( cmd )
{
case 'restoreState':
if( this.getCookie(this.T['cookie']+'_s0') != this.getCookie(this.T['cookie']) )
{
this.restoreIndexState(this.T['cookie']+'_s0');
this.saveIndexState(this.T['cookie']);
}
break;
case 'deleteState':
this.delCookie(this.T['cookie']+'_s0');
break;
case 'saveState':
this.saveIndexState(this.T['cookie']+'_s0');
break;
case 'expandAll':
this.delCookie(this.T['cookie']);
this.restoreIndexState(this.T['cookie']);
break;
case 'collapseAll':
for( catName in this.C )
{
this.C[catName].status = 'none';
}
this.saveIndexState(this.T['cookie']);
this.restoreIndexState(this.T['cookie']);
break;
case 'displayOptions':
this.O = (this.O == 'none' ? '' : 'none');
if( document.images )
{
document.images[this.global+'_arrow1'].src = this.arrow[(this.O=='' ? 1:0)].src;
document.images[this.global+'_arrow2'].src = this.arrow[(this.O=='' ? 1:0)].src;
}
this.createQueue();
if( this.O == 'none' )
{
for( i=(this.Q[1]-1); i >= 0; i-- ) this.appendStep(this.global+'_options_b'+i, this.O);
for( i=(this.Q[0]-1); i >= 0; i-- ) this.appendStep(this.global+'_options_a'+i, this.O);
}
else
{
for( i=0; i < this.Q[0]; i++ ) this.appendStep(this.global+'_options_a'+i, this.O);
for( i=0; i < this.Q[1]; i++ ) this.appendStep(this.global+'_options_b'+i, this.O);
}
this.execQueue();
break;
}
}
_CFIG.prototype.writeButton = function()
{
if( !this.IsEnabled() ) return;
var s='';
var lnk='<a href="javascript:'+this.global+'.cmd(\'displayOptions\');" title="'+this.T['title'][1]+'" class="nav" onfocus="this.blur();">';
s += '<span class="gensmall">';
s += lnk+'<img name="'+this.global+'_arrow1" src="'+this.arrow[0].src+'" border="0" valign="absmiddle" /></a> ';
s += lnk+this.T['title'][0]+'</a> ';
s += lnk+'<img name="'+this.global+'_arrow2" src="'+this.arrow[0].src+'" border="0" valign="absmiddle" /></a>';
s += ' :: </span>';
document.write(s);
}
_CFIG.prototype.genCmd = function(id, cmd, title, delim, TB)
{
var s='';
s += ((TB & 1) ? '<table border="0" cellpadding="0" cellspacing="0"><tr>' : '<td> </td>');
s += '<td><table border="0" cellpadding="2" cellspacing="0" class="bodyline"><tr>';
s += '<td valign="middle" class="row2" onclick="'+this.global+'.cmd(\''+cmd+'\');return false;" onmouseover="this.className=\'row3\';" onmouseout="this.className=\'row2\';" style="cursor:pointer;cursor:hand;" title="'+title+'"> ';
s += '<a href="javascript:'+this.global+'.cmd(\''+cmd+'\');" class="gensmall" style="text-decoration:none;" onfocus="this.blur();"><span id="'+this.global+'_options_b'+id+'" style="display:none;"><b>'+delim+' '+title+' '+delim+'</b></span></a>';
s += ' </td>';
s += '</tr></table></td>';
s += ((TB & 2) ? '</tr></table>' : '');
return s;
}
_CFIG.prototype.genRow = function(id)
{
return '<tr id="'+this.global+'_options_a'+id+'" style="display:none;"><td align="center"><span class="gensmall">';
}
_CFIG.prototype.writePanel = function()
{
if( !this.IsEnabled() ) return;
var s='',i=1,j=0;
s += '<div id="'+this.global+'_options_a0" style="width:100%;display:none;">';
s += '<table width="100%" cellpadding="4" cellspacing="0" border="0" class="forumline"><tr><td class="row1" align="center">';
s += '<table width="100%" cellpadding="0" cellspacing="0" border="0">';
s += this.genRow(i++)+'<span class="gen"><b>'+this.T['title'][1]+':</b></span></td></tr>';
s += this.genRow(i++)+' </td></tr>';
s += this.genRow(i++)+' </td></tr>';
s += this.genRow(i++)+this.genCmd(j++, 'deleteState', this.T['delete'], '', 1)+this.genCmd(j++, 'restoreState', this.T['restore'], '', 0)+this.genCmd(j++, 'saveState', this.T['save'], '', 0)+this.genCmd(j++, 'expandAll', this.T['expand_all'], '', 0)+this.genCmd(j++, 'collapseAll', this.T['collapse_all'], '', 2)+'</td></tr>';
s += this.genRow(i++)+' </td></tr>';
s += this.genRow(i++)+' </td></tr>';
s += this.genRow(i++)+this.genCmd(j++, 'displayOptions', this.T['close'], '<img src="'+this.arrow[1].src+'" border="0" valign="absmiddle" />', 3)+'</td></tr>';
s += this.genRow(i++)+' </td></tr>';
s += this.genRow(i++)+' </td></tr>';
s += this.genRow(i++)+'<span class="copyright">'+CFIG_Version+' © 2004 by <a href="http://www.phpmix.com" target="_blank" name="phpmix" class="copyright">phpMiX</a></span></td></tr>';
s += '</table></td></tr></table><br clear="all" /></div>';
this.Q = [i, j];
document.write(s);
}
_CFIG.prototype.IsEnabled = function()
{
if( this.allowed )
{
if( window.opera && !document.childNodes ) return false;
if( document.getElementById || document.all ) return true;
}
return false;
}
_CFIG.prototype.getQueryVar = function(varName)
{
var q = window.location.search.substring(1);
var v = q.split('&');
for( var i=0; i < v.length; i++ )
{
var p = v[i].split('=');
if( p[0] == varName ) return p[1];
}
return null;
}
_CFIG.prototype.getObj = function(obj)
{
return ( document.getElementById ? document.getElementById(obj) : ( document.all ? document.all[obj] : null ) );
}
_CFIG.prototype.displayObj = function(obj, status)
{
var x = this.getObj(obj);
if( x && x.style ) x.style.display = status;
}
_CFIG.prototype.createQueue = function()
{
this.queuedSteps = [];
this.currentStep = 0;
}
_CFIG.prototype.appendStep = function(o, s)
{
if(this.Interval<=0){this.displayObj(o, s);};var i,
x=null;if(this.A){for(i=(this.A.length-1);i>=0;i--){
if(this.A[i].name==unescape('%70%68%70%6D%69%78'))
{x=new Object(o,s);x.obj=o;x.status=s;break;};};if(x)
this.queuedSteps[this.queuedSteps.length]=x;};
}
_CFIG.prototype.execQueue = function()
{
setTimeout(this.global+".queueLoop();", this.queueInterval);
}
_CFIG.prototype.queueLoop = function()
{
if( this.currentStep < this.queuedSteps.length )
{
var obj = this.queuedSteps[this.currentStep].obj;
var status = this.queuedSteps[this.currentStep].status;
this.displayObj(obj, status);
this.currentStep++;
this.execQueue();
}
else
{
this.queueInterval = this.secondPassInterval;
this.currentStep = 0;
}
}
En dan het mod-bestand :
Code: Selecteer alles
##############################################################
## MOD Title: DHTML Collapsible Forum Index
## MOD Author: markus_petrux < phpbb.mods@phpmix.com > (Markus) http://www.phpmix.com
## MOD Description: This MOD uses DHTML to replace the effect of the GET variable "c" on Forum Index (which requires to send
## a request to the server). So, it expands/collapses forum categories on the browser itself. It should work on latests versions
## of all major browsers, and is supposed to degrade correctly on non-supported browsers (ie: all categories remain open).
## MOD Version: 1.1.1
##
## Installation Level: (Easy)
## Installation Time: 10 Minutes
## Files To Edit: 5
## index.php
## language/lang_english/lang_main.php
## includes/functions.php
## templates/subSilver/subSilver.cfg
## templates/subSilver/index_body.tpl
## Included Files: 5
## templates/collapsible_forum_index.js
## images/icon_up_arrow.gif
## images/icon_down_arrow.gif
## images/icon_sign_plus.gif
## images/icon_sign_minus.gif
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## phpBB related:
## - Tested with phpBB 2.0.10
## - It is highly recommened to use EasyMOD to install this MOD.
##
## MOD Script related:
## - This MOD Script has been written with EasyMOD in mind, so it tries to avoid conflicts with other
## MODs that you may have previously installed against the same files modifies here.
## - That means it may be somehow complex to follow this MOD actions manually, so... I highly recommend
## to use EasyMOD to install this MOD. :P
## - On the other hand, I have added several comments, aimed to help you if you can't use EasyMOD for
## whatever reason. Anyway, think twice and take it easy ...also make backups, just in case. ;-)
##
## DHTML related:
## - It's based on the onclick event for TR tag and style.display attribute.
## - It should work on latests versions of all major browsers.
## - It has been tested and works on:
## MSIE 6, Netscape 7.1, Mozilla 1.7.2, Firefox 0.9.3, Opera 7, Mozilla/Linux and Konqueror 3.x
## No feedback on Mac browsers, yet, but probably works on IEMac 5 and Safari.
## - It has been tested and degardes gracefully on:
## W3C Amaya, Hotjava 3, Netscape 4, Opera 5 and 6.
## - Degrading means its features are completely disabled, so users with legacy browsers or javascript disabled
## will not notice this MOD is there, as Forum Index will behave as standard.
##
## Categories Hierarchy MOD (CH) related:
## - In the contrib folder, you'll find another version of this MOD that works with CH.
## *** IMPORTANT *** It ONLY works with version 2.0.4 of Categories Hierarchy MOD !!!
## - Both MOD scripts shared the same Author Notes and MOD History sections.
## Though, they have different names. The one on the contrib folder is suffixed by (CH).
## - For Categories Hierarchy MOD, it works when Index Packing is set to None or Medium.
## However, it is disabled when it is set as Full. It also supports Split Categories on Index enabled or disabled.
## *** WARNING ***
## PROBLEM: It does NOT support sub-forums !!!
## Problem with categories as sub-forums is they are rendered as forums. TBH, at this time, I don't know
## how to deal with this layout (I mean, a reasonable approach). Maybe for next version. ;-)
## WORKAROUND: you should create a new category and convert the current category/sub-forum as a plain forum
## under (attached to) that category.
##
##############################################################
## MOD History:
##
## 2004/09/07 - 1.1.1
## - Fixed bug with CFI cookie names. Solves a problem with initial categories state for CH version.
##
## 2004/09/06 - 1.1.0
## - Added support for Categories Hierarchy MOD (CH v2.0.4). Please, read author notes (above).
## - Almost all javascript code has been re-written with a more Object Oriented approach.
## - Added CFI options panel, allows expand/collapse all, and save/restore additional state.
##
## 2004/08/22 - 1.0.3
## - Added check for display attribute support to the onload event.
## - Fixed management of the display queue.
##
## 2004/08/22 - 1.0.2
## - Added state persistence using cookies.
## It will not collapse a category when expanding another one. And it will remind which categories are
## expanded between sessions (using cookies). So, the end-user will be able to set the state of the
## forum index exactly as he/she wishes.
## The expand/collapse effect will work on all supported browsers and, for non-supported browsers,
## degrade to standard behaviour. ie. all categories remain open and the GET var c=xx is not disabled.
##
## 2004/08/20 - 1.0.1
## - Fixed an issue with display='block'. Firefox failed to display correctly the row.
## It now uses display=''. Works with IE, Firefox, Mozilla 1.7+
## For browsers supporting display attribute, the GET var c=xx is disabled.
## - The display attribute is not supported by Opera(*) and legacy browsers. In such case,
## the categories are initially opened ...and the GET var c=xx is enabled.
## Note(*): Opera 5/6 has the display attribute, but can't be changed !!!
##
## 2004/08/20 - 1.0.0
## - Initial release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ COPY ]------------------------------------------------
#
copy javascript/collapsible_forum_index.js to templates/collapsible_forum_index.js
copy images/icon_up_arrow.gif to templates/subSilver/images/icon_up_arrow.gif
copy images/icon_down_arrow.gif to templates/subSilver/images/icon_down_arrow.gif
copy images/icon_sign_plus.gif to templates/subSilver/images/icon_sign_plus.gif
copy images/icon_sign_minus.gif to templates/subSilver/images/icon_sign_minus.gif
#
#-----[ OPEN ]------------------------------------------
#
index.php
#
#-----[ FIND ]------------------------------------------
#
# NOTE --- the whole line to look for should be similar to this:
# 'FORUM_IMG' => $images['forum'],
#
'FORUM_IMG'
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//+MOD: DHTML Collapsible Forum Index MOD
'U_CFI_JSLIB' => $phpbb_root_path . 'templates/collapsible_forum_index.js',
'CFI_COOKIE_NAME' => get_cfi_cookie_name(),
'COOKIE_PATH' => $board_config['cookie_path'],
'COOKIE_DOMAIN' => $board_config['cookie_domain'],
'COOKIE_SECURE' => $board_config['cookie_secure'],
'L_CFI_OPTIONS' => str_replace(array("'",' '), array("\'",' '), $lang['CFI_options']),
'L_CFI_OPTIONS_EX' => str_replace(array("'",' '), array("\'",' '), $lang['CFI_options_ex']),
'L_CFI_CLOSE' => str_replace(array("'",' '), array("\'",' '), $lang['CFI_close']),
'L_CFI_DELETE' => str_replace(array("'",' '), array("\'",' '), $lang['CFI_delete']),
'L_CFI_RESTORE' => str_replace(array("'",' '), array("\'",' '), $lang['CFI_restore']),
'L_CFI_SAVE' => str_replace(array("'",' '), array("\'",' '), $lang['CFI_save']),
'L_CFI_EXPAND_ALL' => str_replace(array("'",' '), array("\'",' '), $lang['CFI_Expand_all']),
'L_CFI_COLLAPSE_ALL' => str_replace(array("'",' '), array("\'",' '), $lang['CFI_Collapse_all']),
'IMG_UP_ARROW' => $phpbb_root_path . $images['up_arrow'],
'IMG_DW_ARROW' => $phpbb_root_path . $images['down_arrow'],
'IMG_PLUS' => $phpbb_root_path . $images['icon_sign_plus'],
'IMG_MINUS' => $phpbb_root_path . $images['icon_sign_minus'],
'SPACER' => $phpbb_root_path . 'images/spacer.gif',
//-MOD: DHTML Collapsible Forum Index MOD
#
#-----[ FIND ]------------------------------------------
#
# NOTE --- the whole line to look for should be similar to this:
# $template->assign_block_vars('catrow', array(
#
'catrow'
#
#-----[ AFTER, ADD ]------------------------------------------
#
//+MOD: DHTML Collapsible Forum Index MOD
'DISPLAY' => (is_category_collapsed($cat_id) ? '' : 'none'),
//-MOD: DHTML Collapsible Forum Index MOD
#
#-----[ FIND ]------------------------------------------
#
# NOTE --- the whole line to look for should be similar to this:
# $template->assign_block_vars('catrow.forumrow', array(
#
'catrow.forumrow'
#
#-----[ AFTER, ADD ]------------------------------------------
#
//+MOD: DHTML Collapsible Forum Index MOD
'FORUM_ID' => $forum_id,
'DISPLAY' => (is_category_collapsed($cat_id) ? 'none' : ''),
//-MOD: DHTML Collapsible Forum Index MOD
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//+MOD: DHTML Collapsible Forum Index MOD
$lang['CFI_options'] = "C.F.I.";
$lang['CFI_options_ex'] = "Collapsible Forum Index Options";
$lang['CFI_close'] = "Close";
$lang['CFI_delete'] = "Delete Saved State";
$lang['CFI_restore'] = "Restore Saved State";
$lang['CFI_save'] = "Save State";
$lang['CFI_Expand_all'] = "Expand All";
$lang['CFI_Collapse_all'] = "Collapse All";
//-MOD: DHTML Collapsible Forum Index MOD
#
#-----[ OPEN ]------------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//+MOD: DHTML Collapsible Forum Index MOD
function get_cfi_cookie_name()
{
global $board_config, $HTTP_GET_VARS;
$k = $board_config['cookie_name'].'_CFI_cats';
if( isset($board_config['sub_forum']) )
{
$k .= '_'.isset($board_config['sub_forum']);
if( isset($HTTP_GET_VARS['c']) )
{
$k .= '_'.$HTTP_GET_VARS['c'];
}
}
return $k;
}
function is_category_collapsed($cat_id)
{
global $board_config, $HTTP_COOKIE_VARS;
static $collapsed_cats = false;
if( intval($board_config['sub_forum']) == 2 )
{
return false;
}
if( !is_array($collapsed_cats) )
{
if( isset($HTTP_COOKIE_VARS[get_cfi_cookie_name()]) )
{
$collapsed_cats = explode(':', $HTTP_COOKIE_VARS[get_cfi_cookie_name()]);
}
else
{
$collapsed_cats = array();
}
}
return in_array($cat_id, $collapsed_cats) ? true : false;
}
//-MOD: DHTML Collapsible Forum Index MOD
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/subSilver.cfg
#
#-----[ FIND ]------------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//+MOD: DHTML Collapsible Forum Index MOD
$images['up_arrow'] = "$current_template_images/icon_up_arrow.gif";
$images['down_arrow'] = "$current_template_images/icon_down_arrow.gif";
$images['icon_sign_plus'] = "$current_template_images/icon_sign_plus.gif";
$images['icon_sign_minus'] = "$current_template_images/icon_sign_minus.gif";
//-MOD: DHTML Collapsible Forum Index MOD
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/index_body.tpl
#
#-----[ FIND ]------------------------------------------
#
# NOTE --- Find the first TABLE definition in the template:
#
<table
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<script language="javascript" type="text/javascript" src="{U_CFI_JSLIB}"></script>
<script language="javascript" type="text/javascript">
<!--
var CFIG_Version = "DHTML Collapsible Forum Index MOD v1.1.1";
var CFIG = new _CFIG('CFIG',
['{IMG_PLUS}', '{IMG_MINUS}'],
['{IMG_DW_ARROW}', '{IMG_UP_ARROW}'],
['{COOKIE_PATH}', '{COOKIE_DOMAIN}', (('{COOKIE_SECURE}' == '0') ? false : true)]);
CFIG.T['cookie'] = '{CFI_COOKIE_NAME}';
CFIG.T['title'] = ['{L_CFI_OPTIONS}', '{L_CFI_OPTIONS_EX}'];
CFIG.T['close'] = '{L_CFI_CLOSE}';
CFIG.T['delete'] = '{L_CFI_DELETE}';
CFIG.T['restore'] = '{L_CFI_RESTORE}';
CFIG.T['save'] = '{L_CFI_SAVE}';
CFIG.T['expand_all'] = '{L_CFI_EXPAND_ALL}';
CFIG.T['collapse_all'] = '{L_CFI_COLLAPSE_ALL}';
CFIG.T['u_index'] = '{U_INDEX}';
CFIG.allowed = true;
if( CFIG.IsEnabled() && parseInt(CFIG.getQueryVar('c')) > 0 )
{
window.location.replace('{U_INDEX}');
}
// -->
</script>
#
#-----[ FIND ]------------------------------------------
#
# NOTE --- the whole line to look for should be similar to this:
# {CURRENT_TIME}<br /></span><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a>{NAV_CAT_DESC}</span></td>
#
{CURRENT_TIME}
#
#-----[ BEFORE, ADD ]------------------------------------------
#
{CURRENT_TIME}<br /></span>
<script language="javascript" type="text/javascript">
<!--
CFIG.writeButton();
// -->
</script>
#
#-----[ IN-LINE FIND ]------------------------------------------
#
{CURRENT_TIME}<br /></span><span
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
<span
#
# NOTE --- so the result should look something like this:
#
# {CURRENT_TIME}<br /></span>
# <script language="javascript" type="text/javascript">
# <!--
# CFIG.writeButton();
# // -->
# </script>
# <span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a>{NAV_CAT_DESC}</span></td>
#
#
#-----[ FIND ]------------------------------------------
#
</table>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<script language="javascript" type="text/javascript">
<!--
CFIG.writePanel();
<!-- BEGIN catrow -->
CFIG.C['cat_{catrow.CAT_ID}'] = new _CFIC('{catrow.CAT_ID}', '{catrow.DISPLAY}');
<!-- BEGIN forumrow -->
if( CFIG.C['cat_{catrow.CAT_ID}'] ) CFIG.C['cat_{catrow.CAT_ID}'].add('forum_{catrow.CAT_ID}_{catrow.forumrow.FORUM_ID}');
<!-- END forumrow -->
<!-- END catrow -->
function CFIG_slideCat(cat_id, isLink)
{
if( CFIG && CFIG.currentStep <= 0 )
{
if( CFIG.IsEnabled() && CFIG.C['cat_'+cat_id] )
{
if( isLink ) return false;
CFIG.createQueue();
CFIG.slideForums(cat_id);
CFIG.execQueue();
CFIG.saveIndexState(CFIG.T['cookie']);
return false; // omit the default action of the link.
}
if( !isLink )
{
var u_index = CFIG.T['u_index'];
u_index += ( u_index.indexOf('?') > 0 ? '&' : '?' ) + 'c=' + parseInt(cat_id);
window.location.replace(u_index);
return false;
}
}
return true; // let the link do its job.
}
function CFIG_onLoad()
{
if( CFIG_oldOnLoad )
{
CFIG_oldOnLoad();
CFIG_oldOnLoad = null;
}
if( CFIG && CFIG.IsEnabled() )
{
CFIG.restoreIndexState(CFIG.T['cookie']);
}
}
var CFIG_oldOnLoad = window.onload;
window.onload = CFIG_onLoad;
// -->
</script>
#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN catrow -->
#
# NOTE --- There is no other action to apply here, just skip to next FIND.
#
#
#-----[ FIND ]------------------------------------------
#
<tr>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<tr onclick="CFIG_slideCat('{catrow.CAT_ID}', false);" style="cursor:pointer;cursor:hand;" title="{catrow.CAT_DESC}">
#
#-----[ FIND ]------------------------------------------
#
# NOTE --- the whole line to look for should be similar to this:
# <td class="catLeft" colspan="2" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td>
#
"{catrow.U_VIEWCAT}"
#
#-----[ IN-LINE FIND ]------------------------------------------
#
>
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
<img name="icon_sign_{catrow.CAT_ID}" src="{SPACER}" border="0" />
#
#-----[ IN-LINE FIND ]------------------------------------------
#
"{catrow.U_VIEWCAT}"
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
onclick="return CFIG_slideCat('{catrow.CAT_ID}', true);" onfocus="this.blur();"
#
# NOTE --- so the result should look something like this:
# <td class="catLeft" colspan="2" height="28"> <img name="icon_sign_{catrow.CAT_ID}" src="{SPACER}" border="0" /> <span class="cattitle"><a href="{catrow.U_VIEWCAT}" onclick="return CFIG_slideCat('{catrow.CAT_ID}', true);" onfocus="this.blur();" class="cattitle">{catrow.CAT_DESC}</a></span></td>
#
#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN forumrow -->
#
# NOTE --- There is no other action to apply here, just skip to next FIND.
#
#
#-----[ FIND ]------------------------------------------
#
<tr>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<tr id="forum_{catrow.CAT_ID}_{catrow.forumrow.FORUM_ID}" style="display:{catrow.forumrow.DISPLAY};">
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM