[Problem] mit Page Generation Time MOD

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
Thoman
Mitglied
Beiträge: 303
Registriert: 26.12.2002 16:21
Kontaktdaten:

[Problem] mit Page Generation Time MOD

Beitrag von Thoman »

hi

ich benutze die phpbbplus 2.05 mit 1.12 denke ist weniger auschlaggebend
vielmehr ist mein problem das ich den obengennten mod eingebaut habe

Code: Alles auswählen

Hack revision: 2.0.0 
File Size: 5 Kb 
phpBB Version: 2.0.4 
Author: Smartor 
Downloads: 1574 
Average Rating: 8 / 10 
Added: 2002-07-02 08:59:52 
Last Update: April 3, 2003 
soweit wird auch alles angezeigt nur der link für den super mod ist nicht mehr sichtbar weder für den admin noch selbst für den supermod.

denke das problem liegt in der includes/page_tail.php kopiere ich die originale wieder rein gehts nehme ich die aus dem hack gehts nicht.

original page_tail.php

Code: Alles auswählen

<?php
/***************************************************************************
 *                              page_tail.php
 *                            -------------------
 *   begin                : Saturday, Feb 13, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : support@phpbb.com
 *
 *   $Id: page_tail.php,v 1.27.2.2 2002/11/26 11:42:12 psotfx Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

if ( !defined('IN_PHPBB') )
{
	die('Hacking attempt');
}

//
// Show the overall footer.
//
if ( $userdata['user_level'] == ADMIN ) 
{ 
        $admin_link = '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><a href="super_mod/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Super_Mod_panel'] . '</a><br /><br />'; 
} 
else if ( $userdata['user_level'] == LESS_ADMIN ) 
{ 
        $admin_link = '<a href="super_mod/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Super_Mod_panel'] . '</a><br /><br />'; 
}
$template->set_filenames(array(
	'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl')
);

$template->assign_vars(array(
	'PHPBB_VERSION' => '2' . $board_config['version'],
	'PLUS_VERSION' => $board_config['plus_version'],
	'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '', 
	'ADMIN_LINK' => $admin_link)
);

$template->pparse('overall_footer');

//
// Close our DB connection.
//
$db->sql_close();

//
// Compress buffered output if required and send to browser
//
if ( $do_gzip_compress )
{
	//
	// Borrowed from php.net!
	//
	$gzip_contents = ob_get_contents();
	ob_end_clean();

	$gzip_size = strlen($gzip_contents);
	$gzip_crc = crc32($gzip_contents);

	$gzip_contents = gzcompress($gzip_contents, 9);
	$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);

	echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
	echo $gzip_contents;
	echo pack('V', $gzip_crc);
	echo pack('V', $gzip_size);
}
exit;

?>
und hier die vom generation mod

Code: Alles auswählen

<?php
/***************************************************************************
 *                              page_tail.php
 *                            -------------------
 *   begin                : Saturday, Feb 13, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : support@phpbb.com
 *
 *   $Id: page_tail.php,v 1.27.2.2 2002/11/26 11:42:12 psotfx Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

if ( !defined('IN_PHPBB') )
{
	die('Hacking attempt');
}

//
// Show the overall footer.
//

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

$template->set_filenames(array(
	'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl')
);

$template->assign_vars(array(
	'PHPBB_VERSION' => '2' . $board_config['version'],
	'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '',
	'ADMIN_LINK' => $admin_link)
);

$template->pparse('overall_footer');

//
// Close our DB connection.
//
$db->sql_close();

//
// Compress buffered output if required and send to browser
//
if ( $do_gzip_compress )
{
	//
	// Borrowed from php.net!
	//
	$gzip_contents = ob_get_contents();
	ob_end_clean();

	$gzip_size = strlen($gzip_contents);
	$gzip_crc = crc32($gzip_contents);

	$gzip_contents = gzcompress($gzip_contents, 9);
	$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);

	echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
	echo $gzip_contents;
	echo pack('V', $gzip_crc);
	echo pack('V', $gzip_size);
}


/* Un-comment the line below to restrict Admins only to view page generation info */

//if( ($userdata['session_logged_in']) and ($userdata['user_level'] == ADMIN) )
{
	$gzip_text = ($board_config['gzip_compress']) ? 'GZIP enabled' : 'GZIP disabled';

	$debug_text = (DEBUG == 1) ? 'Debug on' : 'Debug off';

	$excuted_queries = $db->num_queries;

	$mtime = microtime();
	$mtime = explode(" ",$mtime);
	$mtime = $mtime[1] + $mtime[0];
	$endtime = $mtime;

	$gentime = round(($endtime - $starttime), 4);

	$sql_time = round($db->sql_time, 4);

	$sql_part = round($sql_time / $gentime * 100);
	$php_part = 100 - $sql_part;

	echo '<br /><div style="font-family: Verdana; font-size: 10px; color: #000000; letter-spacing: -1px" align="center">Page generation time: '. $gentime .'s (PHP: '. $php_part .'% - SQL: '. $sql_part .'%) - SQL queries: '. $excuted_queries .' - '. $gzip_text .' - '. $debug_text .'</div>';
}
exit;
?>
denke das problem wird jeweils im letzten teil der jeweiligen datei liegen oder ?
Benutzeravatar
Chaze
Ehemaliges Teammitglied
Beiträge: 2035
Registriert: 31.01.2003 12:20
Wohnort: Hannover

Beitrag von Chaze »

Ersetze in der 'neuen' page_tail.php

Code: Alles auswählen

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

durch

Code: Alles auswählen

if ( $userdata['user_level'] == ADMIN ) 
{ 
        $admin_link = '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><a href="super_mod/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Super_Mod_panel'] . '</a><br /><br />'; 
} 
else if ( $userdata['user_level'] == LESS_ADMIN ) 
{ 
        $admin_link = '<a href="super_mod/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Super_Mod_panel'] . '</a><br /><br />'; 
}
by[t]e,
Chaze
!!!--> Kein Support per PN oder Mail <--!!!
Thoman
Mitglied
Beiträge: 303
Registriert: 26.12.2002 16:21
Kontaktdaten:

Beitrag von Thoman »

danke funktioniert :)

das problem:

seit der änderung geht mein countdown nicht mehr :)

http://www.ssmf.net ganz unten
woran kann das schon wieder liegen oder gibt es mittlerweile ein countdown der zum bestimmten datum die tage stunden und minuten zählt ?
Benutzeravatar
Chaze
Ehemaliges Teammitglied
Beiträge: 2035
Registriert: 31.01.2003 12:20
Wohnort: Hannover

Beitrag von Chaze »

Poste doch bitte mal die URL zu dem Countdown-Mod den Du eingebaut hast.
by[t]e,
Chaze
!!!--> Kein Support per PN oder Mail <--!!!
Thoman
Mitglied
Beiträge: 303
Registriert: 26.12.2002 16:21
Kontaktdaten:

Beitrag von Thoman »

hallo...

hier der countdown sehe grad verkehrt abgespeichert einfach den quelltext anschauen. :-?

den habe ich zb. eingefügt in der index_body.tpl und in der portal_body.tpl
vielleicht war es auch verkehrt ?

hier das textfile des pageloading mods

auf URL1 countdown funktioniert kein pageloading mod verbaut.

auf URL2 countdown geht nicht nach einbau des pageloading mod´s

werde aber noch was versuchen evtl liegts auch am page generation mod
deshalb nachher mal den mod still legen bei der 2.url
Thoman
Mitglied
Beiträge: 303
Registriert: 26.12.2002 16:21
Kontaktdaten:

Beitrag von Thoman »

so es liegt an der overall_header.tpl

wenn ich den pageloading mod einbaue wird der countdown nicht angezeigt den ich unten "seitenende" habe.

habe nach und nach den mod verbaut umd immer hat es funktioniert bis zum eintrag in der der oben besgaten datei da heisst es zb.

Code: Alles auswählen

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl

#
#-----[ FIND ]------------------------------------------
#
</head>

#
#-----[ BEFORE, ADD ]-----------------------------------
#
<script language="JavaScript" type="text/javascript">
<!--
function hideLoadingPage() {
	if (document.getElementById) {  // DOM3 = IE5, NS6
		document.getElementById('hidepage').style.visibility = 'hidden';
	}
	else {
		if (document.layers) {  // Netscape 4
			document.hidepage.visibility = 'hidden';
		}
		else {  // IE 4
			document.all.hidepage.style.visibility = 'hidden';
		}
	}
}
//  End -->
</script>


