PDA

View Full Version : vB3 Member Album 2.0


Pages : [1] 2 3

Velocd
04-09-2004, 10:00 PM
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:

ALTER TABLE `customprofilepic` ADD disapproved smallint(5) not null default'0';
ALTER TABLE `customprofilepic` ADD reason varchar(100) not null;



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 (https://vborg.vbsupport.ru/showpost.php?p=503583&postcount=76).
Pseudomizer also posted a portal-integration allowing you to display a random profile picture on your portal.
Click here to view (https://vborg.vbsupport.ru/showpost.php?p=503591&postcount=77).
Thanks to those who posted add-ons!


Galleries in Action

iKwak - http://www.calpolyonline.com/forums/album.php
Mudxx - http://www.musictalk.com/album.php
Velocd - http://forums.animesystem.com/album.php


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:

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


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
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 (http://www.everythingvb.com/showthread.php?t=116)?

That would probably be sweet ;)

msimplay
04-11-2004, 12:45 PM
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
Is this or could it be made compatible with this hack (http://www.everythingvb.com/showthread.php?t=116)?

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

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

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:

$perpage = $vboptions['album_perpage'];

Place:

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.

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

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:

<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
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?


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:

avatar.avatarpath

Replace it with:

avatar.avatarpath, user.avatarrevision

As for that template, for step #1 find:
<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:
<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
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
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?

Christine
04-13-2004, 12:50 AM
What if the images are smaller than the 175x175 thumbnail I am setting -- would that cause it to cough?

Here is a sample of the first images:
137x191
175x173
134x165
175x170
168x154
172x175

Most are within these dimensions as I had them all sized for an html gallery that we had been using.

Velocd
04-13-2004, 01:23 AM
That is odd, if it worked the first time through with 100x100.

Try 200x200, maybe that works (just for testing). Are the images up to #7 actually being resized properly? There might be something up with those #7-#11 images, like you mentioned.

I'll look into why it might be doing this.

Pseudomizer
04-13-2004, 01:31 AM
Hello,

i need a little bit of help please. I just installed this hack on vb3.0.0 and did all the modifications, uploads and database queries. All without any errors.

In the AdminCP i have now the options and i can set them BUT:

- where is the link to this new gallery ? Is this not in the modifications ? Do i have to manually edit my navbar to add the link to album.php ?
- when i go to my control panel ( normal user ) and i try to upload a file larger then 100x100 it rejects it. How do i set the size for the pictures ? I searched through all admin settings, but i did not find it.

Please help me.

Thanks in advance.

Cheers,

Pseudomiizer

Boofo
04-13-2004, 02:16 AM
What is a good size to allow for profile pics?

Christine
04-13-2004, 02:50 AM
Bob,

I have all of mine set to the approx. dimensions above for displaying in rows of 3 for 800x600 resolution.

Velocd,

I will try 200x200.

Tonight, I took a datadump of the customprofilepic table and uploaded it to my test server, deleted the thumbnaildata field all together, and then readded the field under profilepicdata.

I then reset thumbnails to 175 and attempted to resize, and it locked up here:

albumcp.php?do=rebuildthumbs&startat=21&perpage=20

With the thumbnaildata field cleared, it ran through the first 20 pics just fine, but then kept cycling back through startat=21&perpage=20.

I opened another browser program and set the URL for startat=41&perpage=20 to see if I could maybe skip over any problem pics, but it wouldn't take that -- it just refreshed itself to 21 & 20 and kept cycling though those over and over again.

All of the photos are .jpg format, and all original sizes are as mentioned.

If I add a new photo with the 175 limit, it also works fine - it is just trying to change them once they have been added and the limit is changed after that time.

This has me baffled.

Christine
04-13-2004, 02:58 AM
- where is the link to this new gallery ? Is this not in the modifications ? Do i have to manually edit my navbar to add the link to album.php ?Yes, so that you can customize it to your forums. Here is the code I used -- but I am restricting the album to members only. If you don't want to restrict that, take out the conditional. Add phrase:

Global
album
Album

In Navbar, find:

<td class="vbmenu_control"><a href="memberlist.php?$session[sessionurl]">$vbphrase[members_list]</a></td>

Below it add:

<if condition="$show['member']">
<td class="vbmenu_control"><a href="album.php?$session[sessionurl]">$vbphrase[album]</a></td>
</if>
- when i go to my control panel ( normal user ) and i try to upload a file larger then 100x100 it rejects it. How do i set the size for the pictures ? I searched through all admin settings, but i did not find it.This is tied into the Attachment thumbnail setting.

That is in Options > Message Attachment Options > Thumbnail Size

:)

Christine
04-13-2004, 03:00 AM
Speaking of permissions, if anyone is interested in tying the permissions on the album to the memberlist security field, just add this to album.php: Find:

$perpage = $vboptions['album_perpage'];
$pertr = $vboptions['album_pertr'];

Under it, add:

// permissions check
if (!($permissions['forumpermissions'] & CANVIEW) OR !($permissions['genericpermissions'] & CANVIEWMEMBERS))
{
print_no_permission();
}

:)

Boofo
04-13-2004, 03:29 AM
Bob,

I have all of mine set to the approx. dimensions above for displaying in rows of 3 for 800x600 resolution.



I have my thumbnails set at 150 width right now. But what is a good size to allow the propfilepic so it isn't too small but not too large for the profile itself? There it will show full size.

calvinnguyen
04-13-2004, 04:56 AM
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:

$perpage = $vboptions['album_perpage'];

Place:

echo $perpage;

And see if there is any output.

Still the same problem
Warning: Division by zero in /home/vietmyen/public_html/album.php on line 151

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 Vietmyen 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=1

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

Date: Monday 12th of April 2004 10:55:27 PM

Pseudomizer
04-13-2004, 07:51 AM
Hello Christine,

thanks for all your answers. Point 1: This is fine. Now i will add a link to my menu, but after reading your second answer with the permissions how about addind this to the memberlist as a pop-up like the search button ? This would make more sense if you already are tying it to memberlist.

Point2: I tried to set it to 200 and rebuild the attachment update counters and i tried to set it to 500 and updated the attachment counters. It is STILL 100x100. Something is going wrong here. Any idea why ?

Cheers,

Pseudomizer

Christine
04-13-2004, 10:46 AM
Hi Pseudomizer,

I have it tied to the permissions, but set as a seperate link for navigation. Sure, you can change that, and with all the links I have going on up there now, I may look at that myself!

As far as the rebuild -- you need to run the rebuild function in the vB3 Member Album > Approve Images section as the attachment rebuild is for the attachment table.

Pseudomizer
04-13-2004, 11:36 AM
Hi Christine,

i fully understood what you mean but it does not work. After installing all the modifications, templates and uploads my "Approve Images" section is completly empty. Only if i upload one image which is less than 100x100 pixel in my control panel, i get the options in the "Approve Images" section to rebuild the profile picture thumbnails. I could live with that but here is the problem now:

Member attachment options -> Thumbnailsize -> 500
Maintenance -> Update Counters -> Message Thumbnails > Rebuild done
vB3 Member Album -> Approve Images -> Rebuild profile picture thumbnails done

Now if i try to upload any image i still have the damn restriction of 100x100 pixel. Why ? Where is the error ?

Cheers,

Pseudomizer

Velocd
04-13-2004, 03:10 PM
Pseudo, you have the thumbnail sizes confused with the actual profile picture size.

As I mentioned on the first page of this thread to Vivi Ornitier, to change the profile image dimensions, you have to edit usergroups. Each usergroup has its own defined size.

https://vborg.vbsupport.ru/showpost.php?p=498484&postcount=14

Pseudomizer
04-13-2004, 03:33 PM
Perfect. Thank you so much. Sorry for being unable to find that error in previous messages. A small hint in the instructions would save you a lot of time answering these kind of requests. :-)

But good work, nice hack. I will try to convert my existing pictures from your old member photo gallery hack into this new hack because all old database entries are still there.

Cheers,

Pseudomizer

Velocd
04-13-2004, 04:29 PM
Still the same problem
Warning: Division by zero in /home/vietmyen/public_html/album.php on line 151

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


Calvin, what I asked before was if placing echo $perpage; below $perpage = $vboptions['album_perpage'] outputted anything to the screen? My answer wasn't a direct solution.

I took a datadump of the customprofilepic table and uploaded it to my test server, deleted the thumbnaildata field all together, and then readded the field under profilepicdata.

I then reset thumbnails to 175 and attempted to resize, and it locked up here:

albumcp.php?do=rebuildthumbs&startat=21&perpage=20

With the thumbnaildata field cleared, it ran through the first 20 pics just fine, but then kept cycling back through startat=21&perpage=20.

I opened another browser program and set the URL for startat=41&perpage=20 to see if I could maybe skip over any problem pics, but it wouldn't take that -- it just refreshed itself to 21 & 20 and kept cycling though those over and over again.

All of the photos are .jpg format, and all original sizes are as mentioned.

If I add a new photo with the 175 limit, it also works fine - it is just trying to change them once they have been added and the limit is changed after that time.

This has me baffled.


This likely has to do with the $perpage value in albumcp.php, and some weird bug.

I don't have a lot of time to debug it now, but one troubleshooting solution I can provide is to erase the $perpage chunk of code, and re-generate all thumbnails in one process.

I've attached a customized albumcp.php that does just this. Be sure to rename it albumcp.php to use it. If it still doesn't work, and locks up, then there might be a problem with the actual GD-image handling functions. (although I sort of doubt it)

calvinnguyen
04-13-2004, 09:47 PM
Calvin, what I asked before was if placing echo $perpage; below $perpage = $vboptions['album_perpage'] outputted anything to the screen? My answer wasn't a direct solution.


There is nothing to the screen, whatever the screen it.

when I type: http://mydomain.com/album.php

I got error like as I report here.

Velocd
04-13-2004, 09:57 PM
No errors occured when running the install.html queries? The value of $vboptions['album_perpage'] must be blank if nothing is outputting, which means the setting must not exist in the table.

Run this query from PhpMyAdmin, and show me the results.

SELECT * FROM setting WHERE varname='album_perpage'

calvinnguyen
04-14-2004, 12:42 AM
Here is the result that I attachment when I run
SELECT * FROM setting WHERE varname='album_perpage'

When I run album.php from my website I got number 18. That's it. I did't see anything else.

gmarik
04-14-2004, 05:27 PM
2-3 pics would be even betterm why not?

Velocd
04-14-2004, 09:23 PM
Review the thread, I've already explained. I have a very tight schedule with college, my job, and other coding projects, therefore don't have time to spend for "add-ons" to my hacks released at vBulletin.org.

Christine
04-15-2004, 12:51 AM
Thanks, Velocd -- the albumcp_debug.php worked great!

Pseudomizer
04-15-2004, 01:17 AM
Calvin, what I asked before was if placing echo $perpage; below $perpage = $vboptions['album_perpage'] outputted anything to the screen? My answer wasn't a direct solution.



This likely has to do with the $perpage value in albumcp.php, and some weird bug.

I don't have a lot of time to debug it now, but one troubleshooting solution I can provide is to erase the $perpage chunk of code, and re-generate all thumbnails in one process.

I've attached a customized albumcp.php that does just this. Be sure to rename it albumcp.php to use it. If it still doesn't work, and locks up, then there might be a problem with the actual GD-image handling functions. (although I sort of doubt it)

This is strange. I installed the hack on a windows 2000 Server running Apache and MySQL and all went fine. Now installed it on SuSe Linux and Apache and MySQL and i got the same error message after a fresh install.

Then i went straight to my ACP clicked on the member photo options and saved them once. After this my division by zero error in album.php and functions.php was gone.

I thought that could be interesting for all of you.

Cheers,

Pseudomizer

d3nnis
04-15-2004, 04:36 AM
Velocd can you enhanced this mod to make it into a personals page? I also like the idea of using profile (for members own pic)

Boofo
04-15-2004, 02:05 PM
Mike. I'm getting this for all the signatures:

Last modified:
Dec 31st, 1969, 6:00 pm

Can this be fixed?

Christine
04-15-2004, 06:15 PM
Hi Bob,

That field is only captured when there is a change made and it is saved - the default is 0.

You can default a date of your choice in there by running this script:

UPDATE usertextfield SET sigdateline = 'unixtimestamp'

Good thing you have that tool, aye? :p

Boofo
04-15-2004, 06:46 PM
Hi Bob,

That field is only captured when there is a change made and it is saved - the default is 0.

You can default a date of your choice in there by running this script:

UPDATE usertextfield SET sigdateline = 'unixtimestamp'

Good thing you have that tool, aye? :p

That tool is nice. ;) Are you still going to make a vb page out of it? ;)

Is there a way to not have it show a last update time until it actually is updated? That would be better I think. ;)

Velocd
04-16-2004, 05:36 AM
Yep, and that actually makes more sense. Will update the install.html.

In the template album_sig_list, find:

<br /><br />Last modified:<br />$user[sigdate], <font class="time">$user[sigtime]</font>

Replace it with:

<if condition="$user[sigdateline]"><br /><br />Last modified:<br />$user[sigdate], <font class="time">$user[sigtime]</font></if>

Velocd can you enhanced this mod to make it into a personals page?

I'm not quite sure what you mean. :\

d3nnis
04-16-2004, 05:56 AM
I'm not quite sure what you mean. :\


Something like this :

http://www.chillicrap.com/Personals/

Velocd
04-16-2004, 01:37 PM
Review the thread. I've mentioned many a times I don't plan to build add-ons for this hack.

No multiple images, no commenting system, yadda yadda.

You are free to do so yourself.

Pseudomizer
04-16-2004, 02:24 PM
Hello,

i would like to know if there is anyone interested in an upgrade path from this hack for version 2.3.x to version 3.0.0 ? I have created a script to migrate all the pictures from the old hack into the new hack.

The only disadvantage will be that all comments will be cut off after 40 characters because the new entry field in the user options is limited to 40 characters which was 255 characters before.

If people are interested to migrate please respond in here. I am more then happy to help out because Velocd has done a great job with these 2 hacks.

If you are not sure which hack i am talking about here is the link to the old vb2.3.x hack: https://vborg.vbsupport.ru/showthread.php?t=49565&highlight=gallery

Cheers,

d3nnis
04-16-2004, 02:58 PM
Review the thread. I've mentioned many a times I don't plan to build add-ons for this hack.

No multiple images, no commenting system, yadda yadda.

You are free to do so yourself.


hehe u can do the personals... i would be glad to purchase it from you (u can make it commercial! I haven seen any personals yet... to integrate into vb3)

Boofo
04-16-2004, 03:00 PM
Yep, and that actually makes more sense. Will update the install.html.

In the template album_sig_list, find:

<br /><br />Last modified:<br />$user[sigdate], <font class="time">$user[sigtime]</font>

Replace it with:

<if condition="$user[sigdateline]"><br /><br />Last modified:<br />$user[sigdate], <font class="time">$user[sigtime]</font></if>


Thank you, sir. That actually looks much better. ;)

Velocd
04-17-2004, 04:21 AM
The only disadvantage will be that all comments will be cut off after 40 characters because the new entry field in the user options is limited to 40 characters which was 255 characters before.

Well, the HTML input field "maxlength" attribute does little to actually restrict the data that can be passed.

The comment field in the table customprofilepic is varchar(255), meaning it can hold up to 255 characters. I only set the INPUT maxlength value to 40, as I thought that was suitable for this hack.

Both can be changed.

Pseudomizer
04-17-2004, 09:24 AM
Well, the HTML input field "maxlength" attribute does little to actually restrict the data that can be passed.

The comment field in the table customprofilepic is varchar(255), meaning it can hold up to 255 characters. I only set the INPUT maxlength value to 40, as I thought that was suitable for this hack.

Both can be changed.

Correct. My script just cuts off every character after the 40th one. So if someone needs to go beyond the 40 characters he can just uncomment this cut function and he will have all 255 characters available assuming that he changes the input field from 40 to 255.

But no one is interested in this script so far. I am fine with the 40 characters.

Cheers,

Velocd
04-17-2004, 02:37 PM
If you want, I can place the script as an attachment in the first post, so people will see it more easily.

Defiantly a good incentive for people to upgrade if they currently have the old member gallery. ;)

Pseudomizer
04-20-2004, 11:03 PM
If you want, I can place the script as an attachment in the first post, so people will see it more easily.

Defiantly a good incentive for people to upgrade if they currently have the old member gallery. ;)

Hello Velocd,

sorry for the delay but i implemented some small bugfixes into this script and made it more userfriendly with screen outputs.

I have added an installation instruction into the ZIP file how to install it and how to run it. Please note that i highly recommend all users who want to use this script to backup their existing database BEFORE they run this script.

Enjoy this script.

Cheers,

Pseudomizer
04-20-2004, 11:17 PM
Hello Velocd,


PLEASE DO NOT USE THE CODE BELOW!!! This code was quick and dirty and a better version with only 1 query can be found here:
https://vborg.vbsupport.ru/showpost.php?p=504210&postcount=82


i just have created another add-on for your hack. What it does ? It implements a random picture on your portal ( tested with vbindex 3.0.0 Build 5 ).

What do you have to do ? It's very simple. Here are the instructions:


Open your vbindex.php from your webroot directory and do the following:

vbindex.php:

Find:


// ################################################## ###########################
// unset vB's default template vars, do this at the end so any standard error
// or redirect calls still have the vars for use in the templates.
unset($header, $footer, $navbar, $headinclude);


Above add:


// ############## PROCESS RANDOM PIC #######################################

$profilepic = 0;

while ($profilepic == 0 )
{
srand ((double)microtime()*10000);
$randval = rand(1,1000);

$images = $DB_site->query("
SELECT user.userid, user.username, customprofilepic.profilepicdata
FROM ".TABLE_PREFIX."customprofilepic
LEFT JOIN ".TABLE_PREFIX."user USING (userid)
WHERE visible=1 and user.userid = $randval
");

$rows = $DB_site->num_rows($images);

if (!$rows)
{
// do nothing because i assume that you have at least 1 picture in your database
}
else
{
$image = $DB_site->fetch_array($images);
$output_pic = "<A HREF=\"./forum/member.php?u=$randval\">$image[username]<BR><BR>";
$profilepic = 1;
$output_pic .= "<img src=\"./forum/image.php?u=$randval&type=pthumb\" border=\"0\" width=\"150\"

height=\"150\"/></A>";
}
}


Templates:

Open vbindex_customblock_3:

Find:


Block $box Content


Replace this with:


$output_pic


Now enable your custombox_3 in your vboptions in your ACP and all set all done. Have fun !!!


P.S.: If you are using another portal software then you could adopt this script for your use. You just have to find the correct template from your portal software and insert the variable for the output.

Cheers,

FleaBag
04-22-2004, 03:32 AM
Eventually got it going after having a fiddle with my database. It really is quite difficult to deal with! Thanks for this hack - keep uo the excellent work.

Boofo
04-22-2004, 03:58 AM
Hello Velocd,

i just have created another add-on for your hack. What it does ? It implements a random picture on your portal ( tested with vbindex 3.0.0 Build 5 ).

What do you have to do ? It's very simple. Here are the instructions:


Open your vbindex.php from your webroot directory and do the following:

vbindex.php:

Find:


// ################################################## ###########################
// unset vB's default template vars, do this at the end so any standard error
// or redirect calls still have the vars for use in the templates.
unset($header, $footer, $navbar, $headinclude);


Above add:


// ############## PROCESS RANDOM PIC #######################################

$profilepic = 0;

while ($profilepic == 0 )
{
srand ((double)microtime()*10000);
$randval = rand(1,1000);

$images = $DB_site->query("
SELECT user.userid, user.username, customprofilepic.profilepicdata
FROM ".TABLE_PREFIX."customprofilepic
LEFT JOIN ".TABLE_PREFIX."user USING (userid)
WHERE visible=1 and user.userid = $randval
");

$rows = $DB_site->num_rows($images);

if (!$rows)
{
// do nothing because i assume that you have at least 1 picture in your database
}
else
{
$image = $DB_site->fetch_array($images);
$output_pic = "<A HREF=\"./forum/member.php?u=$randval\">$image[username]<BR><BR>";
$profilepic = 1;
$output_pic .= "<img src=\"./forum/image.php?u=$randval&type=pthumb\" border=\"0\" width=\"150\"

height=\"150\"/></A>";
}
}


Templates:

Open vbindex_customblock_3:

Find:


Block $box Content


Replace this with:


$output_pic


Now enable your custombox_3 in your vboptions in your ACP and all set all done. Have fun !!!


P.S.: If you are using another portal software then you could adopt this script for your use. You just have to find the correct template from your portal software and insert the variable for the output.

Cheers,

I tried this on vBadvanced and although it worked great the query count went through the roof on the homepage. ;)

Pseudomizer
04-22-2004, 07:51 AM
I tried this on vBadvanced and although it worked great the query count went through the roof on the homepage. ;)


Oh oh. Thanks for this hint. This was a quick and dirty implementation for a request. I did not thought about performance because i tested in on my test forum. :disappointed:

But you are right. I will change the PHP code and i will have a look into this how i could reduce it to 1 or 0 queries. :nervous:

Thanks for this hint.

Cheers,

Boofo
04-22-2004, 07:58 AM
I will definately be interested in this if you can make that happen. maybe I'll add some code to put a little paragraph under each picture that is also randomized. ;)

Can you show me some randomizing code for my quotes?

Pseudomizer
04-22-2004, 10:46 AM
Hello Boofo,

thanks for bringing this up. I just rewrote the code and brought it down to 1 single query. :nervous:

Please implement all changes like this:

Find:


// ################################################## ###########################
// unset vB's default template vars, do this at the end so any standard error
// or redirect calls still have the vars for use in the templates.
unset($header, $footer, $navbar, $headinclude);


Above this add:


// ############## PROCESS RANDOM PIC #######################################

$images = $DB_site->query("
SELECT user.userid, user.username, customprofilepic.profilepicdata, customprofilepic.comment
FROM ".TABLE_PREFIX."customprofilepic
LEFT JOIN ".TABLE_PREFIX."user USING (userid)
WHERE visible=1 and customprofilepic.profilepicdata IS NOT NULL
ORDER BY RAND()
");

$rows = $DB_site->num_rows($images);

if (!$rows)
{
//do nothing
}
else
{
$image = $DB_site->fetch_array($images);
$output_pic = "<A HREF=\"./forum/member.php?u=$image[userid]\">$image[username]<BR><BR>";
$output_pic .= "<img src=\"./forum/image.php?u=$image[userid]&type=pthumb\" border=\"0\" width=\"150\" height=\"150\"/></A>";
}


If you need comments below the pictures then...

Replace in my code above:


$output_pic .= "<img src=\"./forum/image.php?u=$image[userid]&type=pthumb\" border=\"0\" width=\"150\" height=\"150\"/></A>";


With:


$output_pic .= "<img src=\"./forum/image.php?u=$image[userid]&type=pthumb\" border=\"0\" width=\"150\" height=\"150\"/></A><BR>$image[comment]<BR>";



Cheers,

Boofo
04-22-2004, 03:05 PM
Ah, much better. Thank you, sir. ;)

Pseudomizer
04-22-2004, 03:11 PM
You're welcome. Where ever i can help.

Cheers,

Onkel_Tom
04-23-2004, 12:39 AM
Hi all,
I installed this very nice hack today. Many thanks to Velocd for this great work and the simple ans clear installation instructions.

I get a problem in admincp => vB3 Member Album => Approve Images
there are no thumbnails shown, only red crosses and no images !

I run all queries, do the installation correct and GD Support is enabled for 1.6.x
My server only has PHP 4.2.3 and GD 1.6.2

My second problem is that only 4 images are shown in Admincp for aproval and on the album.php page but there must be more Pics because many users have a userpic in their profile.

any idea ?

Onkel_Tom
04-23-2004, 10:26 AM
Okay, sorry, it was a little bit late last night ;)
I changed profile picture and user picture in my mind...

all profile pictures are shown on the album.php page !

but the size is still max. 100 pixel on the album.php while in the profile the size is max.200 pixel (this is my setting in the usergroup for profile pictures).
In attachment settings the sizes are 800x600 for all picure endings.

