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
  #32  
Old 01-17-2005, 09:36 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

Quote:
Originally Posted by MorrisMcD
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
If you read KirbyDE post for the the optimized version all you need to edit is showthread.php and thats it done.
Reply With Quote
  #33  
Old 01-17-2005, 01:02 PM
MorrisMcD's Avatar
MorrisMcD MorrisMcD is offline
 
Join Date: Nov 2003
Location: Cincinnati, Ohio
Posts: 415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DR?@M W?@V?R
If you read KirbyDE post for the the optimized version all you need to edit is showthread.php and thats it done.
I saw that but I noticed that

LEFT JOIN " . TABLE_PREFIX . "post_parsed AS post_parsed ON(post_parsed.postid = post.postid)

exists twice in my showthread.php

Should I add

LEFT JOIN " . TABLE_PREFIX . "customprofilepic AS customprofilepic ON(customprofilepic.userid=post.userid)

below both instances?

Should I remove the queries I already installed? Sorry.. I dont know what the last few posts really meant, so that may answer my question, but not really since I am not sure what you all are talking about..

Thanks
Reply With Quote
  #34  
Old 01-17-2005, 01:11 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As already stated here you must edit both queries.
Reply With Quote
  #35  
Old 01-17-2005, 01:12 PM
MorrisMcD's Avatar
MorrisMcD MorrisMcD is offline
 
Join Date: Nov 2003
Location: Cincinnati, Ohio
Posts: 415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KirbyDE
As already stated here you must edit both queries.
I thought that is what was meant, but I just wanted to check..

Thanks
Reply With Quote
  #36  
Old 01-17-2005, 01:31 PM
MorrisMcD's Avatar
MorrisMcD MorrisMcD is offline
 
Join Date: Nov 2003
Location: Cincinnati, Ohio
Posts: 415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok.. Got it working... Thanks for the help.. I am running 3.0.5 and with Kirby's instructions, all works well...

Although I think I am going to change the code to have the image located in the images directory rather than the root, which is where it must be by your code..

Thanks again
Reply With Quote
  #37  
Old 01-17-2005, 01:44 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I just adapted this from the original hack.
You can palce the image whereever you want, just make sure you got the correct path in the IMG-Tag
Reply With Quote
  #38  
Old 03-20-2005, 12:31 AM
Alien's Avatar
Alien Alien is offline
 
Join Date: Oct 2001
Posts: 827
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KirbyDE
Well, I just adapted this from the original hack.
You can palce the image whereever you want, just make sure you got the correct path in the IMG-Tag
Again, this is awesome.. Nice work..

Any way in the popup window version to get the photo to display centered and not left aligned whenever it pops up? Or have it be dynamic so that no matter what size the picture is it will adjust the pop to be that exact size? Just an asthetics idea..
Reply With Quote
  #39  
Old 04-02-2005, 12:32 AM
ninjaneo ninjaneo is offline
 
Join Date: Mar 2005
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks like the current versoin you copied out of some vterm window from a shell of some kind... one of the lines is cut off.

Code:
######### OPEN includes/functions_showthread.php ########

## FIND:
$show['messageicon'] = iif($post['iconpath'], true, false);


## BELOW ADD:

        // profile pic in thread
        if ($post[haspic] == "" && isset($post['userid']))
        {
            $show['haspic']=false;
            $mjctemp = $DB_site->query_first("SELECT count(*) AS count FROM " . TABLE_PREFIX . "customprofilepic WHERE userid=" . $pos$
                if ($mjctemp[count]==1) {
                        $show['haspic']=true;
                        $DB_site->query("UPDATE " . TABLE_PREFIX . "user SET haspic='1' WHERE userid = $post[userid]");
                } else {
                        $DB_site->query("UPDATE " . TABLE_PREFIX . "user SET haspic='0' WHERE userid = $post[userid]");
                }
        } else {
                if ($post[haspic]=="1")
                { $show['haspic']=true; }
                else
                { $show['haspic']=false; }
        }
        // profile pic in thread

// SAVE & CLOSE includes/functions_showthread.php
[high]* ninjaneo points to
[/high]
Code:
            $mjctemp = $DB_site->query_first("SELECT count(*) AS count FROM " . TABLE_PREFIX . "customprofilepic WHERE userid=" . $pos$
Reply With Quote
  #40  
Old 05-22-2005, 06:23 PM
HarryBO HarryBO is offline
 
Join Date: Jan 2003
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice Hack, but i became an parse error:

Parse error: parse error, unexpected '$' in /www/htdocs/v*****/includes/functions_showthread.php on line 1421

This is line 1421

$mjctemp = $DB_site->query_first("SELECT count(*) AS count FROM " . TABLE_PREFIX . "customprofilepic WHERE userid=" . $pos$
Reply With Quote
  #41  
Old 05-23-2005, 09:54 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Replace the line:
PHP Code:
            $mjctemp $DB_site->query_first("SELECT count(*) AS count FROM " TABLE_PREFIX "customprofilepic WHERE userid=" $pos
with:
PHP Code:
            $mjctemp $DB_site->query_first("SELECT count(*) AS count FROM " TABLE_PREFIX "customprofilepic WHERE userid=" $post['userid']); 
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 01:26 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.05560 seconds
  • Memory Usage 2,316KB
  • 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
  • (2)bbcode_code
  • (2)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
  • (2)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