vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vB3 Member Album 2.0 (https://vborg.vbsupport.ru/showthread.php?t=63733)

Velocd 04-09-2004 10:00 PM

vB3 Member Album 2.0
 
https://vborg.vbsupport.ru/

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. ;)

joeychgo 04-10-2004 11:09 PM

can a user upload more then one pic?

Velocd 04-11-2004 12:12 AM

:\

In the current system of profile pictures, a user cannot upload more than one.

This hack simply provides an album for those pictures (in addition to a separate album for signatures).

mmw 04-11-2004 12:17 AM

Thanks for releasing this, finaly the profile picture function on my forum will get used :)

Vivi Ornitier 04-11-2004 12:25 AM

wow, i was waitin for this for awhile, thx heaps

Christine 04-11-2004 12:49 AM

I was just sitting down to write this SAME thing tonight.

I am so glad I checked in here first.

Thanks, Velocd!

Boofo 04-11-2004 01:41 AM

In the modifyprofilepic template, I don't have this code in RC3:

Quote:

<div class="smallfont" style="margin-top:$stylevar[formspacer]px"><label for="profilepic"><input type="checkbox" name="deleteprofilepic" value="1" id="profilepic">$vbphrase[delete_current_profile_pic]</label></div></td>
The other phrase I found all right. What do I need to do here?

Boofo 04-11-2004 02:13 AM

Well, installed and working good except I am getting a little red x where the profile pic should appear. Anyone else run into this or know how to fix it?

Velocd 04-11-2004 02:34 AM

Which isn't showing? The thumbnail, or the profile picture?

Boofo 04-11-2004 02:41 AM

The thumbnails and the avatars in the album.php aren't showing and they don't show in the admin cp approval area either. The pictures show fine in the actual profile.

Velocd 04-11-2004 04:36 AM

I've just installed this on a fresh version of vB3 (it was tested on vB3 Beta 5 and a modified vB3 prior), and the installation was flawless. :)

Boofo, make sure you run the "Rebuild profile picture thumbnails" from admincp/albumcp.php?do=approve. This is required at first, and consequently every other time you change the dimensions of the attachment thumbnail size.

Then clear your browser internet cache, and restart the browser. The browser probably handles the stream of the image a bit more funky since it's from the database, rather than a file on the server. Therefore it might not be updating properly unless you clear your cache.

You say the avatar doesn't show, also?

How does your forum handle custom avatars? Uploaded into the database, or are they stored in a folder?

mudxx 04-11-2004 05:11 AM

Installed it, works great :)

Btw, Boofo, be sure you have jpeg support enabled in GD...

It's most likely you've got something wrong with GD... ran into that problem myself.

Vivi Ornitier 04-11-2004 05:23 AM

This isn't workin the way i expected it to. Let' see

1. When i upload a picture it says i'm above the dimensions set, how do i change the dimensions for the user profile pic?

2. I go to the album.php page and all i see is the people's username with a X beside their name.

3. I try to go to the verify picture link in admincp and it takes me to a 404

Edit: the admincp problem was due to me just not uploadin it into the admincp directory, lol.

But my original quesoitn still holds, how do i change the dimensions for the profile pics? it is set at 100x100

Velocd 04-11-2004 05:57 AM

I've updated to vma1.1, as there were some important bug fixes concerning approval and aesthetics.

To upgrade, reupload albumcp.php to your admincp, and do steps #3-4 and #28 again. ;)


Quote:

Originally Posted by Vivi Ornitier
But my original quesoitn still holds, how do i change the dimensions for the profile pics? it is set at 100x100

The thumbnail settings for photos are the same as attachments. So modify your attachment thumbnail settings (via AdminCP options page) if you wish to change the size.

edit:

If you mean the actual profile dimensions, those are defined by each usergroup. Refer to the usergroup page in your AdminCP.

calvinnguyen 04-11-2004 09:00 AM

I got this error below: Can anyone help me out with this error?

Warning: Division by zero in /home/vietmyen/public_html/album.php on line 149

Warning: Division by zero in /home/vietmyen/public_html/includes/functions.php on line 1707



There seems to have been a slight problem with the VietSuperModel Net database.
Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.

Database error in vBulletin 3.0.0:

Invalid SQL:
SELECT user.userid, dateline,
comment, user.username, user.usertitle,
user.joindate, user.usergroupid
FROM customprofilepic
LEFT JOIN user USING (userid)
WHERE visible=0

ORDER BY posts desc
LIMIT 0,

mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 9

mysql error number: 1064

Floris 04-11-2004 11:45 AM

Quote:

Originally Posted by Velocd
https://vborg.vbsupport.ru/

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!

This hack does not support uploading multiple images per account.

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. ;)

Could a comment system be implemented? Like usernotes.

LeeCHeSSS 04-11-2004 11:54 AM

Is this or could it be made compatible with this hack?

That would probably be sweet ;)

msimplay 04-11-2004 12:45 PM

Quote:

Originally Posted by calvinnguyen
I got this error below: Can anyone help me out with this error?

Warning: Division by zero in /home/vietmyen/public_html/album.php on line 149

Warning: Division by zero in /home/vietmyen/public_html/includes/functions.php on line 1707



There seems to have been a slight problem with the VietSuperModel Net database.
Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.

Database error in vBulletin 3.0.0:

Invalid SQL:
SELECT user.userid, dateline,
comment, user.username, user.usertitle,
user.joindate, user.usergroupid
FROM customprofilepic
LEFT JOIN user USING (userid)
WHERE visible=0

ORDER BY posts desc
LIMIT 0,

mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 9

mysql error number: 1064

weird i got the exact same error

Oblivion Knight 04-11-2004 03:10 PM

Quote:

Originally Posted by LeeCHeSSS
Is this or could it be made compatible with this hack?

That would probably be sweet ;)

I'm fairly sure it could with a little tweaking.. :)

I may have a play around with the 2 hacks later on my test board and see what I can come up with.

Boofo 04-11-2004 03:56 PM

Quote:

Originally Posted by Velocd
I've just installed this on a fresh version of vB3 (it was tested on vB3 Beta 5 and a modified vB3 prior), and the installation was flawless. :)

Boofo, make sure you run the "Rebuild profile picture thumbnails" from admincp/albumcp.php?do=approve. This is required at first, and consequently every other time you change the dimensions of the attachment thumbnail size.

Then clear your browser internet cache, and restart the browser. The browser probably handles the stream of the image a bit more funky since it's from the database, rather than a file on the server. Therefore it might not be updating properly unless you clear your cache.

You say the avatar doesn't show, also?

How does your forum handle custom avatars? Uploaded into the database, or are they stored in a folder?

The avatars are stored in the folder on the server.

Vivi Ornitier 04-11-2004 04:21 PM

hmmm . . . i was hopin this would be like the vb2 hack where it would thumbnail the picture to be put on the photo album page but then if u click on the thumbnailed picture, it would become the original large size.

Boofo 04-11-2004 04:29 PM

Quote:

Originally Posted by mudxx
Installed it, works great :)

Btw, Boofo, be sure you have jpeg support enabled in GD...

It's most likely you've got something wrong with GD... ran into that problem myself.

Yes, it's enabled and running fine. ;)

Boofo 04-11-2004 04:39 PM

Ok, it works now. Whatever you did in the new update, Mike, it seems to have fixed it. Thank you for a great hack, buddy! ;)

Vivi Ornitier 04-11-2004 04:54 PM

hmmm .. . disregard what i said. This hack uses the profile pic as the basis for the photo album. I remember the last version created a whole new feature where you uploaded the picture so in the photo album, you could click on the thumbnil and it would show the original unthumbnaield version.

However, I'm sure you could do what i asked for in my previous post but it would show in the case that the picture the user uploaded was really large, it would show that picture instead of a thumbnailed version in the member's profile.

Mehh . ..oh well, it all works lol, great hack

Velocd 04-11-2004 05:17 PM

Quote:

I got this error below: Can anyone help me out with this error?

Warning: Division by zero in /home/vietmyen/public_html/album.php on line 149

Warning: Division by zero in /home/vietmyen/public_html/includes/functions.php on line 1707



There seems to have been a slight problem with the VietSuperModel Net database.
Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.

Database error in vBulletin 3.0.0:

Invalid SQL:
SELECT user.userid, dateline,
comment, user.username, user.usertitle,
user.joindate, user.usergroupid
FROM customprofilepic
LEFT JOIN user USING (userid)
WHERE visible=0

ORDER BY posts desc
LIMIT 0,

mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 9

mysql error number: 1064
Did you run the MySQL queries?

It's giving a division by zero because the $perpage variable is empty. You should have this field set in AdminCP -> vB3 Member Photo -> Settings.

Also..

Code:

FROM customprofilepic
LEFT JOIN user USING (userid)
WHERE visible=0

In my code, it is not visible=0 but visible=1. It would be good to change that.

Velocd 04-11-2004 05:22 PM

Also note, I usually release my hacks in full featured status.

Meaning, I don't plan to add-on any enhancements. This hack is a simple gallery system for current vB3 profile pictures and signatures. I wont be adding multiple image support, a commenting system, etc.

If you would like to do so, feel free.

calvinnguyen 04-11-2004 08:01 PM

Quote:

Originally Posted by Velocd
Did you run the MySQL queries?

It's giving a division by zero because the $perpage variable is empty. You should have this field set in AdminCP -> vB3 Member Photo -> Settings.

Also..

Code:

FROM customprofilepic
LEFT JOIN user USING (userid)
WHERE visible=0

In my code, it is not visible=0 but visible=1. It would be good to change that.

yes, visible is 1

yes, I did run individual each line query for a time. And completed run to all.

I didn't see any opotion like you said:AdminCP -> vB3 Member Photo -> Settings.

I only see : AdminCP -> vB3 Member Photo

under vB3 Member Photo have:
options
approve images

Velocd 04-11-2004 08:05 PM

vB3 Member Photo -> Options is what I meant.

Is the images per page value set?

Try editing your album.php, and under where it says:

PHP Code:

$perpage $vboptions['album_perpage']; 

Place:

PHP Code:

echo $perpage

And see if there is any output.

Christine 04-11-2004 08:22 PM

Working like a champ on the first install. :D

I can't thank you enough for this. You wrote this WAY more thorough then I would have been capable of doing in just slapping something together. Saved me a MOUNTAIN of time and aggrivation.

:)

Edit to add -- I just changed my favorite hack to this one.

Velocd 04-12-2004 12:45 AM

Heh, I'm glad I could help such a large way. ;)

This was probably the quickest hack I've coded, since Mudxx requested it on Wednesday or Tuesday. :p

Boofo 04-12-2004 01:00 AM

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.

nando415 04-12-2004 01:28 AM

What is GD Graphics library? I did everything exactly as asked in the set up and I get the same exact error as calvin

Velocd 04-12-2004 02:34 AM

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.

Christine 04-12-2004 03:06 AM

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!

Boofo 04-12-2004 03:37 AM

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>


Velocd 04-12-2004 06:47 AM

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:

Boofo 04-12-2004 07:07 AM

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. ;)

Velocd 04-12-2004 02:28 PM

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).

Boofo 04-12-2004 04:44 PM

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! ;)

Christine 04-12-2004 09:32 PM

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?


All times are GMT. The time now is 05:53 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.01813 seconds
  • Memory Usage 1,924KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (3)bbcode_html_printable
  • (5)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete