vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   how can I allow hot link avatars? (https://vborg.vbsupport.ru/showthread.php?t=28163)

Justice 09-15-2001 10:33 PM

I currently have a UBB, and some of my users have really large custom avatars. They're hosted on different sites and linked to mine. From what I can see on vBulletin, all avatars are hosted on the server and get run from a script. This would use up far too much of my bandwidth, but I still want to offer custom avatars. Is there a way to have avatars on a vB run by hot linking to another website?

Freddie Bingham 09-16-2001 12:55 AM

You would have to hack a bit. Disable avatars and rename a custom profile field to "Avatar". The user than types in the url to the avatar and you put $userinfo[field7] (or whatever is may be) in the postbit template. Than in the getpostbit function in functions.php you would have to add something like:

if ($userinfo[field7]) {
$userinfo[field7] = "<img src='$userinfo[field7]' border='0'>";
}

Justice 09-16-2001 01:27 AM

cool. sounds like the exact same thing I did with UBB... shouldn't be a problem

thanks for the reply

eva2000 09-24-2001 05:16 PM

nice freddie :)

Admin 09-24-2001 05:19 PM

LOL, it seems to be people have been trying to do this for ages now. :)

eva2000 09-24-2001 05:26 PM

only problem i see is if members started to post a avatar as an inline attachment and use that url to link in the custom field... which essentially is using the vB owner's bandwidth anyway :(

Freddie Bingham 09-24-2001 06:19 PM

eva yes it will happen.

Some enterprising souls like to post attachments and then refer to them in their signatures. If you have users on your forums doing this, you should stop the practice. It can have a noticeable performance hit on your server in bandwidth and in cpu usage.

Justice 09-26-2001 03:49 AM

I don't see this being a big problem. Let's say you set the minimum amount of posts at a medium to high level. The only people using avatars would be regular members. Then you make it a rule not to use attachments for avatars...

Now, anyone who would disregard the rules would probably be more likely to use an obscene avatar or do something a lot more detrimental to your forum. And very few regular members would do that (why risk getting banned and/or starting your post count all over)

DrunkenStud 10-03-2001 07:54 PM

hmmm I cant get that to work.

Im putting the code in the functions.php and edited the postbit template but the output im getting is just the text typed into the field.

All the field numbers and stuff are right its field5, but it still aint working? Any ideas?

Admin 10-03-2001 07:59 PM

Where exactly did you add the code in the function?
It could be you added it in a bad place.

eva2000 10-03-2001 08:24 PM

Quote:

Originally posted by freddie
eva yes it will happen.

Some enterprising souls like to post attachments and then refer to them in their signatures. If you have users on your forums doing this, you should stop the practice. It can have a noticeable performance hit on your server in bandwidth and in cpu usage.

man i'm getting slow at catching replies :o

i have img tag off in sigs only smilies are allowed.. but then again i have sigs off hehe

Karas 10-05-2001 05:10 AM

In light of that avatar hack...I just want to get a "feel" if this would be possible....would there be a way that a user could personally disable their avatar for a single post, without having to disable them totally?

My site uses avatars that are 130x280...so to turn them off would not be viable...I know they are long and it'd be easier to just say "redo the art.." heh...but say a poster wants to make a short post and not make all that blank space...what would the possibility be of making some check box to disable the avatar for a post / thread?

Alot of my ppl (as you know since you were the one to move our threads..:) Thanks!) are ex Ez Board refugees..so they got used to some creature comforts like that, and the ability to mark individual forums as read (wish that could be done too..sigh).

Thanks for any help!

Kamran 10-17-2001 09:27 PM

Hi,

I started on this, and then when I started to edit functions.php, my comp froze, so I had to restart.

When I looked at it again, it was all blank, and my forums now say:

Fatal error: Call to undefined function: getuserinfo() in /home/talkwres/public_html/forum/admin/sessions.php on line 327

Can I just upload functions.php again - or would I have to edit it?

(I never installed it in the first place, so not sure what to do)

thx

Kam

Kamran 10-17-2001 10:20 PM

I uploaded the old one, and it now said:

Parse error: parse error in /home/talkwres/public_html/forum/admin/functions.php on line 1874

Warning: Cannot add header information - headers already sent by (output started at /home/talkwres/public_html/forum/admin/functions.php:1874) in /home/talkwres/public_html/forum/admin/functions.php on line 1459

Fatal error: Call to undefined function: makelogincode() in /home/talkwres/public_html/forum/global.php on line 311

Inzagi 10-17-2001 11:19 PM

I really think that these hack was made for vB 1...
and not for the 2 version..

So it's clear why it is not working ..

By the way: Why do want to have this hack ?
I think it's already in vB 2 , as you can chose to URL to a certain avatar.

Kamran 10-17-2001 11:24 PM

Users can link to an image - but it puts that image on your server.

Kamran 10-18-2001 09:27 PM

Quote:

Originally posted by freddie
You would have to hack a bit. Disable avatars and rename a custom profile field to "Avatar". The user than types in the url to the avatar and you put $userinfo[field7] (or whatever is may be) in the postbit template. Than in the getpostbit function in functions.php you would have to add something like:

if ($userinfo[field7]) {
$userinfo[field7] = "<img src='$userinfo[field7]' border='0'>";
}

Hi,

How do you work out what field number it is?

thx

Kam

Admin 10-19-2001 06:45 AM

Hover it in the Custom Profile Fields screen, and see the ID in the status bar.

Kamran 10-19-2001 03:10 PM

Thx Firefly,

So does this look right:


// ###################### Start buildpostbit #######################
function getpostbit($post) {
// sorts through all the stuff to return the postbit template

// user
global $bbuserinfo,$ignore;
// showthread
global $counter,$firstnew,$sigcache,$highlight,$postid,$f orum;
// global options
global $showdeficon,$showonline,$displayemails,$enablepms ,$allowsignatures,$wordwrap,$dateformat,$timeforma t,$logip,$replacewords,$postsperday,$avatarenabled ,$registereddateformat,$viewattachedimages;

if ($userinfo[field5]) {
$userinfo[field5] = "<img src='$userinfo[field5]' border='0'>";
}
if ($counter%2==0) {
$post[backcolor]="#F1F1F1";
$post[bgclass] = "alt1";
} else {
$post[backcolor]="#DFDFDF";
$post[bgclass] = "alt2";
}

Kamran 10-19-2001 06:22 PM

Hi,

I tried it, but when someone puts a url in the avatar field, it just shows the url under the username, not the image.

You can see an example here (Dreamer's post):

http://www.talkwrestlingonline.com/f...id=956#post956

Kamran 10-20-2001 10:08 AM

Anyone know what I'm doing wrong?

thx

Kam

B0204520 10-22-2001 08:44 AM

try this:
in postbit

change [fieldx] to

<img src="$post[fieldx]">

but the thing is that when user don't use avatar links...
it shows "x" image not found sign...

ibeblunt 11-01-2001 04:49 PM

In version 2.2.0 you will need to add the hack to the following to /admin/functions.php:

Line 182:

// hack
if ($post[field8]) {
$post[field8] = "<img width=50 height=50 src=$post[field8] border=0>";
}

Keep in mind, my field is referred to as field8, yours will be different.

Christine 03-08-2002 03:12 PM

Is it possible to retain the canned avatars while still allowing remote linked ones?

dslteam 04-27-2002 04:38 PM

i have 2.2.5. version.

i tried to edit the template "postbit" -> but in the thread it comes the whole code and the avatar. if i delete the code and let only: <img width=50 height=50 src=$post[field8] border=0>, there is a image not found symbol if there is no avatar.

i tried to edit the functions.php file, but it happens nothing after it.

please help !!!!

i simply want that the users can add the URL to their avatars and i simply link them.

ibeblunt 04-27-2002 08:42 PM

Here's what I did:

In function.php, Line 185 after '$userinfo=$post;'

// HACK
if ($post[fieldX]) {
$post[fieldX] = "<img width=\"50\" height=\"50\" src=\"$post[fieldX]\" border=\"0"\>";
}
// HACK

What this will do is CHECK to see if the user has an image set in fieldX. If so, it will display the avatar, otherwise it skips it.

Now that I look at it, I should make it check to ensure it's a gif or jpg and then that the image is there.

Teknoscape 06-04-2002 05:13 AM

is this still current for the latest version of vBulletin?


All times are GMT. The time now is 02:45 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.01224 seconds
  • Memory Usage 1,773KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (27)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete