Author |
Message |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Thu Nov 06, 2003 12:21 pm |
|
I would really appreciate it if someone, or several of you, would do a fresh install of 6.9 and test this. Then if you could clone your present site that isn't working and does NOT have these fixes and THEN apply these fixes and see if, by applying the sql fix towards the bottom of this post, it corrects everything. I really feel we are close on this. Thanks for everyone's help and input!
After playing with this for weeks, I believe the following will fix all avatar broken images and pathing issues. The main problems stems from the way the forums store the avatar paths and nuke stores, or doesn't store them. I believe that this fixes all scenarios. This is intended for a new installation
First of all BACKUP your users table and your Your_Account/index.php file!!!!
Then, in Forum Configuration, set the 2 avatar settings to
modules/Forums/images/avatars
Then, modify modules/Your_Account/index.php as follows.
Find and change all instances of
/gallery/$userinfo
to
/$userinfo
Then on or about line 771 modify this line
$userinfo[user_avatar] = ereg_replace("gallery/","",$userinfo[user_avatar]);
to read
$userinfo[user_avatar] = ereg_replace("gallery/gallery/","gallery/",$userinfo[user_avatar]);
Then on or about linee 998 and also 1010, find this code
user_avatar='$user_avatar'
and change it to
user_avatar='gallery/$user_avatar'
If you apply the fixes above to an already existing site, read this
If this breaks some user's avatars, then it's probably because the avatar had been saved w/o the gallery prefix in the path. Or some other work-around had been attempted. There could be many scenarios based on each site.
First test that that is the problem by manually updating that users record in the users_table using phpMyAdmin. Correct the user_avatar to gallery/079.gif.
If that works, then you could try running this query
UPDATE nuke_users
set user_avatar = 'gallery/'||user_avatar
where user_avatar not like 'gallery%';
Be sure to back up your users table before attempting this. |
|
|
|
 |
chadz
New Member


Joined: Nov 03, 2003
Posts: 8
|
Posted:
Mon Nov 10, 2003 2:13 pm |
|
Thanks for the fix, it works on my existing site.
 |
|
|
|
 |
morpheus_75
Involved


Joined: Oct 07, 2003
Posts: 302
|
Posted:
Wed Nov 12, 2003 6:06 am |
|
Let's say everything works (tnxxxxxxxxx Rav!! ). There's only a thing to fix as far as I am concerned. When someone registers and chooses his or her avatar for the first time in "your account", the avatar path displays the usual problem (gallery/gallery).
Then if he or she tries to change it in the forum, everything works. The following avatar modifications (both in the forum and in "your account") work properly.
Dunno, but maybe there is another php file to modify in order to eliminate this problem? |
|
|
|
 |
TheosEleos
Life Cycles Becoming CPU Cycles

Joined: Sep 18, 2003
Posts: 960
Location: Missouri
|
Posted:
Tue Nov 18, 2003 1:50 pm |
|
Ok, Raven!
I am getting ready, in the next couple of days, to start a site from scratch. I was planning on using 6.9 and would be glad to do this for you. |
_________________ Only registered users can see links on this board! Get registered or login! |
|
 |
 |
TheosEleos

|
Posted:
Sat Nov 22, 2003 9:34 am |
|
I did this with a new site and no mods done at all. The only user on the database was me. To test it right should I start over again with no members?
I ask because there is still an x in the your account/your info area.
Here is the path.
modules/Forums/images/avatars/Array [user_avatar] |
|
|
|
 |
Raven

|
Posted:
Sat Nov 22, 2003 10:27 pm |
|
Yes. Please start right from the beginning. Thanks for doing this  |
|
|
|
 |
TheosEleos

|
Posted:
Sat Nov 22, 2003 11:39 pm |
|
|
|
 |
Raven

|
Posted:
Sat Nov 22, 2003 11:56 pm |
|
Great! So now, try making changes every which way. Change the avatar in Forums. Change it in Your Info. Then modify your profile and Your Info in other settings and see if the path is always protected. |
|
|
|
 |
