Customized portal

Neue Projekte und Anfragen, Teamarbeiten und Alpha/Beta Scripte jeder Art.
KEINE Supportanfragen zu bestehenden MODs!
Benutzeravatar
AmigaLink
Beiträge: 5843
Registriert: Mi 03.Mär, 2004 09:05
Wohnort: NRW
Kontaktdaten:

Beitrag von AmigaLink »

Bei dir sieht man jetzt sehr schön was ich verhindern möchte. Nämlich das die Titelzeile komplett verschwindet, wenn man einklappt. Da soll schon noch sichbar sein, was man ausklappen kann. ;)

Lässt du die Titeleisten vom Portal generieren, oder hast du sie in die Boxen.tpl eingesetzt?
Ich möchte nämlich, wenn ich das umsetze, die vom Portal verwenden. Auf gut Deutsch das Portal soweit verändern, das automatisch für jede Box (auch wenn neue hinzugefügt werden) die einklappfunktion verfügbar ist. :D Für einzelne Boxen natürlich abschaltbar. ;)
[center].: Web Relax .::. Essen mit Freude .::. AmigaLink.de :.
______________________________________

Kein Support per PM, ICQ oder eMail!!!
[/center]
Titus
Beiträge: 235
Registriert: Fr 18.Mär, 2005 22:23

Beitrag von Titus »

naja man könnte die klappfunktion nur für den boxeninhalt verwenden, ich hab es jedoch so gamacht da ich eben teilweise boxen verwende die Ihre eigene titelleiste oder eben garkeine mitbringen, es aber trozdem geht

naja der Boxentitel (zwar nur der ACPtitel) ist ja beim Mouseover sichtbar, mit ging es auch darum die box z.B. am index wegklappen zu können und dann die volle breite zu haben(daher auch die änderung mit der spaltenbreite)

*edit2*
das mit der abschaltbaren klappfunktion wird sicher schwierig, den titel immer zu haben ist weniger das problem da brauchst du nur in der function unten die stelle 2x

Code: Alles auswählen

if($block_info[$b_counter]['titlebar'] == 1)
von == 1 auf < 2 ändern dann wird der titel immer ausgegeben ;)
*/edit2*

ich kann dir mal die tpl einer box posten die benötigten variablen werden immer beim erstellen der box mitgeliefert, das skript lädt über die overall_header.tpl

