profilepic.php - modifiziert

Ermöglicht es dem Benutzer ein Bild in sein Profil einzufügen.

profilepic.php - modifiziert

Beitragvon ibuerfei » 26. Mai 2006 21:44

hallo,

haben die profilepic.php modifiziert, so dass profilepics die kleiner als das pop-up fenster sind zentriert werde.
eventuell könnt ihr das ja bei euch im nächsten release mit aufnehmen.

gruss ibuerfei

Code: Alles auswählen
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';

include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

if ( isset($HTTP_SERVER_VARS['HTTP_REFERER']) && isset($HTTP_SERVER_VARS['HTTP_HOST']) )
{
if( (!stristr($HTTP_SERVER_VARS['HTTP_REFERER'], $HTTP_SERVER_VARS['HTTP_HOST'])) )
{
  die('Not Authorised');
}
}

$user_id = ( isset($HTTP_GET_VARS['u']) ) ? md5(intval($HTTP_GET_VARS['u'])) : FALSE;
$full = ( isset($HTTP_GET_VARS['full']) ) ? TRUE : FALSE;

if ( $user_id )
{
$thumb = (!$full) ? ((is_file($phpbb_root_path.'images/userprofile_pics/thumbnails/'.$user_id.'.jpeg')) ? $phpbb_root_path.'images/userprofile_pics/thumbnails/'.$user_id.'.jpeg' : '') : '';
$pic = (is_file($phpbb_root_path.'images/userprofile_pics/'.$user_id.'.jpeg')) ? $phpbb_root_path.'images/userprofile_pics/'.$user_id.'.jpeg' : '';
$image = ( $thumb ) ? $thumb : (( $pic ) ? $pic : $phpbb_root_path.'images/no_profilepic.jpeg');

header("Pragma: no-cache");
if ( $thumb ) {
  header('Content-type: image/jpeg');
  readfile($image);
} else {
  if ( $full ) {
   header('Content-type: text/html');
   print "<body><table width=100% height=100%><tr width=100% height=100%><td width=100% height=100%><center><img src=$image  align=middle ></center></td></tr></table></body>";
  } else {
   header('Content-type: image/jpeg');
   readfile($image);
  }
}
exit;
} else {
message_die(GENERAL_MESSAGE, 'No pic specified');
}
?>
ibuerfei
 
Beiträge: 12
Registriert: 29. Apr 2006 13:55

Beitragvon AmigaLink » 26. Mai 2006 22:10

Garnicht schlecht die Idee. 8)
Danke dir.
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen. Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.
Benutzeravatar
AmigaLink
Administrator
 
Beiträge: 3987
Registriert: 11. Aug 2004 01:06
Wohnort: NRW


Zurück zu Userpic in Profile



Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 9 Gäste

cron