mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Preliminary avatar gallery support
git-svn-id: file:///svn/phpbb/trunk@1173 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
e2c755710f
commit
dd2033ace0
13 changed files with 741 additions and 411 deletions
|
@ -153,6 +153,7 @@ $template->assign_vars(array(
|
|||
"AVATAR_MAX_HEIGHT" => $new['avatar_max_height'],
|
||||
"AVATAR_MAX_WIDTH" => $new['avatar_max_width'],
|
||||
"AVATAR_PATH" => $new['avatar_path'],
|
||||
"AVATAR_GALLERY_PATH" => $new['avatar_gallery_path'],
|
||||
"SMILIES_PATH" => $new['smilies_path'],
|
||||
"INBOX_PRIVMSGS" => $new['max_inbox_privmsgs'],
|
||||
"SENTBOX_PRIVMSGS" => $new['max_sentbox_privmsgs'],
|
||||
|
|
|
@ -34,6 +34,8 @@ if($setmodules == 1)
|
|||
$phpbb_root_path = "./../";
|
||||
include($phpbb_root_path . 'extension.inc');
|
||||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/post.'.$phpEx);
|
||||
|
||||
|
||||
//
|
||||
|
@ -138,45 +140,46 @@ if ( isset($HTTP_GET_VARS['submit']) ) {
|
|||
//
|
||||
// Let's find out a little about them...
|
||||
//
|
||||
$userdata = get_userdata_from_id($HTTP_GET_VARS[POST_USERS_URL]);
|
||||
$this_userdata = get_userdata_from_id($HTTP_GET_VARS[POST_USERS_URL]);
|
||||
|
||||
//
|
||||
// Now parse and display it as a template
|
||||
//
|
||||
$user_id = $userdata['user_id'];
|
||||
$username = $userdata['username'];
|
||||
$email = $userdata['user_email'];
|
||||
$user_id = $this_userdata['user_id'];
|
||||
$username = $this_userdata['username'];
|
||||
$email = $this_userdata['user_email'];
|
||||
$password = "";
|
||||
$password_confirm = "";
|
||||
|
||||
$icq = $userdata['user_icq'];
|
||||
$aim = $userdata['user_aim'];
|
||||
$msn = $userdata['user_msnm'];
|
||||
$yim = $userdata['user_yim'];
|
||||
$icq = $this_userdata['user_icq'];
|
||||
$aim = $this_userdata['user_aim'];
|
||||
$msn = $this_userdata['user_msnm'];
|
||||
$yim = $this_userdata['user_yim'];
|
||||
|
||||
$website = $userdata['user_website'];
|
||||
$location = $userdata['user_from'];
|
||||
$occupation = $userdata['user_occ'];
|
||||
$interests = $userdata['user_interests'];
|
||||
$signature = $userdata['user_sig'];
|
||||
$website = $this_userdata['user_website'];
|
||||
$location = $this_userdata['user_from'];
|
||||
$occupation = $this_userdata['user_occ'];
|
||||
$interests = $this_userdata['user_interests'];
|
||||
$signature = $this_userdata['user_sig'];
|
||||
|
||||
$viewemail = $userdata['user_viewemail'];
|
||||
$notifypm = $userdata['user_notify_pm'];
|
||||
$attachsig = $userdata['user_attachsig'];
|
||||
$allowhtml = $userdata['user_allowhtml'];
|
||||
$allowbbcode = $userdata['user_allowbbcode'];
|
||||
$allowsmilies = $userdata['user_allowsmile'];
|
||||
$allowviewonline = $userdata['user_allow_viewonline'];
|
||||
$viewemail = $this_userdata['user_viewemail'];
|
||||
$notifypm = $this_userdata['user_notify_pm'];
|
||||
$attachsig = $this_userdata['user_attachsig'];
|
||||
$allowhtml = $this_userdata['user_allowhtml'];
|
||||
$allowbbcode = $this_userdata['user_allowbbcode'];
|
||||
$allowsmilies = $this_userdata['user_allowsmile'];
|
||||
$allowviewonline = $this_userdata['user_allow_viewonline'];
|
||||
|
||||
$user_avatar = $userdata['user_avatar'];
|
||||
$user_style = $userdata['user_style'];
|
||||
$user_lang = $userdata['user_lang'];
|
||||
$user_timezone = $userdata['user_timezone'];
|
||||
$user_dateformat = $userdata['user_dateformat'];
|
||||
$user_avatar = $this_userdata['user_avatar'];
|
||||
$user_avatar_type = $this_userdata['user_avatar_type'];
|
||||
$user_style = $this_userdata['user_style'];
|
||||
$user_lang = $this_userdata['user_lang'];
|
||||
$user_timezone = $this_userdata['user_timezone'];
|
||||
$user_dateformat = $this_userdata['user_dateformat'];
|
||||
|
||||
$user_status = $userdata['user_active'];
|
||||
$user_allowavatar = $userdata['user_allowavatar'];
|
||||
$user_allowpm = $userdata['user_allow_pm'];
|
||||
$user_status = $this_userdata['user_active'];
|
||||
$user_allowavatar = $this_userdata['user_allowavatar'];
|
||||
$user_allowpm = $this_userdata['user_allow_pm'];
|
||||
|
||||
$COPPA = false;
|
||||
|
||||
|
@ -185,18 +188,30 @@ if ( isset($HTTP_GET_VARS['submit']) ) {
|
|||
$smilies_status = ($board_config['allow_smilies']) ? $lang['ON'] : $lang['OFF'];
|
||||
|
||||
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" />';
|
||||
$s_hidden_fields .= '<input type="hidden" name="user_id" value="' . $userdata['user_id'] . '" />';
|
||||
$s_hidden_fields .= '<input type="hidden" name="user_id" value="' . $this_userdata['user_id'] . '" />';
|
||||
|
||||
if( $user_avatar != "" )
|
||||
if( $user_avatar_type )
|
||||
{
|
||||
$avatar = (strstr($user_avatar, 'http') && $board_config['allow_avatar_remote']) ? "<br /><img src=\"" . $user_avatar . "\"><br />" : "<br /><img src=\"../" . $board_config['avatar_path'] . "/" . $user_avatar . "\" alt=\"\" /><br />";
|
||||
$s_hidden_fields .= '<input type="hidden" name="user_avatar" value="' . $user_avatar . '" />';
|
||||
switch( $user_avatar_type )
|
||||
{
|
||||
case USER_AVATAR_UPLOAD:
|
||||
$avatar = "<img src=\"" . $board_config['avatar_path'] . "/" . $user_avatar . "\" alt=\"\" />";
|
||||
break;
|
||||
case USER_AVATAR_REMOTE:
|
||||
$avatar = "<img src=\"$user_avatar\" alt=\"\" />";
|
||||
break;
|
||||
case USER_AVATAR_GALLERY:
|
||||
$avatar = "<img src=\"" . $board_config['avatar_gallery_path'] . "/" . $user_avatar . "\" alt=\"\" />";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$avatar = "";
|
||||
}
|
||||
|
||||
$signature = preg_replace("/\:[0-9a-z\:]*?\]/si", "]", $signature);
|
||||
|
||||
$template->set_filenames(array(
|
||||
"body" => "admin/user_edit_body.tpl")
|
||||
);
|
||||
|
@ -333,26 +348,24 @@ else if($HTTP_POST_VARS[submit] && $HTTP_POST_VARS['user_id'])
|
|||
|
||||
validate_optional_fields($icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature);
|
||||
|
||||
$viewemail = (isset($HTTP_POST_VARS['viewemail'])) ? $HTTP_POST_VARS['viewemail'] : 0;
|
||||
$viewemail = (isset($HTTP_POST_VARS['viewemail'])) ? intval($HTTP_POST_VARS['viewemail']) : 0;
|
||||
$allowviewonline = (isset($HTTP_POST_VARS['hideonline'])) ? ( ($HTTP_POST_VARS['hideonline']) ? 0 : 1 ) : 1;
|
||||
$notifypm = (isset($HTTP_POST_VARS['notifypm'])) ? $HTTP_POST_VARS['notifypm'] : 1;
|
||||
$attachsig = (isset($HTTP_POST_VARS['attachsig'])) ? $HTTP_POST_VARS['attachsig'] : 0;
|
||||
$notifypm = (isset($HTTP_POST_VARS['notifypm'])) ? intval($HTTP_POST_VARS['notifypm']) : 1;
|
||||
$attachsig = (isset($HTTP_POST_VARS['attachsig'])) ? intval($HTTP_POST_VARS['attachsig']) : 0;
|
||||
|
||||
$allowhtml = (isset($HTTP_POST_VARS['allowhtml'])) ? $HTTP_POST_VARS['allowhtml'] : $board_config['allow_html'];
|
||||
$allowbbcode = (isset($HTTP_POST_VARS['allowbbcode'])) ? $HTTP_POST_VARS['allowbbcode'] : $board_config['allow_bbcode'];
|
||||
$allowsmilies = (isset($HTTP_POST_VARS['allowsmilies'])) ? $HTTP_POST_VARS['allowsmilies'] : $board_config['allow_smilies'];
|
||||
$allowhtml = (isset($HTTP_POST_VARS['allowhtml'])) ? intval($HTTP_POST_VARS['allowhtml']) : $board_config['allow_html'];
|
||||
$allowbbcode = (isset($HTTP_POST_VARS['allowbbcode'])) ? intval($HTTP_POST_VARS['allowbbcode']) : $board_config['allow_bbcode'];
|
||||
$allowsmilies = (isset($HTTP_POST_VARS['allowsmilies'])) ? intval($HTTP_POST_VARS['allowsmilies']) : $board_config['allow_smilies'];
|
||||
|
||||
$user_style = ($HTTP_POST_VARS['style']) ? $HTTP_POST_VARS['style'] : $board_config['default_style'];
|
||||
$user_style = ($HTTP_POST_VARS['style']) ? intval($HTTP_POST_VARS['style']) : $board_config['default_style'];
|
||||
$user_lang = ($HTTP_POST_VARS['language']) ? $HTTP_POST_VARS['language'] : $board_config['default_lang'];
|
||||
$user_timezone = (isset($HTTP_POST_VARS['timezone'])) ? $HTTP_POST_VARS['timezone'] : $board_config['board_timezone'];
|
||||
$user_timezone = (isset($HTTP_POST_VARS['timezone'])) ? doubleval($HTTP_POST_VARS['timezone']) : $board_config['board_timezone'];
|
||||
$user_template = ($HTTP_POST_VARS['template']) ? $HTTP_POST_VARS['template'] : $board_config['board_template'];
|
||||
$user_dateformat = ($HTTP_POST_VARS['dateformat']) ? trim($HTTP_POST_VARS['dateformat']) : $board_config['default_dateformat'];
|
||||
|
||||
$user_avatar = ( isset($HTTP_POST_VARS['user_avatar']) ) ? $HTTP_POST_VARS['user_avatar'] : "";
|
||||
|
||||
$user_status = (!empty($HTTP_POST_VARS['user_status'])) ? $HTTP_POST_VARS['user_status'] : 0;
|
||||
$user_allowpm = (!empty($HTTP_POST_VARS['user_allowpm'])) ? $HTTP_POST_VARS['usr_allowpm'] : 0;
|
||||
$user_allowavatar = (!empty($HTTP_POST_VARS['usr_allowavatar'])) ? $HTTP_POST_VARS['user_allowavatar'] : 0;
|
||||
$user_status = (!empty($HTTP_POST_VARS['user_status'])) ? intval($HTTP_POST_VARS['user_status']) : 0;
|
||||
$user_allowpm = (!empty($HTTP_POST_VARS['user_allowpm'])) ? intval($HTTP_POST_VARS['user_allowpm']) : 0;
|
||||
$user_allowavatar = (!empty($HTTP_POST_VARS['usr_allowavatar'])) ? intval($HTTP_POST_VARS['user_allowavatar']) : 0;
|
||||
|
||||
if(isset($HTTP_POST_VARS['submit']))
|
||||
{
|
||||
|
@ -379,17 +392,40 @@ else if($HTTP_POST_VARS[submit] && $HTTP_POST_VARS['user_id'])
|
|||
$error = TRUE;
|
||||
$error_msg = $lang['Password_mismatch'];
|
||||
}
|
||||
else if(!$password && $password_confirm)
|
||||
{
|
||||
$error = TRUE;
|
||||
$error_msg = $lang['Password_mismatch'];
|
||||
}
|
||||
|
||||
if( $signature != "" )
|
||||
{
|
||||
if( strlen($signature) > $board_config['max_sig_chars'] )
|
||||
{
|
||||
$error = TRUE;
|
||||
if(isset($error_msg))
|
||||
{
|
||||
$error_msg .= "<br />";
|
||||
}
|
||||
$error_msg .= $lang['Signature_too_long'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$signature_bbcode_uid = ( $allowbbcode ) ? make_bbcode_uid() : "";
|
||||
$signature = prepare_message($signature, $allowhtml, $allowbbcode, $allowsmilies, $signature_bbcode_uid);
|
||||
}
|
||||
}
|
||||
|
||||
if( isset($HTTP_POST_VARS['avatardel']) )
|
||||
{
|
||||
if( !eregi("http", $user_avatar) )
|
||||
if( $user_avatar_type == USER_AVATAR_UPLOAD )
|
||||
{
|
||||
if(file_exists("./../" . $board_config['avatar_path'] . "/" . $user_avatar))
|
||||
if( file_exists("./../" . $board_config['avatar_path'] . "/" . $user_avatar) )
|
||||
{
|
||||
@unlink("./../" . $board_config['avatar_path'] . "/" . $user_avatar);
|
||||
}
|
||||
}
|
||||
$avatar_sql = ", user_avatar = ''";
|
||||
$avatar_sql = ", user_avatar = '', user_avatar_type = " . USER_AVATAR_NONE;
|
||||
}
|
||||
|
||||
if(!$error)
|
||||
|
@ -457,8 +493,8 @@ else if($HTTP_POST_VARS[submit] && $HTTP_POST_VARS['user_id'])
|
|||
}
|
||||
else
|
||||
{
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET " . $username_sql . $passwd_sql . "user_email = '$email', user_icq = '$icq', user_website = '$website', user_occ = '$occupation', user_from = '$location', user_interests = '$interests', user_sig = '$signature', user_viewemail = $viewemail, user_aim = '$aim', user_yim = '$yim', user_msnm = '$msn', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_allow_pm = $user_allowpm user_notify_pm = $notifypm, user_lang = '$user_lang', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '$user_dateformat', user_active = $user_status, user_actkey = '$user_actkey'" . $avatar_sql . "
|
||||
echo $sql = "UPDATE " . USERS_TABLE . "
|
||||
SET " . $username_sql . $passwd_sql . "user_email = '$email', user_icq = '$icq', user_website = '$website', user_occ = '$occupation', user_from = '$location', user_interests = '$interests', user_sig = '$signature', user_viewemail = $viewemail, user_aim = '$aim', user_yim = '$yim', user_msnm = '$msn', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_lang = '$user_lang', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '$user_dateformat', user_active = $user_status, user_actkey = '$user_actkey'" . $avatar_sql . "
|
||||
WHERE user_id = $user_id";
|
||||
if($result = $db->sql_query($sql))
|
||||
{
|
||||
|
|
|
@ -434,6 +434,7 @@ CREATE TABLE [phpbb_users] (
|
|||
[user_regdate] [int] NOT NULL ,
|
||||
[user_rank] [int] NULL ,
|
||||
[user_avatar] [varchar] (100) NULL ,
|
||||
[user_avatar_type] [smallint] NOT NULL,
|
||||
[user_email] [varchar] (25) NULL ,
|
||||
[user_icq] [varchar] (15) NULL ,
|
||||
[user_website] [varchar] (50) NULL ,
|
||||
|
@ -652,7 +653,8 @@ ALTER TABLE [phpbb_users] WITH NOCHECK ADD
|
|||
CONSTRAINT [DF_phpbb_users_user_allow_pm] DEFAULT (1) FOR [user_allow_pm],
|
||||
CONSTRAINT [DF_phpbb_users_user_allow_viewonline] DEFAULT (1) FOR [user_allow_viewonline],
|
||||
CONSTRAINT [DF_phpbb_users_user_notify] DEFAULT (1) FOR [user_notify],
|
||||
CONSTRAINT [DF_phpbb_users_user_notify_pm] DEFAULT (1) FOR [user_notify_pm]
|
||||
CONSTRAINT [DF_phpbb_users_user_notify_pm] DEFAULT (1) FOR [user_notify_pm],
|
||||
CONSTRAINT [DF_phpbb_users_user_avatar_type] DEFAULT (0) FOR [user_avatar_type]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_auth_access] ON [phpbb_auth_access]([group_id], [forum_id]) ON [PRIMARY]
|
||||
|
|
|
@ -471,6 +471,7 @@ CREATE TABLE phpbb_users (
|
|||
user_regdate int(11) DEFAULT '0' NOT NULL,
|
||||
user_rank int(11) DEFAULT '0',
|
||||
user_avatar varchar(100),
|
||||
user_avatar_type tinyint(4) DEFAULT '0' NOT NULL,
|
||||
user_email varchar(255),
|
||||
user_icq varchar(15),
|
||||
user_website varchar(100),
|
||||
|
|
|
@ -449,6 +449,7 @@ CREATE TABLE phpbb_users (
|
|||
user_allow_viewonline int2 DEFAULT '1' NOT NULL,
|
||||
user_rank int4 DEFAULT '0',
|
||||
user_avatar varchar(100),
|
||||
user_avatar_type int2 DEFAULT '0' NOT NULL,
|
||||
user_level int4 DEFAULT '1',
|
||||
user_lang varchar(255),
|
||||
user_timezone int4 DEFAULT '0' NOT NULL,
|
||||
|
|
51
phpBB/develop/convert_avatars.php
Normal file
51
phpBB/develop/convert_avatars.php
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
$phpbb_root_path = "../";
|
||||
|
||||
include($phpbb_root_path . 'extension.inc');
|
||||
include($phpbb_root_path . 'config.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/constants.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/db.'.$phpEx);
|
||||
|
||||
|
||||
$sql = "ALTER TABLE " . USERS_TABLE . "
|
||||
ADD user_avatar_type TINYINT(4) DEFAULT '0' NOT NULL";
|
||||
if( !$result = $db->sql_query($sql) )
|
||||
{
|
||||
die("Couldn't alter users table");
|
||||
}
|
||||
|
||||
$sql = "SELECT user_id, user_avatar
|
||||
FROM " . USERS_TABLE;
|
||||
if( $result = $db->sql_query($sql) )
|
||||
{
|
||||
$rowset = $db->sql_fetchrowset($result);
|
||||
|
||||
for($i = 0; $i < count($rowset); $i++)
|
||||
{
|
||||
if( ereg("^http", $rowset[$i]['user_avatar']))
|
||||
{
|
||||
$sql_type = USER_AVATAR_REMOTE;
|
||||
}
|
||||
else if( $rowset[$i]['user_avatar'] != "" )
|
||||
{
|
||||
$sql_type = USER_AVATAR_UPLOAD;
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql_type = USER_AVATAR_NONE;
|
||||
}
|
||||
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET user_avatar_type = $sql_type
|
||||
WHERE user_id = " . $rowset[$i]['user_id'];
|
||||
if( !$result = $db->sql_query($sql) )
|
||||
{
|
||||
die("Couldn't update users table- " . $i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo "<BR><BR>COMPLETE<BR>";
|
||||
|
||||
?>
|
|
@ -36,11 +36,16 @@ define(USER, 0);
|
|||
define(ADMIN, 1);
|
||||
|
||||
|
||||
// User Activation
|
||||
// User related
|
||||
define(USER_ACTIVATION_NONE, 0);
|
||||
define(USER_ACTIVATION_SELF, 1);
|
||||
define(USER_ACTIVATION_ADMIN, 2);
|
||||
|
||||
define(USER_AVATAR_NONE, 0);
|
||||
define(USER_AVATAR_UPLOAD, 1);
|
||||
define(USER_AVATAR_REMOTE, 2);
|
||||
define(USER_AVATAR_GALLERY, 3);
|
||||
|
||||
|
||||
// Forum state
|
||||
define(FORUM_UNLOCKED, 0);
|
||||
|
|
|
@ -408,6 +408,7 @@ $lang['Registration_info'] = "Registration Information";
|
|||
$lang['Profile_info'] = "Profile Information";
|
||||
$lang['Profile_info_warn'] = "This information will be publicly viewable";
|
||||
$lang['Avatar_panel'] = "Avatar control panel";
|
||||
$lang['Avatar_gallery'] = "Avatar gallery";
|
||||
|
||||
$lang['Website'] = "Website";
|
||||
$lang['From'] = "From";
|
||||
|
@ -471,7 +472,11 @@ $lang['Link_remote_Avatar'] = "Link to off-site Avatar";
|
|||
$lang['Link_remote_Avatar_explain'] = "Enter the URL of the location containing the Avatar image you wish to link to.";
|
||||
$lang['Avatar_URL'] = "URL of Avatar Image";
|
||||
$lang['Select_from_gallery'] = "Select Avatar from gallery";
|
||||
$lang['Avatar_gallery'] = "Show gallery";
|
||||
$lang['View_avatar_gallery'] = "Show gallery";
|
||||
|
||||
$lang['Select_avatar'] = "Select avatar";
|
||||
$lang['Return_profile'] = "Cancel avatar";
|
||||
$lang['Select_category'] = "Select category";
|
||||
|
||||
$lang['Delete_Image'] = "Delete Image";
|
||||
$lang['Current_Image'] = "Current Image";
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -123,6 +123,10 @@
|
|||
<td class="row1">Avatar Storage Path <br /><span class="gensmall">Path under your phpBB root dir, e.g. images/avatars</span></td>
|
||||
<td class="row2"><input type="text" size="20" maxlength="255" name="avatar_path" value="{AVATAR_PATH}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1">Avatar Gallery Path <br /><span class="gensmall">Path under your phpBB root dir for pre-loaded images, e.g. images/avatars/gallery</span></td>
|
||||
<td class="row2"><input type="text" size="20" maxlength="255" name="avatar_gallery_path" value="{AVATAR_GALLERY_PATH}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="catSides" colspan="2"><span class="cattitle">Email Settings</span></td>
|
||||
</tr>
|
||||
|
|
|
@ -268,8 +268,3 @@
|
|||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<!-- IF $S_ALLOW_AVATAR_UPLOAD eq TRUE || $S_ALLOW_AVATAR_LOCAL eq TRUE || $S_ALLOW_AVATAR_REMOTE eq TRUE -->
|
||||
<!-- IF $S_ALLOW_AVATAR_LOCAL eq TRUE -->
|
||||
<!-- IF $S_ALLOW_AVATAR_REMOTE eq TRUE -->
|
||||
<!-- IF $S_ALLOW_AVATAR_UPLOAD eq TRUE -->
|
37
phpBB/templates/subSilver/profile_avatar_gallery.tpl
Normal file
37
phpBB/templates/subSilver/profile_avatar_gallery.tpl
Normal file
|
@ -0,0 +1,37 @@
|
|||
|
||||
<form action="{S_PROFILE_ACTION}" method="post">
|
||||
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||
<tr>
|
||||
<td align="left"><span class="nav"><a href="{U_INDEX}" class="nav">{SITENAME} {L_INDEX}</a></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
|
||||
<tr>
|
||||
<th class="thHead" colspan="{S_COLSPAN}" height="25" valign="middle">{L_AVATAR_GALLERY}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="catBottom" align="center" valign="middle" colspan="6" height="28"><span class="genmed">{L_CATEGORY}: <select name="avatarcategory">{S_OPTIONS_CATEGORIES}</select> <input type="submit" class="liteoption" value="{L_GO}" name="avatargallery" /></span></td>
|
||||
</tr>
|
||||
<!-- BEGIN avatar_row -->
|
||||
<tr>
|
||||
<!-- BEGIN avatar_column -->
|
||||
<td class="row1" align="center"><img src="{avatar_row.avatar_column.AVATAR_IMAGE}" /></td>
|
||||
<!-- END avatar_column -->
|
||||
</tr>
|
||||
<tr>
|
||||
<!-- BEGIN avatar_option_column -->
|
||||
<td class="row2" align="center"><input type="radio" name="avatarselect" value="{avatar_row.avatar_option_column.S_OPTIONS_AVATAR}" /></td>
|
||||
<!-- END avatar_option_column -->
|
||||
</tr>
|
||||
|
||||
<!-- END avatar_row -->
|
||||
<tr>
|
||||
<td class="catBottom" colspan="{S_COLSPAN}" align="center" height="28">{S_HIDDEN_FIELDS}
|
||||
<input type="submit" name="submitavatar" value="{L_SELECT_AVATAR}" class="mainoption" />
|
||||
|
||||
<input type="submit" name="cancelavatar" value="{L_RETURN_PROFILE}" class="liteoption" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
|
@ -381,7 +381,7 @@ $select_post_order .= "</select>";
|
|||
//
|
||||
// Go ahead and pull all data for this topic
|
||||
//
|
||||
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, p.*, pt.post_text, pt.post_subject
|
||||
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, p.*, pt.post_text, pt.post_subject
|
||||
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
|
||||
WHERE p.topic_id = $topic_id
|
||||
AND p.poster_id = u.user_id
|
||||
|
@ -665,9 +665,20 @@ for($i = 0; $i < $total_posts; $i++)
|
|||
|
||||
$poster_joined = ($postrow[$i]['user_id'] != ANONYMOUS) ? $lang['Joined'] . ": " . create_date($board_config['default_dateformat'], $postrow[$i]['user_regdate'], $board_config['board_timezone']) : "";
|
||||
|
||||
if($postrow[$i]['user_avatar'] != "" && $poster_id != ANONYMOUS)
|
||||
if( $postrow[$i]['user_avatar_type'] && $poster_id != ANONYMOUS )
|
||||
{
|
||||
$poster_avatar = (eregi("http", $postrow[$i]['user_avatar']) && $board_config['allow_avatar_remote']) ? "<br /><img src=\"" . $postrow[$i]['user_avatar'] . "\"><br />" : "<br /><img src=\"" . $board_config['avatar_path'] . "/" . $postrow[$i]['user_avatar'] . "\" alt=\"\" /><br />";
|
||||
switch( $postrow[$i]['user_avatar_type'] )
|
||||
{
|
||||
case USER_AVATAR_UPLOAD:
|
||||
$poster_avatar = "<img src=\"" . $board_config['avatar_path'] . "/" . $postrow[$i]['user_avatar'] . "\" alt=\"\" />";
|
||||
break;
|
||||
case USER_AVATAR_REMOTE:
|
||||
$poster_avatar = "<img src=\"" . $postrow[$i]['user_avatar'] . "\" alt=\"\" />";
|
||||
break;
|
||||
case USER_AVATAR_GALLERY:
|
||||
$poster_avatar = "<img src=\"" . $board_config['avatar_gallery_path'] . "/" . $postrow[$i]['user_avatar'] . "\" alt=\"\" />";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue