vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Avatar images broken (https://vborg.vbsupport.ru/showthread.php?t=281878)

mrcrx 04-21-2012 04:03 PM

Avatar images broken
 
I opened a ticket with vbulletin.com but they told me to come here.

Last month the folder that stored the avatar images was lost. I understand the images are gone but is there anyway I can globally reset all the broken image avatars back to the default image? I have 86,000 members. Asking everyone to do it will take a very long time and there is no way I can go into each and every profile to repair this. Anyone have any suggestions?

kh99 04-21-2012 05:42 PM

I think you would need to write a script to remove the records from the customavatar table where the file doesn't exist any more.

(Sorry, I originally posted that you should truncate the table, but then I remembered that you said you lost the files a month ago, so if you were to truncate the table you'd lose any avatars that were uploaded since then).

mrcrx 04-21-2012 05:56 PM

Know anyone that can write a script like that?

kh99 04-21-2012 08:12 PM

1 Attachment(s)
OK, first, use at your own risk! (ETA ...and if you decide you don't want to risk it, I understand). You should backup your database first, or at least the customavatar table.

Upload the attached file to your forum directory, then point your browser at it (i.e. www.mydomain.com/forum/fixavatars.php). You must be logged in as an admin. I'm not sure how long it will take, but it won't look like it's doing anything until it's done (it'll look like it's taking a long time to load the page), so be patient.

If it works, when you run it a second time it should immediately tell you that it removed 0 rows.

mrcrx 04-21-2012 11:14 PM

Thank you! I will try this tomorrow morning when I have less traffic.

kh99 04-21-2012 11:22 PM

You know, I read your post again and you say you want to set them "back to the default image". I'm not sure if this will do that - the users may end up with no avatar (that's what happened when I tested it, but that's what my test site has by default). What do you get as the default image (and did you have to configure that somehow?).

Lynne 04-22-2012 01:20 AM

There is no default avatar for users. Default is to have no avatar at all. So, Kevin's script may set the site back to default (no avatar), not back to some default avatar.

mrcrx 04-22-2012 08:31 AM

Ok, I tried running the script.

The first time I ran it the results came back in 30 secs.

It said Removed 15252 rows from customavatar

The second time I ran it it came back with

Removed 0 rows from customavatar

I think it worked. Thank you!

Can this be changed to fix my broken profile and signature pictures as well?

What I ment by default avatar was the image that shows up if you have no avatar at all. In my case it is a Silhouette of a person.

kh99 04-22-2012 09:00 AM

Try going to Maintenance in the admincp, and under General Update Tools (or Update Cunters if you have an older version) run Rebuild Custom Avatar Thumbnails.

mrcrx 04-22-2012 09:14 AM

Ok, I did that. Not sure what that did. However I am seeing broken images for the thumbnail of the avatar in my recent post section. Is this another spot that needs to be repaired?

--------------- Added [DATE]1335090127[/DATE] at [TIME]1335090127[/TIME] ---------------

Something odd is going on. Depending on the page I am viewing will now depend on if the link is broken.

2 examples

https://vborg.vbsupport.ru/external/2012/04/19.png
https://vborg.vbsupport.ru/external/2012/04/20.png


All times are GMT. The time now is 09:17 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01037 seconds
  • Memory Usage 1,730KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete