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

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

i've been trying this for 2 and half hour, and result, nothing appear. only show <img src="image.php?u=1&type=profile"> in source file.

i tried to put

PHP Code:
function prepare_profilepic()
    {
        if (
$this->registry->options['profilepicenabled'] AND $this->userinfo['profilepic'] AND ($this->registry->userinfo['permissions']['genericpermissions'] & $this->registry->bf_ugp_genericpermissions['canseeprofilepic'] OR $this->registry->userinfo['userid'] == $this->userinfo['userid']) AND ($this->userinfo['permissions']['genericpermissions'] & $this->registry->bf_ugp_genericpermissions['canprofilepic'] OR $this->userinfo['adminprofilepic']))
        {
            if (
$this->registry->options['usefileavatar'])
            {
                
$this->prepared['profilepicurl'] = $this->registry->options['profilepicurl'] . '/profilepic' $this->prepared['userid'] . '_' $this->userinfo['profilepicrevision'] . '.gif';
            }
            else
            {
                
$this->prepared['profilepicurl'] = 'image.php?' $this->registry->session->vars['sessionurl'] . 'u=' $this->prepared['userid'] . "&amp;dateline=" $this->userinfo["profilepicdateline"] . "&amp;type=profile";
            }

            if (
$this->userinfo['ppwidth'] AND $this->userinfo['ppheight'])
            {
                
$this->prepared['profilepicsize'] = ' width="' $this->userinfo["ppwidth"] . '" height="' $this->userinfo["ppheight"] . '" ';
            }
        }
        else
        {
            
$this->prepared['profilepicurl'] = '';
        }
    } 
in plugin->makenew plugin->postbit_start_display and showthread_query

and display

PHP Code:
http://www.YOURSITE.COM/forum/image.php?u=$post[userid]&type=profile 
but nothing appear
can i get more clue. im trying to search both in .com and org
to find similar, but nothing i found, only the 3.5.4 version with avatar in datbaase.

please help me >_<
Reply With Quote
  #12  
Old 03-16-2009, 05:00 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

$this can only be referenced inside object context...
Reply With Quote
  #13  
Old 03-16-2009, 05:56 AM
vidan vidan is offline
 
Join Date: Feb 2008
Location: texas
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so do i need to put require globals.php in the plugin?

--------------- Added [DATE]1237227955[/DATE] at [TIME]1237227955[/TIME] ---------------

hello, can i got more clue >_<
nearly a week
Reply With Quote
  #14  
Old 03-16-2009, 07:07 PM
Mr-Moo Mr-Moo is offline
 
Join Date: Sep 2007
Location: Chicago, IL.
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you creating a plugin or just modifying files? Your losing me mate.
Reply With Quote
  #15  
Old 03-17-2009, 01:26 AM
vidan vidan is offline
 
Join Date: Feb 2008
Location: texas
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i just want to show profile picture in showthread, i do not know if its need a plugin or simple editing the style.
Reply With Quote
  #16  
Old 03-17-2009, 05:24 PM
Mr-Moo Mr-Moo is offline
 
Join Date: Sep 2007
Location: Chicago, IL.
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My method should have been a simple "style-edit", to my knowledge it should have worked.

Dismounted's should have also worked by editing the PHP file.
Reply With Quote
  #17  
Old 03-17-2009, 06:31 PM
vidan vidan is offline
 
Join Date: Feb 2008
Location: texas
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no mr boo boo, this cant be style edit, needs some hooks. but i dont know what to hooks -_-
im not a progammer, not even nearly >_<
Reply With Quote
  #18  
Old 03-17-2009, 07:18 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you try doing a search at all for this? This may help get you on the right track - Profile Picture in Postbit. There may be other threads, but I just grabbed one for posting here.
Reply With Quote
  #19  
Old 03-17-2009, 07:22 PM
vidan vidan is offline
 
Join Date: Feb 2008
Location: texas
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes yes and yes, its been a week before i created this thread. then its 2 weeks now.
yes and that thread, i read that too. but its for database, i need the one using file storage.
btw my first post in this thread, is based on that thread -> https://vborg.vbsupport.ru/showpost....7&postcount=15

thanks Lynne

--------------- Added [DATE]1237322372[/DATE] at [TIME]1237322372[/TIME] ---------------

hello dismounted mrboo and lynne
i found this

PHP Code:
$show['profilepic'] = ($vbulletin->options['profilepicenabled'] AND $userinfo['profilepic'] AND ($permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseeprofilepic'] OR $vbulletin->userinfo['userid'] == $userinfo['userid']) AND ($userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canprofilepic'] OR $userinfo['adminprofilepic'])) ? true false;

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";
}

if (
$userinfo['ppwidth'] AND $userinfo['ppheight'])
{
    
$userinfo['profilepicsize'] = " width=\"$userinfo[ppwidth]\" height=\"$userinfo[ppheight]\" ";

i tried in showthread_query and postbit but cant work.
got some idea?
Reply With Quote
  #20  
Old 03-17-2009, 07:45 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You know, isn't the url to the profile picture (when in file storage) just a matter of knowing the userid and the profilepicrevision? I'll answer that to the best of my knowledge... yes, it is. So, just grab the profilepicrevision from the user table and then the url to the image is just "$vboptions[profilepicurl]/profilepic$post[userid]_$post[profilepicrevision].gif".

edit to add: you don't even need a plugin to grab the profilepicrevision since it's already available. I'm not sure about grabbing the height and width though since I didn't look at the tables for that.
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:26 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.03386 seconds
  • Memory Usage 2,288KB
  • 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
  • (3)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