Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Remotely Hosted Avatars Details »»
Remotely Hosted Avatars
Version: 1.00, by Dataforce Dataforce is offline
Developer Last Online: Jun 2012 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 02-25-2004 Last Update: Never Installs: 8
 
No support by the author.

Adapted from here

**NO SUPPORT GIVEN**
**USE AT YOUR OWN RISK**

=======

This has been tested, and works on VB3 RC4

not sure about other browsers.

This checks the image dimensions and if its a real image, but does NOT check the file size as the image is not being uploaded to the server, it is eing linked remotely.

Dimension checking is so that it can't screw up layouts.

=======

If A user already has an avatar that is NOTremotely hosted - it will be displayed, else the remotely hsoted avatar will be displayed.

to include the avatar in other places on your site, add an if statement:
PHP Code:
if ($post[avatar2] != '' AND $post[avatar2] != "http://www." AND $post[avatar2] != "http://"  AND $post[avatar2] != "www.") {
        
$post['avatarurl'] = $post[avatar2];

Another alternative (which unfortunatly adds another query) if you only have the userid is:

PHP Code:
$pic $DB_site->query("SELECT * FROM `"TABLE_PREFIX ."user` WHERE userid = ".$userid);
$piccy $DB_site->fetch_array($pic) ;
if (
$piccy['avatar2'] != '' AND $piccy['avatar2'] != "http://www." AND $piccy['avatar2'] != "http://"  AND $piccy['avatar2'] != "www.") {
        
$avatarurl $piccy['avatar2'];

(Replace $avatarurl with whatever the variable is for the url of the avatar to show )
=======
Requires:

File Modifications: 6
File Uploads: 0
SQL Queries: 1
Template additions: 0
Template Changes: 0

=======
Enjoy

-DF

Edit: Attatched

Edit: Fixed Small bugs
- Incomplete lines from editing in pico
- if avatar2 was "http://www." for some reason - it displayed no avatar, rather than the old avatar.

Edit: Added Ability for users to still use predefined avatars or no avatar (In last 2 If statements made it set avatar2 to http://www.)

if user enters NONE in the customavatar URL field - it also sets their avatar to no avatar. (Its up to you to change the phrase if you want your members to know - else they can use the "no avatar" setting above as normal)

Works in member.php aswell now

Edit: Fixed more Pico erros and added example of getting avatar url direclty from DB

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 08-05-2005, 09:33 AM
AndyW AndyW is offline
 
Join Date: Aug 2005
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ALTER TABLE `df_forum`.`PREFIX_user` ADD `avatar2` TEXT NOT NULL;

Replace “df_forum” with the name of the database where your ‘user’ table is stored
Replace “PREFIX_” with the prefix of your tables, (or just remove it)

Can someone translate this into English for me?????

Not sure what I am supposed to do here???
Reply With Quote
  #13  
Old 08-25-2005, 03:07 PM
Warlord's Avatar
Warlord Warlord is offline
 
Join Date: Jan 2002
Location: TN, USA
Posts: 668
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AndyW
ALTER TABLE `df_forum`.`PREFIX_user` ADD `avatar2` TEXT NOT NULL;

Replace ?df_forum? with the name of the database where your ?user? table is stored
Replace ?PREFIX_? with the prefix of your tables, (or just remove it)


Can someone translate this into English for me?????

Not sure what I am supposed to do here???

In phpMyAdmin if you look on the left side of your screen you will see a whole bunch of menut titles which are the names of your tables. What this tells you to do is replace df_forum with the name of your database.

The name of your database will be at the very top of the left side of your screen in the list that shows all your tables in phpMyAdmin.

If your tables all look like this:

vb_user
vb_postbit
vb_header
vb_footer

etc. etc. then you're prefix is vb. Replace PREFIX_ with vb_ (or whatever your prefix might be), if you have no prefix to your tables then just remove the word PREFIX_ and drive on soldier.
Reply With Quote
  #14  
Old 11-13-2006, 09:28 AM
Rawhide Rawhide is offline
 
Join Date: Oct 2006
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very useful modification, has anyone upgraded it to vBulletin 3.6.3?
Reply With Quote
  #15  
Old 01-24-2008, 04:32 PM
bigM bigM is offline
 
Join Date: Oct 2004
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Rawhide View Post
Very useful modification, has anyone upgraded it to vBulletin 3.6.3?
word!

I need this plugin also for 3.6.x .....
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:55 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03915 seconds
  • Memory Usage 2,248KB
  • Queries Executed 19 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete