Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 03-10-2009, 04:18 AM
vidan vidan is offline
 
Join Date: Feb 2008
Location: texas
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default HOW TO show profile picture in showthread

As by topic request, profile picture locate in file storage
thanks everyone
i found onlyfor database, i need for profile picture locate in file storage

Quote:
Originally Posted by riverpoet View Post
Wow, can't believe how easy this is (vB 3.5.4)!

Add a PLUG-IN with HOOK LOCATION showthread_query and the following code:

Code:
$hook_query_fields = ",customprofilepic.dateline AS profilepicdateline";
$hook_query_joins = "LEFT JOIN " . TABLE_PREFIX . "customprofilepic AS customprofilepic ON(customprofilepic.userid = post.userid)";
In POSTBIT template, add :

Code:
<if condition="$post['profilepicdateline']">
<img src="image.php?u=$post[userid]&dateline=$post[profilepicdateline]&type=profile">
</if>
NOTE: This will only work if you're using the database for avatar/profilepic storage!
Reply With Quote
  #2  
Old 03-10-2009, 05:08 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Follow the breadcrumbs of member profiles... Into class_userprofile.php.
Reply With Quote
  #3  
Old 03-11-2009, 09:51 AM
vidan vidan is offline
 
Join Date: Feb 2008
Location: texas
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello, sorry dismounted, i still dont get it.
what to find in class_userprofile?
Reply With Quote
  #4  
Old 03-12-2009, 04:21 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The code to fetch a profile picture...
Reply With Quote
  #5  
Old 03-12-2009, 06:53 PM
vidan vidan is offline
 
Join Date: Feb 2008
Location: texas
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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'] = '';
		}
	}
you mean this one?

what to put in template? sorry for trouble dismounted
Reply With Quote
  #6  
Old 03-14-2009, 05:43 AM
vidan vidan is offline
 
Join Date: Feb 2008
Location: texas
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hello?
Reply With Quote
  #7  
Old 03-14-2009, 03:55 PM
Mr-Moo Mr-Moo is offline
 
Join Date: Sep 2007
Location: Chicago, IL.
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Possibly this may work,

Display an image in your style of the location
PHP Code:
http://www.WEBSITE/forum/image.php?u=1&type=profile 
Where you see the "1", echo out the userID, ($post[userid]).

It should look something like:
PHP Code:
http://www.YOURSITE.COM/forum/image.php?u=$post[userid]&type=profile 
Reply With Quote
  #8  
Old 03-14-2009, 04:33 PM
vidan vidan is offline
 
Join Date: Feb 2008
Location: texas
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it returns blank web.

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

hello bump up, i need this modificationplease >_<
Reply With Quote
  #9  
Old 03-15-2009, 06:12 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The code you found tells you exactly how you can find the picture URL...
Reply With Quote
  #10  
Old 03-15-2009, 01:54 PM
Mr-Moo Mr-Moo is offline
 
Join Date: Sep 2007
Location: Chicago, IL.
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vidan View Post
it returns blank web.

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

hello bump up, i need this modificationplease >_<
Erm, you may want to think about this a little.

The code provided by yourself clearly has the solution. You may also want to re-think the code I posted to you, as that will indeed return a blank page. The code I provided was intended to be placed within the forum style. It requires functions to be called from another file (globals.php) to properly function.

So please, re-test, be patient, and be thankful
Reply With Quote
Reply

Thread Tools
Display Modes

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 08:45 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.04465 seconds
  • Memory Usage 2,253KB
  • 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_code
  • (2)bbcode_php
  • (2)bbcode_quote
  • (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