TheosEleos

|
Posted:
Sun Nov 23, 2003 12:33 am |
|
|
|
 |
TheosEleos

|
Posted:
Sun Nov 23, 2003 3:46 pm |
|
Ok, messed around with this some more, Raven.
When my uploaded avatar gets messed up as described above I change to a gallery avatar. When I change to gallery avatar everything looks fine. I go into the your info area and make changes to anything and do a "save changes" the avatar in the main "your account' (same place as Actual User Status) area is the one that gets broken and the path is like this link. The avatar from the gallery shows up just fine in "your info'.
http://www.mysite.com/modules/Forums/images/avatars/gallery/gallery/007.gif |
|
|
|
 |
Raven

|
Posted:
Sun Nov 23, 2003 4:16 pm |
|
This was fixed in one of my earlier attempts but I think the 'tweaking' has somehow reverted it. As soon as I have time I will look at it. Sometime in 2005 seems a possibility .... |
|
|
|
 |
TheosEleos

|
Posted:
Sun Nov 23, 2003 4:30 pm |
|
Rushed code is as good as no code at all eh? |
|
|
|
 |
DrummerDudeStu
Regular


Joined: Nov 21, 2003
Posts: 70
Location: London UK
|
Posted:
Sat Dec 06, 2003 7:29 am |
|
When i did this i think it fixed any new members avatar but all the existing members i have all now have RED X's
What I did to the gallery was change the path of them to images/avatar/gallery
and in the gallery folder there a many folders with loads of avatars in them..
In theory people should reselect there avatars and it will all be good for new members?
But in Your_Account In Your Info it shows your existing avatar but when u go down in the list i see all the folders and when u clik on them you just get a red X
Is there a way of disabling the ability to select your avatar in Your Info and only make it an option in the Forum profile part? |
|
|
|
 |
DrummerDudeStu

|
Posted:
Sat Dec 06, 2003 7:34 am |
|
|
|
 |
Raven

|
Posted:
Sat Dec 06, 2003 11:59 am |
|
This is covered in the original thread as to how to retrofit the modofcations. But, as I have stated here, there is no fix that anyone has offered, including me, that works correctly. The only fix that will work correctly that I have found, is to remove the ability to change your avatar from the User Info screen and only allow changing from the Forum profile. The author of nuke continues to offer junk for new features and will not fix the most basic error he has had since v6.5 - the avatar fix. I highly recommend that the nuke community bomb him with news submissions complaining about this since he will not allow comments nor PM's  |
|
|
|
 |
DrummerDudeStu

|
Posted:
Sun Dec 07, 2003 6:26 am |
|
|
|
 |
blith
Client

Joined: Jul 18, 2003
Posts: 977
|
Posted:
Fri Jan 09, 2004 3:03 pm |
|
Raven, what do I need to do to the Your_Account module to remove the option of choosing an avatar there?
Nevermind, I see that is not the sole problem, it is when anything is changed in Your_Account... thanks anyway! |
|
|
|
 |
Raven

|
Posted:
Fri Jan 09, 2004 4:38 pm |
|
Unfortunately, you are correct. But, Chatserv's patch does what you want  |
|
|
|
 |
twelves
Regular


Joined: Aug 22, 2003
Posts: 84
|
Posted:
Mon Mar 22, 2004 7:50 pm |
|
I installed 7.2 today and I dont have even properties for Guest or new members. Right click the red-x and its www.guitarchat.net
And get this, It said avatar issue fixed in the FB 7.2. But if you look at this fix below, it is 1/2 way installed and if you attempt to finish the fix the account properties go down.
I am amazed this issue is still a problem.
7.2! Red-x and Rocking into 2005!
Perhapse in 2006 it will be fixed.
Code:## EasyMod 0.0.10a compliant
#################################################################
## MOD Title: Default Avatar MOD
## MOD Author: Shannado <sven@shannado.nl> (Sven) http://www.shannado.nl/forumorg
## MOD Description: This MOD shows a default avatar for user who don't have set an avatar. The default avatar mus be set in
## template config file. You can also specify an avatar for the guest user !
## MOD Version: 1.0.2
##
## Installation Level: Easy
## Installation Time: 5 - 15 minutes
## Files To Edit: viewtopic.php,
## usercp_viewprofile.php,
## subSilver.cfg
## Included Files: N/A
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
##############################################################
## MOD History:
##
## ------------
## 01-01-2002 - 0.9.0 beta
## - Beta
##
## 01-01-2002 - 0.9.1 beta
## - You can also specify an avatar for the guest user !
##
## 01-01-2002 - 1.0.0 FINAL
## - Final Release
##
## 01-01-2002 - 1.0.1 FINAL
## - Made phpBB v2.0.2 complaint and EasyMod 0.0.7 complaint
##
## 05-12-2003 - 1.0.2 FINAL
## - Made phpBB v2.0.6 complaint and EasyMod 0.0.10a complaint
## - Adjusted to the new Template
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
#
#-----[ COPY ]------------------------------------------
#
copy no_avatar.gif to /templates/subSilver/images/no_avatar.gif
copy guest_avatar.gif to /templates/subSilver/images/guest_avatar.gif
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
case USER_AVATAR_GALLERY:
$poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $postrow[$i]['user_avatar'] . '" alt="" border="0" />' : '';
break;
}
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Default Avatar MOD - Begin
//
if ( empty($poster_avatar) && $poster_id != ANONYMOUS)
{
$poster_avatar = '<img src="'. $images['default_avatar'] .'" alt="" border="0" />';
}
if ( $poster_id == ANONYMOUS )
{
$poster_avatar = '<img src="'. $images['guest_avatar'] .'" alt="" border="0" />';
}
//
// Default Avatar MOD - End
//
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------------
#
case USER_AVATAR_GALLERY:
$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $profiledata['user_avatar'] . '" alt="" border="0" />' : '';
break;
}
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Default Avatar MOD - Begin
//
if ( empty($avatar_img) )
{
$avatar_img = '<img src="'. $images['default_avatar'] .'" alt="" border="0" />';
}
//
// Default Avatar MOD - End
//
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/subSilver.cfg
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// Default Avatar MOD
//
$images['default_avatar'] = "$current_template_images/no_avatar.gif";
$images['guest_avatar'] = "$current_template_images/guest_avatar.gif";
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
|
|
|
|
|
 |
Raven

|
Posted:
Mon Mar 22, 2004 7:52 pm |
|
I haven't looked at it but I have heard 100% as you report here. Also, that fix as originally written never worked from what I heard. Ah yes - your hard earned money at work again  |
|
|
|
 |
JGNYC
New Member


Joined: Oct 17, 2002
Posts: 5
|
Posted:
Sat May 01, 2004 5:14 pm |
|
twelves wrote: | I am amazed this issue is still a problem. |
Me too. I've been looking everywhere for a fix  |
|
|
|
 |
spcdata
Regular


Joined: Jan 24, 2004
Posts: 81
Location: Sweden
|
Posted:
Thu Jun 03, 2004 11:03 am |
|
Is this SOLVED yet? if not I have made my own fix for this the problem is that I'm running my forum standalone not the built in one if anyone is intressted i can post it here, just have to remake it so it has the right path every where. |
_________________ /spcdata |
|
|
 |
NuclearX
New Member


Joined: May 21, 2004
Posts: 21
|
Posted:
Tue Jun 08, 2004 10:33 pm |
|
I am interested. How did you do it?  |
|
|
|
 |
Girl
Hangin' Around

Joined: Jan 28, 2004
Posts: 27
|
Posted:
Wed Aug 11, 2004 10:03 am |
|
spcdata if its a fix for the anon posters getting a red x for an avatar and it pointing to just the domain name, slap that bad boy up. |
|
|
|
 |
|