Seite 2 von 2

Verfasst: 02.01.2005 19:24
von SimpsonFan
Sorry aber ich kenn mich kein bisschen mit PHP aus und kann dir da leider net weiterhelfen aber biste mal alles durchgegangen mit de Anleitung ???

Verfasst: 03.01.2005 19:31
von Inside0ut
wie gesagt, die beiden mods funktionieren unabhängig voneinander einwandfrei!

der dl mod scheint nicht richtig integriert..

BITTE NOCHMALS UM HILFE :/

Verfasst: 03.01.2005 20:56
von SimpsonFan
Haste dir mal den Fix runtergeladen den es hier gibt ???

edit: Haste mal geschaut ob in den beiden Anleitung vielleicht an zwei gleichen Textstellen was geändert werden muss und du vielleicht von einer Mod was überschrieben hast ?!?!? Is mir auch schon passiert :wink:

Verfasst: 06.01.2005 17:28
von Inside0ut
hab gerad alles durchgeschaut :/ es gibt nix das sich irgendwie miteinander aufhebt oder in konflikt zueiander steht. ich poste mal die jeweilig, relevanten änderungen der beiden mods. vielleicht kann mancher ja anhand dessen sagen, wo das problem liegt...

Auszug Junior Admin:

Code: Alles auswählen

#-----[ OPEN ]------------------------------------------ 
# 
includes/constants.php

# 
#-----[ FIND ]------------------------------------------ 
#
define('GROUPS_TABLE', $table_prefix.'groups');

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
define('JR_ADMIN_TABLE', $table_prefix.'jr_admin_users');

# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/page_tail.php

# 
#-----[ FIND ]------------------------------------------ 
#
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';

# 
#-----[ REPLACE WITH ]------------------------------------------ 
#
include_once($phpbb_root_path . 'includes/functions_jr_admin.' . $phpEx);
$admin_link = jr_admin_make_admin_link();

# 
#-----[ OPEN ]------------------------------------------ 
# 
admin/pagestart.php

# 
#-----[ FIND ]------------------------------------------ 
#
//
// End session management
//

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
include_once($phpbb_root_path . 'includes/functions_jr_admin.' . $phpEx);
find_lang_file_nivisec('lang_jr_admin');

# 
#-----[ FIND ]------------------------------------------ 
#
else if ($userdata['user_level'] != ADMIN)
{
	message_die(GENERAL_MESSAGE, $lang['Not_admin']);
}

# 
#-----[ REPLACE WITH ]------------------------------------------ 
#
elseif (!jr_admin_secure(basename($HTTP_SERVER_VARS['REQUEST_URI'])))
{
	message_die(GENERAL_ERROR, $lang['Error_Module_ID'], '', __LINE__, __FILE__);	
}

# 
#-----[ OPEN ]------------------------------------------ 
# 
admin/index.php

# 
#-----[ FIND ]------------------------------------------ 
#
	$dir = @opendir(".");

	$setmodules = 1;
	while( $file = @readdir($dir) )
	{
		if( preg_match("/^admin_.*?\." . $phpEx . "$/", $file) )
		{
			include($file);
		}
	}

	@closedir($dir);

	unset($setmodules);

# 
#-----[ REPLACE WITH ]------------------------------------------ 
#
	$jr_admin_userdata = jr_admin_get_user_info($userdata['user_id']);
	$module = jr_admin_get_module_list($jr_admin_userdata['user_jr_admin']);

# 
#-----[ FIND ]------------------------------------------ 
#
	ksort($module);

	while( list($cat, $action_array) = each($module) )
	{
		$cat = ( !empty($lang[$cat]) ) ? $lang[$cat] : preg_replace("/_/", " ", $cat);

		$template->assign_block_vars("catrow", array(
			"ADMIN_CATEGORY" => $cat)
		);

		ksort($action_array);

		$row_count = 0;
		while( list($action, $file)	= each($action_array) )
		{
			$row_color = ( !($row_count%2) ) ? $theme['td_color1'] : $theme['td_color2'];
			$row_class = ( !($row_count%2) ) ? $theme['td_class1'] : $theme['td_class2'];

			$action = ( !empty($lang[$action]) ) ? $lang[$action] : preg_replace("/_/", " ", $action);

			$template->assign_block_vars("catrow.modulerow", array(
				"ROW_COLOR" => "#" . $row_color,
				"ROW_CLASS" => $row_class, 

				"ADMIN_MODULE" => $action,
				"U_ADMIN_MODULE" => append_sid($file))
			);
			$row_count++;
		}
	}

# 
#-----[ REPLACE WITH ]------------------------------------------ 
#
	jr_admin_make_left_pane();
	
# 
#-----[ FIND ]------------------------------------------ 
#
	else
	{
		$template->assign_vars(array(
			"L_NO_GUESTS_BROWSING" => $lang['No_users_browsing'])
		);
	}

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
	jr_admin_make_info_box();


Auszug dl-Mod:

Code: Alles auswählen

# Finde in includes/page_header.php
#########################

	'L_USERGROUPS' => $lang['Usergroups'], 

########################



# Füge danach ein:
########################

	'L_DOWNLOADS' => $lang['Downloads'], 

########################



# Finde in includes/page_header.php
#########################

	'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),

########################



# Füge danach ein:
########################

	'U_DOWNLOADS' => append_sid('downloads.'.$phpEx),

########################



# Finde in templates/SubSilver/overall_header.tpl
#########################

					<tr>
						<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_PROFILE}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a>&nbsp; &nbsp;<a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a>&nbsp; &nbsp;<a href="{U_LOGIN_LOGOUT}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" />{L_LOGIN_LOGOUT}</a>&nbsp;</span></td>
					</tr>

########################



# Füge danach ein:
########################

					<tr>
						<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_DOWNLOADS}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_d.gif" width="13" height="13" border="0" alt="{L_DOWNLOADS}" hspace="3" />{L_DOWNLOADS}</a>&nbsp;</span></td>
					</tr>

########################



# Finde in viewonline.php
#########################

				case PAGE_FAQ:
					$location = $lang['Viewing_FAQ'];
					$location_url = "faq.$phpEx";
					break;

########################



# Füge danach ein:
########################

				case PAGE_DOWNLOADS:
					$location = $lang['downloads'];
					$location_url = "downloads.$phpEx";
					break;

########################



# Finde in admin/index.php
#########################

						case PAGE_FAQ:
							$location = $lang['Viewing_FAQ'];
							$location_url = "index.$phpEx?pane=right";
							break;

########################



# Füge danach ein:
########################

						case PAGE_DOWNLOADS:
							$location = $lang['downloads'];
							$location_url = "downloads.$phpEx?pane=right";
							break;

########################



# Finde in admin/index.php
#########################

					case PAGE_FAQ:
						$location = $lang['Viewing_FAQ'];
						$location_url = "index.$phpEx?pane=right";
						break;

########################



# Füge danach ein:
########################

					case PAGE_DOWNLOADS:
						$location = $lang['downloads'];
						$location_url = "downloads.$phpEx?pane=right";
						break;

########################



# Finde in includes/constants.php
#########################

define('PAGE_GROUPCP', -11);

########################



# Füge danach ein:
########################

define('PAGE_DOWNLOADS', -12);

########################



# Finde in includes/constants.php
#########################

define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');

########################



# Füge danach ein:
########################

define('DOWNLOADS_TABLE',  $table_prefix.'downloads');
define('DL_CAT_TABLE',  $table_prefix.'downloads_cat');

########################



# Finde in templates/subSilver/subSilver.cfg
#########################

$images['voting_graphic'][4] = "$current_template_images/voting_bar.gif";

########################



# Füge danach ein:
########################

$images['Dl_grey'] = "$current_template_images/dl_grey.gif";
$images['Dl_red'] = "$current_template_images/dl_red.gif";
$images['Dl_green'] = "$current_template_images/dl_green.gif";
$images['Dl_yellow'] = "$current_template_images/dl_yellow.gif";

#####################
###


Auszug dl-Mod Update:

Code: Alles auswählen

#
#-----[ OPEN ]------------------------------------------
#
downloads.php

#
#-----[ FIND ]------------------------------------------
#
//
// Set page ID for session management
//
$userdata = session_pagestart($user_ip, PAGE_DOWNLOADS);
init_userprefs($userdata);
//
// End session management
//

#
#-----[ AFTER, ADD ]------------------------------------------
#
$cat = ( $HTTP_POST_VARS['cat'] ) ? $HTTP_POST_VARS['cat'] : $HTTP_GET_VARS['cat'];
$view = ( $HTTP_POST_VARS['view'] ) ? $HTTP_POST_VARS['view'] : $HTTP_GET_VARS['view'];
$id = ( $HTTP_POST_VARS['id'] ) ? $HTTP_POST_VARS['id'] : $HTTP_GET_VARS['id'];

#
#-----[ OPEN ]------------------------------------------
#
load.php

#
#-----[ FIND ]------------------------------------------
#
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_DOWNLOADS);
init_userprefs($userdata);
//
// End session management
//

#
#-----[ AFTER, ADD ]------------------------------------------
#
$id = ( $HTTP_POST_VARS['id'] ) ? $HTTP_POST_VARS['id'] : $HTTP_GET_VARS['id'];

#
#-----[ OPEN ]------------------------------------------
#
admin/admin_dl_cat.php

#
#-----[ FIND ]------------------------------------------
#
      $cat_name = ( isset($HTTP_POST_VARS['cat_name']) ) ? trim($HTTP_POST_VARS['cat_name']) : "";

#
#-----[ AFTER, ADD ]------------------------------------------
#
      $path = ( isset($HTTP_POST_VARS['path']) ) ? trim($HTTP_POST_VARS['path']) : "";

#
#-----[ OPEN ]------------------------------------------
#
admin/admin_dl_traffic_all_users.php

#
#-----[ FIND ]------------------------------------------
#
if ($x == "bytes") $traffic_bytes = $traffic;
if ($x == "kb") $traffic_bytes = bcmul($traffic,1024);
if ($x == "mb") $traffic_bytes = bcmul($traffic,1048576);

	//
	// Ok, the traffic has been modified and submitted, let's update
	//
	if( ( $mode == 'save' && isset( $HTTP_POST_VARS['submit'] ) ) )
	{

		$traffic = ( !empty($HTTP_POST_VARS['traffic']) ) ? trim(strip_tags( $HTTP_POST_VARS['traffic'] ) ) : '';
	}

#
#-----[ REPLACE WITH ]------------------------------------------
#
$traffic = ( !empty($HTTP_POST_VARS['traffic']) ) ? trim(strip_tags( $HTTP_POST_VARS['traffic'] ) ) : '';
$x = ( !empty($HTTP_POST_VARS['x']) ) ? trim(strip_tags( $HTTP_POST_VARS['x'] ) ) : '';
$function = ( !empty($HTTP_POST_VARS['function']) ) ? trim(strip_tags( $HTTP_POST_VARS['function'] ) ) : '';

if ($x == "bytes") $traffic_bytes = $traffic;
if ($x == "kb") $traffic_bytes = bcmul($traffic,1024);
if ($x == "mb") $traffic_bytes = bcmul($traffic,1048576);

#
#-----[ OPEN ]------------------------------------------
#
admin/admin_dl_traffic_single_user.php

#
#-----[ FIND ]------------------------------------------
#
	if ($x == "bytes") $traffic_bytes = $user_traffic;

#
#-----[ BEFORE, ADD ]------------------------------------------
#
	$x = ( !empty($HTTP_POST_VARS['x']) ) ? trim(strip_tags( $HTTP_POST_VARS['x'] ) ) : '';
	$function = ( !empty($HTTP_POST_VARS['function']) ) ? trim(strip_tags( $HTTP_POST_VARS['function'] ) ) : '';


#

Verfasst: 07.01.2005 15:39
von Inside0ut
*mal wieder hochstell*

Verfasst: 01.02.2005 21:31
von Jungpionier
hab das gleiche Problem :(

ist denn keiner bereit sich dem Thema mal anzunehmen.??

mfg