vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Custom Avatars as Files (updated for vBulletin 2.2.2) (https://vborg.vbsupport.ru/showthread.php?t=11760)

DVD Plaza 04-10-2001 05:32 AM

This might be a silly question (sorry!), but why isn't this a part of the official product?

TechTalk 04-12-2001 02:23 AM

Quote:

Originally posted by DVD Plaza
This might be a silly question (sorry!), but why isn't this a part of the official product?
I would like to know too....

Kier, can we just make sure all of your hacks make it in the final releases? I would be a much happier man

~Chris

Freddie Bingham 04-12-2001 02:40 AM

It will be part of 2.1

jojo85 04-12-2001 03:49 AM

Nice :D

VirtueTech 04-14-2001 08:40 AM

Thank you very much Kier

TooHectic 04-15-2001 02:58 AM

does this work with beta 5?

I ran the install_db2fileavatars.php, at started to edit the files, but I noticed that the files were a little different for beta 5. For instance, the first modification step adjusts the functions.php file, and one of the original lines is
PHP Code:

return "avatar.php?s=$session[sessionhash]&userid=$userid"

But this line looks like this in beta 5
PHP Code:

return "avatar.php?userid=$userid&dateline=$avatarinfo[dateline]"

Can I still proceed with the rest? In fact, I had origianlly decided to stop, but the install_db2fileavatars.php already changed some things...... so I can't even set any custom avatars as it stands right now. I get a blank screen after I submit the settings for uploading the avatar. Can I fix this, or can I just continue with the hack? :confused:

VirtueTech 04-15-2001 03:03 AM

I proceeded and it worked great with beta 5

TooHectic 04-15-2001 07:20 AM

Thanks... I'll try it tomorrow.

CityNet 04-16-2001 07:36 AM

Arrgh.. I did this hack, entirely as instructed and when going into the Change Profile page I get this:

Parse error: parse error in /usr/local/plesk/apache/vhosts/thecitynetwork.net/httpdocs/forums/member.php on line 1042

What happened?

TomLloyd 04-16-2001 01:05 PM

Thanks for this hack Kier.

We had to disable avatars on our site because the amount of people uploading to the Db crashed our server! (RaQ 4)

Have re-enabled avatars now, much thanks.

(I'm using beta 5, and I noticed no problems installing btw)

CityNet 04-16-2001 05:59 PM

Quote:

Originally posted by CityNet
Arrgh.. I did this hack, entirely as instructed and when going into the Change Profile page I get this:

Parse error: parse error in /usr/local/plesk/apache/vhosts/thecitynetwork.net/httpdocs/forums/member.php on line 1042

What happened?

Finally got around to installing Word and figuring out how to turn on line numbering... What? Line 1042 is just some commented file?

I tried uploading it again. It worked this time.. Thanks. ^_^

((EDIT: Tried entering a URL for an avatar and STILL keep getting "This is not a valid GIF or JPG file. Please ensure that it is and try again"

That's it... I'm going to cuddle up in a fetal position and just cry. Trying to get these avs to work is going to result in me tearing my hair out)

SpankMe 04-19-2001 10:15 PM

What we really need is a utility that will go through the MySQL dB and convert all image attachments to files and update the associated post. We could then cron it to run every so often.

I like allowing users to attach images but it is a REAL PAIN for them to download the images every time they visit the thread :(

eiko 05-10-2001 11:05 PM

After installing this hack (which is Awesome by the way)...
When you click a user's profile link, returns this error:

Warning: Object DB_site not found in /home/name/dir/forums3/member.php on line 1037

Fatal error: Member function used on a non-object in /home/name/dir/forums3/member.php on line 1037

RC2

eiko 05-11-2001 08:33 PM

anyone?

eiko 05-12-2001 01:25 PM

Maybe I asked this question in the wrong forum?

eiko 05-12-2001 01:47 PM

Well no wonder no one replied...
Sorry... BONEHEAD mistake on my part.

uhh...

in my best Gilda Radner.... Nevermind.

Dakota 05-15-2001 05:09 PM

Is there anyway that there could be an option for just mods and admins be able to select custom avatars?

TGO 05-17-2001 11:22 PM

I tried to install this on RC3 and got a datbase error..I REALLY need this hack too. :\

BTW, the error is when I run the install script, I press Install and I get a database error. Whether I have created the custom_avatars directory or not..

Error is:
---
There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.
----

Please help with this one Kier..

ForzaGrifo 05-20-2001 01:51 AM

Kier, I've got RC 3 too and I really want this hack. Will I get the same problem as TGO's? Thanks.

Cid Kramer 05-20-2001 10:53 AM

I'm in the same boat as TGO the hack is needed badly too, any help would be greatly apriciated.

Sven 05-22-2001 08:11 AM

Tried to install into Final Release... but got stuck while editing functions.php....

The lines to replace are not matching the installation description.... :(

Will there be any update on the hack for the Final????

It would be really nice to get it working, currently Avatars on our Forums are disabled due to traffic but i'd like to offer this to our users.

Fiyah 05-22-2001 09:52 AM

Quote:

Originally posted by Kier
Yes, All avatar options that are present when using the standard mySQL avatar system are still present


where would you change the max size at?

ForzaGrifo 05-22-2001 06:17 PM

Quote:

Originally posted by Sven
Tried to install into Final Release... but got stuck while editing functions.php....

The lines to replace are not matching the installation description.... :(

Will there be any update on the hack for the Final????


Yeah, I would like to know the instructions for installing into 2.0 Gold as well. Can anyone help?

PeterS 05-23-2001 01:32 AM

just wanted to note works dandy with the 2.0.0 release. read to re-tweak the files but all is happy once again.

Great Hack, many thanks

http://forums.sobservers.com

ForzaGrifo 05-23-2001 06:20 PM

Hey PeterS, cool site! where did you get that cool news fader?

Luciano 05-24-2001 06:57 AM

sorry if i'm off topic,
but i was wondering..
if i have lets say 600 avatars
wouldn't it be nice to have categories like:
Male avatars,
female avatars
simpson avatars
,,,, avatars..

with about 80 each...

would be user and server friendly...

or am I wrong???

Luc

jucs 05-25-2001 10:01 AM

If I install this hack for example, what are the risks? I assume if a 2.1 version came out I would have to reinstall? Would it affect say converting from 2.0 to 2.1 down the road?

Sorry if this is a dumb question. I just don't want to sprint before I walk with VB. :)

Sven 05-25-2001 09:05 PM

as announced in the Suggestions & Feedback Thread the Hack will be part of the next version....

But still:
I need some Instructions for this hack to get it installed in vB2.0.0...
Is there anybody who successfully installed it in the final release and could tell me what to do?

jucs 05-25-2001 11:25 PM

Ditto...I would like to install it into V2.0 final.

eva2000 05-25-2001 11:27 PM

Quote:

Originally posted by PeterS
just wanted to note works dandy with the 2.0.0 release. read to re-tweak the files but all is happy once again.

Great Hack, many thanks

http://forums.sobservers.com

great the next hack i need to add :D

jucs 05-26-2001 12:45 AM

What does Read to re-tweak mean?

jucs 05-27-2001 12:46 PM

Answer Sven and my questions? Thanks.

Sven 05-27-2001 02:13 PM

So here's a bit of the problem:
admin/functions.php as per instructions:
PHP Code:

function getavatarurl($userid) {
  global 
$DB_site,$session;

  if (
$avatarinfo=$DB_site->query_first("SELECT user.avatarid,avatarpath,NOT ISNULL(avatardata) AS hascustom FROM user LEFT JOIN avatar ON avatar.avatarid=user.avatarid LEFT JOIN customavatar ON customavatar.userid=user.userid WHERE user.userid='$userid'")) {
    if (
$avatarinfo[avatarpath]!="") {
      return 
$avatarinfo[avatarpath];
    } else if (
$avatarinfo['hascustom']) {
      return 
"avatar.php?s=$session[sessionhash]&userid=$userid"


admin/functions.php in vB2.0.0 Final Release:
PHP Code:

function getavatarurl($userid) {
  global 
$DB_site,$session;

  if (
$avatarinfo=$DB_site->query_first("SELECT user.avatarid,avatarpath,NOT ISNULL(avatardata) AS hascustom,customavatar.dateline
                                         FROM user
                                         LEFT JOIN avatar ON avatar.avatarid=user.avatarid
                                         LEFT JOIN customavatar ON customavatar.userid=user.userid
                                         WHERE user.userid='
$userid'")) {
    if (
$avatarinfo[avatarpath]!="") {
      return 
$avatarinfo[avatarpath];
    } else if (
$avatarinfo['hascustom']) {
      return 
"avatar.php?userid=$userid&dateline=$avatarinfo[dateline]";
    } else {
      return 
'';
    }
  }


You see that tiny differences?
So is there anyone out there who could tell me what to do?

nuno 05-27-2001 02:59 PM

tx Kier
works with 2.0.0 release also

functions.php

find:

PHP Code:

function getavatarurl($userid) {
  global 
$DB_site,$session;

  if (
$avatarinfo=$DB_site->query_first("SELECT user.avatarid,avatarpath,NOT ISNULL(avatardata) AS hascustom,customavatar.dateline
                                         FROM user
                                         LEFT JOIN avatar ON avatar.avatarid=user.avatarid
                                         LEFT JOIN customavatar ON customavatar.userid=user.userid
                                         WHERE user.userid='
$userid'")) {
    if (
$avatarinfo[avatarpath]!="") {
      return 
$avatarinfo[avatarpath];
    } else if (
$avatarinfo['hascustom']) {
      return 
"avatar.php?userid=$userid&dateline=$avatarinfo[dateline]";
    } else {
      return 
'';
    }
  }


replace with:

PHP Code:

function getavatarurl($userid) {
  global 
$DB_site,$session,$usefileavatar;


  if (
$avatarinfo=$DB_site->query_first("SELECT user.avatarid,avatarpath,avatarrevision,NOT ISNULL(avatardata) AS hascustom,customavatar.dateline
                                         FROM user
                                         LEFT JOIN avatar ON avatar.avatarid=user.avatarid
                                         LEFT JOIN customavatar ON customavatar.userid=user.userid
                                         WHERE user.userid='
$userid'")) {
    if (
$avatarinfo[avatarpath]!="") {
      return 
$avatarinfo[avatarpath];
    if (
$usefileavatar) return "custom_avatars/avatar$userid"."_$avatarinfo[avatarrevision].gif";
            else return 
"avatar.php?userid=$userid";
    }
  }



Freddie Bingham 05-27-2001 03:01 PM

sven the code looks the same .. it just appears I got to it and broke the sql up into multiple lines which I have a habit of doing.

Wayne Luke 05-28-2001 05:10 AM

Quote:

Originally posted by freddie
sven the code looks the same .. it just appears I got to it and broke the sql up into multiple lines which I have a habit of doing.
Only because it is a lot easier to read and comprehend.

jucs 05-28-2001 03:26 PM

The code replace for announcement.php is incorrect?? I can only find this:

if ($post[hascustomavatar] and $avatarenabled) {
$avatarurl="avatar.php?userid=$post[userid]&dateline=$post[avatardateline]";

Note it is different from this in the instructions:

if ($post[hascustomavatar] and $avatarenabled) {
$avatarurl="avatar.php?s=$session[sessionhash]&userid=$post[userid]";

What gives? I have final 2.0.

Sven 05-28-2001 03:31 PM

Well, that's almost the same question I have.... what about the
&dateline=$post[avatardateline]" thing?
Do I have to add this at the appropriate places or is it not mandatory?

I got the Avatar_as_files option working on my local testinstallation with the replacements from the instructions but I'm not sure if I can use this on the production environment w/o causing bugs due to the changes.

jucs 05-28-2001 03:46 PM

I just started with that file...are there any more of these discrepencies?

Sven 05-28-2001 06:45 PM

@jucs:

I edited all of the files now to add the "dateline"...
It's in all files but member.php, in most of them you just need to add the
&dateline=$post[avatardateline]"

but in user.php it's different, take care of that one!

In my local installation it seems to work - after I changed the files ;)


All times are GMT. The time now is 01:12 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.01425 seconds
  • Memory Usage 1,849KB
  • 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
  • (6)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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