I rebuild thumbnails in admincp => vB3 Member Album => Options
but size on album.php page is only max. 100 pixel !

also images which where uploaded before the installation of this hack where showed in admincp as a red cross.

any ideas ?

Pseudomizer
04-23-2004, 10:48 AM
Hi Tom,

regarding your first probem with the size: I had the same problem and i forgot to set the profile picture size for each group and not the avatar picture size. You should be fine with the attachment size of 800x600 ( a little bit large i think but ok ).

Regarding your second problem it is very obvious. This hack puts all pictures in form of a blob into the database. All previous pictures have not been implemented into the database.

About how many pictures are we talking about which you are seeing as a cross ? One or two or about 200 ?

Cheers,

Onkel_Tom
04-23-2004, 11:25 AM
Hi Pseudomizer,
thanks for your quick reply.

regarding your first probem with the size: I had the same problem and i forgot to set the profile picture size for each group and not the avatar picture size. You should be fine with the attachment size of 800x600 ( a little bit large i think but ok ).

I checked the size for profile pictures twice for the usergroups and do a small change so I can be sure that the right data is in the db.

About how many pictures are we talking about which you are seeing as a cross ? One or two or about 200 ?


only 4 at the moment ;)

Pseudomizer
04-23-2004, 01:21 PM
Hi Pseudomizer,
thanks for your quick reply.

I checked the size for profile pictures twice for the usergroups and do a small change so I can be sure that the right data is in the db.

So it does not work for you at all ?



only 4 at the moment ;)

How about deleting these 4 pictures from the database and have the users reload them again ?

Cheers,

Onkel_Tom
04-23-2004, 04:15 PM
Okay, I deleted all 4 profile pictures and then uploaded ohter pics in 200 Pixel with again on the server.
Now the thumbnails in admincp shown the old picture but not a red cross ;)

But at album.php still small pictures with 100 Pixel are shown...

Onkel_Tom
04-23-2004, 06:42 PM
Okay, I think I'm too stupid to understand the hack...
Now the right pictures are shown in admincp but only with 100 Pixel instead of 200. Also in album.php the pictures are still 100 pixel...

Pseudomizer
04-23-2004, 08:15 PM
Okay, I think I'm too stupid to understand the hack...
Now the right pictures are shown in admincp but only with 100 Pixel instead of 200. Also in album.php the pictures are still 100 pixel...

Hello Onkel_Tom,

just a question. This hack is for version 3.0.0 from VBulletin. Your board is running 2.3.5 ( yes, i just registered there ;-) ). Are you in the process of upgrading ?

If not, there is a version for 2.3.x VBs out.

How long does it take until a member gets full status on your site ?

Cheers,

Onkel_Tom
04-23-2004, 09:30 PM
I have more than one board ;)
It depends on the admins how long the activation needs, I will have a look in 2 Minutes...
The board for the Hack is a vB3.0.1 !

Pseudomizer
04-23-2004, 09:35 PM
I have more than one board ;)
It depends on the admins how long the activation needs, I will have a look in 2 Minutes...
The board for the Hack is a vB3.0.1 !

Oh. Ok. Do you have ICQ ? It would make this much more easier. My number is in my profile.

Cheers,

Christine
04-23-2004, 11:03 PM
I am attaching a file with 3 minor add-ons for anyone interested.

Included:

1. Ties the album viewing permissions to the memberlist viewing permissions
2. Adds the ability to add/update the photo with a comment in the Admin CP
3. Adds the ability to add/update the photo with a comment in the Mod CP

Thanks again, Velocd -- my members LOVE the album!!

Christine
04-24-2004, 03:56 PM
Now i will add a link to my menu, but after reading your second answer with the permissions how about addind this to the memberlist as a pop-up like the search button ? I really liked this idea, as adding the donations link for subscriptions is making Navbar a bit crowded.

Attached is a template mod for Navbar that will put the Memberlist and Velocd's album into a dropdown menu like QuickLinks is, with a fallback for those who can't view the JS.

:)

Boofo
04-24-2004, 06:11 PM
I really liked this idea, as adding the donations link for subscriptions is making Navbar a bit crowded.

Attached is a template mod for Navbar that will put the Memberlist and Velocd's album into a dropdown menu like QuickLinks is, with a fallback for those who can't view the JS.

:)

What goes into the phrases? You have the titles for the phrases, but no content. ;)

Christine
04-24-2004, 06:18 PM
What goes into the phrases? You have the titles for the phrases, but no content. ;)members and members_list are already there -- the only one that needs to be added is photo_album, unless I missed something, and if so, please let me know which ones!!

Boofo
04-24-2004, 06:22 PM
members and members_list are already there -- the only one that needs to be added is photo_album, unless I missed something, and if so, please let me know which ones!!

You're right, my bad. I didn't look at it close enough. You didn't have Type, Varnme or Text there, it threw me off. Sorry about that. ;)

welo
04-25-2004, 08:20 AM
Installing on 3.0.1 and receive this error in albumcp.php?do=approve

Invalid SQL:
SELECT customprofilepic.*, user.username
FROM vb3_customprofilepic
LEFT JOIN vb3_user
USING (userid)
ORDER BY visible, username

mysql error: Unknown table 'customprofilepic'

mysql error number: 1051

This corresponds to line 56 of albumcp.php so for gits and shiggles I tried:

SELECT " . TABLE_PREFIX . "customprofilepic.*, " . TABLE_PREFIX . "user.username
...and it worked, except I got broken images in the ACP exactly like Bofoo (https://vborg.vbsupport.ru/showpost.php?p=498385&postcount=8) was getting, and the MySQL 1064 error on album.php Calvin (https://vborg.vbsupport.ru/showpost.php?p=498525&postcount=15) got.

Now you say (https://vborg.vbsupport.ru/showpost.php?p=498682&postcount=25) ACP -> vB3 Member Photo -> Settings (which is actually 'Options') is the key, so I set entries per page from 18 to 12. Making progress. Now I get this error on album.php:

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

ORDER BY posts desc
LIMIT 0, 12

mysql error: Unknown table 'user' in field list

mysql error number: 1109

Yet another table prefixing issue, right? This around line 193 in album.php, so now I have:

$images = $DB_site->query("
SELECT ".TABLE_PREFIX."user.userid, dateline,
comment, ".TABLE_PREFIX."user.username, ".TABLE_PREFIX."user.usertitle,
".TABLE_PREFIX."user.joindate, ".TABLE_PREFIX."user.usergroupid
FROM ".TABLE_PREFIX."customprofilepic
LEFT JOIN ".TABLE_PREFIX."user USING (userid)
WHERE visible=1
Now it appears to be working. Beginning to look like you need to update a couple of files in your zip though.

welo
04-25-2004, 08:31 AM
Oh, and everything for your sorting selectors in album.php neglects prefixes too:

$users = $DB_site->query("
SELECT ".TABLE_PREFIX."user.userid, ".TABLE_PREFIX."user.username, ".TABLE_PREFIX."user.usergroupid,
".TABLE_PREFIX."user.usertitle, ".TABLE_PREFIX."usertextfield.signature, ".TABLE_PREFIX."usertextfield.sigdateline,
".TABLE_PREFIX."avatar.avatarpath, ".TABLE_PREFIX."user.avatarrevision, NOT ISNULL(".TABLE_PREFIX."customavatar.avatardata) AS hascustomavatar,
".TABLE_PREFIX."customavatar.dateline AS avatardateline
FROM ".TABLE_PREFIX."user
LEFT JOIN ".TABLE_PREFIX."usertextfield
USING (userid)
LEFT JOIN ".TABLE_PREFIX."avatar AS ".TABLE_PREFIX."avatar
ON(".TABLE_PREFIX."avatar.avatarid = ".TABLE_PREFIX."user.avatarid)
LEFT JOIN ".TABLE_PREFIX."customavatar AS ".TABLE_PREFIX."customavatar
ON(".TABLE_PREFIX."customavatar.userid = ".TABLE_PREFIX."user.userid)
WHERE ".TABLE_PREFIX."usertextfield.signature!=''$condition
ORDER BY " . ($sort == 'dateline' ? 'sigdateline' : $sort) . " $order
LIMIT " . ($minlimit-1) . ", $perpage
");

welo
04-25-2004, 09:14 AM
Okay, hate to be a pest but this one I'm not tracking down. For some reason whenever I update my profile picture info from UCP, I get an error (a VB error - not SQL) saying:

There has been an error in the upload. Please ensure that the file has been correctly selected and that the upload has taken place successfully.

I assume this indicates a glitch either with profile.php or includes/functions_upload.php, but I'm sure not seeing it. I'm not trying to upload a pic btw, just trying to add a comment to it.

subu1
04-25-2004, 06:48 PM
verry nice Hack, i installed on vB3.0 Gold and i have an error by album.php

Datenbankfehler in vBulletin 3.0.0:

Ungueltige SQL-Abfrage:
SELECT user.userid, dateline,
comment, user.username, user.usertitle,
user.joindate, user.usergroupid
FROM customprofilepic
LEFT JOIN user USING (userid)
WHERE visible=1

ORDER BY posts desc
LIMIT 0, 18

mysql error: Unknown column 'comment' in 'field list'

mysql error number: 1054

Datum: 25.04.2004 21:46:36
Skript: http://www.starlight-board.net/board/album.php





sorry i can't find my error, all queries are run :rolleyes:

Pseudomizer
04-25-2004, 06:58 PM
verry nice Hack, i installed on vB3.0 Gold and i have an error by album.php

Datenbankfehler in vBulletin 3.0.0:

Ungueltige SQL-Abfrage:
SELECT user.userid, dateline,
comment, user.username, user.usertitle,
user.joindate, user.usergroupid
FROM customprofilepic
LEFT JOIN user USING (userid)
WHERE visible=1

ORDER BY posts desc
LIMIT 0, 18

mysql error: Unknown column 'comment' in 'field list'

mysql error number: 1054

Datum: 25.04.2004 21:46:36
Skript: http://www.starlight-board.net/board/album.php





sorry i can't find my error, all queries are run :rolleyes:

Hello subu1,

there is no column 'comment' in the user table. Where is this query located and when do you get this error ? Seems something to be wrong with your source code. Did you check again if you implemented all the changes correctly ?

Cheers,

subu1
04-25-2004, 07:22 PM
..the query is locatet only in my profile.php

search:

$profilepic = $DB_site->query_first("
SELECT userid, dateline
FROM " . TABLE_PREFIX . "customprofilepic
WHERE userid = $bbuserinfo[userid]
");

replace it with:

$profilepic = $DB_site->query_first("
SELECT userid, dateline, comment, visible
FROM " . TABLE_PREFIX . "customprofilepic
WHERE userid = $bbuserinfo[userid]
");

$profilepic['comment'] = fetch_censored_text($profilepic['comment']);

it's correct i don't have 'comment' in the user table

I thing i need a command for my User Table... INSERT INTO `User....only I do not know like



what can i do :nervous:

Pseudomizer
04-25-2004, 09:21 PM
Hello subu1,

no, you don't need a column in the user table. The column should be located in your customprofilepic table.

Please try in the phpmyadmin or in mysql command line the following query and tell me what you get:

SELECT userid, dateline, comment, visible FROM customprofilepic WHERE userid = '1';

Cheers,

subu1
04-25-2004, 09:29 PM
Hello subu1,

no, you don't need a column in the user table. The column should be located in your customprofilepic table.

Please try in the phpmyadmin or in mysql command line the following query and tell me what you get:

SELECT userid, dateline, comment, visible FROM customprofilepic WHERE userid = '1';

Cheers,

ok I see that :disappointed:

Fehler

SQL-Befehl :

SELECT userid, dateline,
COMMENT , visible
FROM customprofilepic
WHERE userid = '1'
LIMIT 0, 30

MySQL meldet:


Unknown column 'COMMENT' in 'field list'

Pseudomizer
04-25-2004, 09:36 PM
What do you get for:

select * from customprofilepic limit 1;

If you are missing comments, is the rest there ?

Cheers,

subu1
04-25-2004, 09:41 PM
now I see this :rolleyes:

Pseudomizer
04-25-2004, 09:57 PM
Ok. The solution is easy:

You missed that line during the installation:


ALTER TABLE `customprofilepic` ADD comment varchar(255) NOT NULL AFTER filename;


Please do this command and all should work fine.

Cheers,

Velocd
04-26-2004, 11:02 PM
Sorry about my recent absence from this thread, been busy. ;)

If you still have questions, feel free to ask.

If you could provide me with a URL to your gallery, I'll add it to the first post of this thread under "Examples," as a display of some of the gallerys out there. I've added Mudxx's already. Just PM me the link. :)

Boofo
04-26-2004, 11:15 PM
Mike, is there a way to have it so regular members will not be able to list the signatures when viewing the album?

Velocd
04-26-2004, 11:24 PM
Regular members? As in the specific usergroup "registered" ?

Assuming your registered group ID is #2, in the template "album_display", find:


<select name="type">
<option value="1"<if condition="$type == 'image'"> selected="selected"</if>>Pictures</option>
<option value="2"<if condition="$type == 'sig'"> selected="selected"</if>>Signatures</option>
</select>&nbsp;&nbsp;


Replace it with:

<select name="type">
<option value="1"<if condition="$type == 'image'"> selected="selected"</if>>Pictures</option>
<if condition="$bbuserinfo['usergroupid'] != 2">
<option value="2"<if condition="$type == 'sig'"> selected="selected"</if>>Signatures</option>
</if>
</select>&nbsp;&nbsp;


They'll still be able to access signatures if they know the code, so in the album.php, find:

$type = $_REQUEST['type'] ? $_REQUEST['type'] : 1;

Replace it with:

$type = $_REQUEST['type'] && $bbuserinfo['usergroupid'] != 2 ? $_REQUEST['type'] : 1;

welo
04-27-2004, 02:53 AM
I think I found a bug but wanted to check here and make sure.

In the UCP it gives you either the option of importing your pic from a remote url or uploading it. Whenever someone imports from a url the board imports the pic and stores it in the database.

What's happening is, if a person uploads a pic everything works fine and their thumbnail is created in the member album. However, if they use a url to import it, somehow GD skips that step and a broken image shows up in the member gallery.

Anyone else have this happen? For now I just commented out the url linking feature in the modifyprofilepic template (and adjusted the corresponding phrase). Be nice not to have to though.

Velocd
04-27-2004, 04:26 AM
I'll look into this. I'm quite sure I tested this out when creating the hack, but I could have overlooked it, assuming it should have worked in either case.

welo
04-27-2004, 07:22 AM
Yeah, one of my staff members was having trouble with it so I just tried it myself. If you upload the pic then the thumbnail renders; import it from url and it doesn't (the pics are still in the user profile though).

I'm still having an issue trying to add a comment to an already uploaded picture, too. If I add the comment at the time of the pic upload, it works. Attempting it subsequently produces a board error.

This is a really cool script, man. Just hoping we can get these couple of bugs worked out before building on it a little more. This hack took an inordinate amount of time to install due to tracking down the lack of table prefixes in your files, so with all this effort invested I'm not gonna give up yet, hehe. ;)

Onkel_Tom
04-27-2004, 10:29 AM
What's happening is, if a person uploads a pic everything works fine and their thumbnail is created in the member album. However, if they use a url to import it, somehow GD skips that step and a broken image shows up in the member gallery.

same bug for me !

subu1
04-27-2004, 02:59 PM
Ok. The solution is easy:

You missed that line during the installation:


ALTER TABLE `customprofilepic` ADD comment varchar(255) NOT NULL AFTER filename;


Please do this command and all should work fine.

Cheers,

cool soweit sogut, hoffe mir ist niemand b?se wenn ich mal eben etwas deutsches wieder reinbringe, aber sonst bekomm ich es nicht auf die Reihe *snief*

Sah im ACP auch nur diese 4 Kreuze und das hochladen funktionierte nicht, ergo bin ich hin und habe die 4 Profilpics in der Datenbank gel?scht.

Bekomme aber trotzdem nichts hochgeladen und komme mit den gr??eneinstellungen im ACP nicht klar.

Gibs nicht nochmal ne Anleitung f?r Dummies worauf ich zu achten habe, habe auch icq ;)

greetz subu1

Finde diesen Hack klasse und die Member w?rden sich wirklich freuen :rolleyes:

W?rdest Du mir nochmal helfen;)

Pseudomizer
04-27-2004, 03:54 PM
No problem. One quick help in german and one in english:

English:
VBulletin Options -> Avatar Options -> Enable profile pic to YES
Member attachment options -> Thumbnailsize -> 500
Maintenance -> Update Counters -> Message Thumbnails > Rebuild
vB3 Member Album -> Approve Images -> Rebuild profile picture thumbnails ( only available if you have an unapproved pic pending )
Usergroup -> for each specific group set the profile pic dimensions like heigth 500 and width 500

German:
VBulletin Optionen -> Benutzerbild Optionen -> Profil Bild aktivieren auf JA
Beitrag Anhang Optionen -> Thumbnail Größe -> 500
Importieren und Pflege -> Zähler aktualisieren -> Anhang Thumbnails erstellen
vB3 Member Album -> Approve Images -> Rebuild profile picture thumbnails ( geht nur, wenn ein Bild noch auf Freischaltung wartet )
Usergruppen -> für jede Usergruppe die Profilbild Dimensionen auf z.B. Höhe 500 und Breite 500 einstellen

Und ich habe keine ICQ Nummer in Deinem Profil gefunden. Meine sollte in meinem Profil stehen.

Cheers,

subu1
04-27-2004, 05:16 PM
Importieren und Pflege -> Z?hler aktualisieren -> Anhang Thumbnails erstellen

Wenn ich das ausf?hre kann ich garnicht so schnell schauen wie die Meflermeldungen der misc.php aufgerufen werden :rolleyes:

Pseudomizer
04-27-2004, 05:24 PM
Wenn ich das ausf?hre kann ich garnicht so schnell schauen wie die Meflermeldungen der misc.php aufgerufen werden :rolleyes:

Fehlermeldungen ? Welche Art ? Dr?ck mal auf STOP in dem Browser und dann mach nen Screenshot.

Gru?,

subu1
04-27-2004, 05:53 PM
it works *g*.......ich Dummi hatte nicht alle queries ausf?hren lassen, kopierte alle auf einmal zum ausf?hren und wieder etwas gelernt;)

ICQ ist schon eine nette Erfindung:-)

akiy
04-27-2004, 07:56 PM
I believe the line in profile.php:


$profilepic['comment'] = fetch_censored_text($profilepic['comment']);


needs to be


if ($profilepic) {
$profilepic['comment'] = fetch_censored_text($profilepic['comment']);
}


Otherwise, a user who doesn't have a profile picture currently uploaded will get the "Your Current Profile Picture" fieldset in his/her Edit Profile Picture section.

cooltechie
04-27-2004, 08:38 PM
can't wait to see this working

Velocd
04-27-2004, 10:26 PM
I'm still having an issue trying to add a comment to an already uploaded picture, too. If I add the comment at the time of the pic upload, it works. Attempting it subsequently produces a board error.

Actually, I intentionally made it do this. I can't precisely remember why, it may have been that some bug would have got in the way thus making it longer to code. Also, I figured most people put one comment for each unique picture, and leave it be, until they upload a new picture.

welo
04-28-2004, 12:26 AM
Actually, I intentionally made it do this. I can't precisely remember why, it may have been that some bug would have got in the way thus making it longer to code. Also, I figured most people put one comment for each unique picture, and leave it be, until they upload a new picture.
I see. Well, perhaps an interim workaround is to add a note below the comment text field explaining this. I'm only running it on my test board right now and already three testers have mentioned it. Bound to keep reappearing in a live environment. You know people will keep wanting to change this (like their signature).

subu1
04-28-2004, 02:26 PM
Now enable your custombox_3 in your vboptions in your ACP and all set all done. Have fun !!!




Cheers,

sorry but i don't have this Option in my vbioptinons.php or ACP.

I have now upgrade from vBindex-3[1].0.0-RC3_Build-8 to vBindex-3-0-0-RC5_Build-5, but NO enable feature :surprised:

welo
04-29-2004, 05:13 PM
Sorry, I am forced to uninstall this hack. Too many weird errors and enduser ambiguities floating around it for use in a live environment yet. I'll take a fresh look at it later when I have more time. It's a great idea though.

Pseudomizer
04-29-2004, 09:40 PM
sorry but i don't have this Option in my vbioptinons.php or ACP.

I have now upgrade from vBindex-3[1].0.0-RC3_Build-8 to vBindex-3-0-0-RC5_Build-5, but NO enable feature :surprised:

This is how it should look like after upgrading to RC5. Then you select custombox 3 and you edit the template which is named like this.

Cheers,

TyC
05-04-2004, 03:25 AM
Hi ,

Sorry about the n00bish Q, i am new to VB3.

The only problem i am having on the installation instructions is..
25. Create a new template called album_display

I am unsure about creating a new template, Do i just open Notepad , put in the code you provided and save as album_display.php ?

I have searched the forums but cant find any help on this subject.

Many thanks

-TyC

TyC
05-04-2004, 06:56 AM
OK i worked out how to make the template , no thanks to anyone here!

I got all the Errors everyone else got until i debuged like everyone else & it worked , only problems now are images on the album.php dont appear , all you see is a red x.

When i try upload a new picture i get this error.

Parse error: parse error, unexpected $ in /home/httpd/vhosts/URL/httpdocs/forum/includes/functions_upload.php on line 417

Fatal error: Call to undefined function: build_image() in /home/httpd/vhosts/URL/httpdocs/forum/includes/functions_upload.php on line 204

i think im going to remove this Hack now

Pseudomizer
05-04-2004, 08:26 AM
OK i worked out how to make the template , no thanks to anyone here!

I got all the Errors everyone else got until i debuged like everyone else & it worked , only problems now are images on the album.php dont appear , all you see is a red x.

When i try upload a new picture i get this error.

Parse error: parse error, unexpected $ in /home/httpd/vhosts/URL/httpdocs/forum/includes/functions_upload.php on line 417

Fatal error: Call to undefined function: build_image() in /home/httpd/vhosts/URL/httpdocs/forum/includes/functions_upload.php on line 204


i think im going to remove this Hack now

Hi,

first of all welcome if you are new to vb. The first thing you should learn is to be patient. The second thing to read the threads. Multiple people have asked a lot of questions and many people run into the same problems.

On top of this i would suggest that you install a testboard where you can test things out first.

Cheers,

Boofo
05-04-2004, 10:18 AM
OK i worked out how to make the template , no thanks to anyone here!

I got all the Errors everyone else got until i debuged like everyone else & it worked , only problems now are images on the album.php dont appear , all you see is a red x.

When i try upload a new picture i get this error.

Parse error: parse error, unexpected $ in /home/httpd/vhosts/URL/httpdocs/forum/includes/functions_upload.php on line 417

Fatal error: Call to undefined function: build_image() in /home/httpd/vhosts/URL/httpdocs/forum/includes/functions_upload.php on line 204


i think im going to remove this Hack now

Ok, take a deep breath and calm down and we'll see about getting this fixed for you.

First of all, what code is on this line in this file?

Parse error: parse error, unexpected $ in /home/httpd/vhosts/URL/httpdocs/forum/includes/functions_upload.php on line 417

pixelpunk
05-07-2004, 03:38 PM
I'm having a little bit of trouble on my site with your gallery.

http://www.midsouthraves.org/community/album.php

Some of the images don't get parsed when I rebuild the profile picture thumbnails. At first I thought it was the GIF files but it's happening with jpgs that users have uploaded as well.

When I run the script to rebuild the images in my control panel it looks as if it's stuck in a loop and eventually times out or something, I haven't figured out what exactly it's doing because after awhile (by the time i'm tired of watching the page flicker) it's mysteriously stopped.

Any suggestions? It's almost working!

Pseudomizer
05-07-2004, 03:57 PM
I'm having a little bit of trouble on my site with your gallery.

http://www.midsouthraves.org/community/album.php

Some of the images don't get parsed when I rebuild the profile picture thumbnails. At first I thought it was the GIF files but it's happening with jpgs that users have uploaded as well.

When I run the script to rebuild the images in my control panel it looks as if it's stuck in a loop and eventually times out or something, I haven't figured out what exactly it's doing because after awhile (by the time i'm tired of watching the page flicker) it's mysteriously stopped.

Any suggestions? It's almost working!

Does this happen to all of your new uploads ? Which gd version are you using ? What seetings did you choose in the ACP for the thumbnails ?

Cheers,

pixelpunk
05-07-2004, 04:57 PM
Does this happen to all of your new uploads ? Which gd version are you using ? What settings did you choose in the ACP for the thumbnails ?

Cheers,

How do you mean? The images look fine everywhere (profiles, members list, etc) except in the album.php.

I'm running 'GD version bundled (2.0.15 compatible)'

Specifically what settings are you looking for in my ACP for the thumbnails? I have the max res for profile pics set to 320x320 and thumbnails are set to exactly the same thing. I've tried using the control panel to rebuild attachment thumbnails and when I try to rebuild the profile pics it just refreshes the first page (1-20) and doesn't seem to want to move to the next batch. I don't know if this bit of information helps any but say i set the 'number of pictures to process per cycle' to 10 and then hit rebuild... well it still tells me it's processing profile pictures 1-20.

I've tried reuploading the admin album page and the album.php and it didn't seem to make a difference.

Attached is a screen cap of the screen I get every time I try to rebuild the profile images. This is the one that says processing images 1-20... always.

Thanks for the help!!

*edit - This happens in both IE 6 and in FireFox 0.8.

Pseudomizer
05-07-2004, 05:26 PM
Hi,

and if one of your members uploads a new profile pic what happens then ? Does this problem always occur or just ocasionally ? Or is this only for pictures which where there before the hack was installed ?

Cheers,

pixelpunk
05-07-2004, 05:58 PM
Hi,

and if one of your members uploads a new profile pic what happens then ? Does this problem always occur or just ocasionally ? Or is this only for pictures which where there before the hack was installed ?

Cheers,

These are all images from before the hack was installed.

I've had a few users try it out and they can upload images fine. No errors whatsoever.

What does the reset button do on the Approve Pictures page? When i click that nothing happens.

Pseudomizer
05-07-2004, 06:03 PM
These are all images from before the hack was installed.

I've had a few users try it out and they can upload images fine. No errors whatsoever.

What does the reset button do on the Approve Pictures page? When i click that nothing happens.

Hi,

i had the same problem. But i migrated from version 2.3.x to version 3.0.0 and i had the old hack installed. So i wrote a script which cleans up the complete memberpics and deletes everything in there and then migrates the pics from the old hack into the new hack. This will not help you at all but you have 2 choices. You can either ask every member to upload the files again or you delete all pictures and let them upload again. That would be my guess but please check with the hack author first.

Cheers,

pixelpunk
05-07-2004, 06:25 PM
Right on, thanks for your help Pseudomizer.

I was beginning to think that they'd have to upload their pics again so I'll let them know and when I find out what's working I'll let you know.

msimplay
05-07-2004, 07:45 PM
hmm weirdo errors two of em 1st one when i approve pictures they seem to still need approving as in the photos appear on the page again even though they are approved

and two i checked this on Boofos forum to make sure i wasn't the only on
when viewing signatures in the album the username doesn#t seem to lead to the users profile
the link appears to be wrong

Christine
05-07-2004, 11:36 PM
...when I try to rebuild the profile pics it just refreshes the first page (1-20) and doesn't seem to want to move to the next batch.Hi pixelpunk,

I was having the same exact issue.

If it isn't too late -- before you ask your peeps to reload their pictures, you may want to try this fix from Velocd:

https://vborg.vbsupport.ru/showpost.php?p=500056&postcount=55

Just rename the attached file to albumcp.php, override the albumcp.php in your ACP and give it a test run.

:)

Boofo
05-07-2004, 11:42 PM
hmm weirdo errors two of em 1st one when i approve pictures they seem to still need approving as in the photos appear on the page again even though they are approved

and two i checked this on Boofos forum to make sure i wasn't the only on
when viewing signatures in the album the username doesn#t seem to lead to the users profile
the link appears to be wrong

I just checked it and on my site, the username DOES go to their profile just fine. You might want to recheck that. ;)

msimplay
05-07-2004, 11:50 PM
I just checked it and on my site, the username DOES go to their profile just fine. You might want to recheck that. ;)
actually u might wanna check it

http://www.bearfacts2.com/forums/album.php?type=2&sort=posts&order=desc

thats signatures

Boofo
05-07-2004, 11:54 PM
actually u might wanna check it

http://www.bearfacts2.com/forums/album.php?type=2&sort=posts&order=desc

thats signatures

Awww, you didn't say signatures. I thought you were referring to the profile pics. ;)

He's right, Mike, apparently the userid isn't being passed to the name link in the signatures part of this hack.

Velocd
05-09-2004, 12:39 AM
I've updated to version 2.0.

It's mostly a bug update, but I also improved the verification process in the AdminCp. So I emphasize you to update.

Upgrade instructions and the new file, as well a v2.0 screenshot of the ACP, can be found in the first post:
https://vborg.vbsupport.ru/showthread.php?p=498288

If you have questions or problems, just ask. ;)

assassingod
05-09-2004, 12:45 AM
Thanks Mike, installed and working fine:)

pixelpunk
05-10-2004, 03:05 PM
Hi pixelpunk,

I was having the same exact issue.

If it isn't too late -- before you ask your peeps to reload their pictures, you may want to try this fix from Velocd:

https://vborg.vbsupport.ru/showpost.php?p=500056&postcount=55

Just rename the attached file to albumcp.php, override the albumcp.php in your ACP and give it a test run.

:)

Didn't work, I had to reupload all the images that weren't showing up.

Question: How would I have my default album page load show the pics ascending by username?

Also, how would you go about modifying the folder display for the Photo Album? It's a little redundant. See the image below for the change.

http://toybox.homeip.net/howto.gif

Velocd
05-10-2004, 08:14 PM
For your first question, it's hard coded in album.php.

Find:

if (!in_array($sort, $valid_sort))
$sort = 'posts';
}
else
{
$sort = 'posts';
}


Replace posts with username in both instances.

Then find:

if (!in_array($order, $valid_order))
$order = 'desc';
}
else
{
$order = 'desc';
}


Replace desc with asc in both instances.

I'm not sure what you mean by redundant for your second question. Member Album is the parent feature, where as you can consider "signatures" and "profile pictures" to be its children. (clicking "Member Album" takes you to the default "profile pictures" view.

Christine
05-10-2004, 10:35 PM
Thanks for all your work on this, Velocd.

:)

pixelpunk
05-11-2004, 07:27 PM
Awesome thanks, I looked for that and simply didn't recognize it... I get so scatterbrained when I start modifying everything!

What I mean by redundant is how "> Member Album" shows up next to the board name and then you have " Profile Pictures" under that.

Typically when you click the navigation to your control panel it reads:

Board Title
`- User Control Panel

not:

Board Title > options or whatever
`- User Control Panel

Thanks for helping us out! This hack is beautiful.

Maikeru
05-14-2004, 01:20 AM
I like this hack, especially because I've used it on a forum before :o. It works really well, so..maybe I'll download it.

MaxScript
05-15-2004, 12:55 AM
no workie
www.batalk.com/album.php

i get a blank page

Velocd
05-15-2004, 06:20 AM
You forgot to install the templates.

If that's not the case, arbitrarily place PHP echo statements in your album.php to find where the error is.

MaxScript
05-15-2004, 04:36 PM
:) my bad , i forgot one temp


works great [ clicks install ]

www.batalk.com/album.php

assassingod
05-16-2004, 04:28 AM
Comment system if anyone wants it:
https://vborg.vbsupport.ru/showthread.php?p=512870#post512870

Rich
05-16-2004, 01:01 PM
Hello,
The installatioin went fine,everything appears to work with THIS program. However,it doesn't allow anyone to change their avatars,ect. I get this error when I use my test name:

Parse error: parse error, expecting `']'' in /home2/hcenter/public_html/profile.php on line 1622

This is line 1622:

$profilepic['comment'] = fetch_censored_text($profilepic['comment' $show['profilepic'] = iif($profilepic, true, false);

What the problem???????

Pseudomizer
05-18-2004, 04:14 PM
I've updated to version 2.0.

It's mostly a bug update, but I also improved the verification process in the AdminCp. So I emphasize you to update.

Upgrade instructions and the new file, as well a v2.0 screenshot of the ACP, can be found in the first post:
https://vborg.vbsupport.ru/showthread.php?p=498288

If you have questions or problems, just ask. ;)

Hello Velocd,

with all respect i have to post this because i think that other people will also run into this problem.

What's the problem ? Very easy. As soon as you have too many pictures you will run into either browser problems or PHP timeout problems exceeding 30 secs.

Fix for this ? Why do admins click on "Verify" ? Not to see the already verified pictures. The admin wants to verify any new pic that has been uploaded.

Due to this i altered your original code to show per default the "unapproved" and "disapproved" pictures and only if someone clicks on "approved" then he will get the full list of the approved pictures.

This is what i need and i don't know if other people need this but just in case you run into this problem here are my changes:

Open albumcp.php in an editor and find:

require_once('./global.php');


After this place:

if (!$_REQUEST['type'])
{
$type = "1";
}
else
{
$type = $_REQUEST['type'];
}


Then REPLACE this:

echo "<td align='center' class='alt1'><a href='#unapproved'>Unapproved</a> ($count_una) &nbsp;|&nbsp;
<a href='#approved'>Approved</a> ($count_app) &nbsp;|&nbsp;
<a href='#disapproved'>Disapproved</a> ($count_dis)</td>";


with this:

echo "<td align='center' class='alt1'><a href='albumcp.php?type=1'>Unapproved</a> ($count_una) &nbsp;|&nbsp;
<a href='albumcp.php?type=2'>Approved</a> ($count_app) &nbsp;|&nbsp;
<a href='albumcp.php?type=1'>Disapproved</a> ($count_dis)</td>";


Then find this:

if ($unapproved)
{


Before add this:

if ( $type == "1" )
{


Then find this:

print_submit_row('Verify Unapproved','Reset', 6);


After add this:

}
}
else
{


Then find this:

print_submit_row('Verify Approved ','Reset', 6);
}


After add this:

}
//endif

// Disapproved
//////////////////

if ( $type == "1" )
{


Then find this:

print_submit_row('Verify Disapproved','Reset', 6);
}


Add this below:

}
else
{
}
//endif
}


All set all done. Or replace the albumcp.php with my attached albumcp.php.

Enjoy.

Cheers,

Kwak
05-19-2004, 02:19 AM
Hi, I double checked the codes for each files and the new template and I get the database error:

http://www.calpolyonline.com/forums/album.php

Where could the problem be?

Velocd
05-19-2004, 02:44 AM
CalPoly online eh? San Luis Obispo is my home town ;) I would have gone to that college, except they don't seem to admit the local citizens by huge numbers. :\

As for your problem, I can view the image gallery fine.

Kwak
05-19-2004, 04:09 AM
CalPoly online eh? San Luis Obispo is my home town ;) I would have gone to that college, except they don't seem to admit the local citizens by huge numbers. :\

As for your problem, I can view the image gallery fine.

What the...working fine now! Cool!
Cal Poly San Luis Obispo is an excellent school, matter of fact, can compete with the top UC campuses. However, there were few cases where the admissions were discriminating ethnic minorities.

More Info: http://www.calpolyonline.com/forums/showthread.php?t=987

Clicks Install.

SnowBot
05-24-2004, 02:02 AM
aarrrggg Having a major problem with the hack, see screenshot below.

Any help would be greak.

None of the images appear in the admincp :( HELP!!! please.



https://vborg.vbsupport.ru/external/2004/05/1.gif



The path to one of the blank images is

http://www.synergyforums.com/forum/image.php?u=194&type=pthumb&s=y (http://www.synergyforums.com/forum/image.php?u=194&type=pthumb&s=y)

dont know if that helps at all....

Velocd
05-24-2004, 05:33 PM
If you verify an image, does the thumbnail show up in the gallery?

Does the full image show up in the vBulletin profile page?

SnowBot
05-24-2004, 06:42 PM
Ok if i verify an image i get this

http://www.synergyforums.com/files/Image1.gif



Then if i click on the red X it takes me to here





http://www.synergyforums.com/files/Image2.gif


BUT if i go to the galary url

www.synergyforums.com/forum/album.php (http://www.synergyforums.com/forum/album.php) i get this

http://www.synergyforums.com/files/Image3.gif



All the sigs show up fine, its the profile pictures that dont, BUT if i upload a new one that seems to work. Its just the exsisting images people have already got.

Majik?
05-25-2004, 06:39 AM
I had the same problem with profile pics that members already had.. They were red Xs. They all had to be uploaded again after installing this hack for hem to display properly.

Pseudomizer
06-08-2004, 01:08 AM
Just as a short update for all of you: If someone uploads an anim gif, there will be no thumbnail due to the resizing and new image create. You will see the famous red X in the gallery. But if you go into the members profile you will see the anim gif.

VeloCD ? Any idea why this happens ? If we insert a GIF as blob into the DB it should not matter if it is an anim gif or not. So it works for the profile pic. But is there a way to recognize if a GIF is an anim GIF and then do NO resizing for a thumbnail ? I do not know of any procedure to check this but it does not hurt to ask for it.

Cheers,

redlabour
06-13-2004, 10:51 AM
Perfect Hack - excactly something is searched by me for a long time ! :D

Ted S
06-16-2004, 12:56 AM
Great hack although changing all those files is never very fun!

If you want another gallery in action feel free to check out http://www.scubaboard.com/album.php?type=1&sort=joindate&order=asc (stock hack right now but I'll probably modify it a bit this week changing the templates mainly).

Pseudomizer
06-16-2004, 01:44 AM
Great hack although changing all those files is never very fun!

If you want another gallery in action feel free to check out http://www.scubaboard.com/album.php?type=1&sort=joindate&order=asc (stock hack right now but I'll probably modify it a bit this week changing the templates mainly).

Then please open a new thread for your advertising and publish your own hack.

Cheers,

Ted S
06-16-2004, 04:54 AM
No intent to change the code, just change the templates to better fit the tables (a few of them distort on my templates).... I'm not interested in touching any code when it works so well!

Boofo
06-16-2004, 05:22 AM
Is there a way to have this send an email to the Admin when a new pic has been uploaded? I had a user upload a pic and I didn't even know it was there ro be verified until I accidentally checked this in the Admin CP. ;)

Erwin
06-16-2004, 05:52 AM
Then please open a new thread for your advertising and publish your own hack.

Cheers,
I think you misunderstood Ted - when he said gallery in action, he means he is using this hack, and just wanted to show another gallery using this hack in action. :)

Pseudomizer
06-16-2004, 09:06 AM
Upps. Then i am very sorry. I apologize for that. The word "another". Sorry again.

Cheers,

highlander_RD
06-16-2004, 09:32 PM
Since I succesfully installed this *must have* hack migrating pics from vB2, I found the way to add a "comment" into the album_image_list:

1) Add this code in profile.php just below:
require_once('./includes/functions_upload.php');
process_image_upload('profilepic', $avatarurl);

$DB_site->query("UPDATE " . TABLE_PREFIX . "customprofilepic SET comment = '" . addslashes($_POST['commento']) . "' WHERE userid = $bbuserinfo[userid]");


2) Add this code in template modifyprofilepic, just below:
<tr>
<td><phrase 1="$permissions[profilepicmaxwidth]" 2="$permissions[profilepicmaxheight]" 3="$permissions[profilepicmaxsize]">$vbphrase[note_maximum_size_x_y_or_z]</phrase></td>
</tr>

<tr><td>
Comment: <br />
<input type="text" class="bginput" name="commento" size="50" maxlength="100" /></td></tr>


3) In the same template modifyprofilepic replace
<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>
with this:

<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] - <i>$profilepic[comment]</i></label></div>

4) In template album_image_list the comment will appear as follows:

<td valign="top" style="padding-left: 20px"><a style="font-size:11pt" href="member.php?$session[sessionurl]u=$image[userid]"><b>$image[musername]</b></a><br /><span class="smallfont">$image[usertitle]<br /><br /><i>$image[comment]</i></span><br />
</td>

It works fine for me, if you want to check, my beta link to have a screenshot is:
http://www.egcommunity.it/forumbeta/album.php?
(Sorry, need to be registered in order to view the photo gallery!)

;-)

Boofo
06-16-2004, 09:43 PM
Since I succesfully installed this *must have* hack migrating pics from vB2, I found the way to add a "comment" into the album_image_list:

1) Add this code in profile.php just below:
require_once('./includes/functions_upload.php');
process_image_upload('profilepic', $avatarurl);

$DB_site->query("UPDATE " . TABLE_PREFIX . "customprofilepic SET comment = '" . addslashes($_POST['commento']) . "' WHERE userid = $bbuserinfo[userid]");


2) Add this code in template modifyprofilepic, just below:
<tr>
<td><phrase 1="$permissions[profilepicmaxwidth]" 2="$permissions[profilepicmaxheight]" 3="$permissions[profilepicmaxsize]">$vbphrase[note_maximum_size_x_y_or_z]</phrase></td>
</tr>

<tr><td>
Comment: <br />
<input type="text" class="bginput" name="commento" size="50" maxlength="100" /></td></tr>


3) In the same template modifyprofilepic replace
<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>
with this:

<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] - <i>$profilepic[comment]</i></label></div>

4) In template album_image_list the comment will appear as follows:

<td valign="top" style="padding-left: 20px"><a style="font-size:11pt" href="member.php?$session[sessionurl]u=$image[userid]"><b>$image[musername]</b></a><br /><span class="smallfont">$image[usertitle]<br /><br /><i>$image[comment]</i></span><br />
</td>

It works fine for me, if you want to check, my beta link to have a screenshot is:
http://www.egcommunity.it/forumbeta/album.php?
(Sorry, need to be registered in order to view the photo gallery!)

;-)
How about a screenshot then? ;)

highlander_RD
06-17-2004, 11:10 PM
How about a screenshot then? ;)Yes, here they are! :rolleyes: :squareeyed:
the modifyprofilepic page with the input field and the comment below the photo:

Pseudomizer
06-17-2004, 11:21 PM
Yes, here they are! :rolleyes: :squareeyed:
the modifyprofilepic page with the input field and the comment below the photo:

Sorry, but for my understanding. You are running Member Photo album v2.0 on VB 3.0.x and you want to migrate the pics from the member album VB2.3.x to this new version ? Is this correct ?

Cheers,

highlander_RD
06-17-2004, 11:23 PM
and here the screenshot of the photo gallery (the comments are on the right in italic fonts):

highlander_RD
06-17-2004, 11:28 PM
Sorry, but for my understanding. You are running Member Photo album v2.0 on VB 3.0.x and you want to migrate the pics from the member album VB2.3.x to this new version ? Is this correct ?

Cheers,No.
I had on vB 2.2.9 vb Member Photo by Velocd with the "comment" field.
I installed Member Photo Album v2.0 on vB 3.0.1 but I didn' find the "comment" field, so I just added this option that was present on the earlier version.

Thanks

Pseudomizer
06-18-2004, 08:18 PM
No.
I had on vB 2.2.9 vb Member Photo by Velocd with the "comment" field.
I installed Member Photo Album v2.0 on vB 3.0.1 but I didn' find the "comment" field, so I just added this option that was present on the earlier version.

Thanks

Ok. The reason why i asked was if you have seen my migration script from the old version to this new version. But you don't need it any more.

Cheers,

highlander_RD
06-18-2004, 10:33 PM
Ok. The reason why i asked was if you have seen my migration script from the old version to this new version. But you don't need it any more.

Cheers,Maybe I don't... but many members likely need your hack, so I would suggest to publish this useful link anyway! ;D

Pseudomizer
06-18-2004, 11:27 PM
Maybe I don't... but many members likely need your hack, so I would suggest to publish this useful link anyway! ;D

Just read the first posting. It's already in there as 3-rd party add-on. I thought you missed that but in fact you don't need it. :-)

Cheers,

Photon
06-19-2004, 12:49 AM
I've read this whole thread but I can't find the solution for my problem..


Warning: Division by zero in /usr/home/elimina/public_html/drive/forums/album.php on line 142

Warning: Division by zero in /usr/home/elimina/public_html/drive/forums/includes/functions.php on line 1707

Database error in vBulletin 3.0.1:

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

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


can someone help me??

Cypjaxion
06-19-2004, 02:38 AM
Edit - nevermind, nevermind at all :rolleyes:

highlander_RD
06-19-2004, 07:31 AM
I've read this whole thread but I can't find the solution for my problem..


Warning: Division by zero in /usr/home/elimina/public_html/drive/forums/album.php on line 142

Warning: Division by zero in /usr/home/elimina/public_html/drive/forums/includes/functions.php on line 1707
can someone help me??the problem is caused by LIMIT=0 in SQL.
In fact the SQL syntax in album.php is:
// Query: fetch profile pictures
////////////////////////////////////


$images = $DB_site->query("
SELECT user.userid, dateline,
comment, user.username, user.usertitle,
user.joindate, user.usergroupid, user.notescount
FROM ".TABLE_PREFIX."customprofilepic
LEFT JOIN ".TABLE_PREFIX."user USING (userid)
WHERE visible=1
$condition
ORDER BY $sort $order
LIMIT " . ($minlimit-1) . ", $perpage
");
LIMIT is determined by the variable $minlimit in album.php that shouldn't give 0.
$minlimit is determined so:
// Build page scope
///////////////////////


$pagenumber = $page > 0 ? $page : 1;

$rows = $result['count'];

$pages = ceil($rows / $perpage);

if ($pagenumber < 1)
{
$pagenumber = 1;
}
else if ($pagenumber > $rows)
{
$pagenumber = $rows;
}

$minlimit = ($pagenumber - 1) * $perpage+1;
$maxlimit = ($pagenumber) * $perpage;

if ($maxlimit > $rows)
{
$maxlimit = $rows;

$minlimit = $minlimit > $rows ? $rows-$perpage : $minlimit;
}

$minlimit = $minlimit <= 0 ? 1 : $minlimit;

$pagenav = construct_page_nav(
$rows,
"album.php?$session[sessionurl]type=$_REQUEST[type]",
"&amp;pp=$perpage&ltr=$ltr&sort=$sort&order=$order"
);
maybe you need to change the setting perpage and rows?
Or better reinstalling the whole hack?
:-D

Martin64
06-21-2004, 12:54 AM
Great hack, this should be lots of fun. Feel free to link from our album from the first post:

http://www.emutalk.net/album.php?

Though at the moment I'm the only member with a profile pic, there should be more soon. :)

Cold Steel
06-24-2004, 08:15 PM
I've read this whole thread but I can't find the solution for my problem..


Warning: Division by zero in /usr/home/elimina/public_html/drive/forums/album.php on line 142

Warning: Division by zero in /usr/home/elimina/public_html/drive/forums/includes/functions.php on line 1707

Database error in vBulletin 3.0.1:

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

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


can someone help me??
I got that error too. It was simple to fix.

Just go into your admincp and save your settings for the member album.

Cold Steel
06-24-2004, 08:23 PM
I've got it running at http://forums.asiansinc.com/gallery.php

You can use mine as an example, if you want.

Cold Steel
06-24-2004, 09:06 PM
Bug?

All of my signatures show this:

Last modified:
12.31.69, 07:00 PM

will_lean
06-24-2004, 11:07 PM
Hi
just installed this on 3.0.1 and have a few questions.
My album seems to run fine however when i upload a picture there is no feild to add a comment,is the comment portion an addon or has it been added and i missed something?

great hack !

Cold Steel
06-25-2004, 12:29 AM
Would this hack cause me to have this problem "File system directory is not writable. " when trying to upload attachments during normal posting operations? My attachments go into the file server, not the database.

Cold Steel
06-25-2004, 05:02 AM
Well, I fixed that by chmodding everything in the attachments folder 777.

However if you check out http://forums.asiansinc.com/album.php sometimes the picture showing up in the album doesn't match with what shows up in the profile. Also, sometimes it replaced either the profile pic or the avatar -- I'm not sure which.

Onkel_Tom
07-01-2004, 11:06 AM
updated to version 2.0, works great !
thanks you ;)

