Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Blank Profile Feild Details »»
Blank Profile Feild
Version: , by Takara Takara is offline
Developer Last Online: Oct 2009 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 06-14-2002 Last Update: Never Installs: 0
 
No support by the author.

I have a custom profile feild, (field6) that I use as an avatar feild. But if a user leaves it blank, I want it to revert to /images/clear.gif

Can anyone give me a hand? Or if its possible, just have $post[field6] return /images/clear.gif if null instead of checking at the control panel.

Show Your Support

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

Comments
  #2  
Old 06-14-2002, 01:08 AM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

easy

in fuctions.php find:

PHP Code:
if ($post[aim]!="") {
            eval(
"\$post[aimicon] = \"".gettemplate("aim")."\";");
        } else {
            
$post[aim]="";
        } 
under it add

PHP Code:
if ($post[field6]) {
                  
$Avatar="$post[field6]<br>";
            } else {
                  
$Avatar="<img src="imagesfolder }/clear.gif" border="0" alt="No Avatar">";
            } 
that sould work

just call $Avatar in the postbit
Reply With Quote
  #3  
Old 06-14-2002, 01:19 AM
Takara's Avatar
Takara Takara is offline
 
Join Date: Apr 2002
Location: :bunny:
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks very much ^_^
Reply With Quote
  #4  
Old 06-14-2002, 02:07 AM
Takara's Avatar
Takara Takara is offline
 
Join Date: Apr 2002
Location: :bunny:
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

help anime!! I have this in my index.php for my welcome panel

Code:
if ($bbuserinfo[userid]!=0) {
   $avatarurl = $post['field6'];
  if ($avatarurl=='') {
    $avatarurl='images/noavatar.gif';
  }
  $avatarimage='<img src="'.$avatarurl.'" align="left">';
} else {
  $avatarimage='<a href="register.php?s='.$session[sessionhash].'&action=signup"><img src="images/guestavatar.gif" border="0"></a>';
}
But it always shows no avatar selected (unless your not registerd).

This is the code Im using now for the avatar thingie.

Code:
               if ($post[field6]) {
                   $aAvatar="<img src=\"$post[field6]\" border=\"0\"><P>";
                 } else {
                  $aAvatar="<img src=\"{imagesfolder}/clear.gif\" border=\"0\"><P>";
                 }
Can you help? Welcome to my board, btw ^_^
Reply With Quote
  #5  
Old 06-14-2002, 02:15 AM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

try using bbuserinfo[$field6] or bbuserinfo[$aAvatar] in the template, i think thats right.
Reply With Quote
  #6  
Old 06-14-2002, 02:18 AM
Takara's Avatar
Takara Takara is offline
 
Join Date: Apr 2002
Location: :bunny:
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/me scratches her head, then takes another look at it
Reply With Quote
  #7  
Old 06-14-2002, 02:21 AM
Takara's Avatar
Takara Takara is offline
 
Join Date: Apr 2002
Location: :bunny:
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ooohhh, yay. Works. Thankies ^_^
Reply With Quote
  #8  
Old 06-15-2002, 02:12 AM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You could also just as easily...

ALTER TABLE userfield DROP field6

ALTER TABLE userfield ADD field6 varchar(250) NOT NULL DEFAULT 'https://vborg.vbsupport.ru/images/clear.gif'

or instead of the 'https://vborg.vbsupport.ru/images/clear.gif' as the defualt just add your own url to a certain img

g-force2k2
Reply With Quote
  #9  
Old 06-16-2002, 01:20 AM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by gforce2001
You could also just as easily...

ALTER TABLE userfield DROP field6

ALTER TABLE userfield ADD field6 varchar(250) NOT NULL DEFAULT 'https://vborg.vbsupport.ru/images/clear.gif'

or instead of the 'https://vborg.vbsupport.ru/images/clear.gif' as the defualt just add your own url to a certain img

g-force2k2

that is true but i avoid editing the database whenever possible
Reply With Quote
  #10  
Old 06-19-2002, 01:25 AM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i like to play with the database quite alot... mysql and php are powerful combined for a reason then again if you drop a query on accident then your in trouble

g-force2k2
Reply With Quote
Reply


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 10:52 PM.


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.04502 seconds
  • Memory Usage 2,298KB
  • Queries Executed 23 (?)
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_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete