Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Bug Fixes
Author Message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Thu Nov 06, 2003 12:21 pm Reply with quote

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.
 
View user's profile Send private message
chadz
New Member
New Member



Joined: Nov 03, 2003
Posts: 8

PostPosted: Mon Nov 10, 2003 2:13 pm Reply with quote

Thanks for the fix, it works on my existing site.
Mr. Green
 
View user's profile Send private message
morpheus_75
Involved
Involved



Joined: Oct 07, 2003
Posts: 302

PostPosted: Wed Nov 12, 2003 6:06 am Reply with quote

Let's say everything works (tnxxxxxxxxx Rav!! Smile). 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?
 
View user's profile Send private message
TheosEleos
Life Cycles Becoming CPU Cycles



Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Tue Nov 18, 2003 1:50 pm Reply with quote

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.

_________________
http://jamesdibben.com 
View user's profile Send private message Visit poster's website AIM Address ICQ Number
TheosEleos







PostPosted: Sat Nov 22, 2003 9:34 am Reply with quote

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







PostPosted: Sat Nov 22, 2003 10:27 pm Reply with quote

Yes. Please start right from the beginning. Thanks for doing this Smile
 
TheosEleos







PostPosted: Sat Nov 22, 2003 11:39 pm Reply with quote

Worked perfectly!!!
 
Raven







PostPosted: Sat Nov 22, 2003 11:56 pm Reply with quote

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







PostPosted: Sun Nov 23, 2003 12:33 am Reply with quote

Ok, when I upload my avatar it goes to this path and shows up fine.
[ Only registered users can see links on this board! Get registered or login! ]

If I go into your account/your info and change something I it breaks everywhere and the path is this.
[ Only registered users can see links on this board! Get registered or login! ]
 
TheosEleos







PostPosted: Sun Nov 23, 2003 3:46 pm Reply with quote

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'.
[ Only registered users can see links on this board! Get registered or login! ]
 
Raven







PostPosted: Sun Nov 23, 2003 4:16 pm Reply with quote

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







PostPosted: Sun Nov 23, 2003 4:30 pm Reply with quote

Laughing

Rushed code is as good as no code at all eh?
 
DrummerDudeStu
Regular
Regular



Joined: Nov 21, 2003
Posts: 70
Location: London UK

PostPosted: Sat Dec 06, 2003 7:29 am Reply with quote

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 Sad

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 Sad

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?
 
View user's profile Send private message Visit poster's website MSN Messenger
DrummerDudeStu







PostPosted: Sat Dec 06, 2003 7:34 am Reply with quote

it pointed everyones avatar to
[ Only registered users can see links on this board! Get registered or login! ]


when i wish it to be
[ Only registered users can see links on this board! Get registered or login! ]



chek for any problems because i am confused as hell!!!
www.stuswebsite.com
 
Raven







PostPosted: Sat Dec 06, 2003 11:59 am Reply with quote

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 Mad
 
DrummerDudeStu







PostPosted: Sun Dec 07, 2003 6:26 am Reply with quote

well i have noticed that when i select a avatar thats in a gaklery i made

eg.
[ Only registered users can see links on this board! Get registered or login! ]


in in my site into block it show up as
[ Only registered users can see links on this board! Get registered or login! ]


there is a missing /gallery in there so its looking in the wrong place.. other than tht it works properley

(except in Your Info but screw that)

Is There A Way Of Making The Pic Show Up Properley?
 
blith
Client



Joined: Jul 18, 2003
Posts: 977

PostPosted: Fri Jan 09, 2004 3:03 pm Reply with quote

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!
 
View user's profile Send private message Visit poster's website
Raven







PostPosted: Fri Jan 09, 2004 4:38 pm Reply with quote

Unfortunately, you are correct. But, Chatserv's patch does what you want Smile
 
twelves
Regular
Regular



Joined: Aug 22, 2003
Posts: 84

PostPosted: Mon Mar 22, 2004 7:50 pm Reply with quote

I installed 7.2 today and I dont have even properties for Guest or new members. Right click the red-x and its [ Only registered users can see links on this board! Get registered or login! ]

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
 
View user's profile Send private message Visit poster's website
Raven







PostPosted: Mon Mar 22, 2004 7:52 pm Reply with quote

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 Laughing
 
JGNYC
New Member
New Member



Joined: Oct 17, 2002
Posts: 5

PostPosted: Sat May 01, 2004 5:14 pm Reply with quote

twelves wrote:
I am amazed this issue is still a problem.

Me too. I've been looking everywhere for a fix Crying or Very sad
 
View user's profile Send private message
spcdata
Regular
Regular



Joined: Jan 24, 2004
Posts: 81
Location: Sweden

PostPosted: Thu Jun 03, 2004 11:03 am Reply with quote

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 
View user's profile Send private message Send e-mail Visit poster's website
NuclearX
New Member
New Member



Joined: May 21, 2004
Posts: 21

PostPosted: Tue Jun 08, 2004 10:33 pm Reply with quote

I am interested. How did you do it? Very Happy
 
View user's profile Send private message
Girl
Hangin' Around



Joined: Jan 28, 2004
Posts: 27

PostPosted: Wed Aug 11, 2004 10:03 am Reply with quote

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.
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Bug Fixes

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©