functions_portal.php
die eine funktion für die blocks (meine portalconfig ist in der boardconfig daher bitte aufpassen beim übernehmen

Code: Alles auswählen

function portal_parse_blocks($layout, $forum_wide = FALSE, $type='')
{
	global $db, $template, $userdata, $phpbb_root_path, $phpEx, $lang, $var_cache, $board_config;
	
	include_once( $phpbb_root_path . 'includes/bbcode.' . $phpEx );
	if(!$forum_wide)
	{
		$layout_pos=array();
		if($board_config['cache_enabled'])
			$layout_pos=$var_cache->get('lp' . strval($layout), 86400, 'layout_pos');	
		if(!$layout_pos)
		{
			$sql_pos = "SELECT * FROM " . BLOCK_POSITION_TABLE . " WHERE layout ='" . $layout . "'"; 
			if( !($block_pos_result = $db->sql_query($sql_pos)) )
			{
				message_die(CRITICAL_ERROR, "Could not query portal blocks position", "", __LINE__, __FILE__, $sql);
			}
			while ($block_pos_row = $db->sql_fetchrow($block_pos_result))
			{
				$layout_pos[$block_pos_row['bposition']] = $block_pos_row['pkey'];
			}
			
			if($board_config['cache_enabled'])
				$var_cache->save($layout_pos, 'lp' . strval($layout), 'layout_pos');
		}
	}
	
	$block_info=array();
	if($forum_wide)
	{
		$temp_type = $type;
	}else{
		$temp_type = 's' . strval($layout);
	}
	if($board_config['cache_enabled'])
		$block_info=$var_cache->get('bi' . portal_blocks_view(false) . $temp_type, 86400, 'block_info');
	if(!$block_info)
	{
		if(!$forum_wide)
		{
			$sql = "SELECT * 
				FROM " . BLOCKS_TABLE . " 
				WHERE layout ='" . $layout . "' 
				AND active = '1' 
				AND view IN " . portal_blocks_view() . " 
				AND bposition NOT IN ('@','*') 
				ORDER BY weight";
		}else
		{
			if($type=='header')
			{
				$temp_pos = '@';
			}else
			{
				$temp_pos = '*';
			}
			$sql = "SELECT * 
				FROM " . BLOCKS_TABLE . " 
				WHERE layout = '0' 
				AND active = '1' 
				AND view IN " . portal_blocks_view() . " 
				AND bposition = '" . $temp_pos . "' 
				ORDER BY weight";
		}
		if( !($block_im_result = $db->sql_query($sql)) )
		{
			message_die(CRITICAL_ERROR, "Could not query portal blocks information", "", __LINE__, __FILE__, $sql);
		}
		$block_info = $db->sql_fetchrowset($block_im_result);
		if($board_config['cache_enabled'])
			$var_cache->save($block_info, 'bi' . portal_blocks_view(false) . $temp_type, 'block_info');
	}

	$block_count = count($block_info);

	for ($b_counter = 0; $b_counter < $block_count; $b_counter++)
	{
		$is_group_allowed = TRUE;
		if(!empty($block_info[$b_counter]['groups']))
		{
			$is_group_allowed = FALSE;
			$group_content = explode(",",$block_info[$b_counter]['groups']);
			for ($i = 0; $i < count($group_content); $i++)
			{
				if(in_array(intval($group_content[$i]), portal_groups($userdata['user_id'])))
				{
					$is_group_allowed = TRUE;
				}
			}
		}
		if($is_group_allowed)
		{
			if($forum_wide)
			{
				$position = $type;
			}else
			{
				$position = $layout_pos[$block_info[$b_counter]['bposition']];
			}
			$lang_exist = FALSE;
			$block_name = ereg_replace('blocks_imp_','',$block_info[$b_counter]['blockfile']);
			if(file_exists('blocks/language/lang_' . $board_config['default_lang'] . '/lang_' . $block_name . '_block.' . $phpEx))
			{
				$lang_exist = TRUE;
				include($phpbb_root_path . 'blocks/language/lang_' . $board_config['default_lang'] . '/lang_' . $block_name . '_block.' . $phpEx);
			}
			if(!empty($block_info[$b_counter]['blockfile'])){
				$template->set_filenames(array(
					$block_name . '_block'         => 'blocks/' . $block_name . '_block.tpl')
				);
				$output_block='';
				if(($board_config['cache_enabled'])&&($block_info[$b_counter]['cache']))
					$output_block=$var_cache->get('b' . strval($block_info[$b_counter]['bid']), $block_info[$b_counter]['cache_time'], 'block');	
				if(!$output_block)
				{
					include($phpbb_root_path . 'blocks/' . $block_info[$b_counter]['blockfile'] . '.' . $phpEx);
					$output_block = portal_assign_var_from_handle($template, $block_name . '_block');
					if(($board_config['cache_enabled'])&&($block_info[$b_counter]['cache']))
						$var_cache->save($output_block, 'b' . strval($block_info[$b_counter]['bid']), 'block');
				}

				$template->assign_block_vars($position . '_blocks_row',array(
					'OUTPUT' => $output_block,
					'BID' => $block_info[$b_counter]['bid'],
					'TITLE2' => $block_info[$b_counter]['title']
					)
				);

				if($block_info[$b_counter]['titlebar'] == 1)
				{
					if(($lang_exist) && ($block_info[$b_counter]['local'] == 1))
					{
						$template->assign_block_vars($position . '_blocks_row.title',array(
							'BID' => $block_info[$b_counter]['bid'],
							'TITLE' => $lang['Title_' . $block_name]
							)
						);
					}else
					{
						$template->assign_block_vars($position . '_blocks_row.title',array(
							'BID' => $block_info[$b_counter]['bid'],
							'TITLE' => $block_info[$b_counter]['title']
							)
						);
					}
				}
				else
				{
				$template->assign_block_vars($position . '_blocks_row.block',array(
					'BID' => $block_info[$b_counter]['bid'],
					'TITLE2' => $block_info[$b_counter]['title']
					));
				}
				
				if($block_info[$b_counter]['border'] == 1)
				{
					$template->assign_block_vars($position . '_blocks_row.border','');
				}

				if($block_info[$b_counter]['background'] == 1)
				{
					$template->assign_block_vars($position . '_blocks_row.background','');
				}

			}else{
				$text=$block_info[$b_counter]['content'];
				if($block_info[$b_counter]['type'])
				{
					$text = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $text);
					if ( $block_info[$b_counter]['block_bbcode_uid'] != '' )
					{
						$text = bbencode_second_pass($text, $block_info[$b_counter]['block_bbcode_uid']);
					}
					$text = make_clickable($text);
					$text = smilies_pass($text);
					$text = str_replace("\n", "\n<br />\n", $text);
					$text = '<span class="postbody">' . $text . '</span>';
				}
				$template->assign_block_vars($position . '_blocks_row',array(
					'BID' => $block_info[$b_counter]['bid'],
					'TITLE2' => $block_info[$b_counter]['title'],
					'OUTPUT' => $text
					)
				);
				if($block_info[$b_counter]['titlebar'] == 1)
				{
					if(($lang_exist) && ($block_info[$b_counter]['local'] == 1))
					{
						$template->assign_block_vars($position . '_blocks_row.title',array(
							'BID' => $block_info[$b_counter]['bid'],
							'TITLE' => $lang['Title_' . $block_name]
							)
						);
					}else
					{
						$template->assign_block_vars($position . '_blocks_row.title',array(
						'BID' => $block_info[$b_counter]['bid'],
						'TITLE' => $block_info[$b_counter]['title']
							)
						);
					}
				}
				else
				{
				$template->assign_block_vars($position . '_blocks_row.block',array(
					'BID' => $block_info[$b_counter]['bid'],
					'TITLE2' => $block_info[$b_counter]['title']
					));
				}
				if($block_info[$b_counter]['border'] == 1)
				{
					$template->assign_block_vars($position . '_blocks_row.border','');
				}
				if($block_info[$b_counter]['background'] == 1)
				{
					$template->assign_block_vars($position . '_blocks_row.background','');
				}
			}
		}
	}
}
und ein block

Code: Alles auswählen

<td valign="top">
<!-- BEGIN index_blocks_row -->
<DIV id={index_blocks_row.BID}_block>
	<!-- BEGIN block -->
<A title="Hide {index_blocks_row.block.TITLE2}" href="javascript:ShowHide('{index_blocks_row.block.BID}_block','{index_blocks_row.block.BID}_block2','{index_blocks_row.block.BID}_block');"><IMG height=9 alt="Hide {index_blocks_row.block.TITLE2}" border="0" src="images/icon_up_arrow.gif" width=9></A>
	<!-- END block -->
<table width="{INDEX_WIDTH}" cellpadding="5" cellspacing="0" border="0"
<!-- BEGIN border -->
class="forumline"
<!-- END border -->
>
	<!-- BEGIN title -->
	<tr>
		<th>{index_blocks_row.title.TITLE}&nbsp;<A title="Hide {index_blocks_row.title.TITLE}" href="javascript:ShowHide('{index_blocks_row.title.BID}_block','{index_blocks_row.title.BID}_block2','{index_blocks_row.title.BID}_block');"><IMG height=9 alt="Hide {index_blocks_row.title.TITLE}" border="0" src="images/icon_up_arrow.gif" width=9></A></th>
	</tr>
	<!-- END title -->
	<tr>
		<td
		<!-- BEGIN background -->
		class="row1"
		<!-- END background -->
		>{index_blocks_row.OUTPUT}</td>
	</tr>
</table>
</DIV>
<DIV id={index_blocks_row.BID}_block2 style="DISPLAY: none; PADDING-BOTTOM: 5px; PADDING-TOP: 5px"><A href="javascript:ShowHide('{index_blocks_row.BID}_block','{index_blocks_row.BID}_block2','{index_blocks_row.BID}_block');"><IMG height=9 alt="Show {index_blocks_row.TITLE2}" border="0" src="images/icon_down_arrow.gif" width=9></A></DIV>
<SCRIPT language=javascript type=text/javascript>
<!--
tmp = '{index_blocks_row.BID}_block';
if(GetCookie(tmp) == '2')
{
	ShowHide('{index_blocks_row.BID}_block','{index_blocks_row.BID}_block2','{index_blocks_row.BID}_block');
}
//-->
</SCRIPT>
<br />
<!-- END index_blocks_row -->
</td>
<td width="1" valign="top">&nbsp;</td>
die JS http://e3.xv12.com/includes/scripts2.js
Zuletzt geändert von Titus am Do 21.Jul, 2005 23:49, insgesamt 2-mal geändert.
Benutzeravatar
oxpus
Administrator
Beiträge: 28737
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Cool, die Boxenüberschrifte verschwinden auch. Schaut dann klasse aus ;)
Naja, es wird ja noch dran gearbeitet.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Titus
Beiträge: 235
Registriert: Fr 18.Mär, 2005 22:23

Beitrag von Titus »

Für einzelne Boxen natürlich abschaltbar
mir ist der gedacnke gekommen das könnte man wohl am besten realisieren in dem man das buttonIMG nicht ausgibt, dann hat man keine möglichkeit den mechanismus auszuführen :p
Benutzeravatar
AmigaLink
Beiträge: 5843
Registriert: Mi 03.Mär, 2004 09:05
Wohnort: NRW
Kontaktdaten:

Beitrag von AmigaLink »

Erstmal danke für deinen Code. Ich werde mir das bei gelegenheit in aller ruhe mal ansehen und durch den Kopf gehen lassen. :)
Für einzelne Boxen natürlich abschaltbar
mir ist der gedacnke gekommen das könnte man wohl am besten realisieren in dem man das buttonIMG nicht ausgibt, dann hat man keine möglichkeit den mechanismus auszuführen :p
Das ist das einfachste. :D
[center].: Web Relax .::. Essen mit Freude .::. AmigaLink.de :.
______________________________________

Kein Support per PM, ICQ oder eMail!!!
[/center]
Benutzeravatar
tom10
Beiträge: 1106
Registriert: Sa 29.Jan, 2005 14:58
Kontaktdaten:

Beitrag von tom10 »

Und ich bastle hier das ganze wochenende an genau so was änlichem rum und hier ist wird fleißig schon dran gearbeitet. Da bleib ich mal gespannt ob das noch zu einer guten Anleitung weitergeführt wird. Genau sowas wäre ja genial. Abschaltbare boxen. Userspezifisch einstellbar. :respect:
Der Versuch was neues zu versuchen....
http://simson-le.de.vu
Blisk
Beiträge: 873
Registriert: Di 21.Sep, 2004 12:06
Kontaktdaten:

Beitrag von Blisk »

Is that MOD already maded???
Benutzeravatar
dagobert
Beiträge: 457
Registriert: Mo 08.Mär, 2004 13:46
Wohnort: Altenkirchen
Kontaktdaten:

Beitrag von dagobert »

hier ist mal ein acp menü, dass ebenfalls cookies verwendet. ich finds scharf ;)

(vielleicht könnt ihr davon ja auch noch codefetzen gebrauchen.....)

Code: Alles auswählen

############################################################## 
## MOD Title: DHTML Slide Menu for ACP 
## MOD Author: markus_petrux < phpbb.mods@phpmix.com > (Markus) http://www.phpmix.com 
## MOD Description: This MOD turns your ACP left pane into a Dynamic HTML Slide Menu (roll-in/roll-out effects), 
##     making it easier to navigate. 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). It also uses cookies to 
##     remind previous menu state. Really useful if you have many MODs installed. :-) 
## MOD Version: 1.0.0 
## 
## Installation Level: (Easy) 
## Installation Time: 5 Minutes 
## Files To Edit: 2 
##    admin/index.php 
##    templates/subSilver/admin/index_navigate.tpl 
## Included Files: 0 
############################################################## 
## 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 
## - This MOD is EasyMOD (0.0.11a3) friendly. 
## 
## DHTML related: 
## - It's based on the onclick event for TD tag and style.display attribute. 
## - It should work on latests versions of all major browsers. 
## 
############################################################## 
## MOD History: 
## 
## 2004/08/11 - 1.0.0 
## - This is same as 0.0.5 Beta. Just changed the version number to upload 
##   to the phpBB MODs database, as well as a couple of MOD header fields. 
## 
## 2004/08/09 - 0.0.5 Beta 
## - Fixed cursor pointer for non-IE browsers (cursor:pointer;cursor:hand;). 
##   Now, it should work on: IE4+, IE5Mac, Mozilla, Opera6+ and Safari 1.2+. 
##   It doesn't on: NS4, iCab and OmniWeb. 
## 
## 2004/08/08 - 0.0.4 Beta 
## - Fixed a couple of problems with cookie functions. 
## - Fixed a javascript error in displayObj() if x.style is undefined (NS4). 
## - Added ability to close the opened category. 
## - Added ability to use a shorter interval to hide the menus at onload event. 
## - Initial display, now works with 0 miliseconds interval, much faster. 
##   Note setTimeout is used to allow the browser to show the roll-out effect. 
## - So now, initial display closes all categories much faster, and it only leaves 
##   one opened, if one was active last time the ACP was used. 
## 
## 2004/08/07 - 0.0.3 Beta 
## - Fixed a small bug: First time the script is executed, no categories are open. 
##   Now, it opens first category by default. 
## - Also changed initial display behaviour. Now all categories are initially displayed as 
##   open. Then, at onload event time, they are closed (applying the roll-out effect). 
##   This one solves an issue with legacy versions of Netscape, Opera and OmniWeb browsers 
##   which does NOT support changing the display attribute. 
## 
## 2004/08/06 - 0.0.2 Beta 
## - Re-written almost all javascript code to implement the roll-in/roll-out behaviour 
##   when opening/closing menu categories (aka. slide menu). 
## 
## 2004/08/05 - 0.0.1 Beta 
## - Initial Beta release 
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

# 
#-----[ OPEN ]------------------------------------------ 
# 
admin/index.php 
# 
#-----[ FIND ]------------------------------------------ 
# 
# NOTE --- the whole line to look for should be similar to this: 
#      "U_ADMIN_INDEX" => append_sid("index.$phpEx?pane=right"), 
# 
U_ADMIN_INDEX 
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
//+MOD: DHTML Menu for ACP 
      'COOKIE_NAME'   => $board_config['cookie_name'], 
      'COOKIE_PATH'   => $board_config['cookie_path'], 
      'COOKIE_DOMAIN'   => $board_config['cookie_domain'], 
      'COOKIE_SECURE'   => $board_config['cookie_secure'], 
//-MOD: DHTML Menu for ACP 
# 
#-----[ FIND ]------------------------------------------ 
# 
   ksort($module); 
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
//+MOD: DHTML Menu for ACP 
   $menu_cat_id = 0; 
//-MOD: DHTML Menu for ACP 
# 
#-----[ FIND ]------------------------------------------ 
# 
# NOTE --- the whole line to look for should be similar to this: 
#      $template->assign_block_vars("catrow", array( 
# 
"catrow" 
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
//+MOD: DHTML Menu for ACP 
         'MENU_CAT_ID' => $menu_cat_id, 
         'MENU_CAT_ROWS' => count($action_array), 
//-MOD: DHTML Menu for ACP 
# 
#-----[ FIND ]------------------------------------------ 
# 
# NOTE --- the whole line to look for should be similar to this: 
#         $template->assign_block_vars("catrow.modulerow", array( 
# 
"catrow.modulerow" 
# 
#-----[ FIND ]------------------------------------------ 
# 
# NOTE --- the whole line to look for should be similar to this: 
#            "ROW_CLASS" => $row_class, 
# 
ROW_CLASS 
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
//+MOD: DHTML Menu for ACP 
            'ROW_COUNT' => $row_count, 
//-MOD: DHTML Menu for ACP 
# 
#-----[ FIND ]------------------------------------------ 
# 
# NOTE --- This is the closing statements of the while loop related to $action_array 
# 
         $row_count++; 
      } 
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
//+MOD: DHTML Menu for ACP 
      $menu_cat_id++; 
//-MOD: DHTML Menu for ACP 
# 
#-----[ OPEN ]------------------------------------------ 
# 
templates/subSilver/admin/index_navigate.tpl 
# 
#-----[ FIND ]------------------------------------------ 
# 
# NOTE --- the whole line to look for should be similar to this: 
#<table width="100%" cellpadding="4" cellspacing="0" border="0" align="center"> 
# 
<table 
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
<script language="javascript" type="text/javascript"> 
<!-- 

var menuVersion = "Slide Menu v1.0.0"; 

/************************************************************* 
 *   DHTML Slide Menu for ACP MOD 
 * 
 *   Copyright (C) 2004, Markus (phpMiX) 
 *   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! ;-) 
 *************************************************************/ 

menuVersion += ' &copy; 2004<br />by <a href="http://www.phpmix.com/" target="_blank" class="copyright">phpMiX</a>'; 

function getCookie(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)); 
} 
function setCookie(name, value, expires, path, domain, secure) 
{ 
   document.cookie = name + '=' + escape (value) + 
      ((expires) ? '; expires=' + ( (expires == 'never') ? 'Thu, 31-Dec-2099 23:59:59 GMT' : expires.toGMTString() ) : '') + 
      ((path)    ? '; path='    + path    : '') + 
      ((domain)  ? '; domain='  + domain  : '') + 
      ((secure)  ? '; secure' : ''); 
} 
function delCookie(name, path, domain) 
{ 
   if( getCookie(name) ) 
   { 
      document.cookie = name + '=;expires=Thu, 01-Jan-1970 00:00:01 GMT' + 
         ((path)    ? '; path='    + path    : '') + 
         ((domain)  ? '; domain='  + domain  : ''); 
   } 
} 

function menuCat(id, rows) 
{ 
   this.cat_id = id; 
   this.cat_rows = rows; 
   this.status = 'block'; 
} 
var menuCats = new Array(); 
<!-- BEGIN catrow --> 
menuCats['menuCat_{catrow.MENU_CAT_ID}'] = new menuCat('{catrow.MENU_CAT_ID}', {catrow.MENU_CAT_ROWS}); 
<!-- END catrow --> 

function getObj(obj) 
{ 
   return ( document.getElementById ? document.getElementById(obj) : ( document.all ? document.all[obj] : null ) ); 
} 
function displayObj(obj, status) 
{ 
   var x = getObj(obj); 
   if( x && x.style ) x.style.display = status; 
} 

var queueInterval = 20;      // milliseconds between queued steps. 
var execInterval = 0; 
var queuedSteps; 
var currentStep; 

function queueStep(o, s) 
{ 
   this.obj = o; 
   this.status = s; 
} 
function execQueue() 
{ 
   if( currentStep < queuedSteps.length ) 
   { 
      var obj = queuedSteps[currentStep].obj; 
      var status = queuedSteps[currentStep].status; 
      displayObj(obj, status); 
      if( menuCats[obj] ) menuCats[obj].status = status; 
      currentStep++; 
      setTimeout("execQueue();", execInterval); 
   } 
   else 
   { 
      execInterval = queueInterval; 
   } 
} 
function onMenuCatClick(cat_id) 
{ 
   var currentCat, currentStatus; 

   currentCat = 'menuCat_'+cat_id; 
   currentStatus = menuCats[currentCat].status; 

   queuedSteps = new Array(); 
   currentStep = 0; 

   for( var catName in menuCats ) 
   { 
      if( menuCats[catName].status == 'none' ) continue; 

      for( var i=(menuCats[catName].cat_rows-1); i >= 0; i-- ) 
      { 
         queuedSteps[currentStep++] = new queueStep(catName+'_'+i, 'none'); 
      } 
      queuedSteps[currentStep++] = new queueStep(catName, 'none'); 
   } 

   if( currentStatus == 'none' ) 
   { 
      queuedSteps[currentStep++] = new queueStep(currentCat, 'block'); 
      for( var i=0; i < menuCats[currentCat].cat_rows; i++ ) 
      { 
         queuedSteps[currentStep++] = new queueStep(currentCat+'_'+i, 'block'); 
      } 
      var   expdate = new Date();      // 72 Hours from now 
      expdate.setTime(expdate.getTime() + (72 * 60 * 60 * 1000)); 
      setCookie('{COOKIE_NAME}_menu_cat_id', cat_id, expdate, 
            ('{COOKIE_PATH}'   == '') ? null : '{COOKIE_PATH}', 
            ('{COOKIE_DOMAIN}' == '') ? null : '{COOKIE_DOMAIN}', 
            ('{COOKIE_SECURE}' == '0') ? false : true); 
   } 
   else 
   { 
      delCookie('{COOKIE_NAME}_menu_cat_id', 
            ('{COOKIE_PATH}'   == '') ? null : '{COOKIE_PATH}', 
            ('{COOKIE_DOMAIN}' == '') ? null : '{COOKIE_DOMAIN}'); 
   } 

   currentStep = 0; 
   setTimeout("execQueue();", execInterval); 
} 

