Creating a new tpl and php

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
Hakan85
Registered User
Posts: 2
Joined: Fri Mar 04, 2005 8:49 pm

Creating a new tpl and php

Post by Hakan85 »

Hi everybody,

I have create a new tpl and php for avatar panel and it doesn't work.
www.turksnlforum.com/plus/plus/profile_avatar.php

i create profile_avatar.php and profile_avatar.tpl

code for profile_avatar.php

Code: Select all

<?php
/***************************************************************************
 *                             Kontakt Formular von Carsten Schäfer
 *                          ------------------------
 *   Version              : Version 1.00 - 26.04.2003
 *   copyright            : (C) 2003 Carsten Schäfer
 *   email			      : [email protected]
 *
 *   $Id: kontakt.php,v 1.00 2003/04/26 Carsten Schäfer $
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   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.
 *
 ***************************************************************************/

define('IN_PHPBB', true);

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

$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);

$page_title = $lang['Avatar Paneel'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);


$template->set_filenames(array(
'body' => 'profile_avatar.tpl')
);

$template->pparse('body');

$template->assign_vars(array( 
"VAR" => $lang['LANG_ENTRY'] 
));

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
code for profile_avatar.tpl

Code: Select all

<form action="{S_PROFILE_ACTION}" {S_FORM_ENCTYPE} method="post">
<table width="100%" cellspacing="2" cellpadding="3" border="0">
<tr>
	<td class="maintitle">{L_PROFILE_INFO}</td>
</tr>
<tr>
<td class="nav"><a href="{U_INDEX}">{L_INDEX}</a> &raquo; {L_PROFILE_INFO}</td>
</tr>
</table>
{ERROR_BOX}
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="forumline">
<tr>
<th colspan="2">{L_AVATAR_PANEL}</th>
</tr>
<tr>
<td class="row1" colspan="2">
<table width="70%" cellspacing="2" cellpadding="0" border="0" align="center">
<tr>
<td width="65%" class="gensmall">{L_AVATAR_EXPLAIN}</td>
<td align="center" class="gensmall">{L_CURRENT_IMAGE}<br />
{AVATAR}<br />
<input type="checkbox" name="avatardel" />
&nbsp;{L_DELETE_AVATAR}</td>
</tr>
</table>
</td>
</tr>
<!-- BEGIN switch_avatar_local_upload -->
<tr>
<td class="row1"><span class="explaintitle">{L_UPLOAD_AVATAR_FILE}:</span></td>
<td class="row2">
<input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}" />
<input type="file" name="avatar" class="post" style="width:200px" />
</td>
</tr>
<!-- END switch_avatar_local_upload -->
<!-- BEGIN switch_avatar_remote_upload -->
<tr>
<td class="row1"><span class="explaintitle">{L_UPLOAD_AVATAR_URL}</span>:<br />
<span class="gensmall">{L_UPLOAD_AVATAR_URL_EXPLAIN}</span></td>
<td class="row2">
<input type="text" name="avatarurl" size="40" class="post" style="width:200px" />
</td>
</tr>
<!-- END switch_avatar_remote_upload -->
<!-- BEGIN switch_avatar_remote_link -->
<tr>
<td class="row1"><span class="explaintitle">{L_LINK_REMOTE_AVATAR}:</span><br />
<span class="gensmall">{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></td>
<td class="row2">
<input type="text" name="avatarremoteurl" size="40" class="post" style="width:200px" />
</td>
</tr>
<!-- END switch_avatar_remote_link -->
<!-- BEGIN switch_avatar_local_gallery -->
<tr>
<td class="row1"><span class="explaintitle">{L_AVATAR_GALLERY}:</span></td>
<td class="row2">
<input type="submit" name="avatargallery" value="{L_SHOW_GALLERY}" class="button" />
</td>
</tr>
<!-- END switch_avatar_local_gallery -->
<!-- END switch_avatar_block -->
<tr>
<td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS} 
<input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" />
&nbsp;&nbsp; 
<input type="reset" value="{L_RESET}" name="reset" class="button" />
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<table width="100%" cellspacing="2" cellpadding="3" border="0">
<tr>
<td class="nav"><a href="{U_INDEX}">{L_INDEX}</a> &raquo; {L_PROFILE_INFO}</td>
</tr>
</table>
</form>
Can you help me to work for this avatar panel?

(sorry for bad english)

Hakan
tOnk3r
Registered User
Posts: 427
Joined: Fri Aug 13, 2004 1:00 am
Location: London
Contact:

Post by tOnk3r »

What exactly do you mean it dosnt work?

What is it supposed to do?
What does it actually do?
Hakan85
Registered User
Posts: 2
Joined: Fri Mar 04, 2005 8:49 pm

Post by Hakan85 »

tOnk3r wrote: What exactly do you mean it dosnt work?

What is it supposed to do?
What does it actually do?


it will not work
can't upload avatar
Submit button doesn't work
look www.turksnlforum.com/plus/plus/profile_avatar.php
Locked

Return to “2.0.x Support Forum”