541
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
<input type="text" name="search_keywords" size="15" class="searchinput" />
<input type="submit" value="{lang_search}" class="button" name="submit" />
<a href="{url_search}" class="smalltext">{lang_advanced_search}</a>
"user_homepage_button" => $user_homepage_button,
//User Pic
"userpic_img" => ($config['userpic'] && $user_row['userpic']) ? ROOT_PATH."data/userpic/".$user_row['userpic'] : "",
//End User Pic
if (!$error && $user_email != $user_info['user_email'] && $user_info['user_level'] != ADMIN && $config['account_activation'] != 0) {
// Upload User Pic
$userpic = $userpic_new = "";
if (!$error && $config['userpic'])
{
$userpics_dir = ROOT_PATH."data/userpic/";
if (!empty($HTTP_POST_FILES['userpic_file']['tmp_name']) && $HTTP_POST_FILES['userpic_file']['tmp_name'] != "none")
{
if (isset($HTTP_COOKIE_VARS['userpic_file']) || isset($HTTP_POST_VARS['userpic_file']) || isset($HTTP_GET_VARS['userpic_file'])) {
die("Security violation");
}
if (!function_exists("is_uploaded_file")) {
function is_uploaded_file($file_name) {
if (!$tmp_file = @get_cfg_var('upload_tmp_dir')) {
$tmp_file = tempnam('','');
$deleted = @unlink($tmp_file);
$tmp_file = dirname($tmp_file);
}
$tmp_file .= '/'.basename($file_name);
return (ereg_replace('/+', '/', $tmp_file) == $file_name) ? 1 : 0;
}
function move_uploaded_file($file_name, $destination) {
return (is_uploaded_file($file_name)) ? ((copy($file_name, $destination)) ? 1 : 0) : 0;
}
}
$error = array();
$extensions = array(
"jpg",
"jpeg",
"gif",
"png"
);
$mime_types = array();
$mime_type_match = array();
include_once(ROOT_PATH.'includes/upload_definitions.php');
foreach($extensions as $val)
$mime_types = array_merge($mime_types, $mime_type_match[$val]);
$mime_types = array_unique($mime_types);
$userpic_ext = strtolower(substr(strrchr($HTTP_POST_FILES['userpic_file']['name'],"."), 1));
$userpic_mime = $HTTP_POST_FILES['userpic_file']['type'];
if (!in_array($userpic_mime, $mime_types) || !in_array($userpic_ext, $extensions))
{
$error[] = $lang['invalid_file_type']. " (".$userpic_ext.", ".$HTTP_POST_FILES['userpic_file']['type'].")";
}
if ($HTTP_POST_FILES['userpic_file']['size'] > $config['userpic_size'] * 1024)
{
$error[] = $lang['invalid_file_size'];
}
if (empty($error))
{
$userpic_name = $user_info['user_id'].".".$userpic_ext;
$userpic_file = $userpics_dir.$userpic_name;
if (file_exists($userpic_file))
{
unlink($userpic_file);
}
if (!move_uploaded_file($HTTP_POST_FILES['userpic_file']['tmp_name'], $userpic_file))
{
$error[] = $lang['file_copy_error'];
}
else
{
@chmod($userpic_file, CHMOD_FILES);
}
}
if (empty($error))
{
$userpic = $HTTP_POST_VARS['userpic'] = $userpic_new = $userpic_name;
if ($user_info['userpic'] != $userpic_name && file_exists($userpics_dir.$user_info['userpic']))
{
@unlink($userpics_dir.$user_info['userpic']);
}
if (!function_exists(init_convert_options))
{
require(ROOT_PATH.'includes/image_utils.php');
}
$image_info = getimagesize($userpic_file);
$convert_options = init_convert_options();
if (($image_info[0] > $config['userpic_width'] || $image_info[1] > $config['userpic_height']))
{
if ($convert_options['convert_error'] || (!$convert_options['convert_error'] && !resize_image($userpic_file, 85, $config['userpic_width'], 1, $config['userpic_height'])))
{
if ($image_info[0] > $config['userpic_width'])
{
$error[] = $lang['invalid_image_width'];
}
if ($image_info[1] > $config['userpic_height'])
{
$error[] = $lang['invalid_image_height'];
}
}
}
}
if (!empty($error))
{
$msg .= (($msg != "") ? "<br />" : "")."<b>".$lang['file_upload_error'].": ".$HTTP_POST_FILES['userpic_file']['name']."</b><br />";
foreach ($error as $val) {
$msg .= "<b>".$HTTP_POST_FILES['userpic_file']['name'].":</b> ".$val."<br />";
}
$HTTP_POST_VARS['userpic'] = $user_info['userpic'];
}
}
else
{
if (isset($HTTP_POST_VARS['userpic_del']) && $HTTP_POST_VARS['userpic_del'])
{
@unlink($userpics_dir.$user_info['userpic']);
$HTTP_POST_VARS['userpic'] = $userpic = "";
$userpic_new = 1;
}
}
}
// End Upload User Pic
"user_showemail_yes" => $user_showemail_yes,
//User Pic
"userpic_allowed" => $config['userpic'],
"userpic_img" => ($user_info['userpic']) ? ROOT_PATH."data/userpic/".$user_info['userpic'] : "",
"lang_userpic_del" => $lang['userpic_del'],
"lang_userpic_upload" => preg_replace("/".$site_template->start."userpic_max_size".$site_template->end."/siU", $config['userpic_size']." ".$lang['kb'], preg_replace("/".$site_template->start."userpic_max_width".$site_template->end."/siU", $config['userpic_width'], preg_replace("/".$site_template->start."userpic_max_height".$site_template->end."/siU", $config['userpic_height'], $lang['userpic_upload']))),
"userpic_max_width" => $config['userpic_width'],
"userpic_max_height" => $config['userpic_height'],
"userpic_max_size" => $config['userpic_size']." ".$lang['kb'],
//End User Pic
$additional_user_fields['userpic'] = array($lang['userpic'], "text", 0);
//-----------------------------------------------------
//--- User Pic ----------------------------------------
//-----------------------------------------------------
$lang['userpic'] = "Personal picture";
$lang['userpic_del'] = "Remove";
$lang['userpic_upload'] = "Maximum image size: {userpic_max_size}.<br />Image larger {userpic_max_width}x{userpic_max_height} will be resized";
$lang['file_copy_error'] = "Copy error. Please check the directory permissions.";
//--- End User Pic ------------------------------------
//User Pic
/*-- Setting-Group Member Personal Photo --*/
$setting_group['memberpersonalphoto']="Personal Picture";
$setting['userpic'] = "Activate";
$setting['userpic_size'] = "Max. image size in KB";
$setting['userpic_width'] = "Max. image width in pixel";
$setting['userpic_height'] = "Max. image height in pixel";
//End User Pic
show_form_footer($lang['save_changes'], "", 2);
//User Pic
show_table_separator($setting_group['memberpersonalphoto'], 2, "setting_group_memberpersonalphoto");
show_setting_row("userpic", "radio");
show_setting_row("userpic_width");
show_setting_row("userpic_height");
show_setting_row("userpic_size");
//End User Pic
<form method="post" action="{url_member}">
<form method="post" action="{url_member}" enctype="multipart/form-data">
<tr>
<td class="row2"><b>{lang_icq}</b></td>
<td class="row2"><input type="text" name="user_icq" size="30" value="{user_icq}" class="input" /></td>
</tr>
{if userpic_allowed}
<tr>
<td class="row1" valign="top"><b>{lang_userpic}</b>
<SPAN class="smalltext">
<br />
<B>{lang_userpic_upload}</B>
</SPAN>
</td>
<td class="row1">
<INPUT type="file" name="userpic_file" size="30" class="input" /><br />
{if userpic_img}<img src="{userpic_img}"><br /><input type="checkbox" name="userpic_del" value="1"> {lang_userpic_del}{endif userpic_img}
</TD>
</TR>
{endif userpic_allowed}
(ofcourse u can add it anywhere u want in this file) <tr>
<td class="row2"><b>{lang_icq}</b></td>
<td class="row2">{if user_icq}<a href="http://wwp.icq.com/scripts/search.dll?to={user_icq}">{user_icq}</a> (<b>{user_icq_status}</b>){endif user_icq}</td>
</tr>
<tr>
<td class="row2"><b>{lang_icq}</b></td>
<td class="row2">{if user_icq}<a href="http://www.icq.com/people/about_me.php?uin={user_icq}">{user_icq}</a> (<b>{user_icq_status}</b>){endif user_icq}</td>
</tr>
{if userpic_img}
<tr>
<td class="row1" valign="top"><b>{lang_userpic}</b></td>
<td class="row1"><img src="{userpic_img}"></td>
</tr>
{endif userpic_img}
ALTER TABLE `4images_users` ADD `userpic` varchar(255) NOT NULL default '';
INSERT INTO `4images_settings` ( `setting_name` , `setting_value` ) VALUES ('userpic', '1');
INSERT INTO `4images_settings` ( `setting_name` , `setting_value` ) VALUES ('userpic_size', '500');
INSERT INTO `4images_settings` ( `setting_name` , `setting_value` ) VALUES ('userpic_width', '200');
INSERT INTO `4images_settings` ( `setting_name` , `setting_value` ) VALUES ('userpic_height', '200');
$additional_sql = "";
Insert below:if (!empty($additional_user_fields)) {
foreach ($additional_user_fields as $key => $val) {
$additional_sql .= ", u.".$key;
}
}
(if this block of code is already present in details.php, then u dont need doublicate it ) if (!empty($additional_image_fields)) {
Insert above: if (!empty($additional_user_fields)) {
$additional_field_array = array();
foreach ($additional_user_fields as $key => $val) {
if ($key != "userpic" || ($key == "userpic" && $config['userpic']))
{
$additional_field_array[$key] = (!empty($image_row[$key])) ? format_text($image_row[$key], 1) : REPLACE_EMPTY;
$additional_field_array['lang_'.$key] = $val[0];
}
}
if (!empty($additional_field_array)) {
$site_template->register_vars($additional_field_array);
}
}
$sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq")."
Replace it with: $sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").", u.userpic
"comment_user_ip" => $comment_user_ip,
Insert below: "comment_userpic" => ($config['userpic'] && $comment_row[$i]['userpic']) ? ROOT_PATH."data/userpic/".$comment_row[$i]['userpic'] : "",
{if comment_userpic} <img src="{comment_userpic}">{endif comment_userpic}
Cant Find a Upload Button in the lightbox
is there a way to see the flags on the whos_online.html ?sure
Um, does this mod have something to do with the way you got the flags to be listed for whos currently online in the home page (not admin control panel)on your website?yes, its based on this too. Maybe in time I'll post it too
mmmm...u know something we dont know?