function doOnLoadMenuACP() 
{ 
   var cat_id; 

   if( getObj('menuCat_0') ) 
   { 
      cat_id = getCookie('{COOKIE_NAME}_menu_cat_id'); 
      if( !menuCats['menuCat_'+cat_id] ) 
      { 
         cat_id = 0; 
      } 
      else 
      { 
         menuCats['menuCat_'+cat_id].status = 'none'; 
      } 
      onMenuCatClick(cat_id); 
   } 
   if( oldOnLoadMenuACP ) 
   { 
      oldOnLoadMenuACP(); 
   } 
} 
var   oldOnLoadMenuACP = window.onload; 
window.onload = doOnLoadMenuACP; 

// --> 
</script> 

# 
#-----[ FIND ]------------------------------------------ 
# 
# NOTE --- the whole line to look for should be similar to this: 
#        <td height="28" class="catSides"><span class="cattitle">{catrow.ADMIN_CATEGORY}</span></td> 
# 
catrow.ADMIN_CATEGORY 
# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
> 
# 
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------ 
# 
 style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{catrow.MENU_CAT_ID}');" 
# 
# NOTE --- so the result should look something like this: 
#        <td height="28" class="catSides" style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{catrow.MENU_CAT_ID}');"><span class="cattitle">{catrow.ADMIN_CATEGORY}</span></td> 
# 

# 
#-----[ FIND ]------------------------------------------ 
# 
      <!-- BEGIN modulerow --> 
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
      <tr> 
         <td class="row1"> 
            <div id="menuCat_{catrow.MENU_CAT_ID}" style="display:block;"> 
               <table width="100%" cellpadding="4" cellspacing="1" border="0" class="bodyline"> 
# 
#-----[ FIND ]------------------------------------------ 
# 
# NOTE --- the whole line to look for should be similar to this: 
#        <td class="row1"><span class="genmed"><a href="{catrow.modulerow.U_ADMIN_MODULE}"  target="main" class="genmed">{catrow.modulerow.ADMIN_MODULE}</a></span> 
# 
<td 
# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
<span 
# 
#-----[ IN-LINE REPLACE WITH ]------------------------------------------ 
# 
<div id="menuCat_{catrow.MENU_CAT_ID}_{catrow.modulerow.ROW_COUNT}" style="display:block;" 
# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
</span> 
# 
#-----[ IN-LINE REPLACE WITH ]------------------------------------------ 
# 
</div> 
# 
#-----[ FIND ]------------------------------------------ 
# 
      <!-- END modulerow --> 
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
               </table> 
            </div> 
         </td> 
      </tr> 
# 
#-----[ FIND ]------------------------------------------ 
# 
<br /> 
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
<div align="center"><span class="copyright"> 
<script language="javascript" type="text/javascript"> 
<!-- 
   document.write(menuVersion); 
// --> 
</script> 
</span></div> 
# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
Blisk
Beiträge: 873
Registriert: Di 21.Sep, 2004 12:06
Kontaktdaten:

Beitrag von Blisk »

this MOD is slidemenu for ACP, is someone made it for a portal, if it is where i can get a mod?
Antworten