4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: V@no on February 06, 2003, 05:30:43 AM
-
Avatar v2
Some people were interesting in such a mod.
This mod will let users select an avatar for their profiles.
The avatars will be displayed in comments. ( can be added somewhere else, if needed )
New features in v2:
1. users can upload their own avatars.
2. administrator can anable/disable: using avatars, upload avatars, change alowed width/height.
This MOD was writen and tested on Windows system with 4images v1.7
---------------------------------------------------------------------------------------------------------------
Changes in following files:
/member.php
/details.php
/includes/upload.php
/includes/db_field_definitions.php
/admin/settings.php
/admin/admin_functions.php
/lang/<yourlanguage>/admin.php
/lang/<yourlanguage>/main.php
/templates/<yourtemplate>/member_profile.html
/templates/<yourtemplate>/member_editprofile.html
/templates/<yourtemplate>/comment_bit.html
---------------------------------------------------------------------------------------
Step 1.
Open member.php
Find: "user_email_save" => $user_email_save,
Insert below: "lang_avatar" => $lang['avatar'],
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_row['user_avatar'] == "") ? "blank.gif" : $user_row['user_avatar'])."\" name=\"icons\" border=\"0\" alt=\"\">" : "",
1.2.
Find: if (!$error) {
$additional_sql = "";
if (!empty($additional_user_fields)) {
$table_fields = $site_db->get_table_fields(USERS_TABLE);
foreach ($additional_user_fields as $key => $val) {
if (isset($HTTP_POST_VARS[$key]) && isset($table_fields[$key])) {
$additional_sql .= ", $key = '".un_htmlspecialchars(trim($HTTP_POST_VARS[$key]))."'";
}
}
}
$sql = "UPDATE ".USERS_TABLE."
SET ".get_user_table_field("", "user_email")." = '$user_email', ".get_user_table_field("", "user_showemail")." = $user_showemail, ".get_user_table_field("", "user_allowemails")." = $user_allowemails, ".get_user_table_field("", "user_invisible")." = $user_invisible, ".get_user_table_field("", "user_homepage")." = '$user_homepage', ".get_user_table_field("", "user_icq")." = '$user_icq'".$additional_sql."
WHERE ".get_user_table_field("", "user_id")." = ".$user_info['user_id'];
$site_db->query($sql);
$msg_color = 1;
$msg .= $lang['update_profile_success'];
if (!empty($new_email_msg)) {
$msg .= "<br />".$new_email_msg;
}
$user_info = $site_sess->load_user_info($user_info['user_id']);
}
else {
$update_process = 1;
}
$action = "editprofile";
}
Add above it:
// Upload Avatar file
if (!$error) {
if (!empty($HTTP_POST_FILES['avatar_file']['tmp_name']) && $HTTP_POST_FILES['avatar_file']['tmp_name'] != "none") {
include(ROOT_PATH.'includes/upload.php');
$site_upload = new Upload();
$new_name = $site_upload->upload_file("avatar_file", "avatar", $config['template_dir'], $user_info['user_id']);
if (!$new_name) {
$msg .= (($msg != "") ? "<br />" : "")."<b>".$lang['file_upload_error'].": ".$new_name."</b><br />".$site_upload->get_upload_errors();
$error = 1;
}else{
$HTTP_POST_VARS['user_avatar'] = "users/".$new_name;
$avatars_dir = TEMPLATE_DIR."/".$config['template_dir']."/avatars/users/";
$dir = opendir($avatars_dir);
$contents = array();
while ($contents[] = readdir($dir)){;}
closedir($dir);
foreach ($contents as $line){
$filename = substr($line,0,(strlen($line)-strlen(strrchr($line,"."))));
$extension = substr(strrchr($line,"."), 1);
$filename2 = substr($new_name,0,(strlen($new_name)-strlen(strrchr($new_name,"."))));
$extension2 = substr(strrchr($new_name,"."), 1);
if ($filename == $filename2 && $extension != $extension2) {
unlink($avatars_dir.$line);
}
}
}
}
}
// End Avatar file
1.3.
Find: $user_icq = $user_info['user_icq'];
Add after: $user_avatar = $user_info['user_avatar'];
1.4.
Few lines below find: $site_template->register_vars(array(
"user_name" => htmlspecialchars(stripslashes($user_name)),
Replace with://-----------------------
//------ Avatar ---------
//-----------------------
if ($config['avatar_use']){
$images = "";
$checked = ($user_avatar == "blank.gif" || $user_avatar == "") ? " selected" : "";
$images .= "\n<option value=\"blank.gif\"$checked>none</option>\n";
$dir = opendir(TEMPLATE_PATH."/avatars/users/");
$contents = array();
while ($contents[] = readdir($dir)){;}
closedir($dir);
natcasesort ($contents);
foreach ($contents as $line){
$filename = substr($line,0,(strlen($line)-strlen(strrchr($line,"."))));
if ($filename == $user_info['user_id']) {
$checked = (stristr($user_avatar, "users/")) ? " selected" : "";
$images .= "\n<option value=\"users/$line\"$checked>".$lang['custom']."</option>\n";
}
}
$dir = opendir(TEMPLATE_PATH."/avatars/");
$contents = array();
while ($contents[] = readdir($dir)){;}
closedir($dir);
natcasesort ($contents);
$checked = "";
foreach ($contents as $line){
$filename = substr($line,0,(strlen($line)-strlen(strrchr($line,"."))));
$extension = substr(strrchr($line,"."), 1);
$checked = "";
if ($line == $user_avatar) { $checked = " selected"; }
if (strcasecmp($extension,"gif")==0 || strcasecmp($extension,"jpg")==0 || strcasecmp($extension,"jpeg")==0 || strcasecmp($extension,"png")==0 ){
if ($line != "blank.gif") {
$filename = str_replace("_", " ", $filename);
$images .= "<option value=\"$line\"$checked>$filename</option>\n";
}
}
}
}
//----------------------
//----- End Avatar -----
//----------------------
$site_template->register_vars(array(
"lang_avatar" => $lang['avatar'],
"lang_avatar_file" => $lang['avatar_file'],
"lang_avatar_dim" => $lang['avatar_max_dim']." ".$config['avatar_width']."x".$config['avatar_height'].$lang['px'],
"lang_avatar_select" => $lang['avatar_select'],
"user_avatar_images" => $images,
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_avatar == "") ? "blank.gif" : $user_avatar)."\" name=\"icons\" border=\"0\" alt=\"\">" : "",
"lang_or" => $lang['or'],
"user_avatar_file" => $config['avatar_user_custom'],
"user_name" => htmlspecialchars(stripslashes($user_name)),
Step 2.
Open details.php
Find: $comment_user_id = $comment_row[$i]['user_id'];
Add after: $user_row_comment = get_user_info($comment_user_id);
2.2.
Find: "comment_id" => $comment_row[$i]['comment_id'],
Add after: "user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_row_comment['user_avatar'] == "") ? "blank.gif" : $user_row_comment['user_avatar'])."\" name=\"icons\" border=\"0\" hspace=\"15\" alt=\"\">" : "",
Step 3.
Open /includes/upload.php
Find: $this->max_height['media'] = $config['max_image_height'];
$this->max_size['thumb'] = $config['max_thumb_size'] * 1024;
$this->max_size['media'] = $config['max_media_size'] * 1024;
Replace with: $this->max_height['media'] = $config['max_image_height'];
$this->max_width['avatar'] = $config['avatar_width'];
$this->max_height['avatar'] = $config['avatar_height'];
$this->max_size['thumb'] = $config['max_thumb_size'] * 1024;
$this->max_size['media'] = $config['max_media_size'] * 1024;
$this->max_size['avatar'] = 99999999999;
3.2.
Find: function copy_file() {
Add after: if ($this->image_type == "avatar") {
if (file_exists($this->upload_path[$this->image_type]."/".$this->file_name)) {
@unlink($this->upload_path[$this->image_type]."/".$this->file_name);
}
$ok = move_uploaded_file($this->upload_file, $this->upload_path[$this->image_type]."/".$this->file_name);
}else{
3.3.
At the end of this function find: @chmod($this->upload_path[$this->image_type]."/".$this->file_name, CHMOD_FILES);
Replace with: }
@chmod($this->upload_path[$this->image_type]."/".$this->file_name, CHMOD_FILES);
3.4.
Find: if ($cat_id) {
$this->upload_path['thumb'] = THUMB_PATH."/".$cat_id;
$this->upload_path['media'] = MEDIA_PATH."/".$cat_id;
}
else {
$this->upload_path['thumb'] = THUMB_TEMP_PATH;
$this->upload_path['media'] = MEDIA_TEMP_PATH;
}
if ($file_name != "") {
Replace with: if ($cat_id) {
$this->upload_path['thumb'] = THUMB_PATH."/".$cat_id;
$this->upload_path['media'] = MEDIA_PATH."/".$cat_id;
$this->upload_path['avatar'] = TEMPLATE_DIR."/".$cat_id."/avatars/users";
}
else {
$this->upload_path['thumb'] = THUMB_TEMP_PATH;
$this->upload_path['media'] = MEDIA_TEMP_PATH;
}
if ($file_name != "" && $this->image_type != "avatar") {
3.5.
Find: $this->mime_type = $this->HTTP_POST_FILES[$this->field_name]['type'];
Replace with: if ($this->image_type == "avatar") {
$this->file_name = $file_name.".".$this->extension;
}
$this->mime_type = $this->HTTP_POST_FILES[$this->field_name]['type'];
3.6.
Find: //Thumbnails
$this->accepted_mime_types['thumb'] = array(
Insert above: //Avatar
$this->accepted_mime_types['avatar'] = array(
"image/jpeg",
"image/pjpeg",
"image/gif",
"image/x-png"
);
$this->accepted_extensions['avatar'] = array(
"jpg",
"jpeg",
"gif",
"png"
);
3.7. *new
Find: $error_msg .= "<b>".$this->file_name.":</b> ".$msg."<br />";
Replace with: $error_msg .= "<b>".(($this->image_type == "avatar") ? $this->HTTP_POST_FILES[$this->field_name]['name'] : $this->file_name).":</b> ".$msg."<br />";
Step 4.
Open /includes/db_field_definitions.php file.
Add this line:$additional_user_fields['user_avatar'] = array($lang['avatar'], "avatar", 0);
Step 5.
Open /admin/settings.php
Find: show_setting_row("highlight_admin", "radio");
Add after: show_table_separator($setting_group[8], 2, "#setting_group_8");
show_setting_row("avatar_use", "radio");
show_setting_row("avatar_user_custom", "radio");
show_setting_row("avatar_width");
show_setting_row("avatar_height");
If u installed some other MOD for example "Annotation by SLL" then u probably will need change $setting_group[8], 2, "#setting_group_8");
Step 6. *updated
Open /admin/admin_functions.php
Find: case "text":
default:
show_input_row($val[0], $field_name, $value);
} // end switch
}
}
}
?>
Replace with: case "avatar":
show_avatar_row($val[0], $field_name, $value);
break;
case "text":
default:
show_input_row($val[0], $field_name, $value);
} // end switch
}
}
}
//-----------------------
//------ Avatar ---------
//-----------------------
function show_avatar_row($title, $name, $value = "blank.gif"){
global $config;
if ($config['avatar_use']){
$dir = opendir(TEMPLATE_PATH."/avatars/");
$contents = array();
while ($contents[] = readdir($dir)){;}
closedir($dir);
natcasesort ($contents);
echo "<tr width=\"50%\"class=\"".get_row_bg()."\" valign='top'>\n<td><p class=\"rowtitle\">".$title."</p></td>\n";
echo "<td width=\"50%\" height=\"115\" valign=\"middle\">\n<table>\n<tr>\n<td>\n<SELECT name=\"$name\" size=\"6\" onkeypress=\"if(window.event.keyCode==13){this.form.submit();}\" onChange=\"document.form.icons_$name.src='".TEMPLATE_PATH."/avatars/'+document.form.$name.options[document.form.$name.selectedIndex].value;\">";
if ($value == "blank.gif" || $value == "") {
$checked = " selected";
}else{
$checked = "";
}
echo "<option value=\"blank.gif\"$checked>none</option>\n";
foreach ($contents as $line){
$filename = substr($line,0,(strlen($line)-strlen(strrchr($line,"."))));
$extension = substr(strrchr($line,"."), 1);
$checked = "";
if ($line == $value) { $checked = " selected"; }
if (strcasecmp($extension,"gif")==0 || strcasecmp($extension,"jpg")==0 || strcasecmp($extension,"jpeg")==0 || strcasecmp($extension,"png")==0 ){
if ($line != "blank.gif") {
$filename = str_replace("_", " ", $filename);
echo "<option value=\"$line\"$checked>$filename</option>\n";
}
}
}
echo "</select>\n</td>\n<td valign='middle' align='left'>\n<img align='center' src=\"".TEMPLATE_PATH."/avatars/".(($value == "") ? "blank.gif" : $value)."\" name=\"icons_$name\" border=\"0\" alt=\"\">\n</td>\n</tr>\n</table>\n</td>\n";
}
}
//----- End Avatar -----
?>
Step 7.
Open /lang/<yourlanguage>/admin.php
Add at the end of the file, just before <? :/*-- Setting-Group 8 --*/
$setting_group[8]="Avatar";
$setting['avatar_use'] = "Use avatars";
$setting['avatar_user_custom'] = "Allow users use their own avatars";
$setting['avatar_width'] = "Max. avatar width in pixel";
$setting['avatar_height'] = "Max. avatar height in pixel";
Change $setting_group[8]="Avatar"; to the number u set in /admin/settings.php
Step 8.
Open /lang/<yourlanguage>/main.php
Add at the end of the file, just before <? :$lang['avatar'] = "Avatar: ";
$lang['avatar_file'] = "Upload avatar:";
$lang['avatar_max_dim'] = "Max. allowed";
$lang['avatar_select'] = "Select from the list:";
$lang['custom'] = "Custom";
Step 9.
Open /templates/<yourtemplate>/member_profile.html
Add this: {if user_avatar_current}
<TR>
<TD class="row2"><B>{lang_avatar}</B></TD>
<TD class="row2">{user_avatar_current}</TD>
</TR>
{endif user_avatar_current}
Step 10.
Open /templates/<yourtemplate>/member_editprofile.html
Change top form to this:<FORM method="post" action="{url_member}" name="creator" enctype="multipart/form-data">
<TABLE width="100%" border="0" cellspacing="0" cellpadding="1">
<TR>
<TD valign="top" class="head1">
<TABLE width="100%" border="0" cellpadding="4" cellspacing="0">
<TR>
<TD colspan="2" valign="top" class="head1">{lang_profile_of} {user_name}</TD>
</TR>
<TR>
<TD class="row1"><B>{lang_email}</B></TD>
<TD class="row1"><INPUT type="text" name="user_email" size="30" value="{user_email}" class="input" /></TD>
</TR>
<TR>
<TD class="row2"><B>{lang_email_confirm}</B></TD>
<TD class="row2"><INPUT type="text" name="user_email2" size="30" value="{user_email2}" class="input" /></TD>
</TR>
<TR>
<TD class="row1"><B>{lang_show_email}</B></TD>
<TD class="row1">
<INPUT type="radio" name="user_showemail" value="1"{user_showemail_yes} />
{lang_yes}
<INPUT type="radio" name="user_showemail" value="0"{user_showemail_no} />
{lang_no}</TD>
</TR>
<TR>
<TD class="row2"><B>{lang_allow_emails}</B></TD>
<TD class="row2">
<INPUT type="radio" name="user_allowemails" value="1"{user_allowemails_yes} />
{lang_yes}
<INPUT type="radio" name="user_allowemails" value="0"{user_allowemails_no} />
{lang_no}
</TD>
</TR>
<TR>
<TD class="row1"><B>{lang_invisible}</B></TD>
<TD class="row1">
<INPUT type="radio" name="user_invisible" value="1"{user_invisible_yes} />
{lang_yes}
<INPUT type="radio" name="user_invisible" value="0"{user_invisible_no} />
{lang_no}
</TD>
</TR>
<TR>
<TD colspan="2" class="head1">{lang_optional_infos}</TD>
</TR>
<TR>
<TD class="row1"><B>{lang_homepage}</B></TD>
<TD class="row1"><INPUT type="text" name="user_homepage" size="30" value="{user_homepage}" class="input" /></TD>
</TR>
<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 user_avatar_images}
<TR>
<TD colspan="2" class="head1">{lang_avatar}</TD>
</TR>
<TR>
<TD class="row2" valign="top">
{if user_avatar_file}
<B>{lang_avatar_file}</B><BR />
<SPAN class="smalltext">
<B>{lang_avatar_dim}</B>
</SPAN>
<BR>
<b>{lang_or}</b><BR>
{endif user_avatar_file}
<B>
{lang_avatar_select}
</B>
</TD>
<TD class="row2">
{if user_avatar_file}
{lang_upload}
<INPUT type="file" name="avatar_file" size="30" class="input" />
<BR />
<BR />
{endif user_avatar_file}
<SELECT name="user_avatar" size="6" onkeypress="if(window.event.keyCode==13){ this.form.submit(); }" onChange="document.images.icons.src='{template_url}/avatars/'+this.value;">{user_avatar_images}</SELECT>
<TABLE width="100%" height="100" border="0">
<TR>
<TD align="center">
{user_avatar_current}
</TD>
</TR>
</TABLE>
</TD>
</TR>
{endif user_avatar_images}
</TABLE>
</TD>
</TR>
</TABLE>
<INPUT type="hidden" name="action" value="updateprofile" />
<P align="center">
<INPUT type="submit" value="{lang_save}" class="button" />
<INPUT type="reset" value="{lang_reset}" class="button" />
</P>
</FORM>
Step 11.
Open /templates/<yourtemplate>/comment_bit.html
Add this: {if user_avatar_current}
{user_avatar_current}
{endif user_avatar_current}
Step 12.
Download attached (#post_attachment) package
Upload install_avatar.php into your 4images root folder, and blank.gif into new /templates/<yourtemplate>/avatars
Start the installation by http://yourhost.com/your4images/install_avatar.php
Now, create two folders:
/templates/<yourtemplate>/avatars/users/
Upload your avatars in /avatars/
Now users can sellect their avatar from control panel.
P.S. Thank SLL for the installer :)
P.P.S. This MOD probably wont work if u have integrated 4images with some boards.
-
The marked ( * ) code above has been changed.
-
Hey this is very cool....it would be cool if the user can upload there pic for the avator...think this is possible?
-
I dont think my PHP knowlege let me do that...
maybe somebody esle can do? ;)
-
You did a great job, its just that would be the reason for me having avators is to let them have there own pic u know. Like I think it would be possible, especially since you made it that far....just has to be a way to let them upload there pic to a folder then call it to be there avator somehow...lol here I am with my dreams i dont know ANY PHP, you did an awsome job!
-
Does anyone know of a good Upload script I could possibly use have it upload to my avator folder....Im looking for a script that will resize the image also to like 200x200 or so...or would it be possible to alter the code above to only show the images @ a certain pixel?
-
Just realized its not working. When Im logged in with my admin name I can see the the avatars in the comments and in the profiles....when I logged in as just a member...I can see the avatars in the profiles but they dont show up in the comments when Im not logged in under admin....any ideas on whats going on?
-
After I install the mood avatars, the mood run without error.
my question is . How to add avatars in other page like in who is online or in my index gallery.
why avatars only show when the current user after log in ?? but when the current user log out the avatars missing :wink: :wink:
-
-
why avatars only show when the current user after log in ?? but when the current user log out the avatars missing :wink: :wink:
Do u mean avatars missing in already posted comments?
GUEST dont have an avatar.
I'm not sure why they are missing, I can see avatars even when I'm not logged in.
-
why avatars only show when the current user after log in ?? but when the current user log out the avatars missing :wink: :wink:
Do u mean avatars missing in already posted comments?
GUEST dont have an avatar.
I'm not sure why they are missing, I can see avatars even when I'm not logged in.
Yeah I notice that on your site that I can see them ....But for some reason if I wasnt logged in on my main Admin account it wouldn't show them....I tried signing on with to other names on my gallery and they didnt show...just on my admin name....
-
....i 4got to chmod the avatar/users folder! i LOVE THIS MOD
-
Ah, I forgot to mention, /users/ folder must set CMOD 777
basicaly the same as /data/media/ folder.
but can u see avatars on my site?
http://come.no-ip.com/details.php?image_id=7570
-
I can see the avatars opn your site when im logged in or logged out....on my site I can only see them when Im logged in under my admin name still...weird
-
added new Step 3.7.
now when error in file dimensions it shows uploaded filename, instead of renamed one (less confusion for users ;) )
if u want do check picture's size when logged in as admin, need change in /includes/upload.php line: if ($user_info['user_level'] != ADMIN) {
with this: if ($user_info['user_level'] != ADMIN || $this->image_type == "avatar") {
-
Hi
I tried this and I try to upload a image and it dosnt upload into the folders but if I but a image in the ftp manually it works.
I have made sure the permissions are set
Any Ideas?
-
make sure that picture width/height is equal or smaller then size u set from Admin Control Panel -> Settings
P.S. Can u show me your site?
-
Hi
Yes I have made sure the sizes all smaller. It even says my profile has been updated.
My site address is:
http://www.highrez.com
Username: demo
Password: demo
Thanks
Steve
-
yes, thes's right, I had the same problem when was tunning up the script... 8O
u forgot add in top <form> this<FORM method="post" action="{url_member}" name="creator" enctype="multipart/form-data">
that will fix two things: upload and image changing.
by the way, dont forget add blank.gif image in /avatars/ folder. :wink:
-
Your a star *******
Now fully working thanks to you. This mod certainly makes my day !
Steve
HighRez.com
-
I have slightly changed Step 1.4 and Step 8.
now "Custom" option will be showed even if user changed his avatart to blank or any from the list (so he dont need upload his avatar again).
also, now "Custom" word is taken from language pack.
-
@v@no: GREAT MOD!
I have one question: It is possible to show the avatar in the memberlist powered by Nicky???
Thanks
Markus
-
sure, in memberlist.php find:
$userlist .= "<td valign=\"top\" align=\"center\">".$user_name."</td>\n";
And replace with: $user_avatar = (!$user_row['user_avatar'] || $user_row['user_avatar'] == "blank.gif") ? "" : "<img src=\"".TEMPLATE_PATH."/avatars/".$user_row['user_avatar']."\">";
$userlist .= "<td valign=\"top\" align=\"center\">".$user_name."<br/ >".$user_avatar."</td>\n";
-
sorry if this out of the topic, Veno can you share to me what code to add in thumbnail alt properti
so when user not login they got message when try to click the thumbnail
that the image only can have detail view when they register.
:? :?
-
@v@no: Another GREAT JOB! Thanks a lot!
@mantra: Good idea. Hope, that v@no can help us again.
Cheers,
Markus
-
some time ago someone asked that already :wink:
http://www.4homepages.de/forum/viewtopic.php?t=3304
-
FANTASTIC!
Thank U very much!
Markus
-
Yes, V@no thank you! You have really been making a lot of mods lately keep up the great work!
-
Thanks veno ,you make my day :D :D :D
If I can sugest maybe we can put the avatars in root directory so if some one try to change to another templates we don't have to upload all the same avatars again. :idea: :idea:
-
u can do that.
go through the code u modifyed and search for .TEMPLATE_PATH
just delete it.(dont delete the dot at the end of this, if its there)
-
BIG Thanks :wink: :wink:
-
Thank you very much! You have geat job but can you do intergaton for vBulletin Version 2.2.X?
Thanks again!
-
Does this mod work with 1.6?
Ihope so... very intresting mod!!!
-
is it possible to add the avatar in the box 'Registered Users' after a member login right after their name and above the link to 'lightbox'?
And if a user hasn't chosen an avatar is it possible to put a default image or text in that space to remind the user to choose an avatar?
thanks
-
i have a small problem with this mod!!
after saving my avater,the member.php file jumps back to "none" avater!!
i can choose my avatars, my own and the avatar in the list,but i can't save the it!
-
is it possible to add the avatar in the box 'Registered Users' after a member login right after their name and above the link to 'lightbox'?
And if a user hasn't chosen an avatar is it possible to put a default image or text in that space to remind the user to choose an avatar?
thanks
hmmm...I like the idea add avatar under the name :wink:
just did it on my site:open /includes/page_header.php
Find: "url_upload" => (!empty($url_upload)) ? $site_sess->url($url_upload) : $site_sess->url(ROOT_PATH."member.php?action=uploadform"),
Add after:"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_info['user_avatar'] == "") ? "blank.gif" : $user_info['user_avatar'])."\" border=\"0\" alt=\"\">" : "",
Then, open user_logininfo.html template. Add this:{user_avatar_current}
About default image - just change blank.gif with image u want.
-
did u run install_avatar.php ?
-
yes!at the first time it was ok, but now, i run it again:
DB Error: Bad SQL Query: INSERT INTO 4images_settings () VALUES ('avatar_use', '1')
Duplicate entry 'avatar_use' for key 1
DB Error: Bad SQL Query: INSERT INTO 4images_settings () VALUES ('avatar_user_custom', '1')
Duplicate entry 'avatar_user_custom' for key 1
DB Error: Bad SQL Query: INSERT INTO 4images_settings () VALUES ('avatar_width', '50')
Duplicate entry 'avatar_width' for key 1
DB Error: Bad SQL Query: INSERT INTO 4images_settings () VALUES ('avatar_height', '50')
Duplicate entry 'avatar_height' for key 1
DB Error: Bad SQL Query: ALTER TABLE 4images_users ADD `user_avatar` VARCHAR( 255 ) NOT NULL
Duplicate column name 'user_avatar'
???????
-
that's ok, u need run it just ones.
well, go over the installation process, I think u missed something or did something wrong.
-
shit!
i checked all steps, but i didn't missed anything and i didn't anything wrong?!
wheres my problem? i don't know,sorry
-
shit!
8O :roll:
did u add this line? $user_avatar = $user_info['user_avatar'];
another thing, if u have access to your database, try to see if user_avatar field under 4images_users table getting updated.
then, add this line just before the code u add in step 1.4.:echo $user_avatar." | ".$user_info['user_avatar'];
it should print on TOP-LEFT corner two times filename of your current avatar. if u see only | then it means the code either doesnt read the database or something u missed.
-
ok!
i add this line $user_avatar = $user_info['user_avatar'];
!!
but i only see this | !! :oops:
but i'm sure, i don't forget to add anything!i checked exactly and found no mistake! :?:
should i check all the files again? :(
-
well, I'm pretty much sure u did something wrong.
because when I upload avatar on your site, it gives me a list of avalable avatars like this:none
Custom
Custom
yes, two times Custom.
it not supposed to be like that.
-
sorry, but it doesn't work!
i do all again with new files from my hd! i do one step to another,slowly, i checked all files two times, i have absolutely no mistake, but it doesn't work!!
i found no mistake?! :(
the same problem with the 2 "custom"!
should i post all my files here?
your mod is great,but i believe,i am too stupid to check this! :!: :?:
(excuse me for my very bad englisch!!)
-
if u want, zip your member.php file, and pm it to me.
-
ok, your member.php file seems to be ok.
but here is another thing:
make sure u did step 4 $additional_user_fields['user_avatar'] = array($lang['avatar'], "avatar", 0);
where did u put this code?
can u enable/disable avatar feature from admin control panel -> settings? does it save settings changes from there?
-
ok! i can enable/disable the avatar feature!!
here is my code from the db_field_definitions.php:
/* ------------------------------------------------------------------------
If you want to add additional fields in order to store more info on
each image or user, set up these fields by inserting a column to the "4images_images"
or "4images_users" table in your database.
If you add an additional image field and allow upload from the gallery,
add the columns to "4images_images_temp" as well.
Add one line for each new column in the following format:
$additional_image_fields['%column_name%'] = array("%field_description%", "%admin_field_type%", %is_required%);
or
$additional_user_fields['%column_name%'] = array("%field_description%", "%admin_field_type%", %is_required%);
$additional_user_fields['user_avatar'] = array($lang['avatar'], "avatar", 0);
At the bottom of this file, you will find examples for adding a new field.
----------
%column_name% string
Replace %column_name% with name of the table column.
You can use the tag {%column_name%} in the templates to display the value of the
database field.
If you want to add a textfield to the templates, do this such like:
<input type="text" name="%column_name%" value="{%column_name%}" />
----------
%field_description% string
Replace %field_description% with a custom name. This name will be displayed in the Control Panel.
The value can be displayed in the templates with the tag {lang_%column_name%}.
It is also recommended to add this tag to the language files (main.php) and to replace "%field_description%"
with $lang['%column_name%'].
----------
and the code from step 4 does exist!
-
aha!
now I see where is the problem!
in the db_field_definitions.php u add the line in the comments!
u must add it at the END of file, just before ?>
-
oh no!! :oops:
ok,thats it!! thank a lot!!
now it works!! :D
very great mod!!
-
PLEASE, moke intergaton for vBulletin Version 2.2.X?
please please please!!!
-
PLEASE, moke intergaton for vBulletin Version 2.2.X?
please please please!!!
what does it have with avatar mod? 8O
another thing, I dont even have vBulletin.
one more thing, I dont even want have vBulletin.
last thing, vBulleting uses database to store templates, right? o-my-god! it s@x, no wonder most of the vBulletin forums I've seen looks the same. I hardly can imaging how it possible edit templates through browser, where u cant even select one letter from a word by using just mouse, because it will select whole word instead... 8O and u have to pay for it??? :evil:
-
I can see the avatars opn your site when im logged in or logged out....on my site I can only see them when Im logged in under my admin name still...weird
I do have the same problem. :oops:
-
beautiful mod V@no ^^
i have a question...
i have 4images integrated to phpBB and i want to integrate this mod with phpBB...
in other words...i want 4images to use phpBB's avatar database as well as the upload avatar database
could you help me code???
thanx ^_~
-
:wink: sorry I push the button submit two times by mistake
-
V@no after I install your new mood v2 . it's work fine on main page. but if I log in admin page I got this error
----------------------------------------------------------------------------------------------------------
Warning: Cannot add header information - headers already sent by (output started at c:\myserver\scripts\gallery\admin\admin_functions.php:671) in c:\myserver\scripts\gallery\admin\admin_functions.php on line 167
Warning: Cannot add header information - headers already sent by (output started at c:\myserver\scripts\gallery\admin\admin_functions.php:671) in c:\myserver\scripts\gallery\admin\admin_functions.php on line 168
Warning: Cannot add header information - headers already sent by (output started at c:\myserver\scripts\gallery\admin\admin_functions.php:671) in c:\myserver\scripts\gallery\admin\admin_functions.php on line 169
Warning: Cannot add header information - headers already sent by (output started at c:\myserver\scripts\gallery\admin\admin_functions.php:671) in c:\myserver\scripts\gallery\admin\admin_functions.php on line 170
Warning: Cannot add header information - headers already sent by (output started at c:\myserver\scripts\gallery\admin\admin_functions.php:671) in c:\myserver\scripts\gallery\admin\admin_functions.php on line 171
----------------------------------------------------------------------------------
Where did I make wrong [ I change all instruction very carefully ]
and I don't have blank line after ?> in all php page like in FAQ of this forum
I search the error line in admin_functions.php
I try remove this code
header ("Cache-Control: no-store, no-cache, must-revalidate");
header ("Cache-Control: pre-check=0, post-check=0, max-age=0", false);
header ("Pragma: no-cache");
header ("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT");
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
and the error missing, did I lost some of feature in 4images.
Can help??
-
This one can't be too hard to integrate in phpBB I think. Here's a guess by using some code of V@no.
open details.php
repeat this step
Find code:
$comment_user_id = $comment_row[$i]['user_id'];
add after
$user_row_comment = get_user_info($comment_user_id);
then find
$comment_user_info .= (isset($comment_row[$i][$user_table_fields['user_comments']])) ? "<br />".$lang['comments']." ".$comment_row[$i][$user_table_fields['user_comments']] : "";
add after
$comment_user_avatar = $user_row_comment['user_avatar'];
then find
"comment_user_id" => $comment_user_id,
add after
"comment_user_avatar" => $comment_user_avatar,
open the comment_bit.html of your template, then add this wherever you like in your user field. For example find
{comment_user_info}<br />
add after
<img src="{comment_user_avatar}">
Save and close all files. I'm not sure if this works with vbb, but if you know a bit of mysql look up the avatar field in your user table copy the table name and replace the user_avatar string with your avatar field you found in your usertable.
$comment_user_avatar = $user_row_comment['user_avatar'];
You could use this trick to add various information from the user table if you understand what I've just written
-
I have one problem. I think i did mistake when i was changing code. Here its the pic:
http://slo-foto.portal.si/slike/avatars.JPG
See? It shouldnt be there, but under my nickname.
Yeah, its a girl... but i am just testing it 8)
-
I have one problem. I think i did mistake when i was changing code. Here its the pic:
http://slo-foto.portal.si/slike/avatars.JPG
See? It shouldnt be there, but under my nickname.
Yeah, its a girl... but i am just testing it 8)
My advice - change my template to fit your lyout, in that case u wont loose anything "important".
-
My advice - change my template to fit your lyout, in that case u wont loose anything "important".
Hm... where can i change your template?
-
ops, never mind...I posted only edit profile template...:oops:
hope u dont use notepad to change your templates, otherwise HTML editor would show u where is the problem.
-
so its possible that the problem is in HTML file? Couse avatars works just fine... but the possition of them..
-
yes, that's somewhere in template misstake.
-
This one can't be too hard to integrate in phpBB I think. Here's a guess by using some code of V@no.
open details.php
repeat this step
Find code:
$comment_user_id = $comment_row[$i]['user_id'];
add after
$user_row_comment = get_user_info($comment_user_id);
then find
$comment_user_info .= (isset($comment_row[$i][$user_table_fields['user_comments']])) ? "<br />".$lang['comments']." ".$comment_row[$i][$user_table_fields['user_comments']] : "";
add after
$comment_user_avatar = $user_row_comment['user_avatar'];
then find
"comment_user_id" => $comment_user_id,
add after
"comment_user_avatar" => $comment_user_avatar,
open the comment_bit.html of your template, then add this wherever you like in your user field. For example find
{comment_user_info}<br />
add after
<img src="{comment_user_avatar}">
Save and close all files. I'm not sure if this works with vbb, but if you know a bit of mysql look up the avatar field in your user table copy the table name and replace the user_avatar string with your avatar field you found in your usertable.
$comment_user_avatar = $user_row_comment['user_avatar'];
You could use this trick to add various information from the user table if you understand what I've just written
Hy,
I have a little problem to include the Code:
In phpbb template is used this {AVATAR_IMG} Code and in mysql table is it users_user_avatar
How must I change the Code you posted bevore to use it ???
Please help my
Gabi
-
V@no could you be so kind and send me those HTML files to my email address?
I have checked every HTML file and it doesn't seems to work.
Thanks alot!
Lucifix
My e-mail: Lucifix_ND@hotmail.com
-
I have slightly changed Step 1.4 and Step 8.
now "Custom" option will be showed even if user changed his avatart to blank or any from the list (so he dont need upload his avatar again).
also, now "Custom" word is taken from language pack.
First of all, thank you V@no for yet another fantastic MOD. I use the Avatar mod and just LOVE it.
For me, when I do a test, "Custom" shows twice in the list if member changes their custom avatar more than one time in a single session.
This is true unless I refresh the page, then the two "Custom" texts go back to one as they should be!
Another thing is since each user will have their custom pic in the same ID as their usersname, then the computer will read from the custom avatar from it's cache and if they change their custom avatar to some other custom avatar, then the browser reads off of the old cache and they don't see the change in their avatar... Unless the actually refresh their page, which they prob. won't.
Is there anything that can be done?
I did read the other case someone had regarding the two "Custom" text and I checked the db_field_definitions.php file and all is as it should be.
other than this tiny prob. all is working fine. :)
-
For me, when I do a test, "Custom" shows twice in the list if member changes their custom avatar more than one time in a single session.
Yes, I've seen this myself...not sure why is that, I asume it's because of different server types? I only able check it on my Windows machine...
Another thing is since each user will have their custom pic in the same ID as their usersname, then the computer will read from the custom avatar from it's cache and if they change their custom avatar to some other custom avatar, then the browser reads off of the old cache and they don't see the change in their avatar... Unless the actually refresh their page, which they prob. won't.
that all depence of how their browser handle the cache. I dont know how to fix it.
-
i have the some problem ------ help pls ........ :cry: :cry:
V@no after I install your new mood v2 . it's work fine on main page. but if I log in admin page I got this error
----------------------------------------------------------------------------------------------------------
Warning: Cannot add header information - headers already sent by (output started at c:\myserver\scripts\gallery\admin\admin_functions.php:671) in c:\myserver\scripts\gallery\admin\admin_functions.php on line 167
Warning: Cannot add header information - headers already sent by (output started at c:\myserver\scripts\gallery\admin\admin_functions.php:671) in c:\myserver\scripts\gallery\admin\admin_functions.php on line 168
Warning: Cannot add header information - headers already sent by (output started at c:\myserver\scripts\gallery\admin\admin_functions.php:671) in c:\myserver\scripts\gallery\admin\admin_functions.php on line 169
Warning: Cannot add header information - headers already sent by (output started at c:\myserver\scripts\gallery\admin\admin_functions.php:671) in c:\myserver\scripts\gallery\admin\admin_functions.php on line 170
Warning: Cannot add header information - headers already sent by (output started at c:\myserver\scripts\gallery\admin\admin_functions.php:671) in c:\myserver\scripts\gallery\admin\admin_functions.php on line 171
----------------------------------------------------------------------------------
Where did I make wrong [ I change all instruction very carefully ]
and I don't have blank line after ?> in all php page like in FAQ of this forum
I search the error line in admin_functions.php
I try remove this code
header ("Cache-Control: no-store, no-cache, must-revalidate");
header ("Cache-Control: pre-check=0, post-check=0, max-age=0", false);
header ("Pragma: no-cache");
header ("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT");
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
and the error missing, did I lost some of feature in 4images.
Can help??
-
kann sein das es nur unter windows geht?????? 8O
-
I cannot download this file. It always downloads a file called "files" that I cannot read. Do I need a certain software to read this or am I downloading wrong?
Thanks
-
hmmm...what browser do u use?
also, can u download any images? cause I use exact same script that used in download.php
(for now here (http://home.attbi.com/~vanowm/install_avatar.zip) is a mirror)
-
Thanks for the quick reply Veno. The morror does not work so I am lost. I can download other files and I have even tried "save target as" and still nothing. It is a small file can soemone email it to me?? I would appreciate it. :wink:
-
sorry about that, I posted without checking it...the link is working now.
-
That worked. :D Thanks
-
b]
Warning: Cannot add header information - headers already sent by (output started at c:\myserver\scripts\gallery\admin\admin_functions.php:671) in c:\myserver\scripts\gallery\admin\admin_functions.php on line 167
Warning: Cannot add header information - headers already sent by (output started at c:\myserver\scripts\gallery\admin\admin_functions.php:671) in c:\myserver\scripts\gallery\admin\admin_functions.php on line 168
Warning: Cannot add header information - headers already sent by (output started at c:\myserver\scripts\gallery\admin\admin_functions.php:671) in c:\myserver\scripts\gallery\admin\admin_functions.php on line 169
Warning: Cannot add header information - headers already sent by (output started at c:\myserver\scripts\gallery\admin\admin_functions.php:671) in c:\myserver\scripts\gallery\admin\admin_functions.php on line 170
Warning: Cannot add header information - headers already sent by (output started at c:\myserver\scripts\gallery\admin\admin_functions.php:671) in c:\myserver\scripts\gallery\admin\admin_functions.php on line 171
[/b]
----------------------------------------------------------------------------------
[/b]
[/quote]
Same here. I had this during install and I had to change the CMOD on files. Ive done all that and still get it.
I also get this when I try to upload a avater.
Parse error: parse error, unexpected ';', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/harv_e/public_html/4images/includes/upload.php on line 336
Fatal error: Cannot instantiate non-existent class: upload in /home/harv_e/public_html/4images/member.php on line 1144
Wow I hope I didnt mess it all up..
-
Same here. I had this during install and I had to change the CMOD on files. Ive done all that and still get it.
I also get this when I try to upload a avater.
this covered in FAQ (make sure u dont have any trailing space after closing ?>
Parse error: parse error, unexpected ';', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/harv_e/public_html/4images/includes/upload.php on line 336
Fatal error: Cannot instantiate non-existent class: upload in /home/harv_e/public_html/4images/member.php on line 1144
Wow I hope I didnt mess it all up..
I guess u did...
-
You where right about the space causing the header error. It took me three times to find it. The other error is still there and im trying to resolve. I may have to start over.
Parse error: parse error, unexpected ';', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/harv_e/public_html/4images/includes/upload.php on line 336
Fatal error: Cannot instantiate non-existent class: upload in /home/harv_e/public_html/4images/member.php on line 546
It happens when you try to upload a image.
-
check all closing } in/around the part u edited in member.php
-
hi,
thanx for this great mod!
but i've 3 problems:
1. there is no check of the image size (width + height) at upload
(users can upload all sizes, i set it to 50x50 pixel)
2. after upload, there are two "custom" entries
3. how i can remove "none" in menu
(i set default in database to a picture...)
cu
-
1. there is no check of the image size (width + height) at upload
(users can upload all sizes, i set it to 50x50 pixel)
perhaps u missed something during installation.
2. after upload, there are two "custom" entries
yes, I've seen this myself on some "sertain" systems. Not sure why this happens, also, its only show twice "custom" when u upload your avatar, but next time u upen control panel, it will be just ones...I dont have an answer for that :(
3. how i can remove "none" in menu
(i set default in database to a picture...)
search for blank.gif
-
1. perhaps u missed something during installation.
yes, i found my mistake in step 1.2.
i added it after not above...
2. yes, I've seen this myself on some "sertain" systems. Not sure why this happens, also, its only show twice "custom" when u upload your avatar, but next time u upen control panel, it will be just ones...I dont have an answer for that
yes, i realized, i can live with that...
3. search for blank.gif
already done,
thank you for this great mod !!!
-
hi! Can someone please help?
I uploaded this mod. and for some reason, I can see the avatar in the member_editprofile.php . but when I login as another user, i can't see it in the profile. :(
Can someone please help? I have {user_avatar_current} on the profile page. It's just not showing.
THank you for any help!
-
can someone please help?
-
sure, in memberlist.php find: $userlist .= "<td valign=\"top\" align=\"center\">".$user_name."</td>\n";
And replace with: $user_avatar = (!$user_row['user_avatar'] || $user_row['user_avatar'] == "blank.gif") ? "" : "<img src=\"".TEMPLATE_PATH."/avatars/".$user_row['user_avatar']."\">";
$userlist .= "<td valign=\"top\" align=\"center\">".$user_name."<br/ >".$user_avatar."</td>\n";
when i did this...I was able to view the user custom photo in the memberlist...HOWEVER, I'm still not able to see it in the member profile...is anyone around to help?
-
Hi! I was wondering if it would be possible to show the avatars on the site as random with the user's name and link to profile just like the random pic mod is.......so I guess this is a Mod Request.
Thank ya!
-
Hi! I was wondering if it would be possible to show the avatars on the site as random with the user's name and link to profile just like the random pic mod is.......so I guess this is a Mod Request.
not sure what do u mean, but showing random avatar on home page?
maybe show a random username?
or username with random avatar? avatars belong to users, not that users belong to avatars :lol:
-
Hi! I was wondering if it would be possible to show the avatars on the site as random with the user's name and link to profile just like the random pic mod is.......so I guess this is a Mod Request.
not sure what do u mean, but showing random avatar on home page?
maybe show a random username?
or username with random avatar? avatars belong to users, not that users belong to avatars :lol:
okay...let's try this......
What if there was a Random User Mod where we could format it like this:
{user_name}
{user_avatar_current}
{user_joindate}
but it would be on the home.html page
-
oaky...I figured out why my user's avatar wasnt showing in their profile. I had put the "lang_user_avatar" in the Edit Profile portion instead of in the show user profile portion. And I didnt figure this out until I was working on showing user's comments and V@no suggested it to someone else.
Anyways.....if anyone cares...problem solved.
-
hi,
got a small problem:
user has uploaded an avatar - after aving it is shown in the user profile - ok.
but when i try to upload a diferent image, the old one is still shown.
just after logging out an login again the new pic is shown.
can someone help?
thx,
o.
-
how can I show user image in user_logininfo.html ?
using same code as in comments didn`t work, i see something like that (http://jjj)
and what to do to escape these: http://www.pramoga.net/details.php?image_id=2533
Now all users are with avatar from first user
-
Hmmm... guess I somehow messed up something cause the avater option does not really look like what it should look like!?
Some php-tags are visible.... and what is with those two "custom" entries..... I only have the blnak.gif... no other pic in the folders..
(http://www.bigredserver.com/4images.jpg)
What went wrong?
-
to fix double "custom" items in the list, redo step 1.4 I just updated it.
the tags are shown only on 4images v1.7.1 and the fix is lost after the hack...we'r working on restoring it.
-
made a misstake in step 3.x ?
I havent check this mod after the hack, it might have some bugs...
-
the tags are shown only on 4images v1.7.1 and the fix is lost after the hack...we'r working on restoring it.
there u go:
http://www.4homepages.de/forum/index.php?topic=6806.0
-
Great, thanx! :)
-
Hi V@no why I don't see the avatar on the coments
This is my comment_bits.html
<tr>
<td class="commentrow{row_bg_number}" valign="top" nowrap="nowrap">
<b>{comment_user_name}</b><br>{user_avatar_current}<br>
{endif user_avatar_current}<br>{if comment_user_ip}<br/>
{comment_user_info}
{if user_avatar_current} <br /><br /><b>IP:</b> {comment_user_ip}{endif comment_user_ip}
</td>
<td width="100%" class="commentrow{row_bg_number}" valign="top">
</p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><b>{comment_headline}</b></td>
<td valign="top" align="right">{if admin_links}{admin_links}{endif admin_links}</td>
</tr>
</table>
<hr size="1" />
{comment_text}
</td>
</tr>
<tr>
<td nowrap="nowrap" bgcolor="#D3DCEB">
<span class="smalltext">{comment_date}</span>
</td>
<td bgcolor="#D3DCEB">
{comment_user_status_img}
{comment_user_profile_button}
{comment_user_email_button}
{comment_user_homepage_button}
{comment_user_icq_button}
</td>
</tr>
<tr>
<td colspan="2" class="commentspacerrow"><img src="{template_url}/images/spacer.gif" width="1" height="1" alt="" /></td>
</tr>
And I also want to show the avatar in the member list how can i do that?
-
Hi V@no How can I put this in the register_form.html
<TD colspan="2" class="head1">{lang_avatar}</TD>
</TR>
<TR>
<TD class="row2" valign="top" width="35%">
{if user_avatar_file}
<B>{lang_avatar_file}</B><BR />
<SPAN class="smalltext">
<B>{lang_avatar_dim}</B>
</SPAN>
<BR>
<b>{lang_or}</b><BR>
{endif user_avatar_file}
<B>
{lang_avatar_select}
</B>
</TD>
<TD class="row2" width="64%">
{if user_avatar_file}
{lang_upload}
<INPUT type="file" name="avatar_file" size="30" class="input" />
<p> </p>
<table border="0" width="100%">
<tr>
<td width="50%">{endif user_avatar_file}
<SELECT name="user_avatar" size="6" onkeypress="if(window.event.keyCode==13){ this.form.submit(); }" onChange="document.images.icons.src='{template_url}/avatars/'+document.creator.user_avatar.options[document.creator.user_avatar.selectedIndex].value;">{user_avatar_images}</SELECT>
</td>
<td> <TABLE width="100%" height="100" border="0">
<TR>
<TD align="center">
{user_avatar_current}
</TD>
</TR>
</TABLE>
<p> </td>
</tr>
</table>
</TD>
-
sorry, u cant without modifying register.php
-
Avatars in Register Form
What this do is to allow the new users selet the avatar they want when they register.
:arrow: What u have to do is this:
Open register.php:
Find the last:
$site_template->register_vars(array(
Replace:
//-----------------------
//------ Avatar ---------
//-----------------------
if ($config['avatar_use']){
$images = "";
$checked = ($user_avatar == "blank.gif" || $user_avatar == "") ? " selected" : "";
$images .= "\n<option value=\"blank.gif\"$checked>none</option>\n";
$dir = opendir(TEMPLATE_PATH."/avatars/users/");
while ($contents[] = readdir($dir)){;}
closedir($dir);
natcasesort ($contents);
foreach ($contents as $line){
$filename = substr($line,0,(strlen($line)-strlen(strrchr($line,"."))));
if ($filename == $user_info['user_id']) {
$checked = (stristr($user_avatar, "users/")) ? " selected" : "";
$images .= "\n<option value=\"users/$line\"$checked>".$lang['custom']."</option>\n";
}
}
$dir = opendir(TEMPLATE_PATH."/avatars/");
$contents = array();
while ($contents[] = readdir($dir)){;}
closedir($dir);
natcasesort ($contents);
$checked = "";
foreach ($contents as $line){
$filename = substr($line,0,(strlen($line)-strlen(strrchr($line,"."))));
$extension = substr(strrchr($line,"."), 1);
$checked = "";
if ($line == $user_avatar) { $checked = " selected"; }
if (strcasecmp($extension,"gif")==0 || strcasecmp($extension,"jpg")==0 || strcasecmp($extension,"jpeg")==0 || strcasecmp($extension,"png")==0 ){
if ($line != "blank.gif") {
$filename = str_replace("_", " ", $filename);
$images .= "<option value=\"$line\"$checked>$filename</option>\n";
}
}
}
}
//----------------------
//----- End Avatar -----
//----------------------
$site_template->register_vars(array(
"lang_avatar" => $lang['avatar'],
"lang_avatar_file" => $lang['avatar_file'],
"lang_avatar_dim" => $lang['avatar_max_dim']." ".$config['avatar_width']."x".$config['avatar_height'].$lang['px'],
"lang_avatar_select" => $lang['avatar_select'],
"user_avatar_images" => $images,
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_avatar == "") ? "blank.gif" : $user_avatar)."\" name=\"icons\" border=\"0\" alt=\"\">" : "",
"lang_or" => $lang['or'],
"user_avatar_file" => $config['avatar_user_custom'],
Save changes.
Open templates/<your_templates>/register_form.html:
Include:
<td colspan="3">{if user_avatar_images}
<tr>
<td class="row2" valign="top" colspan="3">{if user_avatar_file} <b>{lang_avatar_file}
</b><span class="smalltext"><b>(</b>{lang_avatar_dim}<b>)</b></span>
</td>
<td class="row2">{if user_avatar_file} {lang_upload} <input type="file" name="avatar_file" size="30" class="input" />
</td>
</tr>
<tr>
<td class="row1" colspan="3" >
<b><font color="#5CE960">O bien</font></b> , {endif
user_avatar_file} <b>{lang_avatar_select}
</b>{endif user_avatar_file} <select name="user_avatar" onkeypress="if(window.event.keyCode==13){ this.form.submit(); }" onChange="document.images.icons.src='{template_url}/avatars/'+document.creator.user_avatar.options[document.creator.user_avatar.selectedIndex].value;">
{user_avatar_images}
</select></td>
<td class="row1">{user_avatar_current}
</td>
</tr>
<tr>
<td colspan="3">{endif user_avatar_images}
</td>
If you see some errors tell me. But it does work :) I hope this helpin the future
-
great mod but i have a problem when
Allow users use their own avatars is "no"
member can upload avatar i dont know why
please help me
thanks
-
help me please
-
is these in the place?
{if user_avatar_images}
...
{endif user_avatar_images}
I can`t imagine how they can upload...
-
Hi!
Long time since I've been here, didn't really understand wheter there is a way to show the person who is logged in on the front page with an avatar. Next to the user name. Example:
Logged in as: Pete
(image of pete)
anyway to achieve this?
J
-
http://www.4homepages.de/forum/index.php?topic=3978.msg17618#msg17618
-
Hallo
Habe alles so installiert.... Es funktioniert soweit auch aber es zeigt mir folgendes an
{if user_avatar_file} Upload avatar:
Max. allowed 50x50px
ODER
{endif user_avatar_file} Select from the list: {if user_avatar_file}
{endif user_avatar_file}
Ich bringe diese ({if user_avatar_file} und {endif user_avatar_file}) nicht weg ohne dass der Upload nicht mehr funktioniert...
Diese erscheinen gleich 2 mal auf der Seite wo man die Avatar uploaden kann.
Wer weis rat
Danke
Hans-Ruedi
-
its in bug fixes
-
Parse error: parse error, unexpected ';', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/httpd/vhosts/chilebuses.cl/httpdocs/galerianueva/includes/upload.php on line 330
the error show in member.php
What happen?
-
the error show in member.php
you've made a mistake somewhere. restore backups and try again.
-
Wie bekomme ich das Avatarbild in die user_logininfo.html mit {user_avatar_current} gehts leider nicht wieso???
Gruß Marquis
-
Hi!
I have a question.
I installed this mod, but doesen't work.
No error message, but I when upload my avatar, no show it.
Plz help me!
View this site: http://fv.fpn.hu/
-
***removed***
sorry guy's .. my mistake! :oops:
-
Is there anyway to give guests a generic avatar when they post comments?
-
Ok, Ive installed the mod. Its very cool.
Just a few questions.
1. Is there a way to center the avatar in the comments_bit template. right now it looks odd. I cant figure out how to make it stick to the left. Example: http://cydonian.com/photos/details.php?image_id=1036 (scroll down)
2. For some reason when the user uploads his image the word 'Custom' does not appear in the list box. Its just blank. No text. Where can I fix this? what did i miss?
3. Im going to try and do the uploads.php over again because now I cant upload images to my site. It gives me an error. Has this happened to anyone else?
4. and last, any way I can give a generic avatar to guests when they post comments?
-
So...
1. I fixed. You can adjust the width of the space in the comments by editing the hspace=\"0\" field in the details.php. look for the following code.
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_row_comment['user_avatar'] == "") ? "blank.gif" : $user_row_comment['user_avatar'])."\" name=\"icons\" border=\"0\" hspace=\"0\" alt=\"\">" : "",
2. Still cant get the word 'Custom' to show up in the list when user uploads custom avatar. Still searching for an answer. Anyone?
3. I must of missed a line in upload.php because i redid the edit uploading images works fine.
4. Guest Avatar? Turns out you can just change the blank.gif to a generic avatar.
All i need to do is solve #2
Diggin' this mod.
-
Check Step 8 make sure you have this line:
$lang['custom'] = "Custom";
-
Yea its there.
Strange.
-
Hallo Leute!
Wollte mir grad das Mod instalieren und bekomm es nicht zum laufen... :(
bei mir schaut es im kontrollzentrum so aus: (wird alles angezeigt die Klammern sollten ja verborgen sein oder)?
Freiwillige Angaben
Homepage:
ICQ:
Avatar:
{if user_avatar_file} Upload avatar:
Max. allowed 50x50px
ODER
{endif user_avatar_file} Select from the list: {if user_avatar_file}
{endif user_avatar_file}
Bitte um hilfe!
-
bug fixes
-
Verstehe nicht ganz?
Was meinst Du mit Bug-Fixes?
vlg
-
Hi V@no,
when i use this mod it works great, thanks for that!
But one question:
I have made it so that when a user post a comment, his/her avatar is is also posted, and these avatars stays undependent of who is logged in.
I would like to integrate this feature with my guestbook, link: http://www.4homepages.de/forum/index.php?topic=7409.60
When the user1 has posted his/her contribution in the guestbook, his/her avatar is there while he/she is logged in, but when I log in as a user number 2, all avatars are changed to his/her avatar.
So the avatars displayed in the guestbook are all the one avatar the current logged in person has.
Anyway to fix it?
I did add these two things:
guestbook.php
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_row_comment['user_avatar'] == "") ? "blank.gif" : $user_row_comment['user_avatar'])."\" name=\"icons\" border=\"0\" hspace=\"15\" alt=\"\">" : "",
guestbook_comment_bit.html
{if user_avatar_current}
{user_avatar_current}
{endif user_avatar_current}
Can you tell what is still missing?
Should this post have been posted in the guestbook thread, if so, i am sorry.
Sincerly
GeneT
-
1) it seems that you added it in the wrong place
2) even if the line was in the right place it would not work.
3) since the guestbook does not save the user's ID, only name, I see no possibility combine both these mods, exept of do quiet many changes in the guestbook code AND guestbook database table
-
Parse error: parse error, unexpected '[' in /Gallery/lang/polish/main.php on line 306
//-----------------------------------------------------
//--- Admin Links -------------------------------------
//-----------------------------------------------------
$lang['edit'] = "[Edytuj]";
$lang['delete'] = "[Usun]";
$lang['last_comments'] = "Ostatnie komentarze";
$lang['last_comments_more'] = "Wiecej komentarzy...";
$lang['avatar'] = "Avatar: ";
$lang['avatar_file'] = "Upload avatar:";
$lang['avatar_max_dim'] = "Max. allowed";
$lang['avatar_select'] = "Select from the list:";
$lang['custom'] = "Custom";
?>
What happen?
-
$lang['edit'] = "[Edytuj]";
$lang['delete'] = "[Usun]";
dont use [ and ]
-
I used before installation Avatar and everything there was ok :/
-
//-----------------------------------------------------
//--- Admin Links -------------------------------------
//-----------------------------------------------------
$lang['edit'] = "Edytuj";
$lang['delete'] = "Usun";
$lang['last_comments'] = "Ostatnie komentarze";
$lang['last_comments_more'] = "Wiecej komentarzy...";
$lang['avatar'] = "Avatar: ";
$lang['avatar_file'] = "Upload avatar:";
$lang['avatar_max_dim'] = "Max. allowed";
$lang['avatar_select'] = "Select from the list:";
$lang['custom'] = "Custom";
Still not work :(
-
did u upload .php files in text mode not in binary?
-
So, I have made new files .php and also not working... :(
-
What editor do you use? I hope NOT something like Word 2000....wordpad or even notepad would work, only plain text editors (or special for html/php) must be used.
-
"Pajączek 5 NxG Professional" is polish product, the best :P
Probably, I fail :((
-
V@no,
Is it possible to add a field to the profile to use an offsite avatar instead of an uploaded one, possibly a php avatar rotator?
Great mod...
Now if I can just figure out where I messed up on the installation and fix the size limits. I checked everything, and they still don't work. I can live with it though. I only use the Gallery on a private family forum so my family can upload images and post them on the forum without having to have a website to host them on, so it isn't like it's a really busy Gallery or anything.
-
i've a small problem ist all work , on editprofile i upload and that show there the image i've upload, but after on profile that isn't showing the avatar , i've tried with {user_avatar}, {user_avatar_current} and still not showing the avatar on profile ...
any ideia of how can i fix it ?
-
My guess would be you did wrong Step 1. perhaps you've changed the wrong lines.
@Ax Slinger:
Sorry, not in this mod...
-
:D no i've do all correct, the problem its just you've forgot to added
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_row['user_avatar'] == "") ? "blank.gif" : $user_row['user_avatar'])."\" name=\"icons\" border=\"0\" alt=\"\">" : "",
for //------- Show Profile --------------
you've just added at edit profile , so this explain all, why this only show at edit, but now added it at show profile this is working fine ;) (member.php)
-
:D no i've do all correct, the problem its just you've forgot to added
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_row['user_avatar'] == "") ? "blank.gif" : $user_row['user_avatar'])."\" name=\"icons\" border=\"0\" alt=\"\">" : "",
for //------- Show Profile --------------
a-a (http://us.i1.yimg.com/us.yimg.com/i/mesg/emoticons7/68.gif)
The Step 1 is for "Show profile" and Step 1.4 is for "Edit profile".
Told ya you added it in the wrong place :P ;)
-
weird because i've made all correct, following all steps.... :wink: , in correct places !!!
but thats works , now doesn't matter anymore :mrgreen:
-
Parse error: parse error, unexpected ';', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/lavander/public_html/ga/includes/upload.php on line 332
I Can't Find the error...
I post my member.php in two parts for anybody can help me please...
REMOVED
-
My member.php part 2
REMOVED
-
and you showing that because....?????
Parse error: parse error, unexpected ';', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/lavander/public_html/ga/includes/upload.php on line 332
-
remember that you put on this forum when I put the same error that review member.php and put the member.php
So i put right now my upload.php
REMOVED
-
Just restore backups and try again...
-
Well, these error was fixed in my code, but i have another error
Fatal error: Call to undefined function: set_allowed_filetypes() in /home/lavander/public_html/ga/includes/upload.php on line 82
-
Just restore backups and try again...
Repeat untill all errors gone ;)
a little tip: pay attention to the brackets { }
-
jejeje I got it!!
Zend Studio r0x :)
-
THX!
great mod and really easy to install
little tip
pay attention on member.php when you have pm mod 8)
-
Und wie mache ich dass ohne englisch kenntnis?
Genau so etwas suche ich schon länger, nur verstehe ich kein englisch oder nur kleine Stücke davon, gibt es dass auch in deutsch oder wie komme ich da weiter?
Danke
Vitara
-
Why do these "{if user_avatar_file}" appear ?
(http://f-gallery.com.ua/avatar.gif)
I've checked the code twice!
-
bug fixes:
http://www.4homepages.de/forum/index.php?topic=7493.0
http://www.4homepages.de/forum/index.php?topic=6806.0
And please apply every fix for your 4images version:
http://www.4homepages.de/forum/index.php?board=17.0
-
bug fixes:
http://www.4homepages.de/forum/index.php?topic=7493.0
http://www.4homepages.de/forum/index.php?topic=6806.0
And please apply every fix for your 4images version:
http://www.4homepages.de/forum/index.php?board=17.0
It worked after this fix http://www.4homepages.de/forum/index.php?topic=7493.0
I've also applied all available security fixes.
Thanks!
-
Just wanted to say:
Thanks V@no.
It works perfect :D.
-
is it possible to add the avatar in the box 'Registered Users' after a member login right after their name and above the link to 'lightbox'?
And if a user hasn't chosen an avatar is it possible to put a default image or text in that space to remind the user to choose an avatar?
thanks
hmmm...I like the idea add avatar under the name :wink:
just did it on my site:open /includes/page_header.php
Find: "url_upload" => (!empty($url_upload)) ? $site_sess->url($url_upload) : $site_sess->url(ROOT_PATH."member.php?action=uploadform"),
Add after:"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_info['user_avatar'] == "") ? "blank.gif" : $user_info['user_avatar'])."\" name=\"icons\" border=\"0\" alt=\"\">" : "",
Then, open user_logininfo.html template. Add this:{user_avatar_current}
About default image - just change blank.gif with image u want.
and how make it as profile link too ?
cheers ;)
-
Hallo zusammen,
ich habe heute das Avatar-Mod installiert, soweit läuft es ohne Fehlermeldung ABER das
Avatar erscheint nicht an der richtigen Stelle, siehe auch Beispiel-Bild
Woran kann das liegen ?
(http://esc-digital.de/Bilder2/AvatarPlatz.jpg)
__________________________________________________________________________________
english
hello together,
I have installed the avatar mod today it works so far fine, yet... the avatar appears at
the shown above place which is not where it's supposed to be. I want it to be shown under the users name.
Any idea what's wrong ?
-
Hallo zusammen,
ich habe heute das Avatar-Mod installiert, soweit läuft es ohne Fehlermeldung ABER das
Avatar erscheint nicht an der richtigen Stelle, siehe auch Beispiel-Bild
Woran kann das liegen ?
(http://esc-digital.de/Bilder2/AvatarPlatz.jpg)
__________________________________________________________________________________
english
hello together,
I have installed the avatar mod today it works so far fine, yet... the avatar appears at
the shown above place which is not where it's supposed to be. I want it to be shown under the users name.
Any idea what's wrong ?
I guess you've put code from Step 11 in a wrong place ;)
-
Could you pls specify ...?
I made step '11' but am not sure where exactly it has to be placed.
-
Could you pls specify ...?
I made step '11' but am not sure where exactly it has to be placed.
Show us code of 'comment_bit.html' from your template, plz.
-
Show us code of 'comment_bit.html' from your template, plz.
<tr>
<td class="commentrow{row_bg_number}" valign="top" nowrap="nowrap">
<b>{comment_user_name}</b><br />
{comment_user_info}
{if comment_user_ip}<br /><br /><b>IP:</b> {comment_user_ip}{endif comment_user_ip}
</td>
<td width="100%" class="commentrow{row_bg_number}" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><b>{comment_headline}</b></td>
<td valign="top" align="right">{if admin_links}{admin_links}{endif admin_links}</td>
</tr>
</table>
<hr size="1" />
{comment_text}
</td>
</tr>
<tr>
<td class="commentrow{row_bg_number}" nowrap="nowrap">
<span class="smalltext">{comment_date}</span>
</td>
<td class="commentrow{row_bg_number}">
{comment_user_status_img}
{comment_user_profile_button}
{comment_user_email_button}
{comment_user_homepage_button}
{comment_user_icq_button}
</td>
</tr>
<tr>
<td colspan="2" class="commentspacerrow"><img src="{template_url}/images/spacer.gif" width="1" height="1" alt="" /></td>
</tr>
{if user_avatar_current}
{user_avatar_current}
{endif user_avatar_current}
-
Here's the full code for your 'comment_bit.html':
<tr>
<td class="commentrow{row_bg_number}" valign="top" nowrap="nowrap">
{if user_avatar_current}
{user_avatar_current}
{endif user_avatar_current}<br>
<b>{comment_user_name}</b><br />
{comment_user_info}
{if comment_user_ip}<br /><br /><b>IP:</b> {comment_user_ip}{endif comment_user_ip}
</td>
<td width="100%" class="commentrow{row_bg_number}" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><b>{comment_headline}</b></td>
<td valign="top" align="right">{if admin_links}{admin_links}{endif admin_links}</td>
</tr>
</table>
<hr size="1" />
{comment_text}
</td>
</tr>
<tr>
<td class="commentrow{row_bg_number}" nowrap="nowrap">
<span class="smalltext">{comment_date}</span>
</td>
<td class="commentrow{row_bg_number}">
{comment_user_status_img}
{comment_user_profile_button}
{comment_user_email_button}
{comment_user_homepage_button}
{comment_user_icq_button}
</td>
</tr>
<tr>
<td colspan="2" class="commentspacerrow"><img src="{template_url}/images/spacer.gif" width="1" height="1" alt="" /></td>
</tr>
Click here for an example (http://www.f-gallery.com.ua/img1237.htm?l=english")
-
Thank you verry much for your help :D
http://esc-digital.de/4images
-
Thank you verry much for your help :D
http://esc-digital.de/4images
Nichts zu danken! Nebenbei gesagt, schoene Galerie :)
-
Перечитал всё до буквы, но так и не понял отчего у меня выдаёт:
Parse error: parse error, unexpected T_VARIABLE in z:\home\includes\template.php(80) : eval()'d code on line 146
Подскажите пожалста...
-
После установки этого мода??? что-то не верится...ошибка в чём-то другом, возможно даже изменённые файлы были закчены kak BINARY а не kak TEXT (ACSII)
-
Переустановил но аватары не грузятся.... при загрузке они не отображаются.
-
{if user_avatar_file} Upload avatar:
Max. allowed 100x100px
ИЛИ
{endif user_avatar_file} Select from the list: {if user_avatar_file}
{endif user_avatar_file}
Вот это отображается в профиле пользователя в графе аватар...и ни чего не меняется при изменении или загрузке
-
Сделал исправления в includes/templates.php, Положение исправилось , но аватары всёравно не загружаются. Подскажите пожалуйста почему?
-
hey v@no,
after installing this mod i am getting following error when a user updates his/her member profile.
Fatal error: Call to undefined function: check_email() in /gallery/member.php on line 1086
Help ?? :(
-
Most probably you've made a misstake in functions.php...
-
V@no пожалуйста подскажите почему у меня аватары не загружаются хотя после выбора обзором картинка берётся и говорится что профайл пользователя обновлён. Но картинка не появляется нигде. Только файл blank.gif стоит автоматом у всех пользователей но его не видно т.к. он 1 px
-
Most probably you've made a misstake in functions.php...
could u please help me ..v@no :oops:
here's the function.php attached.
-
could u please help me ..v@no :oops:
here's the function.php attached.
There is a big chunk of code missing in your file! I hope you have bakups...
-
There is a big chunk of code missing in your file! I hope you have bakups...
Thanks! V@no...
got it fixed.. only this was missing:
function check_email($email) {
:oops:
-
I think there is more then just that missing..
-
Уважаемый V@no подскажите почему при запуске инсталятора этого мода получается ошибка:
Warning: fopen(avatar.sql): failed to open stream: No such file or directory in /home/public_html/install_avatar.php on line 34
Warning: fgetcsv(): supplied argument is not a valid stream resource in /home/public_html/install_avatar.php on line 35
Warning: fclose(): supplied argument is not a valid stream resource in /home/public_html/install_avatar.php on line 44
DB Error: Bad SQL Query: ALTER TABLE 4images_users ADD `user_avatar` VARCHAR( 255 ) NOT NULL
Duplicate column name 'user_avatar'
-
файл avatar.sql не найден в корневой директории галереии, или неправильно установленны аттрибуты файла (permissions)
А последняя ошибка говорит, что база данных уже раньше была обновлена.
-
Во я лохонулся .... Спасибо огромное V@no .
Подскажите пожалуйста какой мод можно прицепить для более полной инфы пользователей, ну чтоб при регистрации была возможност добавить город, день рождения телефон адрес и т.д. или не обязательно при регистрации , а при изменении профиля например.
Если есть такой подкиньте ссылочку пожалста.. :)
-
Во я лохонулся .... Спасибо огромное V@no .
Подскажите пожалуйста какой мод можно прицепить для более полной инфы пользователей, ну чтоб при регистрации была возможност добавить город, день рождения телефон адрес и т.д. или не обязательно при регистрации , а при изменении профиля например.
Если есть такой подкиньте ссылочку пожалста.. :)
Подскажите хоть как он называется
-
great mod, works perfekt :!:
Just aquestion, is it possible to autoresize uploadet avatars for being more user-friendly?
-
Just aquestion, is it possible to autoresize uploadet avatars for being more user-friendly?
Sorry, no.
-
I have problem from this modem.
Upload does not act me and I have something like this how below:
What it can this be.
Where I could make mistake.
I greet.
-
@Peterpl
you edited in a Wysiwyg Software and not the real Code! I belive :?
sincerly
vincent
-
How this is not true code do not understand so as exactly did it was in first fast.
Or you would can say where I could make mistake - because alone I be not able to this place find.
Thanks
I greet.
-
i've got the same problem as peterpl and following error:
Parse error: parse error, unexpected ';', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /usr/export/www/vhosts/funnetwork/hosting/paddygree/4images/includes/upload.php on line 331
how can i fix the problem?
-
@Peterpl:
Two words: Bug Fixes
i've got the same problem as peterpl and following error:
Not quiet sure what is so simular to Petrpl's problem, but in your case the answer is: restore backups and try again.
-
Уважаемый V@no плиз... подкинте ссылочку на дополнение инфы пользователями (город, дата рождения, тел и т.д) А то я скопировал и перевёл уже все странички форума, но так и не увидел того что мне нужно)
-
http://www.4homepages.de/forum/index.php?topic=10040.0
-
I do not understand what Bug Fixes.
I did all with instructions with first point peaceably.
-
I do not understand what Bug Fixes.
I did all with instructions with first point peaceably.
:roll:
Look in my signature
-
And what is in your signature, because nothing special I did not find it walks, about section
Bug Fix ?
-
http://www.4homepages.de/forum/index.php?board=17.0
apply ALL the fixes, ok?
-
they do not fit to my situation no of these mistakes.
can this something of different be ??
-
they do not fit to my situation no of these mistakes.
Did you apply ALL of them before you stated that? I dont think so.
These are the fixes for the bugs in 4images, if you dont wish to fix your 4images then dont cry that it doesnt work properly.
-
Any way to make it work on PMS ? (pms_view.html) ?
would be great see it work there 8)
Note: Show the avatar of the user of who have send :mrgreen:
-
Hi V@no again! ;) Hope you remember me :P
I've installed this mod, it works fine! Great Mod!
I have installed dreamboard and I would like to put the user's avatar in the showthread.php... I know is an addon you didn't make, but, I suppose you can give me some code to put in order to recover the user's current avatar, and then show it in the php file.
TheOracle tried a few code but the code puts an image in the first post where an user dont have avatar... so I hope you can put a the correct code, actually:
while ($user = mysql_fetch_array($posts)) {
$post_count = $user['user_posts'];
$user_id = $user['user_id'];
$user_rank = $user['user_level'];
$date_registered =(isset($user['user_joindate'])) ? format_date($boardconfig['date_format'], $user['user_joindate']) : REPLACE_EMPTY;
$signature = format_boardtext ($user['user_signature'],$boardconfig['html_board'], $boardconfig['wordwrap_board'], $boardconfig['bb_board'], $boardconfig['bb_image_board'],1);
$user_avatar = $user_info['user_avatar'];
$user_avatar_current = ($config['avatar_use'] && @file_exists(TEMPLATE_PATH."/avatars/".$user_avatar)) ? "<img src=\"".TEMPLATE_PATH."/avatars/".$user_avatar."\">" : get_gallery_image("blank.gif");
}
But the avatar shown don't correspond to user, any idea?
Many thanks :)
-
Try use
$user_avatar = $user['user_avatar'];
instead of$user_avatar = $user_info['user_avatar'];
if it doesnt work, then you'll need add user_avatar into the $sql query.
-
Doesn't seem to work :(
What happens: If a post have no replies, the avatar shows ok, if there are replies, for example: USER1 who has no avatar writes a post ME reply, and USER reply again, my avatar shows at the first post, in USER1
The complete sentence is:
$posts = mysql_query ("SELECT user_posts,user_id,user_name,user_level,
user_joindate,user_signature,user_avatar
FROM ".USERS_TABLE." WHERE user_id ='$thrstarter_id' ");
while ($user = mysql_fetch_array($posts)) {
$post_count = $user['user_posts'];
$user_id = $user['user_id'];
$user_rank = $user['user_level'];
$date_registered =(isset($user['user_joindate'])) ? format_date($boardconfig['date_format'], $user['user_joindate']) : REPLACE_EMPTY;
$signature = format_boardtext ($user['user_signature'],$boardconfig['html_board'], $boardconfig['wordwrap_board'], $boardconfig['bb_board'], $boardconfig['bb_image_board'],1);
$user_avatar = $user_info['user_avatar'];
$user_avatar_current = ($config['avatar_use'] && @file_exists(TEMPLATE_PATH."/avatars/".$user_avatar)) ? "<img src=\"".TEMPLATE_PATH."/avatars/".$user_avatar."\">" : get_gallery_image("blank.gif");
}
You see something anormal?
-
I think I was the one who state the $user_avatar string ... this is a dreamboard MOD code ... why is it in the avatar MOD's topic ? ...
The user_avatar field has already been discussed there.
However, change the above with :
$posts = "
SELECT ".get_user_table_field("", "user_id"). get_user_table_field(",", "user_name"). get_user_table_field(",", "user_level")." user_posts, user_joindate, user_signature, user_avatar
FROM ".USERS_TABLE."
WHERE ".get_user_table_field("", "user_id")." = ".$thrstarter_id;
$result = $site_db->query($posts);
while ($user = $site_db->fetch_array($result)) {
$post_count = $user['user_posts'];
$user_id = $user['user_id'];
$user_rank = $user['user_level'];
$date_registered = (isset($user['user_joindate'])) ? format_date($boardconfig['date_format'], $user['user_joindate']) : REPLACE_EMPTY;
$signature = format_boardtext ($user['user_signature'],$boardconfig['html_board'], $boardconfig['wordwrap_board'], $boardconfig['bb_board'], $boardconfig['bb_image_board'], 1);
$user_avatar = $user['user_avatar'];
$user_avatar_current = ($config['avatar_use'] && @file_exists(TEMPLATE_PATH."/avatars/".$user_avatar)) ? "<img src=\"".TEMPLATE_PATH."/avatars/".$user_avatar."\">" : get_gallery_image("blank.gif");
}
Note: Code edited above.
-
Yes, the code is of Dreamboard...
TheOracle I followed all the thread there, and at the end, you will give a solution for the avatar question... By the way, Avatars Mod is from V@no, so, I asked him in order to know his point of view, but sorry, I apologize ;)
About the sql code, doesn't work, know, thre is no picture shown now :(
-
About the sql code, doesn't work, know, thre is no picture shown now
I followed V@no's suggestion for switching from $user_info['user_avatar'] to $user['user_avatar'] ... doesn't it show the avatar images for each users (+ the fact the user_avatar field was, indeed, added into the $posts SQL query) ?
In the mean time, please take note the code has been edited above. ;)
-
Doesn't work still, and now with some errors, in order to see the progress, i give you the URL:
http://www.eruben.biz/Galeria/showthread.php?bid=6&threadid=4
In this URL the first person doesn't have avatar, the next user ( ME :p ) yes, and the next, the topic-starte not.
The code that now have is:
$posts = "
SELECT ".get_user_table_field(",", "user_id"). get_user_table_field(",", "user_name"). get_user_table_field(",", "user_level")." user_posts, user_joindate, user_signature, user_avatar
FROM ".USERS_TABLE."
WHERE ".get_user_table_field("", "user_id")." = ".$thrstarter_id;
$result = $site_db->query($posts);
while ($user = $site_db->fetch_array($result)) {
$post_count = $user['user_posts'];
$user_id = $user['user_id'];
$user_rank = $user['user_level'];
$date_registered = (isset($user['user_joindate'])) ? format_date($boardconfig['date_format'], $user['user_joindate']) : REPLACE_EMPTY;
$signature = format_boardtext ($user['user_signature'],$boardconfig['html_board'], $boardconfig['wordwrap_board'], $boardconfig['bb_board'], $boardconfig['bb_image_board'], 1);
$user_avatar = $user['user_avatar'];
$user_avatar_current = ($config['avatar_use'] && @file_exists(TEMPLATE_PATH."/avatars/".$user_avatar)) ? "<img src=\"".TEMPLATE_PATH."/avatars/".$user_avatar."\">" : get_gallery_image("blank.gif");
}
-
My mistake. I have just corrected a slight mistake above. :oops:
-
Ok, no errors now, but the problem persist.
The image, what is broken now, it shows in the topic starter, but the avatar must show with my user. :oops:
Sorry for asking and asking and asking ;)
-
Another user already reported this error from the dreamboard MOD topic. As I stated, I'm currently trying to find out a solution to fix this. If no one else posts this before I do, I will gladly post the corrections as soon as I find something. ;)
In the mean time, you might want to make the corrections from the quote you posted after mine (right above) to avoid further confusion. ;)
-
Ok then TheOracle... Thank you for the time trying to help me ;)
I'll look tomorrow in the other thread in order to see if you can make the fix :)
On more thanks.
-
Many thanks,it realy works great!
You are my hero of the day
(http://www.smiliemania.de/smilie132/00001376.gif)
-
(http://img523.imageshack.us/img523/1328/unbenannt6pu.th.jpg) (http://img523.imageshack.us/my.php?image=unbenannt6pu.jpg)
The avatar is at the wrong place, isn't it?
(http://img442.imageshack.us/img442/9977/unbenannt12oy.th.jpg) (http://img442.imageshack.us/my.php?image=unbenannt12oy.jpg)
The { } should not be visible, are they?
How can i fix these things?
-
@insane:
I wish I could see what you're trying to show but your 4.adbrite.com site kinds of restricting me to see the rest of your site. Perhaps you'd like to remove this link from your header so that I could check these screenshots ?
Another solution would be to attach your image within your next message in this topic so that I could click on the attachment. ;)
-
insane, so many times you've asked questions that are already answered in the faq or were fixed in our "bug fixes" forum, so how about do it the proper way: you go and apply EVERY SINGLE FIX that you can find in Bug fixes (http://www.4homepages.de/forum/index.php?board=17.0) forum for you 4images version.
Then, if something else come up, you ask. I think its not such a bad idea ;)
P.S. about first screenshot - design is your task, obviously you made a misstake in the template.
-
i'm scared of destroying my mods which are already installed by putting this fixes up :(
http://img442.imageshack.us/img442/9977/unbenannt12oy.jpg
http://img523.imageshack.us/img523/1328/unbenannt6pu.jpg
-
Hello V@ano,
first of all: Thanks for your many nice Mods. :)
*edit* problem solved.
-
@ insane
... prinzipiell solltest du die Installationsanweisungen genau befolgen und dann auch im Thema lesen ... :!:
... denn es wurde bereits alles was du fragst beantwortet ...
zum Bild 1 :
... http://www.4homepages.de/forum/index.php?topic=3978.msg59010#msg59010
... http://www.4homepages.de/forum/index.php?topic=6806.msg29767#msg29767
zum Bild 2 :
... du solltest {user_avatar_current} in die comment_bit.html einfügen, am besten unter {comment_user_level} ...
... und so wie es aussieht steht dieser Tag in der details.html ...
-
i'm scared of destroying my mods which are already installed by putting this fixes up :(
That's why people invented backups :P
If you are not going to fix your 4images, then you really cant expect much help...
-
pic 1 funktioniert nun.
{user_avatar_current} hab ich nicht in der details.html und {comment_user_level} kann ich nicht finden in der comment_bit.html:
<tr>
<td class="commentrow{row_bg_number}" valign="top" nowrap="nowrap">
<b>{comment_user_name}</b><br />
{comment_user_info}
{if comment_user_ip}<br /><br /><b>IP:</b> {comment_user_ip}{endif comment_user_ip}
</td>
<td width="100%" class="commentrow{row_bg_number}" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><b>{comment_headline}</b></td>
<td valign="top" align="right">{if admin_links}{admin_links}{endif admin_links}</td>
</tr>
</table>
<hr size="1" />
{comment_text}
</td>
</tr>
<tr>
<td class="commentrow{row_bg_number}" nowrap="nowrap">
<span class="smalltext">{comment_date}{if user_avatar_current}
{user_avatar_current}
{endif user_avatar_current}</span>
</td>
<td class="commentrow{row_bg_number}">
{comment_user_status_img}
{comment_user_profile_button}
{comment_user_email_button}
{comment_user_homepage_button}
{comment_user_icq_button}
</td>
</tr>
<tr>
<td colspan="2" class="commentspacerrow"><img src="{template_url}/images/spacer.gif" width="1" height="1" alt="" /></td>
</tr>
-
@ insane
... dann nehme in deinem Fall ... {comment_user_info} ...
-
ok scheint zu funktionieren danke dir.
-
hi,
your Mod is really great, but i have few questions.
I want to show the user avatar on the detail.html, just below the User Name.
I have already fixed it on page_header.php but i cannot see it.
Other problem is, that only registered user can see my avatar. But i want that all can see it.
here is my link: www.amoego.de (http://www.amoego.de)
Sorry my bad english, but i hope you can help me...please
-
Does anybody tryed this MOD on ver. 1.7.2 ?
-
Does anybody tryed this MOD on ver. 1.7.2 ?
Yea. Works fine for me :)
-
Its there a possibility to upload the avatar for a user by the ACP ?!?!?!
or have a different list thant only see the admin to asign a avatar for a user?!?!
thanks for your help!
-
First of all hello to everyone! :D
As you see this is my first post here.. I already read through this and other topics but unfortunately could not find any solution.. so here is my problem:
I used the mod on page 4 to implement the phpbb2 avatars... in comment_bit.html I added the following line:
{if comment_user_avatar} <img src="../phpbb2/images/avatars/{comment_user_avatar}"> {endif comment_user_avatar}
this works fine but as soon as someone who is not registered adds a comment right after a person who is registered and uses an avatar, the avatar of the registered person is also shown beside the post of the unregistered person..
i assume that I have to add something like " else <img src="../phpbb2/images/avatars/BLANK.GIF"> " but as I am a php noob I have no idea how to tell the script to link to a blank image as soon as a person is not registered or uses no avatar.. so I need your help :oops:
Sorry for my bad English.. i hope you understand what the problem is.. THANX
-
i've one problem with avatars size, i've make in ACP the max of 400 x 300 px , but this still allow users to upload images more larger !!! how fix it ? :?:
-
Tripple check Steps 3.x
-
i must change it :
$this->max_size['avatar'] = 99999999999;
:?: :oops:
-
Its file size not the dimentions.
-
Hi!
I installed this mod, but now I want to uninstall it beacuse of my database's size. How can I do to delete this field from my database?
Please, help me! :wink:
-
How can I do to delete this field from my database?
... by using phpMyAdmin ...
-
How can I do to delete this field from my database?
... by using phpMyAdmin ...
But how can I do this?? Just deleting de users_avatars field??
-
yes, that will do the trick ;)
-
How can I add the avatar selection in the register form?!?!?!
thanks for your help!!
-
Hat jemand eine Anleitung für 1.7.2 ?
Hab die ersten beiden Punkte mal versucht zu machen, hab aber die angeben nie finden können :x
Bitte helft mir, will unbedingt diesen Mod !
-
Hello, v@no and the others...
i ve a problem with this [MOD] :( :(
I can't upload a avatar...
*edit*
the file is uploded! But not entry in the database :(
the same is with memberphoto [mod] :(
i put my member.php and my db_field_definitions.php on this thread...
the avatar-path has CHMD 777 and user too..
P.S. on www.wartenaufden15.de/neu/ you can test it. with
USER test
PW test
-
and did you run the installer? are the new fields added into 4images_users table?
-
yes i did...
for a moment this all gone... but then... :(
-
Hallo,
ich bräuchte auch eine Anleitung für 1.7.2, da die Schritte der ersten Seite leider nicht ausführbar sind. Die Textstellen sind nicht zu finden.
______________________________
Hello,
I need instructions for 4images 1.7.2!
Can someone help me, please?
Kann mir bitte jemand helfen?
Vielen Dank
Much Thanks
-
Privet V@no. Delay MOD kak pokazano. Vse ok. NO avatar ne zalivaytsa zamesto vibrannogo avatara poyavlyaetsa "blank.gif"! v chem prichina?
-
Hallo,
ich bräuchte auch eine Anleitung für 1.7.2, da die Schritte der ersten Seite leider nicht ausführbar sind. Die Textstellen sind nicht zu finden.
______________________________
Hello,
I need instructions for 4images 1.7.2!
Can someone help me, please?
Kann mir bitte jemand helfen?
Vielen Dank
Much Thanks
Hallo
wo liegt denn dein Problem bei mir Funzt er einwandfrei nach der Anleitung
schau mal hier (http://www.cover-fun.de)
-
ich weiß leider nicht, wo ich den code in der member.php einfügen soll!
könntest du mir den code deiner member.php vielleicht senden?
Aber du hast auch schon version 1.7.2 installiert? bei 1.7.1 war es bei mir auch kein prob!
danke
-
ну так мне кто нибудь поможет? или будем на немецком речи толкать? которые я в принцепи не понимаю
-
Hello can not download the installer files
please anyone upload the files on a new link or attach them with the topic
thankx :)
-
done
-
instructions for 4images 1.7.2! plz
-
waleed... the instructions are the same...
I installed it today and it was easy...
just follow the same instructions!
-
i cant find the code in step 1.4.
kyzer can u send me the files plz ?
-
How limit size upload avatar? Like no more 50 kb..
-
hai V@em
I am Brazilian and alone I know to say Portuguese, I am using a translator online, I wait that it understands me!
I have 4Images Gallery 1.7.3, made all steps as you he described, I made he ties tres times and he happened the same thing. in the hour to edit profile it appears the table of avatar, but it does not appear no identification of avatr, the unicas things that appear are: a field and one botao of search to the side, one lists blank, and when I make upload of avatar, it appears. he would like that he helped me in this, and when I give upload in one another different one it only appears when I bring up to date the page! Do not have a skill of when you to give upload ja to appear the new? e the list, does not have as when vc to select, to appear the image to the side, to know as is to avatar, before choosing? Good I would like that you I repondesse in English and later procurase a translator and to place in mine lingua, I would help very
debtor and great work
-
sorry, I didnt quet understand the problem...try make a screenshot or something...
-
that description makes hard understand... maybe ill be more easy post at portuguese and wait for someone who knows portuguese helps you... (my suggestion) :wink:
-
V@no, great mod.
Just one problem:
When I try to use the [Browse...] button to select my avatar. Nothing happens. The image is not uploaded to the avatars folder, or the users folder. (The permissions are set to 777).
When I click 'Save' I get the 'Profile updated' response but it does not update anything.
I followed all the steps on the post, installed the mod using the files and everything. Only extra thing I did was delete the install_avatar.php and avatar.sql after I used it because I did not want to leave it there.
Do you know what the problem may be?
-
are you sure it doesnt update anything? or avatar not updated?
check your member_editprofile.html template and make sure its modifyed correctly as in Step 10
Also, check Step 4 and 12
I bet the misstake in either of these 3 steps.
-
I didn't explain myself completely.
The 'SAVE' button works EXCEPT when I use the [Browse...] button to update my avatar.
I can update my info, or update my avatar if I select it from the list of avatars that were uploaded to the server.
However, if I browse for the image and save it does not work at all.
IGC
-
Ok, then we narrowed it down to Step 10 or permissions issue.
-
Ok, then we narrowed it down to Step 10 or permissions issue.
You were right...
I forgot to add the little modification on the <form ...> line.
I didn't want to copy everything in step 10, because I didn't want to change the modifications I made to my layout. I tried to avoid any changes that were unneccessary, and I completely missed the first line :oops:
Thanks for your help V@no
-
Since you are not the first person experienced this I've highlighted the new added code in Step 10
-
How set quota size in 50 kilobyte for uload avatar? This possible?
-
in includes/upload.php set in bytes:
$this->max_size['avatar'] = 99999999999;
-
oops) sorry.. Thanks Vano :)
-
Great Mod V@no
I just installed it and it works just perfect :)
However there is one little problem for me. In my settings I have Max avatar width & height as 50 pixels. But for some reason, I was able to upload images of 100 width & 100 height.
I think it’s because of some other mod.
Tell me how I could I correct it.
Where to start digging??
//Edited
Stupid me. :oops:
I was checking being Admin.
-
Hello V@no
I am having a small issue with this Mod.
I installed the Mod from your first post and every thing was just perfect. It was working the way it should.
Then I applied the changes you posted here
http://www.4homepages.de/forum/index.php?topic=3978.msg17618#msg17618
To show the avatar below the registered user name in Menu (Above Lightbox).
After this, now when I select the avatar from the list, the avatar immediately change from the menu (Above Lightbox) but the avatar below the avatar list remain the same. (It only got changed when save profile and come back again)
Is there a way to solve this small issue??
I hope i was able to clear the point.
-
remove name=\"icons\" from page_header.php
-
Hi, great mod !
is it possible to display the avatar on the details page under the name of the image uploader ?
-
Wenn ich lediglich ein Avatar im Kontrollzentrum des jeweiligen Mitgliedes haben möchte, welches er selbst hochladen kann, welche der Änderungen sind im Mod erforderlich und welche kann ich weglassen. Oder ist dieser Mod dann gänzlich ungeeignet und es gibt eine andere Möglichkeit?
-
I have a huge problem with this mod . . .
I have done everything 2 times and when I choose an avatar, in the database there is no change
I may upload some avatar, avatar will be on server but there is still no change in database
In database there is still no number, letter nothin in row user_avatar !!!!
Can someone help mee ? ? ?
-
Hi, great mod !
is it possible to display the avatar on the details page under the name of the image uploader ?
very good question.. i want to know that, too...
-
Avatar wird nicht in Kommentaren abgebildet. Braucht auch nicht so zu sein, da ich die hochgeladenen Bilder lediglich als Benutzerfotos nutzen möchte, sollen Sie in dem Profil erscheinen. Dafür habe ich folgenden Code in der member_profil.html eingebunden
{if user_avatar_current} {user_avatar_current} {endif user_avatar_current}
Es erscheint kein Bild. Habe ich vorher schon etwas verkehrt gemacht?
-
(http://deferoblog.com/fotoclub/templates/default/avatars//image.gif)
Hi, I am able to upload Avatars and see them in Comments. Please help me figure out how to use premade Avatars for users. I have created templates/default/avatars/ and uploaded images there, but as the photo above shows it does nto work, thanks!
-
Hey, how can we change the max size to 100x100?
-
Hey, how can we change the max size to 100x100?
In admin control panel, "Avatar" settings has that option to change size in px.
-
Works perfect in 1.7.4.
Is it possible to have a sample of the preinstalled avatars display so users can see what they look like?
-
Ich möchte Avatar v2 für 4images v1.7.4 kann aber kein Wort Englisch
also ich habe einiges ausprobiert ich bekomme es mal wieder nicht hin ich bin so blöd!!!!!
Frage: Kann mir da jemand helfen?
-
Ich möchte Avatar v2 für 4images v1.7.4 kann aber kein Wort Englisch
also ich habe einiges ausprobiert ich bekomme es mal wieder nicht hin ich bin so blöd!!!!!
Frage: Kann mir da jemand helfen?
Hallo,
ich bräuchte auch eine Anleitung für 1.7.4, da die Schritte der ersten Seite leider nicht ausführbar.
Die Textstelle ist nicht zu finden.(member.php)
1.4.
Few lines below find:
Code:
$site_template->register_vars(array(
"user_name" => htmlspecialchars(stripslashes($user_name)),
Kann mir bitte jemand helfen?
-
it works with 1.7.4?
i dont know but there´s to bugy mod.
there is no changes on control panel to allow the avatar permission.
also irgendwie bekomm ich das mod auf 1.7.4 nicht zum laufen.
im controlpanel kann man zwar die avatar erlaubnis einstellen aber die änderung lässt sich nicht speicher.
-
hallo! Kann jemand bitte helfen?
Warning: opendir(./templates/default/avatars/users/) [function.opendir]: failed to open dir: No such file or directory in /www/htdocs/lachla/kot-07/member.php on line 1297
Warning: readdir(): supplied argument is not a valid Directory resource in /www/htdocs/lachla/kot-07/member.php on line 1299
Warning: closedir(): supplied argument is not a valid Directory resource in /www/htdocs/lachla/kot-07/member.php on line 1300
-
The marked ( * ) code above has been changed.
hallo! Kann jemand bitte helfen?
Warning: opendir(./templates/default/avatars/users/) [function.opendir]: failed to open dir: No such file or directory in /www/htdocs/lachla/kot-07/member.php on line 1297
Warning: readdir(): supplied argument is not a valid Directory resource in /www/htdocs/lachla/kot-07/member.php on line 1299
Warning: closedir(): supplied argument is not a valid Directory resource in /www/htdocs/lachla/kot-07/member.php on line 1300
-
First question solved, found here the answer: http://www.4homepages.de/forum/index.php?topic=3978.msg17618#msg17618 Thanks again V@no!
Another question, it is possible to add a preview of the avatar in the dropdown menu of selection? i mean something like in phpbb forums.
-
Thanks alot :D it work very well with 1.7.4 but i have a small problem when i click on photo
it show error and don't view Avatar anyone can help please?????????
-
its work well now i make a misstake when adding code to member_editprofile.html file :lol:
thanks
-
i have another problem what thats mean????
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in c:\apache\htdocs\gallery\includes\upload.php on line 333
Fatal error: Cannot instantiate non-existent class: upload in c:\apache\htdocs\gallery\admin\images.php on line 33
-
Hello there ,
I have saw this subject [Mod] Avatar v2.01
http://www.4homepages.de/forum/index.php?topic=3978.0
and in the end of the subject I tried to file downloads
http://gallery.vano.org/file6dl
files " install_avatar.php and avatar.sql "
:cry:
But the link was not working :cry:
so please upload the files again in this web :
http://www.gigasize.com
or
http://files-upload.com
-
Hello;
install_avatar.zip (http://www.4homepages.de/forum/index.php?action=dlattach;topic=3978.0;attach=816)
-
thnx alot :P
-
You're welcome!
-
Ich habe vor geraumer Zeit schon mal nachgefragt, aber keine Antwort bekommen: Ist dieser Mod dazu geeignet, das Benutzerprofil mit einem Avatarbild zu ergänzen? Und was muß ich hinzufügen oder weglassen?
-
i have problem !!!!!!!!!!!!! :!: :!: :!:
when non users inter the Advanced search theres an error:
Notice: Undefined index: user_avatar in /home/localhost/public_html/gallery/includes/page_header.php on line 149
here the code in page_header.php
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_info['user_avatar'] == "") ? "blank.gif" : $user_info['user_avatar'])."\" border=\"0\" alt=\"\">" : "",
how can i fix it?????
-
well thaaaaaaaaaaaanks alot for this MOD
I have small problem ... i really want to solve it :( i tried alot !!
In fact, im using arabic lang ! and whenever then user try to upload a new image ( he/she has to write the name of the image in English otherwise the image wont be uploaded if the write the image name in arabic )
Plz help me out to solve this
tell ya the truth, i wont ask for this if i didnt try to solve it !
FOR ALL ^_^ HELP PLZ
-
Solve it ^_^
the error was from rating mod :P
-
i have problem !!!!!!!!!!!!! :!: :!: :!:
when non users inter the Advanced search theres an error:
Notice: Undefined index: user_avatar in /home/localhost/public_html/gallery/includes/page_header.php on line 149
here the code in page_header.php
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_info['user_avatar'] == "") ? "blank.gif" : $user_info['user_avatar'])."\" border=\"0\" alt=\"\">" : "",
how can i fix it?????
-
Undefined index: user_avatar in /home/localhost/public_html/gallery/includes/page_header.php on line 149
user_avatar field in USERS_TABLE and db_field_definitions.php file ?
-
Undefined index: user_avatar in /home/localhost/public_html/gallery/includes/page_header.php on line 149
user_avatar field in USERS_TABLE and db_field_definitions.php file ?
i don't do anything but seem that it work well now (^_^) thats strange
-
Things not happend like that . Must be reason why.
-
How I can add this mod for 4images 1.7.4
-
How I can add this mod for 4images 1.7.4
Error message ? Source ? URL where no work ?
-
this is the first I add this mod for 4images 1.7.4 on localhost but uncuessful please help me. thank you (i am vietnamese, please to meet you)
-
I can help but need to know error message ... what is say for no work ?
-
since there is no error msg !!
how can he helps you !!
and its working with me and am using 1.7.4
if thunder said so ! :P that means he ganna help you ! only thing you have to do is explain the probem you have ( show him or us ther error msg ) ! ( have been helped alot by him * thanks * )
-
i used a New Registered User mod from state.php here is the code:
//-----------------------------------------------------
//--- New Member --------------------------------------
//-----------------------------------------------------
$sql = "SELECT *
FROM ".USERS_TABLE."
WHERE ".get_user_table_field("", "user_id")." <> ".GUEST."
ORDER by ".get_user_table_field("", "user_joindate")." DESC";
$row = $site_db->query_firstrow($sql);
$new_member = "Welcome to our new registered user, ".(($row[$user_table_fields['user_id']]) ? " <a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&user_id=".$row[$user_table_fields['user_id']])."\"><B>".$row[$user_table_fields['user_name']]."</B></a>\n" : "<B>".$row[$user_table_fields['user_name']]."</B>");
$site_template->register_vars("new_member", $new_member);
unset($new_member);
and i use {new_member} it show the new registered member just fine but how can i show his Avatar ???? :oops:
-
SQL Query start with guest level ... avatar can no show for GUEST ... no use for this.
-
Maybe somebody could give a code how to show avatars in users online list?
P.S. so far MOD runs great on my site with 1.4.7 version.
Thanks!
-
Maybe somebody could give a code how to show avatars in users online list?
Which one ? Is possible post topic of users online list ?
P.S. so far MOD runs great on my site with 1.4.7 version.
Hope mean v1.7.4 and not 1.4.7 ... if so ... run in fix now !! :| ... 8O
-
If I understand you correct:
I just want in default whois_online template show user avatar near his nickname. :wink:
Sorry for mistake. :lol:
-
Is MOD from icecream for whos online dropdown ... no find ... I use search but no result. :(
userpic with whos online and think avatar. ;)
-
So its no way I can show user's avatar near user nickname using this MOD?
In MOD Member Personal photo it was done with sessions.php.....
http://www.4homepages.de/forum/index.php?topic=6797.165 (http://www.4homepages.de/forum/index.php?topic=6797.165)
Maybe it's possible???
-
Ok so this:
http://www.4homepages.de/forum/index.php?topic=6797.msg60455#msg60455
?
In includes/sessions.php file,
find:
$sql = "SELECT s.session_user_id, s.session_lastaction, s.session_ip".get_user_table_field(", u.", "user_id").get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_invisible").", userpic
replace:
$sql = "SELECT s.session_user_id, s.session_lastaction, s.session_ip".get_user_table_field(", u.", "user_id").get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_invisible").", u.userpic, u.user_avatar
Find:
$user_profile_link = (!empty($url_show_profile)) ? str_replace("{user_id}", $row['session_user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&".URL_USER_ID."=".$row['session_user_id'];
add after:
$avatar_img = (isset($config['avatar_use']) && $config['avatar_use'] && @file_exists(TEMPLATE_PATH."/avatars/".$user_row['user_avatar']/".$row['userpic']) && $user_info['user_level'] >= USER) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_row['user_avatar'] == "") ? "blank.gif" : $user_row['user_avatar'])."\" name=\"icons\" border=\"0\" hspace=\"15\" alt=\"\">" : "";
Find:
$user_online_list .= "<a href=\"".$site_sess->url($user_profile_link)."\"><center>".$whos_online_userpic."<br />".$username."</a>".$invisibleuser."</center>".REPLACE_EMPTY. REPLACE_EMPTY;
replace:
$user_online_list .= "<a href=\"".$site_sess->url($user_profile_link)."\"><center>".$avatar_img."<br />".$username."</a>".$invisibleuser."</center>".REPLACE_EMPTY. REPLACE_EMPTY;
-
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/www/boxel.id.lv/includes/sessions.php on line 445 :(
And my sessions.php looks like this.
When changing code I found some difference between yours and mine code.
Are you using some other version???
-
<?php
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
............................
-
Please no need post ful file ... :?
in /home/www/boxel.id.lv/includes/sessions.php on line 445
Post from line 440 and line 450 from includes/sessions.php file.
-
Ok, think I fix ... try again.
-
Sorry,not working, it's a mistake somewhere between line 440 and 445.
Are you using Personal Photo Mod or a later version of 4images???
Because i found big difference between your and mine sessions.php.
Maybe there is a mistake.
I havent modified sessions.php and using default. :roll:
-
Are you using Personal Photo Mod
No for avatar but picture in profile yes.
a later version of 4images???
Fresh.
Because i found big difference between your and mine sessions.php.
No mine ... I find old post of MOD but, yes, possible thing change from old to new ...
I havent modified sessions.php and using default.
I use default and no extra query ... same SQL query by Jan in sessions ...
-
So please could you do a modifications to new sessions.php from 1.7.4,
because this isnt working, and I cant find a mistake.
Post it here please!
Thanks! :)
-
because this isnt working
Is say ? is do ? :roll:
-
:oops:
Cant understand what youmean with that :oops:
-
What is say on screen ? What is do ?? What affect ??
-
The same error as before :(
on this line : $avatar_img=........
-
on this line : $avatar_img=........
What is exac error :?:
How '......' help ?
-
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/www/boxel.id.lv/includes/sessions.php on line 445 Sad
-
on line 445
Ok so post your includes/sessions.php file from line 440 to line 450. I look.
-
Here goes my sessions.php line 440-450
:arrow:
$username = (isset($row[$user_table_fields['user_level']]) && $row[$user_table_fields['user_level']] == ADMIN && $config['highlight_admin'] == 1) ? sprintf("<b>%s</b>", $row[$user_table_fields['user_name']]) : $row[$user_table_fields['user_name']];
if (!$is_invisible || $user_info['user_level'] == ADMIN) {
$user_online_list .= ($user_online_list != "") ? ", " : "";
$user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/", $row['session_user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&".URL_USER_ID."=".$row['session_user_id'];
$avatar_img = (isset($config['avatar_use']) && $config['avatar_use'] && @file_exists(TEMPLATE_PATH."/avatars/".$user_row['user_avatar']/".$row['userpic']) && $user_info['user_level'] >= USER) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_row['user_avatar'] == "") ? "blank.gif" : $user_row['user_avatar'])."\" name=\"icons\" border=\"0\" hspace=\"15\" alt=\"\">" : "";
$user_online_list .= "<a href=\"".$site_sess->url($user_profile_link)."\"><center>".$avatar_img."<br />".$username."</a>".$invisibleuser."</center>".REPLACE_EMPTY. REPLACE_EMPTY;
}
(!$is_invisible) ? $num_visible_online++ : $num_invisible_online++;
$num_registered_online++;
}
$prev_user_ids[$row['session_user_id']] = 1;
:arrow:
-
Find:
$avatar_img = (isset($config['avatar_use']) && $config['avatar_use'] && @file_exists(TEMPLATE_PATH."/avatars/".$user_row['user_avatar']/".$row['userpic']) && $user_info['user_level'] >= USER) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_row['user_avatar'] == "") ? "blank.gif" : $user_row['user_avatar'])."\" name=\"icons\" border=\"0\" hspace=\"15\" alt=\"\">" : "";
replace:
$avatar_img = (isset($config['avatar_use']) && $config['avatar_use'] && @file_exists(TEMPLATE_PATH."/avatars/".$user_row['user_avatar']."/".$row['userpic']) && $user_info['user_level'] >= USER) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_row['user_avatar'] == "") ? "blank.gif" : $user_row['user_avatar'])."\" name=\"icons\" border=\"0\" hspace=\"15\" alt=\"\">" : "";
-
When I login I got an error:
:arrow:
DB Error: Bad SQL Query: SELECT s.session_user_id, s.session_lastaction, s.session_ip, u.user_id, u.user_level, u.user_name, u.user_invisible, u.userpic, u.user_avatar FROM gl_sessions s LEFT JOIN gl_users u ON (u.user_id = s.session_user_id) WHERE s.session_lastaction >= 1188581385 ORDER BY u.user_id ASC, s.session_ip ASC
Unknown column 'u.userpic' in 'field list'
:arrow:
And I am not showed in online list as logged in.
:arrow:
When I am not logged in it shows an error: an unexcepted error ocuured.please try agan later.
:arrow:
-
Unknown column 'u.userpic' in 'field list'
See in phpmyadmin, column no exist in USERS_TABLE table.
-
So if it doesnt exists,should I make it?
Or should I remove variable u.userpic from code???? :?
-
Or should I remove variable u.userpic from code????
If no use userpic MOD, remove u.userpic ... :?
-
OMG, at last I can see avatar near my nickname!!! Thanks for help so far!!! :wink: :wink: :wink:
But its got some bugs.
1. :arrow: Even I choose different avatar, it shows my nickname with default avatar- blank.gif.
Should I change something in templates whois_online or mistake is in sessions.php???
2. I can see avatar in top of nickname,but should be in front, like that--->>>> avatar| Nickname1
3. I want see users in vertical row not horizontal like that:
avatar| Nickname1
avatar| Nickname2
avatar| Nickname3
avatar| Nickname4
Where can I make that?
-
One more mistake:
When I am not logged in I cant see avatars from other users.
-
When I am not logged in I cant see avatars from other users.
Find:
$avatar_img = (isset($config['avatar_use']) && $config['avatar_use'] && @file_exists(TEMPLATE_PATH."/avatars/".$user_row['user_avatar']."/".$row['userpic']) && $user_info['user_level'] >= USER) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_row['user_avatar'] == "") ? "blank.gif" : $user_row['user_avatar'])."\" name=\"icons\" border=\"0\" hspace=\"15\" alt=\"\">" : "";
with:
$avatar_img = (isset($config['avatar_use']) && $config['avatar_use'] && @file_exists(TEMPLATE_PATH."/avatars/".$row['user_avatar'])) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($row['user_avatar'] == "") ? "blank.gif" : $row['user_avatar'])."\" name=\"icons\" border=\"0\" hspace=\"15\" alt=\"\">" : "";
avatar| Nickname1
avatar| Nickname2
avatar| Nickname3
avatar| Nickname4
Use Icecream MOD for whos online list. Can edit this. ;)
-
ok, but what about my default avatar???
It doesn shows my real avatar,just default.... :(
-
NO,it doesn helps, can not see avatar,sorry :( :( :(
And it shows my default avatar,not real one!!! :( :(
-
And it shows my default avatar,not real one!!!
Ok so please post icecream topic. I look. ;)
-
ok,thanks.
Can you give link to Icecream topic please? :wink:
-
have the same error: http://www.4homepages.de/forum/index.php?topic=3978.msg96499#msg96499
"Notice: Undefined index: user_avatar in /home/site/page_header.php on line 116"
This error only appear when a non-registered user search something, with member work perfectly, could somebody help me? :|
-
"Notice: Undefined index: user_avatar in /home/site/page_header.php on line 116"
Please post from line 110 to line 120. I look ...
-
"Notice: Undefined index: user_avatar in /home/site/page_header.php on line 116"
Please post from line 110 to line 120. I look ...
Thanks a lot thunder, here it is: :D
"url_categories" => $site_sess->url(ROOT_PATH."categories.php"),
"url_home" => $site_sess->url(ROOT_PATH."index.php"),
"url_login" => (!empty($url_login)) ? $site_sess->url($url_login) : $site_sess->url(ROOT_PATH."login.php"),
"url_logout" => (!empty($url_logout)) ? $site_sess->url($url_logout) : $site_sess->url(ROOT_PATH."logout.php"),
"url_member" => (!empty($url_member)) ? $site_sess->url($url_member) : $site_sess->url(ROOT_PATH."member.php"),
"url_upload" => (!empty($url_upload)) ? $site_sess->url($url_upload) : $site_sess->url(ROOT_PATH."member.php?action=uploadform"),
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_info['user_avatar'] == "") ? "blank.gif" : $user_info['user_avatar'])."\" border=\"0\" alt=\"\">" : "",
"url_lost_password" => (!empty($url_lost_password)) ? $site_sess->url($url_lost_password) : $site_sess->url(ROOT_PATH."member.php?action=lostpassword"),
"url_captcha_image" => $site_sess->url(ROOT_PATH."captcha.php"),
"has_rss" => false,
"rss_title" => "",
-
Change:
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_info['user_avatar'] == "") ? "blank.gif" : $user_info['user_avatar'])."\" border=\"0\" alt=\"\">" : "",
for:
"user_avatar_current" => (isset($config['avatar_use']) && $config['avatar_use'] && isset($user_info['user_avatar'])) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_info['user_avatar'] == "") ? "blank.gif" : $user_info['user_avatar'])."\" border=\"0\" alt=\"\">" : "",
-
working perfectly, thanks a lot man :D
-
Hallo hoffentlich spricht hier jemand Deutsch :)
Ich würde gerne den Avatar im Template: user_logininfo.html angezeigt haben. Dazu habe ich folgendes probiert, die Zeilen
{if_user_avatar_current}
{user_avatar_current}
{endif_user_avatar_current}
in das user_logininfo.html Template an entsprechender Stelle geschrieben. Leider zeigt er den Avatar aber nicht an. KAnn mir jemand helfen?? Danke schon mal!
Gruß Marquis
-
Weiß das echt keiner ??
-
Weiß das echt keiner ??
versuche mal
includes/page_header.php
suche
"url_lost_password" => (!empty($url_lost_password)) ? $site_sess->url($url_lost_password) : $site_sess->url(ROOT_PATH."member.php?action=lostpassword"),
dadrüber einfügen
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_info['user_avatar'] == "") ? "blank.gif" : $user_info['user_avatar'])."\" name=\"icons\" border=\"0\" alt=\"\">" : "",
-
Hi all
i installed this mod for a long time ago and it works great.
I have the old 4image version 1.7.1
I have now read all 24 sites of this mod, but i can´t found the answer for my only bug:
A user has uploaded his own avatar it is working great, but when he upload another avatar again, it shows the same avatar like before.
He has to refresh the site..to show the new one.
Is there a solution?
greetings,
glitzer
-
Hi all
i installed this mod for a long time ago and it works great.
I have the old 4image version 1.7.1
I have now read all 24 sites of this mod, but i can´t found the answer for my only bug:
A user has uploaded his own avatar it is working great, but when he upload another avatar again, it shows the same avatar like before.
He has to refresh the site..to show the new one.
Is there a solution?
greetings,
glitzer
Yes. In member.php file,
find:
$update_process = 1;
}
$action = "editprofile";
replace:
$update_process = 1;
}
redirect("member.php?action=editprofile");
-
Hi V@no.
now i get this error when i what to upload an avatar
Fatal error: Call to undefined function: redirect() in /www/htdocs/ekarten/pics01/member.php on line 1369
-
V@no ? I post this ... no V@no ... :?
For redirect error, you use old version of 4images. Please install all patch and upgrade from here:
http://www.4homepages.de/forum/index.php?board=17.0
-
ooh no sorry thunderstrike :oops:
Yes i use the old one 1.7.1 because i have so many mods included..i don´t want to loose them with the upgrade.
I hope the bug fixed help me to use this mod!
Thank you very much
-
Hi Thunderstrike,
me once again :lol:
I checked now all bug fixes..but it still does not work. (the avatar function, after uploading an avatar again, i have to refresh the site manually to see the new avatar)
Do you have another idea?
greets,
glitzer
-
Do you have another idea?
Yes, download last 4images version and go to includes/functions.php file. Copy & paste redirect function in your includes/functions.php file on top of ?> tag and try again.
-
Hi Thunderstrike!
Good Idea, but it also doesn´t work. :roll:
Perhaps you could take a look on my function file?
perhaps you can find mistakes or the problem.
Thank you very much for your help!
-
but it also doesn´t work.
And please read step 6 of my signature. You install code but then ?
-
Hi Thunderstrike.
its the same like before...the new avatar is not to see..i have to refresh the site..to see it.
greets glitzer
-
Sigh - ok change to this:
$update_process = 1;
}
header("Location: " . $site_sess->url(ROOT_PATH . "member.php?action=editprofile"));
-
hi Thunderstrike,
thank you for trying help me, but i think i let it be.
With your last code, it is always the same..the avatar is not refreshed.
I can live with this little problem ;-)
Thanks a lot for your quick support :D
-
http://gallery.vano.org/file20dl
not working link
-
install_avatar.zip attached to the 1st post
-
Dieses
onkeypress="if(window.event.keyCode==13){ this.form.submit(); }" onchange="document.images.icons.src='{template_url}/avatars/'+document.creator.user_avatar.options[document.creator.user_avatar.selectedIndex].value;
Was soll den das machen?
Soll das das jeweils angeklickte Bild zeigen?
-
Thanks you for the great MOD V@no! It works perfect! :thumbup:
Is there a way to get the avatar in DreamBoard too?
Chris.
-
Thanks you for the great MOD V@no! It works perfect! :thumbup:
Is there a way to get the avatar in DreamBoard too?
Chris.
There is problem for add avatar in dreamboard for topic creator. Is no show right.
-
Ok, thank you, thunderstrike, for anwer. It's not really important, to see an avatar in board.
In gallery it works and that is good and enough. ;-)
Chris.
-
copy and paste
kopyalarken hatalı kopyalama yapmışsın" syntax error" bu demek.
case "avatar":
show_avatar_row($val[0], $field_name, $value);
break;
case "text":
default:
show_input_row($val[0], $field_name, $value);
} // end switch
}
}
}
//-----------------------
//------ Avatar ---------
//-----------------------
function show_avatar_row($title, $name, $value = "blank.gif"){
global $config;
if ($config['avatar_use']){
$dir = opendir(TEMPLATE_PATH."/avatars/");
$contents = array();
while ($contents[] = readdir($dir)){;}
closedir($dir);
natcasesort ($contents);
echo "<tr width=\"50%\"class=\"".get_row_bg()."\" valign='top'>\n<td><p class=\"rowtitle\">".$title."</p></td>\n";
echo "<td width=\"50%\" height=\"115\" valign=\"middle\">\n<table>\n<tr>\n<td>\n<SELECT name=\"$name\" size=\"6\" onkeypress=\"if(window.event.keyCode==13){this.form.submit();}\" onChange=\"document.form.icons_$name.src='".TEMPLATE_PATH."/avatars/'+document.form.$name.options[document.form.$name.selectedIndex].value;\">";
if ($value == "blank.gif" || $value == "") {
$checked = " selected";
}else{
$checked = "";
}
echo "<option value=\"blank.gif\"$checked>none</option>\n";
foreach ($contents as $line){
$filename = substr($line,0,(strlen($line)-strlen(strrchr($line,"."))));
$extension = substr(strrchr($line,"."), 1);
$checked = "";
if ($line == $value) { $checked = " selected"; }
if (strcasecmp($extension,"gif")==0 || strcasecmp($extension,"jpg")==0 || strcasecmp($extension,"jpeg")==0 || strcasecmp($extension,"png")==0 ){
if ($line != "blank.gif") {
$filename = str_replace("_", " ", $filename);
echo "<option value=\"$line\"$checked>$filename</option>\n";
}
}
}
echo "</select>\n</td>\n<td valign='middle' align='left'>\n<img align='center' src=\"".TEMPLATE_PATH."/avatars/".(($value == "") ? "blank.gif" : $value)."\" name=\"icons_$name\" border=\"0\" alt=\"\">\n</td>\n</tr>\n</table>\n</td>\n";
}
}
//----- End Avatar -----
?>
-
Hello for version 1.7.6 doesn t work :(
i have this error
Parse error: syntax error, unexpected $end in /home/robertx/public_html/photos/member.php on line 1389
I look and this is end of file :
"
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
"content" => $content,
"msg" => $msg,
"clickstream" => $clickstream,
"lang_control_panel" => $lang['control_panel']
));
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
?> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< this is 1389 line
"
thanks
-
Die Mod läuft zu 100% in der aktuellen Version 1.7.6 !!!!!!
Habe diese gerade in meiner priv. Gallery eingebaut und ich habe schon sämtliche Mods installiert!
Man muss nur GANZ genau darauf achten wo es eingebunden werden soll, bzw. wo welcher Code hin soll! Ich habe selber keine Ahnung von PHP daher kann ich nur sagen, dass wenn man ganz genau schaut, dass es auch klappt und es hat beim ersten mal geklappt.
Was aber in der Anleitung fehlt ist, dass in dem Ordner "templates/< your template>/avatars" ein Ordner namens "users" noch rein muss, sonnst sagt er das es fehler in der member.php gibt!
So läuft die Mod 100%!
Was mich interessieren würde ist, dass ich dies ja nicht als Avatar nutzen möchte, sondern das die user dort ihr Foto hochladen können, davon abgesehen, ist das möglich das dies auch wären des Upload verkleinert wird?
Edit:
ist es auch möglich, dass wenn das avatar aus der liste ausgewählt hat, dass es direkt angezeigt wird? So das der user sich eines auch aussuchen kann, ohne das er erst auf absenden klicken muss um es erst zu sehen? Denn das nervt ja wenn ich eines aussuchen, es nicht sehen kann, dann auf absenden klicke und dann ist es das falsche!
Der Code der editprofile
{if user_avatar_images}
<tr>
<td colspan="2" class="head1"><span class="Stil3">» {lang_avatar}</span></td>
</tr>
<tr>
<td class="row2" valign="top"> {if user_avatar_file} <b>{lang_avatar_file}</b><br />
<span class="smalltext"> <b>{lang_avatar_dim}</b> </span><br />
{endif user_avatar_file}</td>
<td class="row2"> {if user_avatar_file}
Upload vom Computer:<br />
<input type="file" name="avatar_file" size="30" class="input" />
<br />
{endif user_avatar_file}
<br />Oder wähle eins aus der Liste aus:<br />
<select name="user_avatar" class="input" size="6" onkeypress="if(window.event.keyCode==13){ this.form.submit(); }" onchange="document.images.icons.src='{template_url}/avatars/'+document.creator.user_avatar.options[document.creator.user_avatar.selectedIndex].value;">
{user_avatar_images}
</select>
<table width="100%" height="100" border="0">
<tr>
<td align="center"> {user_avatar_current} </td>
</tr>
</table></td>
</tr>
{endif user_avatar_images}
Geht das nicht mit sonnem reload oderso?
-
Ich habe es geschafft das wenn ein User sein Bild (Avatar) Uploaden will, dass dieses dann verkleinert wird.
Der Code ist folgender:
// Filename to store image as
$FILENAME="test";
// Width to reszie image to
$RESIZEWIDTH=100;
// Width to reszie image to
$RESIZEHEIGHT=75;
function ResizeImage($im,$maxwidth,$maxheight,$name){
$width = imagesx($im);
$height = imagesy($im);
if(($maxwidth && $width > $maxwidth) || ($maxheight && $height > $maxheight)){
if($maxwidth && $width > $maxwidth){
$widthratio = $maxwidth/$width;
$RESIZEWIDTH=true;
}
if($maxheight && $height > $maxheight){
$heightratio = $maxheight/$height;
$RESIZEHEIGHT=true;
}
if($RESIZEWIDTH && $RESIZEHEIGHT){
if($widthratio < $heightratio){
$ratio = $widthratio;
}else{
$ratio = $heightratio;
}
}elseif($RESIZEWIDTH){
$ratio = $widthratio;
}elseif($RESIZEHEIGHT){
$ratio = $heightratio;
}
$newwidth = $width * $ratio;
$newheight = $height * $ratio;
if(function_exists("imagecopyresampled")){
$newim = imagecreatetruecolor($newwidth, $newheight);
imagecopyresampled($newim, $im, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
}else{
$newim = imagecreate($newwidth, $newheight);
imagecopyresized($newim, $im, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
}
ImageJpeg ($newim,$name . ".jpg");
ImageDestroy ($newim);
}else{
ImageJpeg ($im,$name . ".jpg");
}
}
if($_FILES['image']['size']){
if($_FILES['image']['type'] == "image/pjpeg" || $_FILES['image']['type'] == "image/jpeg"){
$im = imagecreatefromjpeg($_FILES['image']['tmp_name']);
}elseif($_FILES['image']['type'] == "image/x-png" || $_FILES['image']['type'] == "image/png"){
$im = imagecreatefrompng($_FILES['image']['tmp_name']);
}elseif($_FILES['image']['type'] == "image/gif"){
$im = imagecreatefromgif($_FILES['image']['tmp_name']);
}
if($im){
if(file_exists("data/avatars/$FILENAME.jpg")){
unlink("data/avatars/$FILENAME.jpg");
}
ResizeImage($im,$RESIZEWIDTH,$RESIZEHEIGHT,$FILENAME);
ImageDestroy ($im);
}
}
Ich habs zunächst in der member.php eingebaut!
Öffne: member.php
Suche:
$main_template = "member";
define('GET_CACHES', 1);
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$user_access = get_permission();
include(ROOT_PATH.'includes/page_header.php');
if ($action == "") {
$action = "lostpassword";
}
Danach einfügen:
// Filename to store image as
$FILENAME="test";
// Width to reszie image to
$RESIZEWIDTH=100;
// Width to reszie image to
$RESIZEHEIGHT=75;
function ResizeImage($im,$maxwidth,$maxheight,$name){
$width = imagesx($im);
$height = imagesy($im);
if(($maxwidth && $width > $maxwidth) || ($maxheight && $height > $maxheight)){
if($maxwidth && $width > $maxwidth){
$widthratio = $maxwidth/$width;
$RESIZEWIDTH=true;
}
if($maxheight && $height > $maxheight){
$heightratio = $maxheight/$height;
$RESIZEHEIGHT=true;
}
if($RESIZEWIDTH && $RESIZEHEIGHT){
if($widthratio < $heightratio){
$ratio = $widthratio;
}else{
$ratio = $heightratio;
}
}elseif($RESIZEWIDTH){
$ratio = $widthratio;
}elseif($RESIZEHEIGHT){
$ratio = $heightratio;
}
$newwidth = $width * $ratio;
$newheight = $height * $ratio;
if(function_exists("imagecopyresampled")){
$newim = imagecreatetruecolor($newwidth, $newheight);
imagecopyresampled($newim, $im, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
}else{
$newim = imagecreate($newwidth, $newheight);
imagecopyresized($newim, $im, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
}
ImageJpeg ($newim,$name . ".jpg");
ImageDestroy ($newim);
}else{
ImageJpeg ($im,$name . ".jpg");
}
}
if($_FILES['image']['size']){
if($_FILES['image']['type'] == "image/pjpeg" || $_FILES['image']['type'] == "image/jpeg"){
$im = imagecreatefromjpeg($_FILES['image']['tmp_name']);
}elseif($_FILES['image']['type'] == "image/x-png" || $_FILES['image']['type'] == "image/png"){
$im = imagecreatefrompng($_FILES['image']['tmp_name']);
}elseif($_FILES['image']['type'] == "image/gif"){
$im = imagecreatefromgif($_FILES['image']['tmp_name']);
}
if($im){
if(file_exists("data/avatars/$FILENAME.jpg")){
unlink("data/avatars/$FILENAME.jpg");
}
ResizeImage($im,$RESIZEWIDTH,$RESIZEHEIGHT,$FILENAME);
ImageDestroy ($im);
}
}
Öffne: templates/dein template/members_editprofil.html
Suche:
{lang_upload}
<INPUT type="file" name="avatar_file" size="30" class="input" />
Ersetze mit:
Upload vom Computer:<br />
<input type="file" name="image" size="35" class="input"><br /><input type="submit" value="upload" class="button">
Man kann es auch extra zu dem normalen Upload hinzufügen!
Das klappt wunderbar.
Aber nun zu ein paar kleinen dingen die mich stören!
Wie bekomme ich das hin, dass ich in diesem code:
// Filename to store image as
$FILENAME="test";
Den Username als Filename nehmen kann? Also ich habe da z.B Test genommen, aber ich möchte sowas in der Art "user_name", also das dieses Bild dann quasi als "Phisker.jpg" erstellt wird. Ich habe keine Ahnung davon, das mit diesem Code war auch nur Zufall das es klappte.
Dann kommt nich eines, ich habe angegeben:
if(file_exists("data/avatars/$FILENAME.jpg")){
unlink("data/avatars/$FILENAME.jpg");
Aber das hochgeladene Bild wird nicht im data/avatars erstellt, sondern immer nur im root Verzeichnis!
Bitte um Hilfe!
Gruß
Phisker
-
hallo,
sollte klappen:
$FILENAME="test";
=>
$FILENAME = $user_info['user_name'];
Kurt
-
Hy,
das klappt wirklich gut!
2 andere fragen!
1) Er lädt als nun das bild als Phisker.jpg hoch, aber wenn ich ein zweites hochlade, dann überschreibt er das andere, kann man was dagegen tun?
2) Ist es möglich einen ordner anzugeben? Weil er läd es immer im root hoch, obwohl ich ja angegeben habe unten data/avatars
if($im){
if(file_exists("data/avatars/$FILENAME.jpg")){
unlink("data/avatars/$FILENAME.jpg");
}
ResizeImage($im,$RESIZEWIDTH,$RESIZEHEIGHT,$FILENAME);
ImageDestroy ($im);
}
}
Danke, weiterhin!
-
Hello,
I installed this MOD, but only the registered member sees its avatar, we do not see the avatar of the other members in comments is it normal ?
thank you.
-
Hy,
das klappt wirklich gut!
2 andere fragen!
1) Er lädt als nun das bild als Phisker.jpg hoch, aber wenn ich ein zweites hochlade, dann überschreibt er das andere, kann man was dagegen tun?
2) Ist es möglich einen ordner anzugeben? Weil er läd es immer im root hoch, obwohl ich ja angegeben habe unten data/avatars
if($im){
if(file_exists("data/avatars/$FILENAME.jpg")){
unlink("data/avatars/$FILENAME.jpg");
}
ResizeImage($im,$RESIZEWIDTH,$RESIZEHEIGHT,$FILENAME);
ImageDestroy ($im);
}
}
Danke, weiterhin!
Diesen Fehler habe ich bis heute nicht beheben können, auch das es in einem Extra Ordner gespeichert wird, klappt einfach nicht!
-
Hello,
I installed this MOD, but only the registered member sees its avatar, we do not see the avatar of the other members in comments is it normal ?
thank you.
it is only the administrator who sees the avatars, not the members, nor the guests. ???
-
No, its for all users!
-
No, its for all users!
then, I have a problem ... :?
As you a solution or an explanation?
-
No, I am really sorry. I cannot English very well either, you anyway then would not understand this. Excuse me.
-
no problem ... I am french and not good in English ... thank you anyway.
but if someone has an explanation for my problem ...
-
Hello, all;
many thanks to the German and Turkish teams, for their beautiful foot-ball (soccer) match. I really spent a good afternoon. But sport is sport, and it maybe only one winner. For that I saw, turkish team is not definitively a looser. Many thanks to them all for the pleasure they gave us. Hey, Phisker B, I know that you are pleased. Just wait for the result from Russia vs Spain. Maybe we'll all get an enormous surprise. :D
Bonjour, autofolie;
si je comprends bien, les avatars ne sont visibles que par les membres connectés ou les administrateurs...
Quelque chose doit mal se passer, surtout au niveau du template, pour que des tags du type {if..} et {endif...} gênent l'affichage de ces fameux avatars.
Ce n'est qu'une piste. Merci d'avance de me dire comment, et avec quels fichiers vous avez modifié votre script (de quelle version s'agit'il?).
Salutations.
Best regards.
-
Bonjour manurom,
J'utilise la version 1.7.6 de 4images... après installation de ce MOD, je suis le seul (admin) à voir les avatars, les invités et les membres ne les voient pas...
J'ai modifié le script en suivant les indications présentes au début de ce sujet.
Merci pour ton aide,
Pascal
-
Vu, merci;
mais j'ai repéré ce matin deux brochets de presque 90 cm. Je m'en vais me coltiner avec eux.
Cependant, adepte du "no-kill", je relâcherai quelque prise que je prenne.
Je tenterai de mettre en place le MOD, grâce à mon programme 4images Mobile Server. Je vous tiens au courant de mes éventuels échecs ou réussites.
Bien à vous, et gardez espoir.
manurom
-
OK, merci,
Bonne journée au soleil... et taquinez bien les brochets :D
-
Dans member.php je ne trouve pas les lignes suivantes...
In member.php I do not find following lines...
Few lines below find:
Code:
$site_template->register_vars(array(
"user_name" => htmlspecialchars(stripslashes($user_name)),
Replace with:
Code:
//-----------------------
//------ Avatar ---------
//-----------------------
etc....
Ou doit on mettre le paragraphe "replace with" ?
where to put the paragraph " replace with " ?
-
Wie bekomme ich ein Refresh hier rein?
<select name="user_avatar" size="6" onkeypress="if(window.event.keyCode==13){ this.form.submit(); }" onchange="document.images.icons.src='{template_url}/avatars/'+document.creator.user_avatar.options[document.creator.user_avatar.selectedIndex].value;">
{user_avatar_images}
</select>
Überlegung 1
Also wenn ich was ausgewählt habe, dass die Seite ein refresh, aber zu der Tabelle rutscht? Ich habe alle Tabellenstücke mit id="tabellenname" versehen. Also wie gesagt, wenn ich ein Avatar ausgewählt habe, dass die Seite refresht und direkt zu der ID rutscht?
Überlegung 2
Oder ist das möglich, dass wenn ich ein Avatar auswähle, dass kein Refresh stattfindet, aber das man das Avatar direkt begutachten kann? Damit der user nicht immer erst auswählen muss und dann auf absenden und dann ist das nicht das gewollte Avatar und dann muss der user wieder Auswählen -> Absenden, so das dies halt dann nicht der Fall ist! Quasi eine Vorschauansicht!
-
Dans member.php je ne trouve pas les lignes suivantes...
In member.php I do not find following lines...
Few lines below find:
Code:
$site_template->register_vars(array(
"user_name" => htmlspecialchars(stripslashes($user_name)),
Replace with:
Code:
//-----------------------
//------ Avatar ---------
//-----------------------
etc....
Ou doit on mettre le paragraphe "replace with" ?
where to put the paragraph " replace with " ?
Dans "member.php" version 1.7.6, il faut chercher:
$site_template->register_vars(array(
"user_name" => format_text(stripslashes($user_name), 2),
Dans le fichier "includes/page_header.php", chercher:
"url_upload" => (!empty($url_upload)) ? $site_sess->url($url_upload) : $site_sess->url(ROOT_PATH."member.php?action=uploadform"),
et ajouter juste après:
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_info['user_avatar'] == "") ? "blank.gif" : $user_info['user_avatar'])."\" border=\"0\" alt=\"\">" : "",
Ne pas oublier d'affecter un CHMOD777 au dossier avatars/users.
-
Merci pour ton aide manurom :D
J'ai fais la modif. dans le fichier "includes/page_header.php"... et modifié le fichier /templates/<yourtemplate>/comment_bit.html ou j'avais mal placé le code... :?
Maintenant, ça a l'air de fonctionner !
extra.
encore merci,
Pascal
-
Hy,
das klappt wirklich gut!
2 andere fragen!
1) Er lädt als nun das bild als Phisker.jpg hoch, aber wenn ich ein zweites hochlade, dann überschreibt er das andere, kann man was dagegen tun?
2) Ist es möglich einen ordner anzugeben? Weil er läd es immer im root hoch, obwohl ich ja angegeben habe unten data/avatars
if($im){
if(file_exists("data/avatars/$FILENAME.jpg")){
unlink("data/avatars/$FILENAME.jpg");
}
ResizeImage($im,$RESIZEWIDTH,$RESIZEHEIGHT,$FILENAME);
ImageDestroy ($im);
}
}
Danke, weiterhin!
Wie ist das möglich das man dort den Ordner Pfad angeben kann?
-
Es ist etwas tricki mit den htmlspecialchars aber der MOD funktioniert unter 1.7.6 ausgezeichnet!
Danke / Thanks
-
Hola, miren e buscado y buscado y no puedo encontrar los codigos, etc. para crear un avatar para los usuarios de mi web. Como es el codigo y donde se instala es mi pregunta. de antemano gracias.
-
Es ist etwas tricki mit den htmlspecialchars aber der MOD funktioniert unter 1.7.6 ausgezeichnet!
Danke / Thanks
Ja das stimmt!
Habe diese mal an die Version 1.7.6 angepasst und eingedeutscht!
[Mod] Avatar v2 (by V@no) - 1.7.6 - Deutsch (http://www.4homepages.de/forum/index.php?topic=23012.0)
-
in this topic already be question about:
How to make so that avatars of the user it was deduced under the loaded photo
But the answer has not been received. Well so, who can help?
-
Sorry, I don't understand the question. Where do you want show the avatar?
-
Under photo, near to a name of the author
-
so, who can help?
How to make so that avatars was Under photo, near to a name of the author
-
Fast alles funktioniert !!! :D
Bei den Kommentaren, in der Memberliste passt alles, upload auch ok !!
nur im member_profile.html und in der user_logininfo.html bring ich kein Avatar zustande !
Da erscheint nur ein weises feld mit einem roten Kreuz.
Wenn ich in der page_haeder.php folgenden code einfüge:
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_info['user_avatar'] == "") ? "blank.gif" : $user_info['user_avatar'])."\" border=\"0\" alt=\"\">" : "",
bekomme ich folgenden Fehler!!
Parse error: syntax error, unexpected $end in /home/.sites/715/site780/web/4images/includes/template.php(101) : eval()'d code on line 52
Kann mir jemend helfen!!!!
MfG Cocker
-
http://www.4homepages.de/forum/index.php?topic=23072.0
-
Besten Dank für den Link, jetzt läuft fast alles wie es gehört !!!
Nur bei der SUCHE erhalte ich noch einen Fehler, ganz oben im Template, noch über dem Banner!
Notice: Undefined index: user_avatar in /home/.sites/715/site780/web/4images/includes/page_header.php on line 120
??? Wie bekomme ich den noch weg!! Der Fehler kommt aber nur wenn ich als GAST auf der Seite bin.
Eingeloggt kommt kein Fehler !!!
Kann wer helfen ?
MfG Ernst
-
Original installation instructions has no changes in includes/page_header.php
-
I have problem with some avatar (is displayng and discharging) on the web member_editprofile.html - when I click on some image. If You want to see it, please look on the page http://www.wrp.exploracje.pl (http://www.wrp.exploracje.pl) & http://www.wrp.exploracje.pl/member.php?action=editprofile (http://www.wrp.exploracje.pl/member.php?action=editprofile) (Polish: Panel kontrolny) login: demo , pass: demo 4images 1.7.6
-
In step 10 replace
<SELECT name="user_avatar" size="6" onkeypress="if(window.event.keyCode==13){ this.form.submit(); }" onChange="document.images.icons.src='{template_url}/avatars/'+document.creator.user_avatar.options[document.creator.user_avatar.selectedIndex].value;">{user_avatar_images}</SELECT>
With:
<SELECT name="user_avatar" size="6" onkeypress="if(window.event.keyCode==13){ this.form.submit(); }" onChange="document.images.icons.src='{template_url}/avatars/'+this.value;">{user_avatar_images}</SELECT>
-
thanks
good mod
the turkey hello
-
how can i download the installer file?????
-
Welcome to 4images forum.
The file is attached to the original post.
-
thanks
-
Hi V@no... happy to see you are still here...
I dont know whats up.. Im using 1.7.6
and getting this:
Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/lifephotography/htdocs/member.php on line 1352
which is:
"user_email" => format_text(stripslashes($user_email), 2),
together with code that looks like this:
$site_template->register_vars(array(
"lang_avatar" => $lang['avatar'],
"lang_avatar_file" => $lang['avatar_file'],
"lang_avatar_dim" => $lang['avatar_max_dim']." ".$config['avatar_width']."x".$config['avatar_height'].$lang['px'],
"lang_avatar_select" => $lang['avatar_select'],
"user_avatar_images" => $images,
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_avatar == "") ? "blank.gif" : $user_avatar)."\" name=\"icons\" border=\"0\" alt=\"\">" : "",
"lang_or" => $lang['or'],
"user_avatar_file" => $config['avatar_user_custom'],
"user_name" => htmlspecialchars(stripslashes($user_name)), 2),
"user_email" => format_text(stripslashes($user_email), 2),
"user_email2" => format_text(stripslashes($user_email2), 2),
"user_homepage" => format_text(stripslashes($user_homepage), 2),
"user_icq" => $user_icq,
"user_showemail_yes" => $user_showemail_yes,
"user_showemail_no" => $user_showemail_no,
"user_allowemails_yes" => $user_allowemails_yes,
"user_allowemails_no" => $user_allowemails_no,
"user_invisible_yes" => $user_invisible_yes,
"user_invisible_no" => $user_invisible_no,
"lang_profile_of" => $lang['profile_of'],
"lang_email" => $lang['email'],
Is there something I am doing wrong?
Thanks always
thelifephotography.com - 4images
www.thecenterofthenet.com - drupal
-
Ah sorry.. working 140 hours a week and trying to do site in between. I found my mistake, but I switched to the member pic instead ::)
-
is it possible to add the avatar in the box 'Registered Users' after a member login right after their name and above the link to 'lightbox'?
And if a user hasn't chosen an avatar is it possible to put a default image or text in that space to remind the user to choose an avatar?
thanks
hmmm...I like the idea add avatar under the name :wink:
just did it on my site:open /includes/page_header.php
Find: "url_upload" => (!empty($url_upload)) ? $site_sess->url($url_upload) : $site_sess->url(ROOT_PATH."member.php?action=uploadform"),
Add after:"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_info['user_avatar'] == "") ? "blank.gif" : $user_info['user_avatar'])."\" border=\"0\" alt=\"\">" : "",
Then, open user_logininfo.html template. Add this:{user_avatar_current}
About default image - just change blank.gif with image u want.
@V@no
After this modification, I am getting following error message on Search page.
Notice: Undefined index: user_avatar in xxxx\includes\page_header.php on line 204
And on line 204 I have this
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_info['user_avatar'] == "") ? "blank.gif" : $user_info['user_avatar'])."\" border=\"0\" alt=\"\">" : "",
When I view Search page as Admin, I don't get this error.
Can you please help.
-
Did steps 4 and 12?
-
Did steps 4 and 12?
Yes. I am pretty sure I followed your instructions completely. Infect, I double checked everything just now.
Addition user filed is there in db_field_definitions.php and in my DB, I can see "user_avatar" under 4images_users table.
Also, this error comes in Search page only when I view as a Guest. When logged in as Admin/User, I don't see this error message.
-
Bug fixes -> [1.7 - 1.7.6] Additional user fields not being used for guests (http://www.4homepages.de/forum/index.php?topic=22727.0)
-
Bug fixes -> [1.7 - 1.7.6] Additional user fields not being used for guests (http://www.4homepages.de/forum/index.php?topic=22727.0)
Sorry :oops:
I missed it. I should have looked there.
It works perfect now :)
-
Avatarbild in die user_logininfo.html ist auch zu sehen aber ist man in profil von ein andern erscheint das Avatarbild von mir.
-
Hello can anybody help me I have 1.7.6 version , 4times reinstalled member.php and for this reason also downloaded new 1.7.6 and I always get this error when entering to control panel :
I also tried this thread and I get always the same error: http://www.4homepages.de/forum/index.php?topic=23012.0
I m not able to upload avatar at all , I dont see no avatar in members profile so I dont know what to do anymore, before posting anything Im always trying 2days to make it myself but right now I give it up . Is first post updated for 1.7.6 ?
member.php I made 3x times from the beginning so I dont believe it would be my fault , pls help :cry:
Warning: opendir(./templates/default/avatars/users/) [function.opendir]: failed to open dir: No such file or directory in /home2/dancersr/public_html/pictures/member.php on line 1292
Warning: readdir(): supplied argument is not a valid Directory resource in /home2/dancersr/public_html/pictures/member.php on line 1294
Warning: closedir(): supplied argument is not a valid Directory resource in /home2/dancersr/public_html/pictures/member.php on line 1295
Warning: opendir(./templates/default/avatars/) [function.opendir]: failed to open dir: No such file or directory in /home2/dancersr/public_html/pictures/member.php on line 1304
Warning: readdir(): supplied argument is not a valid Directory resource in /home2/dancersr/public_html/pictures/member.php on line 1306
Warning: closedir(): supplied argument is not a valid Directory resource in /home2/dancersr/public_html/pictures/member.php on line 1307
-
Looks like you didn't do step 12 properly. Make sure you created the new folders and set persmissions to CHMOD 777
-
Thanks V@no for very quick respond , right now I will try it
Man you are amazing , Thanks a lot :D , compliments , you know perfectly what to do , I'm really stupid , I was controling only members.php but problem was like you 've said step 12. I made folder - *avatar *- instead *avatars *, permission were ok , I see everything now , now I will control the rest and will try to upload some avatars if everything works .
-
For some reason, I'm noticing that the avatars don't show to anyone logged out. Has anyone else had this problem, or has it been addressed already somewhere else in this thread?
Thanks in advance!
-
This should not be happening. Did you double check all the steps?
Any example where we can see this?
-
This should not be happening. Did you double check all the steps?
Any example where we can see this?
I backed up my database, and ran an older one before the Avatar add. Then re-ran the install for it. Now I am able to see the avatars ONLY when I am logged in under Admin, but not when logged in under a normal Member or as a Guest. I'm guessing there is a string I need to switch around in the modified scripts. I'll look through it all and see if I could find it myself. If anyone finds it before me, please post it up! Thanks!
Oh, and here is a direct link to my test site image page where the comments are at the bottom. If you guys see solid light-blue boxes under the user names, then I figured it out!
http://www.savegasforums.com/img-slum-7.htm
This is a screen cap of what it looks like for me being logged in as an admin...
http://www.savegasforums.com/img-this-is-what-the-admin-sees-9.htm
EDIT: Alright, I narrowed it down to being related to the database changes. When I grabbed the user database backup from my old site, and uploaded it, the Avatars didn't show at all. Then I reinstalled the install_avatars.php file (got the usual "double" message). Then, the avatars still just are able to be seen by the admin when in comments. Oddly, when looking at the member profiles, you can see the avatar whether guest, member, or admin. This is just weird.
-
To be sure
1) if you login as regular member, can you see the avatars?
2) did you install ALL Bug Fixes & Patches (http://www.4homepages.de/forum/index.php?board=17.0) for your version of 4images?
-
In the member_editprofile.htm is the Avatar showing up
But in member_profile.html, not work:
{if user_avatar_current}
<div id="userProfileOptionsAvatar">
<div class="border">
<div class="containerHead">
<div class="containerIcon"><img src="{template_url}/images/icon/avatarM.png" alt=""></div>
<h3 class="containerContent">{lang_avatar}</h3>
</div>
<div class="pageMenu">
<ul>
<li>{user_avatar_current}</li>
</ul>
</div>
</div>
</div>
{endif user_avatar_current}
-
ENGLISH
With this MOD, uploading an avatar does not resize according to the pixels that get in the administrator control panel.
I can give a solution?
And if you ask me, I applied the latest update
Ex
I am in the Admin Panel measures 150x100
But if a user upload a 500x300 image, the image is 500x300 and not SIGE resizes to 150x100
SPANISH
Con este MOD, al subir un avatar no se redimensiona según los pixeles que pongo en el panel de control de Administrador.
Me pueden dar una solución?
Y por si me preguntan, apliqué la última actualización
Ej.
Yo tengo en el Panel de Administrador como medidas 150x100
Pero si un usuario sube una foto 500x300, la imagen sige siendo 500x300 y no se redimensiona a 150x100
-
This mod does not resize avatars, and should give error message if avatar is bigger certain size, UNLESS uploaded by administrator.
Did you try upload it as regular member?
-
This mod does not resize avatars, and should give error message if avatar is bigger certain size, UNLESS uploaded by administrator.
Did you try upload it as regular member?
If I tried to upload it as a member, and I went anyway. Skipping any errors.
Verify that the codes are good, 4 times.
You can make a code to resize images that exceed the dimensions that apply?
-
ENGLISH
With this MOD, uploading an avatar does not resize...
Look here: http://www.4homepages.de/forum/index.php?topic=3978.msg119398#msg119398
-
Look here: http://www.4homepages.de/forum/index.php?topic=3978.msg119398#msg119398
But is not complete, saying such a repetitive yet got that error code.
What would the code work?
EDIT:
I applied and I do not work.
Why?
-
images are not being uploaded >>> ??? no error message appears..even the image gets uploaded...but it isnt stored in the server ...
what can i for this ?? even i checked with the ermision..even those are okay :)
-
check permissions on /templates/<yourtemplate>/avatars/users/ (should be CHMOD 777)
-
V@no ... sir...i check them .,.. evrything seems to be right.... 8O
ill try to install it again from the begining ....
thanks fot the reply sir !
-
Hi All!
How to display user_avatar_current in last_comments_bit.html on front page?
-
Hell Yeah !!
Vielen vielen Dank für diesen Mod.
War zwar eine Sache von 2 Stunden alles reinzubasteln und nebenbei
gleich anzupassen aber es hat sich gelohnt.
1.7.7 - Guest User Admin, alle sehen alle Avatars, eine pure Avatarparty ;)
watch it --> http://www.damebi.at/4images (http://www.damebi.at/4images)
-
Folgendes Problem, habe bereits alles versucht.
Wie kann ich den Randabstand von Avatar zu Rand komplett entfernen, sodass das Avatar den "Kasten" komplett ausfüllt.
Rechts und Links sind jeweils etwa 25px Platz zum Rand, das würde ich gerne entfernen, kann mir da jemand helfen? Bild habe ich angehängt.
Meine comment_bit.html habe ich auch nochmal als .txt angehängt.
Danke
-
Hi v@no,
it's me again.
Some user tried to change their avatars. But I got feedback that it doesn't work. The old picture is still in and there's no entry of a 2nd custom avatar in the list box. :(
I checked the source code two times but can not find a mistake. Do you have any idea where to search for a solution?
Regards clubsociety
-
can you reproduce it yourself? what browser your using is using?
-
is this compatible with 1.7.6 ? i did as the same .... but the image is not uploading :( !
i uploaded some via ftp..it is being displayed in the list but the usr cant upload a Avatar ? :S
i dont get any error messages ! ! i tried setting up new permision (777) to that folder..but it ddnt work ,Any Ideas ?
-
Please re-do step 10, there were some extra BBCode tags, I've removed them.
-
Please re-do step 10, there were some extra BBCode tags, I've removed them.
Thanks Sir !
-
Hi V@no,
I'm using firefox latest release.
The users take different bowsers.
My understandig is: I can upload several avatars. They will be listed in the box and I can choose from. Am I right?
Regards
-
Yes, that's correct.
-
Hello,
I want to show the avatar of the member in the description.
I put this in my page detail.html :
<tr>
<td colspan="3" class="commentUnderline">
<div class="commentTitle">
Description
</div>
</td>
</tr>
<tr>
<td colspan="3">
<div align="center">
<div class="blg"><div class="brg"><div class="tlg"><div class="trg">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td rowspan="2" width="50"><div class="imageDescriptionUser" style="margin-left:7px">{if user_avatar_current}
<span class="avatar">{user_avatar_current}</span>
{endif user_avatar_current}</div></td>
<td><div style="text-align: left; width:100%; padding-left: 13px; float:left"><h2 style="font: bold 1.8em Trebuchet MS, Arial, sans-serif; color: #333333; padding:0; margin:0">{image_name}</h2></div>
</td>
</tr>
<tr>
But it displays the avatar of the member connected, and not the owner....
-
did you try use {user_avatar} instead?
(sorry, don't have this mod installed to test it)
-
if i use {user_avatar}, no avatar is displayed
-
But any time I only get one avatar to choose from with the second option 'none'. If I upload more avatars ther's still only one in the box. I don't understand why. I can not find a mistake in the source code.
Any other ideas?
Regards
-
I like this mod.
but
I install this mod > http://www.4homepages.de/forum/index.php?topic=23866.0
and install paging class comment..
it displays at first page but second page doesnt
-
you must do steps 2 and 2.2 in ajaxcomments.php too.
-
it's ok.
this mod 1.7.7 work...
-
I don't know why, i got this error when i accessing control panel.
Parse error: parse error in C:\wamp\www\4images\includes\template.php(101) : eval()'d code on line 107
I attached my member.php . Please kindly check it for me.
-
Problem is in template files you've edited.
-
Problem is in template files you've edited.
Thank you so much V@no. I got it now. Only one problem, I tried to upload .png file. But it's says invalid extension. Where can i choose to accept png file, my default extensions for uploading png image is accpted. I can only png image for my gallery. Just that I can't upload for your avatar. Any idea?
And one more thing, for feature request, can you add auto image resize function for avatar ? Because, currently whenever user want to upload the avatar, they have to resize by theirself first. It's pretty troublesome nowadays. If you can hack the module from your auto resize image to avatar. It will be very nice. I'm looking forward to get this new feature from you.
Thank you very much indeed!
With Regards,
-
Привет, когда пытаюсь заинсталить в БД вываливаются ошибки:
DB Error: Bad SQL Query: INSERT INTO 4images_settings () VALUES ('avatar_use', '1')
Duplicate entry 'avatar_use' for key 1
DB Error: Bad SQL Query: INSERT INTO 4images_settings () VALUES ('avatar_user_custom', '1')
Duplicate entry 'avatar_user_custom' for key 1
DB Error: Bad SQL Query: INSERT INTO 4images_settings () VALUES ('avatar_width', '50')
Duplicate entry 'avatar_width' for key 1
DB Error: Bad SQL Query: INSERT INTO 4images_settings () VALUES ('avatar_height', '50')
Duplicate entry 'avatar_height' for key 1
Таблицы не создаются, и их нет в БД
-
ого, не пойму как это у меня всё работало когда я делал этот инсталер...
всё исправил, ещё раз сделайте Step 12.
-
помогло, спасибо
-
Super Mod ^_^ bei mir funktioniert alles bestens :)
Hab nur ein Problemchen 8O
Im Profil wird PN an dieses Mitglied nicht mehr angezeigt - und das gilt nur für den Admin
bei den Member ist es sichtbar - irgendwo muss ich was entfernt haben :(
Kann mir jemand bitte dabei helfen :thumbup:
Liebe Grüße,
Habi
-
Hallo allerseits,
ich möchte mich hier für diese tolle Unterstützung bedanken. Sauber und ordentlich beschrieben - selbst für einen weniger versierten Menschen. Das verdient ein großes Dankeschön! Die Einbindung des Mods hat auf Anhieb geklappt. :D
Ich wünsche allen ein gesundes und erfolgreiches Jahr 2010.
Gruß Bommel
-
hello Vano i have a problem please help,
in include/upload.php
i have the error Parse error: syntax error, unexpected ';', expecting T_FUNCTION
whenever i try to upload some avatars. Any ideas?? this error tells me that its on line 336 on upload.php and line 336 is the closing php tag ?>..
an ideas sir???
-
Probably made a mistake doing steps 3.2 and/or 3.3
Count { and }, they must match
-
Helo Vano
Im sorry and thank u for ur reply,
However i have a question previously i made a topic and u locked it :( :( :( :( :( :( :( :( :( :( :( :( :( :(
it was actually a reallly valid topic about the PMv2 and how that it is hard to modify as i have put ur media site MOD and the smilie MOD and so not alot of explanation is done and no one is maintaining the PMv2 to tell us what we should comment out as the MOD that u made (media site) has certain codes inside the code in which we are being told to comment out and this is why i made that topic for help :(, im sorry vano but did i do something wrong?
I dont know what i should do if i make another topic u maybe lock it again but i have another request it is please if u can let members have option to make there images or videos downloadable or not, when they proceed to upload something.
:( i hope i havent done anything wrong. im sorry again
-
5) Reply to the appropriate thread if you have questions regarding MODs (http://www.4homepages.de/forum/index.php?topic=3914.0#post_rule5)
You already replied to the mod in question, then you started a new topic, that's why it was locked.
-
Ok i have a very good question.
why does this only allow avatars and not actual photo image?
-
Say, what? You can use a photo image as avatar...
the question was not understood
-
Hello vano,
Im sorry please forgive me. What I meant was that can a person upload an actual image of themselves rather than an avatar (cartoon). When I think of avatar i think of the little cartoon images that are on xbox 360 :) :). Or does this modification actually can do both? because i read in some thread inside this topic that you said that you cannot find out how to make it so that a user can upload image profile picture, http://www.4homepages.de/forum/index.php?topic=3978.msg16408#msg16408 (http://www.4homepages.de/forum/index.php?topic=3978.msg16408#msg16408) so i was wondering why. Im very sorry vano.
-
yes, users are able upload their own avatars.
New features in v2:
1. users can upload their own avatars.
-
Hello vano,
Also for some reason users cannot seem to upload there own avatrs or pictures? it doesnt seem to work, ive set it 100 x 100 and i open image thats 100 x100 click save and it doesnt work
thanks
-
"doesn't work" - not helpful at all. Need more details.
-
@Vano,
thanks for reply
This is the problem i think some members had some time ago i was browsing throgh and came across this thread u made
http://www.4homepages.de/forum/index.php?topic=3978.msg16549#msg16549 (http://www.4homepages.de/forum/index.php?topic=3978.msg16549#msg16549)
I changed it to this but then i get an error saying unexpected ';', inside of the upload form. When i removed it and then everything was normal but it still didnt upload. I upload an avatar click save page refreshes but no image.
:(
thanks sir
-
In that case you've changed something else, because what you were supposed to change is a HTML template, it could not possibly cause the error you've mentioned. Without that extra data inside <form> tag, you won't be able upload files through that form.
[EDIT]
The error you've mentioned doesn't show inside a form, it shows when you submit the form (save profile), it comes from incorrect modification of includes/upload.php
-
@Vano,
What i did is deleted my /upload.php and replaced it with original upload.php and installed again very carefully the upload.php part modification. And i am still recieving problems regarding the fact it says parse error: syntax error, unexpected ';', expecting T_FUNCTION in /home/globa122/public_html/xxxxx/includes/upload.php on line 334
Code is below sir, When i add that part to the form tag <form> i seem to get that error above :( when 1 thing goes right 100 thing goes wrong for me i hate it
<?php
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* File: upload.php *
* Copyright: (C) 2002-2009 Jan Sorgalla *
* Email: jan@4homepages.de *
* Web: http://www.4homepages.de *
* Scriptversion: 1.7.7 *
* *
* Never released without support from: Nicky (http://www.nicky.net) *
* *
**************************************************************************
* *
* Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz- *
* bedingungen (Lizenz.txt) für weitere Informationen. *
* --------------------------------------------------------------- *
* This script is NOT freeware! Please read the Copyright Notice *
* (Licence.txt) for further information. *
* *
*************************************************************************/
if (!defined('ROOT_PATH')) {
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 .= '/'.get_basefile($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;
}
}
class Upload {
var $upload_errors = array();
var $accepted_mime_types = array();
var $accepted_extensions = array();
var $upload_mode = 3;
var $image_type = "";
var $max_width = array();
var $max_height = array();
var $max_size = array();
var $upload_path = array();
var $field_name;
var $file_name;
var $extension;
var $image_size = 0;
var $image_size_ok = 0;
var $lang = array();
function Upload() {
global $config, $lang;
$this->max_width['thumb'] = $config['max_thumb_width'];
$this->max_width['media'] = $config['max_image_width'];
$this->max_height['thumb'] = $config['max_thumb_height'];
$this->max_height['media'] = $config['max_image_height'];
$this->max_width['avatar'] = $config['avatar_width'];
$this->max_height['avatar'] = $config['avatar_height'];
$this->max_size['thumb'] = $config['max_thumb_size'] * 1024;
$this->max_size['media'] = $config['max_media_size'] * 1024;
$this->max_size['avatar'] = 99999999999;
$this->upload_mode = $config['upload_mode'];
$this->lang = $lang;
$this->set_allowed_filetypes();
}
function check_image_size() {
$this->image_size = @getimagesize($this->upload_file);
$ok = 1;
if ($this->image_size[0] > $this->max_width[$this->image_type]) {
$ok = 0;
$this->set_error($this->lang['invalid_image_width']);
}
if ($this->image_size[1] > $this->max_height[$this->image_type]) {
$ok = 0;
$this->set_error($this->lang['invalid_image_height']);
}
return $ok;
}
function copy_file() {
if ($this->image_type == "avatar") {
if (file_exists($this->upload_path[$this->image_type]."/".$this->file_name)) {
@unlink($this->upload_path[$this->image_type]."/".$this->file_name);
}
$ok = move_uploaded_file($this->upload_file, $this->upload_path[$this->image_type]."/".$this->file_name);
}else{
switch ($this->upload_mode) {
case 1: // overwrite mode
if (file_exists($this->upload_path[$this->image_type]."/".$this->file_name)) {
@unlink($this->upload_path[$this->image_type]."/".$this->file_name);
}
$ok = move_uploaded_file($this->upload_file, $this->upload_path[$this->image_type]."/".$this->file_name);
break;
case 2: // create new with incremental extention
$n = 2;
$copy = "";
while (file_exists($this->upload_path[$this->image_type]."/".$this->name.$copy.".".$this->extension)) {
$copy = "_".$n;
$n++;
}
$this->file_name = $this->name.$copy.".".$this->extension;
$ok = move_uploaded_file($this->upload_file, $this->upload_path[$this->image_type]."/".$this->file_name);
break;
case 3: // do nothing if exists, highest protection
default:
if (file_exists($this->upload_path[$this->image_type]."/".$this->file_name)) {
$this->set_error($this->lang['file_already_exists']);
$ok = 0;
}
else {
$ok = move_uploaded_file($this->upload_file, $this->upload_path[$this->image_type]."/".$this->file_name);
}
break;
}
@chmod($this->upload_path[$this->image_type]."/".$this->file_name, CHMOD_FILES);
return $ok;
}
function check_max_filesize() {
if ($this->HTTP_POST_FILES[$this->field_name]['size'] > $this->max_size[$this->image_type]) {
return false;
}
else {
return true;
}
}
function save_file() {
global $user_info;
$this->upload_file = $this->HTTP_POST_FILES[$this->field_name]['tmp_name'];
$ok = 1;
if (empty($this->upload_file) || $this->upload_file == "none") {
$this->set_error($this->lang['no_image_file']);
$ok = 0;
}
if ($user_info['user_level'] != ADMIN) {
if (!$this->check_max_filesize()) {
$this->set_error($this->lang['invalid_file_size']);
$ok = 0;
}
if (eregi("image", $this->HTTP_POST_FILES[$this->field_name]['type'])) {
if (!$this->check_image_size()) {
$ok = 0;
}
}
}
if (!$this->check_file_extension() || !$this->check_mime_type()) {
$this->set_error($this->lang['invalid_file_type']. " (".$this->extension.", ".$this->mime_type.")");
$ok = 0;
}
if ($ok) {
if (!$this->copy_file()) {
if (isset($this->lang['file_copy_error'])) {
$this->set_error($this->lang['file_copy_error']);
}
$ok = 0;
}
}
return $ok;
}
function upload_file($field_name, $image_type, $cat_id = 0, $file_name = "") {
global $HTTP_COOKIE_VARS, $HTTP_POST_VARS, $HTTP_GET_VARS, $HTTP_POST_FILES;
// Bugfix for: http://www.securityfocus.com/archive/1/80106
if (isset($HTTP_COOKIE_VARS[$field_name]) || isset($HTTP_POST_VARS [$field_name]) || isset($HTTP_GET_VARS [$field_name])) {
die("Security violation");
}
$this->HTTP_POST_FILES = $HTTP_POST_FILES;
$this->image_type = $image_type;
$this->field_name = $field_name;
if ($cat_id) {
$this->upload_path['thumb'] = THUMB_PATH."/".$cat_id;
$this->upload_path['media'] = MEDIA_PATH."/".$cat_id;
$this->upload_path['avatar'] = TEMPLATE_DIR."/".$cat_id."/avatars/users";
}
else {
$this->upload_path['thumb'] = THUMB_TEMP_PATH;
$this->upload_path['media'] = MEDIA_TEMP_PATH;
}
if ($file_name != "" && $this->image_type != "avatar") {
ereg("(.+)\.(.+)", $file_name, $regs);
$this->name = $regs[1];
ereg("(.+)\.(.+)", $this->HTTP_POST_FILES[$this->field_name]['name'], $regs);
$this->extension = $regs[2];
$this->file_name = $this->name.".".$this->extension ;
}
else {
$this->file_name = $this->HTTP_POST_FILES[$this->field_name]['name'];
$this->file_name = ereg_replace(" ", "_", $this->file_name);
$this->file_name = ereg_replace("%20", "_", $this->file_name);
$this->file_name = preg_replace("/[^-\._a-zA-Z0-9]/", "", $this->file_name);
ereg("(.+)\.(.+)", $this->file_name, $regs);
$this->name = $regs[1];
$this->extension = $regs[2];
}
if ($this->image_type == "avatar") {
$this->file_name = $file_name.".".$this->extension;
}
$this->mime_type = $this->HTTP_POST_FILES[$this->field_name]['type'];
preg_match("/([a-z]+\/[a-z\-]+)/", $this->mime_type, $this->mime_type);
$this->mime_type = $this->mime_type[1];
if ($this->save_file()) {
return $this->file_name;
}
else {
return false;
}
}
function check_file_extension($extension = "") {
if ($extension == "") {
$extension = $this->extension;
}
if (!in_array(strtolower($extension), $this->accepted_extensions[$this->image_type])) {
return false;
}
else {
return true;
}
}
function check_mime_type() {
if (!isset($this->accepted_mime_types[$this->image_type])) {
return true;
}
if (!in_array($this->mime_type, $this->accepted_mime_types[$this->image_type])) {
return false;
}
else {
return true;
}
}
function set_allowed_filetypes() {
global $config;
//Thumbnails
$this->accepted_mime_types['thumb'] = array(
"image/jpg",
"image/jpeg",
"image/pjpeg",
"image/gif",
"image/x-png"
);
$this->accepted_extensions['thumb'] = array(
"jpg",
"jpeg",
"gif",
"png"
);
//Avatar
$this->accepted_mime_types['avatar'] = array(
"image/jpeg",
"image/pjpeg",
"image/gif",
"image/x-png"
);
$this->accepted_extensions['avatar'] = array(
"jpg",
"jpeg",
"gif",
"png"
);
//Media
$this->accepted_extensions['media'] = $config['allowed_mediatypes_array'];
$mime_type_match = array();
include(ROOT_PATH.'includes/upload_definitions.php');
foreach ($mime_type_match as $key => $val) {
if (in_array($key, $this->accepted_extensions['media'])) {
if (is_array($val)) {
foreach ($val as $key2 => $val2) {
$this->accepted_mime_types['media'][] = $val2;
}
}
else {
$this->accepted_mime_types['media'][] = $val;
}
}
}
}
function get_upload_errors() {
if (empty($this->upload_errors[$this->file_name])) {
return "";
}
$error_msg = "";
foreach ($this->upload_errors[$this->file_name] as $msg) {
$error_msg .= "<b>".(($this->image_type == "avatar") ? $this->HTTP_POST_FILES[$this->field_name]['name'] : $this->file_name).":</b> ".$msg."<br />";
}
return $error_msg;
}
function set_error($error_msg) {
$this->upload_errors[$this->file_name][] = $error_msg;
}
} //end of class
?>
-
Help Help Help Needed...
Im having this error when i upload a file in avatar..??
Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /home/haider/public_html/directory/includes/upload.php on line 289
I checked the line 289 it was of this coding
$this->accepted_mime_types['avatar'] = array(
??
the whole code is
//Avatar
$this->accepted_mime_types['avatar'] = array(
"image/jpeg",
"image/pjpeg",
"image/gif",
"image/x-png"
);
$this->accepted_extensions['avatar'] = array(
"jpg",
"jpeg",
"gif",
"png"
);
This is the whole code of includes/upload.php
attached
Please help what to do??? :!: :!: :!: :?: :?: :?: :?: :?:
Looking forward to your help...
-
In which file i need to do the settings to show the avatar..
please see the attach file i have boxed the area i want to show the avatar..
=====================
ok i found the file now i guess its "user_logininfo" the the problem is i cant set the avatar..
but i dont know what to do to show avatar there..
i did put this in that code
{user_avatar_current}
so that current avatar shows up..but no use.. avatar is still not showing up??
{lang_loggedin_msg}<br /><br />
{user_avatar_current}
<br /><br />
<ul>
<li><a href="{url_lightbox}">{lang_lightbox}</a></li>
<li><a href="{url_control_panel}">{lang_control_panel}</a></li>
<li><a href="{url_logout}">{lang_logout}</a></li>
</ul>
can you or anyone help me set this avatar there...
-
Im having this error when i upload a file in avatar..??
You've made a mistake in step 3.6
In which file i need to do the settings to show the avatar..
http://www.4homepages.de/forum/index.php?topic=3978.msg17618;topicseen#msg17618
-
Im having this error when i upload a file in avatar..??
You've made a mistake in step 3.6
In which file i need to do the settings to show the avatar..
http://www.4homepages.de/forum/index.php?topic=3978.msg17618;topicseen#msg17618
but you can see my code of upload.php..
i dont understand what did i do wrong..please tell me what did i do wrong in 3.6..it looks to i did exactly what was written in 3.6 and i doubled checked but i cant seem to figure out where did i do wrong....im not a good programmer i guess..
please tell what to do?? what did i do wrong in 3.6??
and many thanks the for second one solution..the avatar is now showing in registered user place..
===================
.......
Hi..i tried your procedure..and yes a drop down list came up in the registration form..but problem is that when i choose a avatar from a drop down list it dont change..only the default image is appearing..
how to make it auto change..like in user edit profile..
when user edit profile and user click the avatar name in the dropdown list the avatar automatically changes..but here in registration form it dosent automatically changes..
you can see my site..
apnadigitalscope.com/directory
what to do??
-
i dont understand what did i do wrong..please tell me what did i do wrong in 3.6..it looks to i did exactly what was written in 3.6 and i doubled checked but i cant seem to figure out where did i do wrong....im not a good programmer i guess..
please tell what to do?? what did i do wrong in 3.6??
Move //Avatar
$this->accepted_mime_types['avatar'] = array(
"image/jpeg",
"image/pjpeg",
"image/gif",
"image/x-png"
);
$this->accepted_extensions['avatar'] = array(
"jpg",
"jpeg",
"gif",
"png"
);
above:above:: //Thumbnails
$this->accepted_extensions['thumb'] = array(
(I've updated the original instructions so it's less confusing)
Hi..i tried your procedure..and yes a drop down list came up in the registration form..but problem is that when i choose a avatar from a drop down list it dont change..only the default image is appearing..
how to make it auto change..like in user edit profile..
when user edit profile and user click the avatar name in the dropdown list the avatar automatically changes..but here in registration form it dosent automatically changes..
you can see my site..
apnadigitalscope.com/directory
what to do??
Replace </b>{endif user_avatar_file} <select name="user_avatar" onkeypress="if(window.event.keyCode==13){ this.form.submit(); }" onChange="document.images.icons.src='{template_url}/avatars/'+document.creator.user_avatar.options[document.creator.user_avatar.selectedIndex].value;">
with this: </b>{endif user_avatar_file} <select name="user_avatar" onkeypress="if(window.event.keyCode==13){ this.form.submit(); }" onChange="document.images.icons.src='{template_url}/avatars/'+this.value;">
-
...
Gosh!!!! Dude how you do these stuff..you are genius.. wanna Give you a big hug...And wanna say you Big big thank you..
i dont know how do you figure out where is the problem..
i mean how would any one know that avatar coding should b up and the thumbnail should b down..its just different functions..they should b working where ever i put them in that file.. i dont understand why they need to be aligned to work..
i mean 2+3=5 then 3+2=5 ..answer should b the same and both different functions are in same file they should have worked..
but yaar..im not the creater and programmer so dont understand on these stuffs much..
But really you are superb man.. i dont know how do you figure out the problem..but Many Many thanks..
Long Live 4images..superb..
-
they should b working where ever i put them in that file.. i dont understand why they need to be aligned to work..
Inside the function it would not make any difference up or down, but you put it outside function, inside a class it's not permitted.
This mod originally was created for 4images v1.7, since then the source of the gallery has changed, that's why you couldn't find the exact lines and put it as you thought was close to.
The updated instructions should now eliminate this confusion and be more universal regardless of 4images version (I hope)
-
is there a modification that adds this code to the member.php script:
htmlspecialchars($user_row['user_name']) : REPLACE_EMPTY,
because i cant find it in a clean version of 1.7.7
specifically the, htmlspecialchars part
or is it not possible to use this modification with version 1.7.7?
thanks so much
-
I've updated step 1
-
Fantastic!!!!!!! Worked like a charm. :D
Step 1.4 should also be updated if you feel like it.
Thanks again.
-
hi v@no.
can you also add feature which auto resize avatar when uploaded by user?
actually most users when upload avatar..they dont care for height and width and when they get error..then they dont upload..and choose from given..
cuz most users in my country dont know much about resizing of images throgh photoshop or any other tool..
can you please also make a mod..which auto resize the avatar when uploaded..like you did for thumnail and images.?
-
I have this error, but my safe mod is turned off, and upload pictures to the gallery work`s fine too!!! I have same errors on my host, and my local server too. Permissions on "avatars" and "users" are set 777! Any ideas or desicions? :-)
Warning: move_uploaded_file(/templates/default/avatars/users/20.gif) [function.move-uploaded-file]: failed to open stream: No such file or directory in C:\Users\***\Desktop\Server\root\includes\upload.php on line 105
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\Windows\Temp\php78A2.tmp' to '/templates/default/avatars/users/20.gif' in C:\Users\***\Desktop\Server\root\includes\upload.php on line 105
-
Looks like you've altered something related to template paths in your gallery. There shouldn't be any / infront of templates/default/
You could try play with this line in includes/upload.php
$this->upload_path['avatar'] = TEMPLATE_DIR."/".$cat_id."/avatars/users";
-
Hmm, any ideas in what file? Maybe i changed somewhere, but where???
-
global.php maybe
-
Ok, i want to show avatar of image owner on my details.html through something like this,
//-----------------------------------------------------
//--- USERS AVATARS -----------------------------------
//-----------------------------------------------------
$user_ava = "";
$sql = "SELECT u.user_avatar as name
FROM ".USERS_TABLE." u, ".IMAGES_TABLE." i
WHERE u.user_id = i.user_id";
$result = $site_db->query($sql);
while ($row = $site_db->fetch_array($result)) {
$user_ava = '<img src="'.ROOT_PATH.'templates/default/avatars/'.$row['name'].'">';
}
$site_template->register_vars(array(
"user_ava" => $user_ava,
));
unset($user_ava);
Very strange, but nothing result! No errors, no results! What`s wrong?
-
Hello sir i want to know.. how to have different avatar size in different pages..
i tried like this..but it didnt worked out.
<img src="{user_avatar_current}" width="80px" height="80px">
but it didnt worked.. please sir tell how can we set different size of avatar in different pages..or a specific page..
i mean to set specific width and height of avatar for only only that specific field..
-
Very strange, but nothing result! No errors, no results! What`s wrong?
Because you forgot specify image_id in the mysql query ;)
Anyhow, I'd recommend instead of creating whole new query, modify this line:
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email")."
Add at the end of the line , u.user_avatar (note the comma)
After that you can register template tag with this:
"user_ava" => "<img src=\"".TEMPLATE_PATH."/avatars/".(($image_row['user_avatar'] == "") ? "blank.gif" : $image_row['user_avatar'])."\" border=\"0\" hspace=\"15\" alt=\"\">",
i tried like this..but it didnt worked out.
<img src="{user_avatar_current}" width="80px" height="80px">
you are using HTML attributes width and height, they only accept numbers:
<img src="{user_avatar_current}" width="80" height="80">
"px" can only be used in CSS style:
<img src="{user_avatar_current}" style="width:80px; height:80px;">
-
Nothing result.
I`ve added this path , u.user_avatar at the end of this line:
$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").$additional_sql.get_user_table_field(", u.", "user_skype").", u.user_avatar
Then below register thi line:
"user_ava" => "<img src=\"".TEMPLATE_PATH."/avatars/".(($image_row['user_avatar'] == "") ? "blank.gif" : $image_row['user_avatar'])."\" border=\"0\" hspace=\"15\" alt=\"\">",
:(
-
you are using HTML attributes width and height, they only accept numbers:
<img src="{user_avatar_current}" width="80" height="80">
"px" can only be used in CSS style:
<img src="{user_avatar_current}" style="width:80px; height:80px;">
Sir im still not able to make the image size smaller??
i used both but still image not resizing..infact image dont even appear?? how to resize image for a particular page or for some specific place??
Actually im trying to add avatar top on header of page.. but i want it smaller on header then normal size on pages..
still trying to fix it..but couldnt find any thing..please suggest me what to do..
-
Did you try to do same this?
<img src="{user_avatar_current}" style="width:50px; height:50px;">
-
Did you try to do same this?
<img src="{user_avatar_current}" style="width:50px; height:50px;">
yes but its not working..
the only thing in header.html works is {user_avatar_current}
even if i dont put the height and with or any attribute , it will not work..??
so how to resize it..
i also tried to make another one like {user_avatar_header)
but got no success?
what to do??
-
{user_avatar_current} - Is it show avatar in your header or no?
-
{user_avatar_current} - Is it show avatar in your header or no?
yes avatar shows up on header with {user_avatar_current}
but i want to resize the avatar for my header place..
so im using img tag
but that tag i guess is not working..
isnt is there any way to have two different sizes like
{user_avatar_current}
which already is global one
but add another one
{user_avatar_header} with my custom size so i can use it in template anywhere i want?
i tried this..
in member.php
i added.
"user_avatar_header" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_row['user_avatar'] == "") ? "blank.gif" : $user_row['user_avatar'])."\" name=\"icons\" width=\"50\" height=\"50\" border=\"0\" alt=\"\">" : "",
under
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_row['user_avatar'] == "") ? "blank.gif" : $user_row['user_avatar'])."\" name=\"icons\" border=\"0\" alt=\"\">" : "",
and added
"user_avatar_header" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_avatar == "") ? "blank.gif" : $user_avatar)."\" name=\"icons\" width=\"50\" height=\"50\" border=\"0\" alt=\"\">" : "",
under
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_avatar == "") ? "blank.gif" : $user_avatar)."\" name=\"icons\" border=\"0\" alt=\"\">" : "",
then i tried using the {user_avatar_header} in my template page..but it didn't worked..
is there any way to achive two different sized??
also in template i tried this too..its also not working
<img src='{user_avatar_current}' style=' width:50px; height:50px;'>
-
{user_avatar_header} - this code will work only on member.php template pages.
Also try to use this:
"user_avatar_header" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_avatar == "") ? "blank.gif" : $user_avatar)."\" name=\"icons\" width=\"50px\" height=\"50px\" border=\"0\" alt=\"\">" : "",
-
Also try to use this:
"user_avatar_header" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_avatar == "") ? "blank.gif" : $user_avatar)."\" name=\"icons\" width=\"50px\" height=\"50px\" border=\"0\" alt=\"\">" : "",
No mate its not working..??? :(
any more suggestions??
@ V@no
where are you sir..really need your help here.. cant figure it out that how to make it possible??
-
Hello.. im using avatar mod.. its working perfectly fine..
but i want to add avatar on header with my defined size ( different from other avatars on main}
i mean i want to have one more tag like {user_avatar_current}
i want to have {user_avatar_header)
i did copied and did little bit changes in
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_row['user_avatar'] == "") ? "blank.gif" : $user_row['user_avatar'])."\" name=\"icons\" border=\"0\" alt=\"\">" : "",
and made it like
"user_avatar_header" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_row['user_avatar'] == "") ? "blank.gif" : $user_row['user_avatar'])."\" name=\"icons\" width=\"i50\" height=\"80\" border=\"0\" alt=\"\">" : "",
did this only in member.php and in details.php..
so now it only works if i visit the member profile page or control panel or some.
i mean with {user_avatar_header} the avatar shows of my defined size but only if i visit the control panel page..??
what to do please tell.??
i want it to work in every page of template {user_avatar_header}
Please Reply..
==================================
Here is the screenshot of my page.. im working on localhost..i mean wamp..so thats why cant give link of this..
The normal site link is
www.cusitlibrary.com
but working on header thing on my pc, that when it will be completed will upload it..
Ok here is the screenshot.
(http://i341.photobucket.com/albums/o377/pakistanihaider/screen.jpg) (http://i341.photobucket.com/albums/o377/pakistanihaider/screen.jpg)
Please Help Suggest what to do??
-
you need add that line into includes/page_header.php
(sorry I don't have access to source code at the moment, can't tell exactly where to add it, but you'll figure it out, I'm sure ;))
P.S.
you have an extra "i" in width value.
-
i added that to page_header.. but it only shows default avatar i mean blank.gif.. it dont show the avatar in use??
i added in
$site_template->register_vars(array(
is there something im missing?
-
Oh, my bad, I missed another thing you need to change: replace $user_row with $user_info
-
"user_avatar_header" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_info['user_avatar'] == "") ? "blank.gif" : $user_info['user_avatar'])."\" name=\"new\" width=\"100\" height=\"100\" border=\"0\" alt=\"\">" : "",
Awesome..its working great sir..Many thanks.. just needed to change the name too cuz when in control panel i did selected a avatar the change was appearing on top..so i changed the name field from icons to new.. and its working fine..
Many Many Many THanks..you are the boss..Superb Thanks..
Kind Regards
Haider
-
I`m too have a little Modification for this MOD. With this modification you will be possible to show image owner avatar, on details page or somewhere else!
1. In details.php find first SQL:
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description,
Replace it with:
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, u.user_avatar
1.1 Find below:
$cat_id = (isset($image_row['cat_id'])) ? $image_row['cat_id'] : 0;
Insert below:
$user_avatar_image = ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($image_row['user_avatar'] == "") ? "blank.jpg" : $image_row['user_avatar'])."\" name=\"new\" width=\"50\" border=\"0\" alt=\"\">" : "";
$site_template->register_vars(array(
"user_avatar_image" => $user_avatar_image,
));
2. Open details.html and insert this {user_avatar_image} where you want!
That`s All!
-
Hello V@no sir.
Please can you do little modifications in this Mod.. that when user upload avatar , it automatically resizes the avatar..
if it is not possible..so is it possible a pop up appears to show user that he/she must upload the avatar to the defined width and height??
Sir.. having very much issue with avatar.. Please find a way to solve the resizing problem..if resizing not possible ..then please tell how to show user the popup error of avatar..
Looking forward to your response.
Kind Regards,
Haider
-
tnx v@no it really works on me .
-
Hello
can I have since built a mod now I have the problem that when an avatar wants upladen is a white page what are the
mfg
-
Hallo,
zum einen funktioniert bei mir irgendwie die Pixelbeschränkung nicht. Und zum anderen hätte ich die Avatar-Vorschau gerne neben der Leiste und nicht darunter.
Kann mir vielleicht jemand sagen, was ich da ändern muss?
Vielen Dank.
Gruß,
Olli
-
.....
zum einen funktioniert bei mir irgendwie die Pixelbeschränkung nicht. Und zum anderen hätte ich die Avatar-Vorschau gerne neben der Leiste und nicht darunter.
...
zu der Vorschau, suche im Code step 10.):
<select name="user_avatar" size="6" onkeypress="if(window.event.keycode==13){ this.form.submit(); }" onchange="document.images.icons.src='{template_url}/avatars/'+this.value;">{user_avatar_images}</select>
<TABLE width="100%" height="100" border="0">
<TR>
<TD align="center">
{user_avatar_current}
</TD>
</TR>
</TABLE>
ersetze es mit:
<table width="100%" height="100" border="0">
<tr>
<td align="left" width="130">
<select name="user_avatar" size="6" onkeypress="if(window.event.keycode==13){ this.form.submit(); }" onchange="document.images.icons.src='{template_url}/avatars/'+this.value;">{user_avatar_images}</select>
</td>
<td align="left">
{user_avatar_current}
</td>
</tr>
</table>
zur Beschränkung, hast du das als User oder Admin getestet, als Admin gibt es keine Beschränkung.
mfg Andi
-
Hi,
das mit dem Layout habe ich, danke!
Ich habe es tatsächlich als Admin getestet. Habe aber jetzt komischerweise auch eine Beschränkung als Admin?!
Wie bekomme ich die jetzt wieder raus? ^^
Gruß,
Olli
-
...Wie bekomme ich die jetzt wieder raus? ^^
..
so gar nicht, ganz ehrlich wozu auch?
-
Hello SIr.
Im using your Mod.. its really nice feature in 4images. But i just want to ask from you please can you add one more feature in this mod, i mean user cant add image if its not the right size they need to use photoshop or other software to resize their image.
so is there any chance you add auto resize in this mod to like you added for images uploads.
Please it will be really Helpful.
Kind Regards
Haider
-
I have a question how to add an avatar in details.html information so that the one who added the picture wrote:
username: Admin [avatar.gif 50x50]
-
Do you want just the text or see actual avatar like this?
username: Admin (http://www.4homepages.de/forum/index.php?action=dlattach;attach=3678;type=avatar)
-
He wants to rewrite the file details.html so that it looked
Photo: for example, 500x500 and next to the right
Avatar 50x50 | avatar adding picture (no viewer)
just like the picture number. 1
or picture 2
-
miss line change password
-
После установки данного мода в редактирование профиля editprofile пропала графа изменить пароль.
Я верннул эту графУ, но когда нажимаю на кнопку "Изменить пароль" ничего не происходит
-
Hi!
I'm having issues after installing this MOD. The problem seems to be with this code that goes into member.php
//-----------------------
//------ Avatar ---------
//-----------------------
if ($config['avatar_use']){
$images = "";
$checked = ($user_avatar == "blank.gif" || $user_avatar == "") ? " selected" : "";
$images .= "\n<option value=\"blank.gif\"$checked>none</option>\n";
$dir = opendir(TEMPLATE_PATH."/avatars/users/");
$contents = array();
while ($contents[] = readdir($dir)){;}
closedir($dir);
natcasesort ($contents);
foreach ($contents as $line){
$filename = substr($line,0,(strlen($line)-strlen(strrchr($line,"."))));
if ($filename == $user_info['user_id']) {
$checked = (stristr($user_avatar, "users/")) ? " selected" : "";
$images .= "\n<option value=\"users/$line\"$checked>".$lang['custom']."</option>\n";
}
}
$dir = opendir(TEMPLATE_PATH."/avatars/");
$contents = array();
while ($contents[] = readdir($dir)){;}
closedir($dir);
natcasesort ($contents);
$checked = "";
foreach ($contents as $line){
$filename = substr($line,0,(strlen($line)-strlen(strrchr($line,"."))));
$extension = substr(strrchr($line,"."), 1);
$checked = "";
if ($line == $user_avatar) { $checked = " selected"; }
if (strcasecmp($extension,"gif")==0 || strcasecmp($extension,"jpg")==0 || strcasecmp($extension,"jpeg")
==0 || strcasecmp($extension,"png")==0 ){
if ($line != "blank.gif") {
$filename = str_replace("_", " ", $filename);
$images .= "<option value=\"$line\"$checked>$filename</option>\n";
}
}
}
}
//----------------------
//----- End Avatar -----
//----------------------
$site_template->register_vars(array(
"lang_avatar" => $lang['avatar'],
"lang_avatar_file" => $lang['avatar_file'],
"lang_avatar_dim" => $lang['avatar_max_dim']." ".$config['avatar_width']."x".$config['avatar_height'].
$lang['px'],
"lang_avatar_select" => $lang['avatar_select'],
"user_avatar_images" => $images,
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_avatar
== "") ? "blank.gif" : $user_avatar)."\" name=\"icons\" border=\"0\" alt=\"\">" : "",
"lang_or" => $lang['or'],
"user_avatar_file" => $config['avatar_user_custom'],
"user_name" => htmlspecialchars(stripslashes($user_name)),
The issue is ONLY on my editprofile.php page and this is the error:
Parse error: syntax error, unexpected $end in /home/xxxxxx/public_html/includes/template.php(101) : eval()'d code on line 244
I know it's got something to do with my template but I can't figure out how to fix it. If I remover the code entirely from members.php everything seems to be fine so it's obviously something wrong there.
Anyone know how to fix this problem? I've already looked through this (http://"http://www.4homepages.de/forum/index.php?topic=23072.msg125968#msg125968") but as I don't know where to look, I don't know how to fix it. Line 244 in template is this so it can't be the reason for the error:
$footer = $this->parse_template("footer");
Any help would be highly appreciated!
-
Hi
Noticed a little bug, admin users are about to upload their own avatar, but a registered user can't
You can fill in the form and save the profile, the page refreshes with "Error uploading image file:" at the top of the page with no report underneath
Any ideas? Is it a restrictions issue?
-
This Mod ready for gallery 1.8 and php 7+, but need this changes:
New step 1.4.
Few lines below find:
$site_template->register_vars(array(
"user_name" => format_text(stripslashes($user_name), 2),
Replace with:
//-----------------------
//------ Avatar ---------
//-----------------------
if ($config['avatar_use']){
$images = "";
$checked = ($user_avatar == "blank.gif" || $user_avatar == "") ? " selected" : "";
$images .= "\n<option value=\"blank.gif\"$checked>none</option>\n";
$dir = opendir(TEMPLATE_PATH."/avatars/users/");
$contents = array();
while ($contents[] = readdir($dir)){;}
closedir($dir);
natcasesort ($contents);
foreach ($contents as $line){
$filename = substr($line,0,(strlen($line)-strlen(strrchr($line,"."))));
if ($filename == $user_info['user_id']) {
$checked = (stristr($user_avatar, "users/")) ? " selected" : "";
$images .= "\n<option value=\"users/$line\"$checked>".$lang['custom']."</option>\n";
}
}
$dir = opendir(TEMPLATE_PATH."/avatars/");
$contents = array();
while ($contents[] = readdir($dir)){;}
closedir($dir);
natcasesort ($contents);
$checked = "";
foreach ($contents as $line){
$filename = substr($line,0,(strlen($line)-strlen(strrchr($line,"."))));
$extension = substr(strrchr($line,"."), 1);
$checked = "";
if ($line == $user_avatar) { $checked = " selected"; }
if (strcasecmp($extension,"gif")==0 || strcasecmp($extension,"jpg")==0 || strcasecmp($extension,"jpeg")==0 || strcasecmp($extension,"png")==0 ){
if ($line != "blank.gif") {
$filename = str_replace("_", " ", $filename);
$images .= "<option value=\"$line\"$checked>$filename</option>\n";
}
}
}
}
//----------------------
//----- End Avatar -----
//----------------------
$site_template->register_vars(array(
"lang_avatar" => $lang['avatar'],
"lang_avatar_file" => $lang['avatar_file'],
"lang_avatar_dim" => $lang['avatar_max_dim']." ".$config['avatar_width']."x".$config['avatar_height'].$lang['px'],
"lang_avatar_select" => $lang['avatar_select'],
"user_avatar_images" => $images,
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_avatar == "") ? "blank.gif" : $user_avatar)."\" name=\"icons\" border=\"0\" alt=\"\">" : "",
"lang_or" => $lang['or'],
"user_avatar_file" => $config['avatar_user_custom'],
"user_name" => format_text(stripslashes($user_name), 2),
New step 3.6.
Find:
//Thumbnails
$this->accepted_extensions['thumb'] = array(
Insert above:
//Avatar
$this->accepted_mime_types['avatar'] = array(
"image/jpeg",
"image/pjpeg",
"image/gif",
"image/x-png"
);
$this->accepted_extensions['avatar'] = array(
"jpg",
"jpeg",
"gif",
"png"
);
Enjoy! :)
-
:thumbup: