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)
-   -   Off Site Avatar Hack (https://vborg.vbsupport.ru/showthread.php?t=39296)

AviationForum 07-12-2002 11:47 PM

How do you query the database?

LanciaStratos 07-16-2002 01:14 AM

Quote:

Originally posted by AviationForum
How do you query the database?
PHPMyAdmin is the best way if you don't want to mess around in SSH/Telnet. ;)

karreman 08-01-2002 06:14 PM

Find:
PHP Code:

<td bgcolor="#13486D"><normalfont>$userinfo[usertitle]&nbsp;<img src="$userinfo[avatarurl]border="0" align="middle"></normalfont></td

Change to:
PHP Code:

<td bgcolor="#13486D"><normalfont>$userinfo[usertitle]&nbsp;<img src="$userinfo[field#]" width="$post[width]height="$post[hieght]border="0" align="middle"></normalfont></td

Mind that little mistake.
Its $post[height] instead of $post[hieght]

Installed it, works like a charme..

finaly question, how can i show a preview of there avatar, once they have change it and they visit the usercp again?
(like the old one)

MarkB 09-07-2002 11:36 AM

An addition to this. If for some reason the person deletes the default code without putting in a URL, and their avatar shows as a broken image, you can add this code to get around it:

In admin/functions.php - under:

Code:

if ($post[homepage]!="" and $post[homepage]!="http://") {
          eval("\$post[homepage] = \"".gettemplate("postbit_homepage")."\";");
} else {
          $post[homepage]="";
                }


ADD:

Code:

if ($post[field#]!="" and $post[field#]!="https://vborg.vbsupport.ru/greentek/clear.gif") {
        eval("\$post[off_avatar] = \"".gettemplate("postbit_off_avatar")."\";");
} else {
        $post[off_avatar]="";
}


(where # is the field number)

Create a new template called postbit_off_avatar using the following:

Code:

<img src="$post[field#]" width="$post[width]" height="$post[height]" border="0"><br>

And in your postbit template, where before you had the above code, put simply:

Code:

$post[off_avatar]

And you should now have no broken avatar images (unless someone's using Geocities!:))

MarkB 09-15-2002 01:19 PM

This is also helps, if you have a blank image for people not using an avatar, and the postbit is stretched even when they make only a one word post (for example), then this will set it up the blank image doesn't show up.

Kuipo 11-03-2002 10:12 AM

Ahhhh Sweetness!! Great hack, and thanks a BUNCH MarkB for fixing that little problem with the space and broken images!

Kuipo 11-03-2002 12:54 PM

I just notcied that it stretches pictures to be whatever size you set in the db. Is there a way to make it only resize the picture if it is larger than the set size.

And i know this is asking a bit much, but how hard would it be to make an image limit. I think that might be really dificult seeing as its on a different server, and i think it would have to ask all the sites what size the picture is if i'm correct in thinking of how to do it.
Anyways, if thats too hard forget it ;)

But the resizing is somthing that can be done, i just dont know how. >.< :lick:

drumsy 01-09-2003 03:42 PM

Quote:

Originally posted by Kuipo
I just notcied that it stretches pictures to be whatever size you set in the db. Is there a way to make it only resize the picture if it is larger than the set size.

And i know this is asking a bit much, but how hard would it be to make an image limit. I think that might be really dificult seeing as its on a different server, and i think it would have to ask all the sites what size the picture is if i'm correct in thinking of how to do it.
Anyways, if thats too hard forget it ;)

But the resizing is somthing that can be done, i just dont know how. >.< :lick:

Bump to the top for a re-size fix! How do I go about correcting this???

Kuipo 01-09-2003 06:20 PM

Just so you know, what i did, was use this hack... and just removed the lines that size the image. Then i used... https://vborg.vbsupport.ru/showthrea...threadid=45343 that to to make sure no one uses an avatar that is too large. I would love a size limiter, but i think it's too hard if it's on another server =(

drumsy 01-09-2003 08:41 PM

Unfortunately this seems to create compatibility issues with my Private Messages.

https://vborg.vbsupport.ru/showthrea...threadid=47536


All times are GMT. The time now is 07:56 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.01420 seconds
  • Memory Usage 1,748KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)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
  • (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