Cold Steel
07-01-2004, 06:40 PM
All the signatures show this:

Last modified:
12.31.69, 07:00 PM

And now I can't change my profile pic -- it always ends up as my avatar, although the album still shows my old profile pic.

Help, please.

buro9
07-02-2004, 07:02 AM
There's a pretty serious problem with your memberlist pages if you have installed this hack.

The hack changed the PRIMARY KEY on the customprofilepic table, and this causes a massive degradation in the speed of the query that memberlist.php uses.

What happens is documented in this thread along with the fix:
https://vborg.vbsupport.ru/showthread.php?t=66765

Note that the fix merely adds an index to restore it more closely to the vBulletin defaults by adding an index back to the table in place of the removed PRIMARY KEY.

I'm pretty furious about it though. IMO no hack should ever touch the vBulletin indexes and schema... they should only extend it. This hack broke that, and in turn created a hundred fold drop in performance of the regular vBulletin memberlist.php

This isn't the first time hacks have done dumb things, but this one was painful because of the 6+ seconds lock on the database table and the resulting performance drop elsewhere on the board.

Add the index back if you run this hack.

Cold Steel
07-04-2004, 04:23 AM
All the signatures show this:

Last modified:
12.31.69, 07:00 PM

And now I can't change my profile pic -- it always ends up as my avatar, although the album still shows my old profile pic.

Help, please.
I had another hack installed (vBSigHosting) that was interfering with this one. I had to rearrange the order of some of the edits. It's fixed, though.

Thanks again for this great hack.

ChuanSE
07-04-2004, 06:18 AM
There's a pretty serious problem with your memberlist pages if you have installed this hack.

The hack changed the PRIMARY KEY on the customprofilepic table, and this causes a massive degradation in the speed of the query that memberlist.php uses.

What happens is documented in this thread along with the fix:
https://vborg.vbsupport.ru/showthread.php?t=66765

Note that the fix merely adds an index to restore it more closely to the vBulletin defaults by adding an index back to the table in place of the removed PRIMARY KEY.

I'm pretty furious about it though. IMO no hack should ever touch the vBulletin indexes and schema... they should only extend it. This hack broke that, and in turn created a hundred fold drop in performance of the regular vBulletin memberlist.php

This isn't the first time hacks have done dumb things, but this one was painful because of the 6+ seconds lock on the database table and the resulting performance drop elsewhere on the board.

Add the index back if you run this hack.



Euhmmmmmm, is this fixed now? I like the idea of a member album, but I don't like a hack that needs patches and mess up my db.

A word from the author plz??!!

ChuanSE
07-04-2004, 06:20 AM
updated to version 2.0, works great !
thanks you ;)


So the 2.0 won't mess up anything? Safe to install? :ermm:

nighteyes
07-04-2004, 03:27 PM
Does this work with vb 3.02?

Onkel_Tom
07-04-2004, 05:48 PM
yes, it works for me with vB3.0.2

kjell
07-05-2004, 07:43 AM
Does it? Have you tested to change your profile picture or rebuild the thumbs?
When I do I get the word Array in the thumbnaildata field instead of the picture.

The function fetch_thumbnail_from_image in /includes/functions_image.php has changed alot so I would like to know for sure if this works or not.

Another question.
How much did you have to pay Jelsoft to remove the copyright notice and have it looked like you made it yourself?

nighteyes
07-06-2004, 02:27 AM
Does it? Have you tested to change your profile picture or rebuild the thumbs?
When I do I get the word Array in the thumbnaildata field instead of the picture.

The function fetch_thumbnail_from_image in /includes/functions_image.php has changed alot so I would like to know for sure if this works or not.

Another question.
How much did you have to pay Jelsoft to remove the copyright notice and have it looked like you made it yourself?

That's what I thought. I'm holding off installig this one for now until more people install it. We now use thumbs and attachments in the file system and I guessed with the coding changes since this hack was released.... it would cause problems.

Onkel_Tom
07-06-2004, 09:02 AM
Does it? Have you tested to change your profile picture or rebuild the thumbs?
When I do I get the word Array in the thumbnaildata field instead of the picture.

The function fetch_thumbnail_from_image in /includes/functions_image.php has changed alot so I would like to know for sure if this works or not.
Yes, you are right !
When uploading a new profile picture it isn't shown in the album.php
also the recreate thumbnails in adminCP for member album didn't work.

So sorry for my replay without checking all functions !


Another question.
How much did you have to pay Jelsoft to remove the copyright notice and have it looked like you made it yourself?

I didn't pay Jelsoft for a branding free version, I payed to the german reseller aducco digital which are under vbulletin-germany.com?
The price was about 110,-? for a unbranded version of vb3

kjell
07-07-2004, 10:58 AM
That's not so expensive :eek:
I know it's of topic but is there any information somewhere about unbranded versions from Jelsoft?
I heard roumers like $700 or more...

Onkel_Tom
07-07-2004, 11:23 AM
You can find all needed information about unbranded version in the members area of vbulletin.com
So please visit this site or ask Jelsoft for more details

Boofo
07-07-2004, 02:47 PM
You can find all needed information about unbranded version in the members area of vbulletin.com
So please visit this site or ask Jelsoft for more details
It costs $120 (USD) for the branding fee option now for vB3. ;)

kjell
07-09-2004, 07:46 AM
Thanks for the info. Got it worked out.
Back to topic then. I like this hack and tried to fix it myself but don't have any experience in image manipulation so I didn't get it to work properly. It's possible to implement the old function in the files and rename them but it's not so convenient I guess.
Is there a chance that the originator will upgrade his board or has anyone else had any succeed with this hack?

Boofo
07-09-2004, 08:47 AM
Did anyone ever come up with a way to send the admin an email or pm when a new pic is uploaded? I had 2 users upload pics last week and they could see them so they didn't think they had to be approved. I found them accidentally by checking the options. Can this be done?

FleaBag
07-10-2004, 10:26 PM
I get the word 'Array' on a fresh install of this hack and vB 3.03 [when rebuilding thumbnails] and the classic red X in the album.php itself for every photo. Tried everything I can think of to fix it, any input would be appreciated. :)

Steve123
07-14-2004, 06:50 AM
Ive installed this hack in vb 3.0.2 and i am also getting the word array..

gd 2+ is installed

any ideas?

buro9
07-14-2004, 09:05 AM
* sigh *

OK, These changes remove the word Array and put in the thumbnail data.

In functions_upload.php find the following (created by this hack):

$image['update'] = ", thumbnaildata = '". $DB_site->escape_string($thumbnail)."'";
$image['insert'] = "'".$DB_site->escape_string($thumbnail)."',";


Replace it with:

$image['update'] = ", thumbnaildata = '". $DB_site->escape_string($thumbnail['filedata'])."'";
$image['insert'] = "'".$DB_site->escape_string($thumbnail['filedata'])."',";


In albumcp.php, which is the one in the admincp folder, find the following:

UPDATE " . TABLE_PREFIX . "customprofilepic
SET thumbnaildata = '" . $DB_site->escape_string($thumbnail) . "'
WHERE picture_id = $image[picture_id]


Replace that with:

UPDATE " . TABLE_PREFIX . "customprofilepic
SET thumbnaildata = '" . $DB_site->escape_string($thumbnail['filedata']) . "'
WHERE picture_id = $image[picture_id]


Finally, you might also want to do find this in that file:

if ($_REQUEST['do'] == 'rebuildthumbs')
{


And follow it with this, adjusting the number of seconds to suit your needs:

set_time_limit(120);


That last bit simply allows the rebuild thumbnails thing to run for 120 seconds = 2 minutes... because there's no pagination stuff in that script and it will probably time out if you have a load of users to rebuild thumbs for.

Other things you might want to do whilst your here... take a look at this thread: https://vborg.vbsupport.ru/showthread.php?t=66765
And then execute this piece of SQL if you haven't already:

ALTER TABLE `customprofilepic` ADD INDEX ( `userid` )


Obviously prepending any TABLE_PREFIX that you use, if indeed you use one.

Any more bugs with this? Probably, so let's resolve them eh? Just report them and there's nothing stopping you lot looking around and trying to figure it out too ;)

Steve123
07-14-2004, 09:28 AM
i was in the process of triyng to find out why it was doing the array..

then i got a reply to this thread :)..

it works thanks :)

Malfunktion
07-14-2004, 02:46 PM
mine still displays the array :(

buro9
07-14-2004, 03:15 PM
mine still displays the array :(
And you have rebuilt the thumbnails, yes?

Malfunktion
07-14-2004, 03:28 PM
correct

kjell
07-15-2004, 06:10 AM
It works again :)
Thanks for having a look at this buro9

Alien
07-15-2004, 06:13 AM
Fresh install. This definatly needs work. ;)

In the admincp (and album.php), everything is red x'd no matter how much counters i update everywhere.. Attempted fixes above, still same problem.. <sigh>

buro9
07-15-2004, 06:29 AM
Fresh install, same problem as Malfunktion. This definatly needs work.

In the admincp (and album.php), everything is red x'd no matter how much counters i update everywhere.. Attempted fixes above, still same problem.. <sigh>
Update Counters?

The Rebuild Thumbnails function for the Album can be found in http://www.example.com/forums/admincp/albumcp.php

If you've installed the hack fully, that would be:
Admin CP > Member Album > Verify Pictures > Rebuild Thumbnails.

The one in Update Counters do posts and attachments... not profile pics :)

Can you confirm this is what you are running :)

Alien
07-15-2004, 06:39 AM
Update Counters?

The Rebuild Thumbnails function for the Album can be found in http://www.example.com/forums/admincp/albumcp.php

If you've installed the hack fully, that would be:
Admin CP > Member Album > Verify Pictures > Rebuild Thumbnails.

The one in Update Counters do posts and attachments... not profile pics :)

Can you confirm this is what you are running :)
Sorry for the lack of clarity, it's very late... lol

Yes, I've run Member Album > Verify Pictures > Rebuild Thumbnails. It goes through them (I have about 100 currently) but if you right click on any of them and open it's a red X, as well as all listings in the album.php...

buro9
07-15-2004, 06:50 AM
Sorry for the lack of clarity, it's very late... lol

Yes, I've run Member Album > Verify Pictures > Rebuild Thumbnails. It goes through them (I have about 100 currently) but if you right click on any of them and open it's a red X, as well as all listings in the album.php...
Cool :)

One more silly request then, could you CTRL + F5 that page to ensure that it's not a browser cache thing... even Firefox still cached the bad results when I finally fixed mine.

If not... then I shall see what else this could be, which might involve you looking for things in your code :)

Alien
07-15-2004, 07:31 AM
Cool :)

One more silly request then, could you CTRL + F5 that page to ensure that it's not a browser cache thing... even Firefox still cached the bad results when I finally fixed mine.

If not... then I shall see what else this could be, which might involve you looking for things in your code :)
Negative, I've cleared cache and restarted browsers.. Nothing.. Even installed latest Firefox again since I hadn't gotten the last version and figured I would test not just on IE.. Nothing! It just won't bring up an image using that pthumb stuff.. :(

Malfunktion
07-15-2004, 12:19 PM
I'm on his boat, I had performed all mentioned tasks but to no avail

redlabour
07-15-2004, 04:15 PM
What did i have to do if i update to 3.0.3 ??

FleaBag
07-15-2004, 05:48 PM
I applied the changes - I no longer get the word array but I now get the red X's too.

www.dragonninja.com/forums/album.php

In both the album itself and in the CP - all counters updated. Thanks for your help buro9.

MissKalunji
07-16-2004, 03:36 AM
http://www.animesystem.com/temp/logo_vma.gif

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:

ALTER TABLE `customprofilepic` ADD disapproved smallint(5) not null default'0';
ALTER TABLE `customprofilepic` ADD reason varchar(100) not null;



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 (https://vborg.vbsupport.ru/showpost.php?p=503583&postcount=76).
Pseudomizer also posted a portal-integration allowing you to display a random profile picture on your portal.
Click here to view (https://vborg.vbsupport.ru/showpost.php?p=503591&postcount=77).
Thanks to those who posted add-ons!


Galleries in Action

iKwak - http://www.calpolyonline.com/forums/album.php
Mudxx - http://www.musictalk.com/album.php
Velocd - http://forums.animesystem.com/album.php


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


Great Hack I've installed it :squareeyed: all i need to find out is where to accept gd in the admincp

www.dancehallareaz.com/forum/album.php

MissKalunji
07-16-2004, 04:16 AM
* sigh *

OK, These changes remove the word Array and put in the thumbnail data.

In functions_upload.php find the following (created by this hack):

$image['update'] = ", thumbnaildata = '". $DB_site->escape_string($thumbnail)."'";
$image['insert'] = "'".$DB_site->escape_string($thumbnail)."',";


Replace it with:

$image['update'] = ", thumbnaildata = '". $DB_site->escape_string($thumbnail['filedata'])."'";
$image['insert'] = "'".$DB_site->escape_string($thumbnail['filedata'])."',";


In albumcp.php, which is the one in the admincp folder, find the following:

UPDATE " . TABLE_PREFIX . "customprofilepic
SET thumbnaildata = '" . $DB_site->escape_string($thumbnail) . "'
WHERE picture_id = $image[picture_id]


Replace that with:

UPDATE " . TABLE_PREFIX . "customprofilepic
SET thumbnaildata = '" . $DB_site->escape_string($thumbnail['filedata']) . "'
WHERE picture_id = $image[picture_id]


Finally, you might also want to do find this in that file:

if ($_REQUEST['do'] == 'rebuildthumbs')
{


And follow it with this, adjusting the number of seconds to suit your needs:

set_time_limit(120);


That last bit simply allows the rebuild thumbnails thing to run for 120 seconds = 2 minutes... because there's no pagination stuff in that script and it will probably time out if you have a load of users to rebuild thumbs for.

Other things you might want to do whilst your here... take a look at this thread: https://vborg.vbsupport.ru/showthread.php?t=66765
And then execute this piece of SQL if you haven't already:

ALTER TABLE `customprofilepic` ADD INDEX ( `userid` )


Obviously prepending any TABLE_PREFIX that you use, if indeed you use one.

Any more bugs with this? Probably, so let's resolve them eh? Just report them and there's nothing stopping you lot looking around and trying to figure it out too ;)

i did everything there :-( and i still see the red x n e idea what to do?

kira
07-17-2004, 05:27 AM
Installed here on my vb 3.03, and I'm getting the strange sig dating (1969) and the broken thumbnails just as the rest are. I only have one profile pic in there (mine) since this is a test forum, and while the picture shows up in my profile, the thumbnail is broken in the gallery and the admincp. And before you ask, yes, I have GD enabled, and yes, I rebuilt the thumbs in the member gallery option area of the admincp. :)

Anyone have ideas? Hellloooooo? Don't get me wrong, this is a great idea for a hack, but 3.03 seems to be making it cry.

If this can't be fixed, how do I uninstall this? I don't mean reverting the files and templates, that's the easy part; how can I "undo" the queries and the changes they wrought onto my database?

kira
07-17-2004, 04:00 PM
I just noticed that the last time Velocd posted in this thread was May 24. As a mod I know he's busy and all, but he did agree to support this hack, didn't he? (Glances up at the thread title) Yep, he did. :) So since he is a moderator, can Velocd the Moderator put some pressure on Velocd the hack author to figure out what's going on with the thumbnail issue, pleeeeeeeeeeease? Thanks! :D

Delirion
07-19-2004, 08:18 AM
I've installed it, and after some tweaking of the database queries, I got it to run.

I rebuild the thumbnails, saved the settings. I've set it that pics don't need to be approved.

But when I in my Admin account and another regular users account look at the Profile Pictures Members Album, I get two images (of 14) - the ones which uploaded since installing the hack. The others just show up as blank. Nothing there, no red x's or words or anything.

And yet some of my other regular users can see 14 images in there.

Velocd
07-26-2004, 05:10 PM
Sorry about not updating this hack (and others), as I've been concentrating lately on the Article Bot I've released, but moreover my actual job has consumed 95% of my time for coding.

I'll read through this thread (which is a lot!) and post a complete update soon. (aiming for this weekend)

MissKalunji
07-26-2004, 05:11 PM
Sorry about not updating this hack (and others), as I've been concentrating lately on the Article Bot I've released, but moreover my actual job has consumed 95% of my time for coding.

I'll read through this thread (which is a lot!) and post a complete update soon. (aiming for this weekend)


Hurray :nervous:

SnowBot
07-29-2004, 12:50 AM
I am having problems with only some pics showing up. If you click on the red X it still takes you to there profile and the pic is clear on that, any ideas?

P.S. The bottom left pic is my wife :) :)

tHe Rk
07-29-2004, 01:12 AM
Sorry about not updating this hack (and others), as I've been concentrating lately on the Article Bot I've released, but moreover my actual job has consumed 95% of my time for coding.

I'll read through this thread (which is a lot!) and post a complete update soon. (aiming for this weekend)

I'll be waiting for it.

The problems I am currently have are these: (Running 3.0.1)

I have red X's showing up on the Album page and on the admin cp approval page. When I try to rebuild album thumbs, it goes to a screen listing all the thumbs, but just sits there, and says this:

Processing: profile picture : [1]
Processing: profile picture : [2]
Processing: profile picture : [3]
Processing: profile picture : [4]
Processing: profile picture : [5]
Processing: profile picture : [6]
Processing: profile picture : [7]
Processing: profile picture : [8]
Processing: profile picture : [9]

vBulletin v3.0.1, Copyright ?2000-2004, Jelsoft Enterprises Ltd.


Also on the sigs display page is says every sig was last edited on: 12-31-1969, 06:00 PM

Thanks, and hopefully it will be an easy fix;)

Yelper
07-29-2004, 03:45 AM
I'm extremely confused. I've done everything correctly (or so I think, redone each step twice [copied original vbulletin 3.0.3 files over and re-configured them]), but in my album page, it shows avatars instead of profile pictures.

Check here for album (http://forums.foreverbeyond.net/album.php). So far, aside from this, seems like everything's going smoothly! :)

Christine
07-31-2004, 12:35 PM
I am having the same issues.

Tried buro9's fix, but that didn't work -- none of the images showed up after a rebuild.

Tried a few things, and two seemed to get close, but still not working:

Switched $thumbnail['filedata'] to $thumbnail['profilepicdata'] and that worked great calling the image from the profilepicdata field, but obviously the images were not thumbnailed. Option here would be to not thumbnail, but to set image limits.

Then tried going back to $thumbnail['filedata'] in conjuntion with commenting out the if (!$vboptions['attachfile']) statement in the fetch_thumbnail_from_image function. That worked GREAT for the profile pics (and thumbnailing) but throws SQL errors for attachments.

I will watch for updates, but for now, I think I am just going to take all of the related functions and image files and copy them to the old 3.0 function way specific to the album (which also makes for one less thing to worry on for upgrades).

:)

SnowBot
07-31-2004, 01:38 PM
Other things you might want to do whilst your here... take a look at this thread: https://vborg.vbsupport.ru/showthread.php?t=66765
And then execute this piece of SQL if you haven't already:

ALTER TABLE `customprofilepic` ADD INDEX ( `userid` )


Obviously prepending any TABLE_PREFIX that you use, if indeed you use one.

Any more bugs with this? Probably, so let's resolve them eh? Just report them and there's nothing stopping you lot looking around and trying to figure it out too ;)
Well i ran that query after making the code changes and now none of the pics show at all :( How do i undo these changes ?

Pseudomizer
08-01-2004, 01:37 AM
Hello @LL,

after having seen that a lot of people have requested this function, and i also needed it, i decided to code it on my own. What is urgently needed for this hack ( despite of the thumbnail problems which are due to vb3.0.3 upgrade ) ? An email function for unapproved images!!!

I received a lot of complaints of my members that their uploaded pics were not visible. But as usual they did not read any thread or any hint on the page. They even do not read the message "This picture hasn't been verified yet". We did not check the ACP every day and due to this i coded this small add-on. I hope you will enjoy it and you will find it useful.

Here is a small installation instruction:

- open the vma_hourly_english.php file and edit the 2 email addresses. One for the sender address and one for the recipient address
- Copy the vma_hourly_english.php file into /forum/includes/cron folder.
- Open your ACP and create a cron job and define in which interval you want to receive emails and you place the link to the new uploaded file in the script field.

That's it !!!

I set it up to hourly reporting but you can set it to daily or weekly. It is up to you. You define the time period via your ACP. The file has nothing to do with the timing and the file name is given by me. You can change it to whatever you want if you wish.

P.S: It only sends an email when you have unapproved images. It does NOT send an email if you have no unapproved images and it also does NOT send an email for disapproved pictures.

That's all. Now enjoy !!!

Cheers,

SnowBot
08-01-2004, 12:27 PM
Hello @LL,

after having seen that a lot of people have requested this function, and i also needed it, i decided to code it on my own. What is urgently needed for this hack ( despite of the thumbnail problems which are due to vb3.0.3 upgrade ) ? An email function for unapproved images!!!
Wanna share how you got it working with 3.0.3 ? :) pretty please..lol

tHe Rk
08-01-2004, 02:27 PM
All of the sudden, my thumbnails are working and showing up on the album page. Also the sig dates fixes itself once the user edits sig for the first time after the hack is installed. However I still can't "Rebuild Profile Picture Thumbnails" in admincp. Hack creator, could we get some support please:)

Pseudomizer
08-01-2004, 04:41 PM
Wanna share how you got it working with 3.0.3 ? :) pretty please..lol

Very easy. I am still on 3.0.1 and it works, but i was missing this email part.

Cheers,

FleaBag
08-03-2004, 09:53 AM
Just hold tight for Velocd's fix, I'm sure it won't take too long.

SnowBot
08-04-2004, 09:37 PM
Can anyone tell me the queries to run to uninstall this, i want to try again from scratch.

Thanks :)

tHe Rk
08-06-2004, 08:52 PM
So, is there going to be a fix??? PLEASE? Pwetty Please???

Ted S
08-09-2004, 03:52 AM
1130 photos and about 500 show thumbnails... this is a great hack, I just hope it can be fixed but understandably, this isnt paid and it certainly isnt #1 on a list.

MissKalunji
08-09-2004, 11:26 AM
How do i uninstall dis hack???

Velocd
08-09-2004, 06:57 PM
I don't have time quite yet for this hack :cry:, expect near the end of the month, 20th-30th of August, for an update. ;)

So as to make things a bit easier when I do go to update (and help me from reading through the pages), could someone summarize the problems, or main problem, with this hack? I've had it running on my forum for months now and haven't had any issues with it. I may be able to do a quick update, if it doesn't seem to be a huge issue.

Ted S
08-09-2004, 07:49 PM
The main issue (for me) is with thumbnails, they dont get generated properly, using the code another user posted I got them to change from printing Array to printing something that turns out as a broken image. There is also a problem with the rebuild function timing out and the thumbnail page being too long (needs multiple pages) but those are minor.

58sniper
08-10-2004, 02:19 AM
I'm extremely confused. I've done everything correctly (or so I think, redone each step twice [copied original vbulletin 3.0.3 files over and re-configured them]), but in my album page, it shows avatars instead of profile pictures.

Check here for album (http://forums.foreverbeyond.net/album.php). So far, aside from this, seems like everything's going smoothly! :)

Yep - I've got the same problem on a clean install on 3.03. I get the avatar photos for each person who has a profile photo. http://www.efhs84.com/forum/album.php? for the example...

Yelper
08-10-2004, 02:30 AM
I don't have time quite yet for this hack :cry:, expect near the end of the month, 20th-30th of August, for an update. ;)

So as to make things a bit easier when I do go to update (and help me from reading through the pages), could someone summarize the problems, or main problem, with this hack? I've had it running on my forum for months now and haven't had any issues with it. I may be able to do a quick update, if it doesn't seem to be a huge issue.
The main problem is that somehow it doesn't work in vBulletin 3.0.3. I see you're still running 3.0.0, so maybe something was changed in the coding from then.

It's okay though, take your time! vBulletin hacks never come before your life, hopefully! :p

Zelda-King
08-14-2004, 03:36 PM
Installed flawlessly on 3.0.1. Thanks!