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
vB3 Member Album 2.0 Details »»
vB3 Member Album 2.0
Version: 1.00, by Velocd Velocd is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 04-09-2004 Last Update: Never Installs: 100
 
No support by the author.



In vBulletin 3 there is an option for members to upload a profile picture. This hack provides more incentive for members to upload their picture, as it integrates a gallery to browse them all. :up:

In addition to browsing profile pictures, there is an option for viewing signatures. This comes in handy, for you don't have to browse through each individual member. Also, a "edit signature" link is provided for moderators, for fast access to editing signatures that aren't in accordance with your rules.

Other Features
  • Require pictures to be approved in order to be visible. You can exempt specified usergroups from this.
  • Thumbnails are generated for profile pictures. You must have GD installed and enabled via the AdminCP options page.
  • For more insight, refer to the attached screenshots, or install it!

Upgrade to 2.0
  • Redo steps 7-8, 11-12, 19-20, 26, 27, and 34
  • Revert the template "modifyprofilepic", and do steps 29-32
  • Run the following queries:
    [sql]
    ALTER TABLE `customprofilepic` ADD disapproved smallint(5) not null default'0';
    ALTER TABLE `customprofilepic` ADD reason varchar(100) not null;
    [/sql]

Notes
  • This hack does not support uploading multiple images per account.
  • Profile thumbnail sizes are defined by the attachment thumbnail sizes. So modify the attachment thumbnail sizes in your AdminCP options page if you wish to change the profile picture thumbnail sizes. Be sure to run "re-generate thumbnails" via the vB3 Member Album -> Approve Images" page.
  • Profile picture sizes (not thumbnails) are defined for each usergroup. Modify a usergroup via AdminCP to change the dimensions members under that group are allowed to have for profile pictures.

3rd Party Add-ons
  • Pseudomizer has posted a migration script that will transfer your files from my old vB2 Member Photo to the correct tables in this vB3 hack. Click here to view.
  • Pseudomizer also posted a portal-integration allowing you to display a random profile picture on your portal.
    Click here to view.
  • Thanks to those who posted add-ons!

Galleries in Action
If you have this hack installed on your forum, and could provide me a demo, please PM a link so I can post it in this thread.

Show Your Support

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

Comments
  #32  
Old 04-12-2004, 01:00 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you read that your new version fixed the problems that I was having?

And what do I do about the first replacement in the modifyprofilepic, sir? Since I am using RC3, it is different than your code.
Reply With Quote
  #33  
Old 04-12-2004, 01:28 AM
nando415 nando415 is offline
 
Join Date: Aug 2003
Location: sf
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What is GD Graphics library? I did everything exactly as asked in the set up and I get the same exact error as calvin
Reply With Quote
  #34  
Old 04-12-2004, 02:34 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Boofo, just place the code where it seems appropriate (use your HTML wisdom ). This was developed for vB3 Gold, so I can't help for older versions where the templates are different, since I don't know what the templates look like. If you want to post the template, I'll have a look.

Quote:
What is GD Graphics library? I did everything exactly as asked in the set up and I get the same exact error as calvin
http://www.boutell.com/gd/
http://www.php.net/gd

It's an image library for advance image manipulation in PHP. For this hack, you need it to resize images. If you have PHP4.3.0 or above, you have GD2 installed. To check if it's installed and what version, use:

PHP Code:
<?php

gd_info
();

?>
It'll return an error if not installed.

You must also have the option enabled via your AdminCP -> Options page.
Reply With Quote
  #35  
Old 04-12-2004, 03:06 AM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Velocd,

I tried to run the rebuild to make the images a bit bigger tonight, and it is locking up. I have 300 pics loaded, but set it as low as 10 trying to make it go through. It gets to image 7 and then just flashes.

New pics load in fine, but I can't get the old ones to change (and really don't want to manually load them a second time!)

Any thoughts on what to look at?

My GD version is 2.0.15 if that matters.

Thanks!
Reply With Quote
  #36  
Old 04-12-2004, 03:37 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mike, I just noticed that the avatars aren't showing up for the signatures when I list them. I am using avatars as files in a dir on the server. Can this be what is causing it not to show the avartars and show the red x instead?

The code in the modifyprofilepic template is as follows:

HTML Code:
<script type="text/javascript">
<!--
function check_yes(objid)
{
	yes = fetch_object(objid);
	if (yes)
	{
		yes.checked = true;
	}
}
//-->
</script>

<form enctype="multipart/form-data" action="profile.php" method="post">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="updateprofilepic" />

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
	<td class="tcat" colspan="2">$vbphrase[edit_profile_picture]</td>
</tr>
<tr>
	<td class="panelsurround" align="center">
	<div class="panel">
		<div style="width:$stylevar[formwidth_usercp]" align="$stylevar[left]">
		
			<fieldset class="fieldset">
				<legend>$vbphrase[your_current_profile_picture]</legend>
				<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
				<tr valign="top">
					<td><img src="image.php?u=$bbuserinfo[userid]&amp;type=profile&amp;dateline=$profilepic[dateline]" alt="$vbphrase[your_profile_picture]" border="0" /></td>
					<td class="smallfont">
						<div style="margin-bottom:$stylevar[formspacer]px">$vbphrase[use_profile_picture] :</div>
						<div>
							<label for="profilepic_yes"><input type="radio" name="profilepic" value="1" id="profilepic_yes" $profilepicchecked[1] />$vbphrase[yes]</label>
							<label for="profilepic_no"><input type="radio" name="profilepic" value="0" id="profilepic_no" $profilepicchecked[0] />$vbphrase[no]</label>
						</div>
						<div style="margin-top:$stylevar[formspacer]px">$vbphrase[if_have_profile_picture_no_will_delete]</div>
					</td>
				</tr>
				</table>
			</fieldset>
			
			<fieldset class="fieldset">
				<legend>$vbphrase[custom_profile_picture]</legend>
				<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
				<tr>
					<td>$vbphrase[may_upload_custom_image_controls]</td>
				</tr>
				<tr>
					<td>
						$vbphrase[enter_profile_picture_url]:<br />
						<input type="text" class="bginput" name="avatarurl" value="http://www." onchange="check_yes('profilepic_yes')" size="50" />
					</td>
				</tr>
				<tr>
					<td>
						<input type="hidden" name="MAX_FILE_SIZE" value="$inimaxattach" />
						$vbphrase[upload_profile_picture_from_computer]:<br />
						<input type="file" class="bginput" name="upload" onchange="check_yes('profilepic_yes')" size="50" />
					</td>
				</tr>
				<tr>
					<td class="smallfont">
						If you want, enter a comment about your picture:<br />
						<input type="text" class="bginput" name="comment" maxlength="40" size="50" />
					</td>
				</tr>
				<tr>
					<td><phrase 1="$permissions[profilepicmaxwidth]" 2="$permissions[profilepicmaxheight]" 3="$permissions[profilepicmaxsize]">$vbphrase[note_maximum_size_x_y_or_z]</phrase></td>
				</tr>
				</table>
			</fieldset>
			
		</div>
	</div>
	
	<div style="margin-top:$stylevar[cellpadding]px">
		<input type="submit" class="button" value="$vbphrase[save_changes]" accesskey="s" />
		<input type="reset" class="button" value="$vbphrase[reset_fields]" accesskey="r" />
	</div>
	</td>
</tr>
</table>

</form>
Reply With Quote
  #37  
Old 04-12-2004, 06:47 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Velocd,

I tried to run the rebuild to make the images a bit bigger tonight, and it is locking up. I have 300 pics loaded, but set it as low as 10 trying to make it go through. It gets to image 7 and then just flashes.

New pics load in fine, but I can't get the old ones to change (and really don't want to manually load them a second time!)

Any thoughts on what to look at?
Christine, you ran the rebuild option originally after installing the hack, correct? No errors showed then?


Quote:
Mike, I just noticed that the avatars aren't showing up for the signatures when I list them. I am using avatars as files in a dir on the server. Can this be what is causing it not to show the avartars and show the red x instead?
Ah, I missed a field in album.php that should have been added. It only affects one if they have custom avatars in folders, such as your case. I'll update the file, but here are the quick directions for you:

In album.php, find:

PHP Code:
avatar.avatarpath 
Replace it with:

PHP Code:
avatar.avatarpathuser.avatarrevision 
As for that template, for step #1 find:
HTML Code:
<td><img src="image.php?u=$bbuserinfo[userid]&amp;type=profile&amp;dateline=$profilepic[dateline]" alt="$vbphrase[your_profile_picture]" border="0" /></td>
Replace it with:
HTML Code:
<td><img src="image.php?u=$bbuserinfo[userid]&amp;type=profile&amp;dateline=$profilepic[dateline]" alt="$vbphrase[your_profile_picture]" border="0" /><if condition="!$profilepic[visible]"><br /><u><b><i>This image is awaiting approval status!</i></b></u></if><if condition="$profilepic[comment]"><br /><i>$profilepic[comment]</i><br /></if></td>
Should be good. :up:
Reply With Quote
  #38  
Old 04-12-2004, 07:07 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, the avatars work now in the signatures listing and the message shows up in the modifyprofilepic area like it should when they ate awaiting approval. I'm all set to go. Thank you, sir.

I know you said you don't like adding things and I dont blame you, but (and there is always a but, isn't there?) would there be away to stop the picture from also showing up in the profile until it is verified? That part bypasses this and that would really be a great idea if you ever had users that were to upload a porn pic or something.
Reply With Quote
  #39  
Old 04-12-2004, 02:28 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually Boofo, that is already applied. ^^

Only the user can view his/her own profile picture in their profile page (member.php) if it is unapproved, but no one else can. However, even if unapproved, it wont show in the gallery (album.php).
Reply With Quote
  #40  
Old 04-12-2004, 04:44 PM
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 Velocd
Actually Boofo, that is already applied. ^^

Only the user can view his/her own profile picture in their profile page (member.php) if it is unapproved, but no one else can. However, even if unapproved, it wont show in the gallery (album.php).
Ok, I see it now. I was looking at my own pic so it was showing up no matter what. I tested in on another pic and it worked as you said. Sorry about that.

I think the sig editor is a great addition to this. It makes checking for a user's sig a lot faster than going through posts or profiles one by one.

Excellent hack, sir! Thank you!
Reply With Quote
  #41  
Old 04-12-2004, 09:32 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Velocd
Christine, you ran the rebuild option originally after installing the hack, correct? No errors showed then?
Yes, I ran it for the default 100x100 and all was fine. It was when I tried to up it to 175x175 that it choked on me each time, about the same place between #7 and #11.

Any thoughts?
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 07:01 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.07532 seconds
  • Memory Usage 2,350KB
  • 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
  • (3)bbcode_html
  • (3)bbcode_php
  • (5)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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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