Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #21  
Old 03-17-2009, 07:58 PM
vidan vidan is offline
 
Join Date: Feb 2008
Location: texas
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OMFG you are my life saver! i dont know its that easy, that simple.
thank you very much lynne ^_^
Reply With Quote
  #22  
Old 03-17-2009, 08:06 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One thing to consider... in vb 3.8, you are allowed to set privacy for such things as your profile picture. Doing a call like that is not taking into consideration whether the user set their profile picture to only be shown to Contacts and Friends versus Everybody. You are not taking their preferences into consideration when you do this.
Reply With Quote
  #23  
Old 03-17-2009, 08:18 PM
vidan vidan is offline
 
Join Date: Feb 2008
Location: texas
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh yes, i forgot that, thanks to remind me Lynne, but its like showpath through the file right?
can i have the same code using in members profile? so its up to member want to show the profile picture or not.

i cant simply copy in memberinfo style -> profilepic, then paste into postbit template right
it does need the modification. and its been 2 week for tryin it, but still not successful >_<
Reply With Quote
  #24  
Old 03-18-2009, 02:15 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I haven't looked at the memberinfo template to see how the permissions are dealt with regarding the profilepicture. It may be that you need to write a plugin to grab some permission field that helps you decide whether someone may see ithe picture or not.
Reply With Quote
  #25  
Old 03-18-2009, 03:39 AM
Mr-Moo Mr-Moo is offline
 
Join Date: Sep 2007
Location: Chicago, IL.
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow Vidan,

I don't mean to sound out of line or anything, but you first insult me, then you criticize my help?

And to boot, my method was pretty damn similar to the actual solution. No hook required, simple template edit, static avatar URL.... Vidan, in the future I will insure to keep my eyes peeled and no longer offer my support to you.

Thank you!
Reply With Quote
  #26  
Old 03-18-2009, 11:28 AM
vidan vidan is offline
 
Join Date: Feb 2008
Location: texas
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no mr moo, i never insult you nor criticize your help.
i used your method, and it didnt work. i never insult you nor anything. i just said, i didnt think it can works without hooks, but Lynne give me the simpliest answer, but i didnt insult you.
im sorry mr moo to make you feel this way. but i never mean to insult you.
Reply With Quote
  #27  
Old 03-18-2009, 04:36 PM
Mr-Moo Mr-Moo is offline
 
Join Date: Sep 2007
Location: Chicago, IL.
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you,

I appreciate your response.
Reply With Quote
  #28  
Old 03-27-2009, 09:56 PM
vidan vidan is offline
 
Join Date: Feb 2008
Location: texas
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello Lynne, i still wondering with this figure, yes you are right it simple show profilepic using filestorage, but i still want to use the code built into memberinfo and memberlist

the memberlist code

PHP Code:
    $can_view_profile_pic = (
            
$show['profilepiccol']
            AND 
$userinfo['profilepic']
            AND (
$userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canprofilepic'] OR $userinfo['adminprofilepic'])
        );
        if (
$userinfo['profilepicrequirement'] AND !can_view_profile_section($userinfo['userid'], 'profile_picture'$userinfo['profilepicrequirement'], $userinfo))
        {
            
$can_view_profile_pic false;
        }

        if (
$can_view_profile_pic)
        {
            if (
$vbulletin->options['usefileavatar'])
            {
                
$userinfo['profilepicurl'] = $vbulletin->options['profilepicurl'] . '/profilepic' $userinfo['userid'] . '_' $userinfo['profilepicrevision'] . '.gif';
            }
            else
            {
                
$userinfo['profilepicurl'] = 'image.php?' $vbulletin->session->vars['sessionurl'] . 'u=' $userinfo['userid'] . "&amp;dateline=$userinfo[profilepicdateline]&amp;type=profile";
            }
            
$userinfo['profilepic'] = "<img src=\"" $userinfo['profilepicurl'] . "\" alt=\"\" title=\"" construct_phrase($vbphrase['xs_picture'], $userinfo['username']) . "\" border=\"0\"";
            
$userinfo['profilepic'] .= ($userinfo['ppwidth'] AND $userinfo['ppheight']) ? " width=\"$userinfo[ppwidth]\" height=\"$userinfo[ppheight]\" " '';
            
$userinfo['profilepic'] .= "/>";
        }
        else
        {
            
$userinfo['profilepic'] = '&nbsp;';
        } 
and the template code is
PHP Code:
    <if condition="$show['profilepiccol'] AND exec_switch_bg()"><td class="$bgclass">$userinfo[profilepic]</td></if> 
can i do the same thing in postbit?

yes
Code:
"$vboptions[profilepicurl]/profilepic$post[userid]_$post[profilepicrevision].gif".
this is very nice, but how about the user not upload any picture?


can i use this
Code:
if (!$this->post['avatarurl'])
{
$this->post['avatarurl'] = "images/avatars/defaultavatar.png";
}
if ($this->registry->userinfo['showavatars']) 
{
$show['avatar'] = true;
}
into profilepic? nah, when i use <if condition="$show['profilepic']"> in template, it does not work.

i just want to show profilepic like in memberlist like in memberinfo >_<
Reply With Quote
  #29  
Old 03-27-2009, 10:11 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Basically you need to look at all the code used for avatars and duplicate the same code for use with profile pictures through either the use of plugins or code edits.

Why don't you just have the users upload their profile pictures into the avatar field? Then you don't have to go through all this?
Reply With Quote
  #30  
Old 03-27-2009, 10:23 PM
vidan vidan is offline
 
Join Date: Feb 2008
Location: texas
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

because i tried over 2 week and i really want to have this works >_< i try what dismounted told me, but as you see, im still open there open here, go site:vbulletin.com profile picture go here go there, ~_~
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 05:32 PM.


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.04400 seconds
  • Memory Usage 2,279KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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