Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Show icon if user has Profile Picture Details »»
Show icon if user has Profile Picture
Version: 1.00, by TechGuy TechGuy is offline
Developer Last Online: Aug 2015 Show Printable Version Email this Page

Version: 3.0.1 Rating:
Released: 04-07-2004 Last Update: Never Installs: 20
 
No support by the author.

What does this do?
Basically, when viewing a thread, if a user has a Profile Picture, it will show a camera icon (or whatever picture you choose) next to his/her online status icon. For example:


How to do this hack:
Download the instructions!

Updates!
July 1, 2004: I finally got around to re-writting this a bit so that you don't have a query for every post in every thread. However, after you install this, you'll notice that the first time you view a thread there will be a ton of queries. That will happen until we've essentially cached each user's "haspic" status in the user table... meaning that, in the end, this should be a lot nicer than the last version.

Show Your Support

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

Comments
  #22  
Old 07-04-2004, 10:59 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes. Posts is for linear mode, chacheposts is for hybrid and threaded mode.

But I only tested in linear mode so far ... don't know if this does work in other modes.
Reply With Quote
  #23  
Old 07-04-2004, 11:42 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KirbyDE
Yes. Posts is for linear mode, chacheposts is for hybrid and threaded mode.

But I only tested in linear mode so far ... don't know if this does work in other modes.
I installed it in both queries. I'll test it out for hybrid and threaded and let you know. Thanks.
Reply With Quote
  #24  
Old 08-30-2004, 12:57 AM
y2krazy y2krazy is offline
 
Join Date: Jun 2003
Location: Houston, Texas
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/me clicks install!
Reply With Quote
  #25  
Old 01-01-2005, 07:29 PM
SIINSI SIINSI is offline
 
Join Date: Mar 2003
Posts: 119
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by y2krazy
[high]* y2krazy clicks install![/high]
For some reason I get a parse error on this line...

{$mjctemp = $DB_site->query_first("SELECT count(*) AS count FROM " . TABLE_PREFIX . "customprofilepic WHERE userid=" . $pos$

Miguel
Reply With Quote
  #26  
Old 01-10-2005, 02:55 AM
Chazz Layne's Avatar
Chazz Layne Chazz Layne is offline
 
Join Date: Feb 2003
Location: Alive, Mobile and Unknown
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Getting the same problem here... happened right after upgrading to 3.0.5 from 3.0.1.

Edit - just tried the other method posted by Kirby, which seems to do absolutely nothing on Threaded mode (the only mode our forum uses). :ermm:

/me begins uninstalling hack. :tired:
Reply With Quote
  #27  
Old 01-12-2005, 12:38 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, I haven't upgraded to 3.0.5 yet (currently 3.0.3) but I don't see why the code I sposted shouldn't work.

Did you modify both queries?
Reply With Quote
  #28  
Old 01-14-2005, 05:39 PM
DR?@M W?@V?R DR?@M W?@V?R is offline
 
Join Date: Aug 2002
Location: uk
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SIINSI
For some reason I get a parse error on this line...

{$mjctemp = $DB_site->query_first("SELECT count(*) AS count FROM " . TABLE_PREFIX . "customprofilepic WHERE userid=" . $pos$

Miguel
same here as well, also the code changes for profile.php are different for 3.0.5.
Reply With Quote
  #29  
Old 01-14-2005, 06:13 PM
DR?@M W?@V?R DR?@M W?@V?R is offline
 
Join Date: Aug 2002
Location: uk
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KirbyDE
Nice one, but let me suggest an optimization (this is how I did it some weeks ago):

In showthread.php FIND
PHP Code:
post_parsed.pagetext_htmlpost_parsed.hasimages
BELOW that ADD
PHP Code:
NOT ISNULL(customprofilepic.userid) AS haspic
Further down in showthread.php FIND
PHP Code:
LEFT JOIN " . TABLE_PREFIX . "post_parsed AS post_parsed ON(post_parsed.postid post.postid
BELOW that ADD
PHP Code:
LEFT JOIN " . TABLE_PREFIX . "customprofilepic  AS customprofilepic ON(customprofilepic.userid=post.userid
And use this template modification:

In template postbit FIND
PHP Code:
$post[onlinestatus
BELOW that ADD
PHP Code:
<if condition="$post['haspic']"><img src="/photo.gif" border=0 alt="Photo in Profile!"></if> 
That's it. This way you don't have to alter table user, file profile.php and functions_showthread.php.
You also might want to extend this for single post display and PM
Thanks for that it works on 3.0.5 in all display modes

I added this code to the image link.

<if condition="$post['haspic']"><a href="image.php?u=$post[userid]&amp;type=profile"><img src="$stylevar[imgdir_misc]/photo.gif" align="absmiddle" border="0" alt="$post[musername] Has A Photo Click Here To View"></a></if>

I would like to add a 100x100 pop up window to show the image, if anyone could help out.
Reply With Quote
  #30  
Old 01-15-2005, 07:55 AM
DR?@M W?@V?R DR?@M W?@V?R is offline
 
Join Date: Aug 2002
Location: uk
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorted.

PHP Code:

<if condition="$post['haspic']"><a href="image.php?u=$post[userid]&amp;type=profile" onclick="window.open('image.php?u=$post[userid]&amp;type=profile', 'popup', 'statusbar=no,menubar=no,scrollbars=no,resizable=no,width=110,height=110'); return false"><img src="$stylevar[imgdir_misc]/photo.gif" align="absmiddle" border=0 alt="$post[musername] Has A Photo Click Here To View"></a></if> 
Reply With Quote
  #31  
Old 01-17-2005, 01:35 AM
MorrisMcD's Avatar
MorrisMcD MorrisMcD is offline
 
Join Date: Nov 2003
Location: Cincinnati, Ohio
Posts: 415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was going to install this but when I got to the profile.php, I noticed the code was different.. So I decided to abandon...

I did already run the query though.. What command would I run to reverse that?

Or, is there a set of instructions on a fresh install on 3.0.5?

Thanks
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 12:50 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.06183 seconds
  • Memory Usage 2,325KB
  • Queries Executed 25 (?)
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
  • (7)bbcode_php
  • (4)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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