#
#-----[ FIND ]------------------------------------------
#
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}" />

#
#-----[ REPLACE WITH ]----------------------------------
#
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}" onload="hideLoadingPage()" />

<div id="hidepage" style="position: absolute; left:0px; top:0px; background-color: {T_BODY_BGCOLOR}; layer-background-color: {T_BODY_BGCOLOR}; height: 100%; width: 100%;">
<table width="100%" height="100%">
<tr>
<td align="center" valign="middle">
<table width="50%" align="center" style="border: 1 {T_BODY_LINK} solid">
<tr>
<td align="center" class="row1"><span class="genmed"><br /><b>{L_PAGE_LOADING_WAIT}</b><br /><br /><img src="images/loading.gif"><br /><br />{L_PAGE_LOADING_STOP}<br />&nbsp;</span></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
da ich kein subsilver template nutze sondern fisubsilver aber den besagten eintrag nicht in der tpl habe , habe ich es einfach zum probieren hinzugefügt.

hier mal die original overall_header der fisubliver:

Code: Alles auswählen

<?xml version="1.0" encoding="{S_CONTENT_ENCODING}"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="Content-Style-Type" content="text/css" />
{META}
{NAV_LINKS}
<title>{SITENAME} :: {PAGE_TITLE}</title>
<link rel="stylesheet" href="templates/fisubsilver/{T_HEAD_STYLESHEET}" type="text/css" />
<script type="text/javascript" src="templates/rollout.js"></script>
<!-- BEGIN switch_enable_pm_popup -->
<script type="text/javascript">
<!--
	if ( {PRIVATE_MESSAGE_NEW_FLAG} )
	{
		window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
	}
//-->
</script>
<!-- END switch_enable_pm_popup -->
{GREETING_POPUP}
</head>
<body>
<CENTER>{BANNER_2_IMG}{BANNER_3_IMG}{BANNER_4_IMG}{BANNER_5_IMG}{BANNER_6_IMG}</CENTER>
<a name="top" id="top"></a>
<table class="bodyline" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td valign="top">
<table class="topbkg" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr> 
<td><a href="{U_INDEX}"><img src="templates/fisubsilver/images/phpbb2_logo.jpg" border="0" alt="{L_INDEX}" title="{L_INDEX}" width="240" height="110" /></a></td>
<td align="right" width="100%">{BANNER_1_IMG}</td><td><img src="templates/fisubsilver/images/spacer.gif" width="100"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="center" class="topnav">&nbsp; <a href="{U_SEARCH}">{L_SEARCH}</a>&nbsp;• 
<!-- BEGIN switch_memberlist_on -->
&nbsp;<a href="{U_MEMBERLIST}">{L_MEMBERLIST}</a>&nbsp; • 
<!-- END switch_memberlist_on -->
&nbsp;<a href="{U_STATISTICS}">{L_STATISTICS}</a>&nbsp; • 
&nbsp;<a href="{U_ALBUM}">{L_ALBUM}</a>&nbsp; •
&nbsp;<a href="{U_LINKS}">{L_LINKS}</a>&nbsp; • 
&nbsp;<a href="{U_CALENDAR}">{L_CALENDAR}</a>&nbsp; • 
&nbsp;<a href="{U_PORTAL}">{L_HOME}</a>&nbsp; • 
&nbsp;<a href="{U_RECENT}">{L_RECENT}</a><br />
&nbsp;<a href="{U_GROUP_CP}">{L_USERGROUPS}</a>&nbsp; •
<!-- BEGIN switch_user_logged_out -->
&nbsp;<a href="{U_REGISTER}">{L_REGISTER}</a>&nbsp; •
<!-- END switch_user_logged_out -->
&nbsp;<a href="{U_FAQ}">{L_FAQ}</a>&nbsp; • &nbsp;<a href="{U_PROFILE}">{L_PROFILE}</a>&nbsp; • &nbsp;<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>&nbsp; 
• &nbsp;<a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td>
kann ich den code von der pageloading da nicht einfach reinkopieren ?
wie sonst soll man den pageloading verbauen wenn der zu änderene code nicht in der overall_header zu finden ist ?
Antworten

Zurück zu „phpBB 2.0: Mod Support“