Seite 2 von 2

Re: Bild erstelen + MySQL

Verfasst: 23.08.2010 18:43
von Dr.Death
Stelle die Dateien mal bitte zum Download bereit. Irgenwo in Deinen Scripts gibt's ein Griff ins Klo... :wink:

Re: Bild erstelen + MySQL

Verfasst: 23.08.2010 20:13
von mojito
aber das script steht doch schon oben

wie häufig soll ich das ncoh posten?

na gut hier mal alle datein:

area.php:

Code: Alles auswählen

<?php
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup(array('memberlist', 'groups'));

// Grab data
$area = request_var('area', '');

$page_title = '"Meine Ecke"';
$template_html = 'area_body.html';

// Start output of page
page_header($page_title);

$template->set_filenames(array(
	'body' => 'area_body.html')
);

page_footer();
?>
area_body.html

Code: Alles auswählen

<!-- IF S_IN_SEARCH_POPUP -->
	<!-- INCLUDE simple_header.html -->
<!-- ELSE -->
	<!-- INCLUDE overall_header.html -->
<!-- ENDIF -->

<img src='../../../images/area/area.php'/>

<!-- IF S_IN_SEARCH_POPUP -->
	<!-- INCLUDE simple_footer.html -->	
<!-- ELSE -->
<br clear="all" />
	
	<!-- INCLUDE breadcrumbs.html -->
	
	<br clear="all" />
	
	<div align="{S_CONTENT_FLOW_END}"><!-- INCLUDE jumpbox.html --></div>
	<br clear="all" />
	<!-- INCLUDE overall_footer.html -->
<!-- ENDIF -->
/images/area/area.php

Code: Alles auswählen

<?php
/*
 * @ignore 
*/ 
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

$user->session_begin(false);
$auth->acl($user->data);
$user->setup();

			
$img = imagecreatetruecolor(500, 544);
 
$bild = imagecreatefrompng("area.png");
 
imagecopy($img, $bild, 0,0,0,0,imagesx($bild),imagesy($bild));

// Ausgabe des Bildes
//Send the image to the browser
header("Content-type: image/png");
@imagepng($img);
exit;
?> 
wie aber schon erklärt sind die ersten beiden datein fehlerfrei, da es mit anderen bildern hervorragend funktioniert.

und wie ich es auch schon dutzende mal gesagt habe, funktioniert bei geringen änderungen der 3. datei (also der phpbb-kram raus und der header anch ganz oben die datei ohne probleme.

aber halt das phpbb-kram läuft hier einfach nciht.

Re: Bild erstelen + MySQL

Verfasst: 24.08.2010 07:17
von Dr.Death
Moin,

Deine ganzen relativen Pfadangaben passen ja auch nicht zusammen ;-)

1. Die Datei area.php im Forums Root ist ok.
2. Die Datei /images/area/area.php hat zwei Fehler: ( Ich gehe davon aus, das das Bild area.png auch im Foren Root liegt )

Code: Alles auswählen

$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../../';

$bild = imagecreatefrompng("../../area.png");
3. Die Datei /styles/prosilver/template/area_body.html

Code: Alles auswählen

<img src='images/area/area.php'/>
Mit diesen Änderungen funktioniert das Lokal bei mir....

Re: Bild erstelen + MySQL

Verfasst: 24.08.2010 13:38
von mojito
die area.png liegt aber nciht im root-ordner. sagte cih aber auch schon dutzende male. die liegt ebenfalls im /images/area/

naja, mit der änderung des phpbb-root-path läuft das ganze wenigstens....

Re: Bild erstelen + MySQL

Verfasst: 24.08.2010 13:49
von Dr.Death
hm, da bin ich wohl über die doppelte Namensbezeichnug gestolpert ;-)

Hauptsache es funktioniert nun.