vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vB Member Photo (https://vborg.vbsupport.ru/showthread.php?t=49565)

KJ_innit 03-04-2003 03:09 PM

excellent, thanks very much. i've sent a mail to my server people, just waiting to see if they've installed it yet :)


thanks again.

gopherhockey 03-04-2003 03:26 PM

I have GD installed on my server - however, phpinfo is stating this as the configure command:

'./configure' '--with-apxs=/usr/local/www/bin/apxs' '--with-config-file-path=/usr/local/www/etc' '--enable-versioning' '--with-system-regex' '--disable-debug' '--enable-track-vars' '--without-gd' '--without-mysql' '--with-zlib' '--with-imap=/usr/local' '--with-mysql=/usr/local' '--prefix=/usr/local/www' 'i386--freebsd4.4'

I assume the '--without-gd' part means I'm SOL, unless I find a way to re-install PHP.

I have root access - it is an Interland virtual server.

Dean C 03-04-2003 05:11 PM

There's further information about gd further down the page ^

gopherhockey 03-04-2003 05:15 PM

I still don't see anything that specifically answers my question though. I know I can request it to be installed, but I need to be sure what I'm asking.

WHen I go into (what is called vinstall on my server) - i can see that GD is installed - the library and the app.

PHP isn't using the "option" though. Do I simply ask them to re-install PHP with that option turned on?

With my host, if I am not as specific as posisble with them they won't help me - they will look and see that the library is installed and tell me I'm on crack :ermm:

Velocd 03-04-2003 07:14 PM

Tell them that GD Library according to PHP Info page is installed but it not enabled according to that command line:
'./configure' '--with-apxs=/usr/local/www/bin/apxs' '--with-config-file-path=/usr/local/www/etc' '--enable-versioning' '--with-system-regex' '--disable-debug' '--enable-track-vars' '--without-gd' '--without-mysql' '--with-zlib' '--with-imap=/usr/local' '--with-mysql=/usr/local' '--prefix=/usr/local/www' 'i386--freebsd4.4'

This should be specific enough to have them look into it and fix the problem.

gopherhockey 03-04-2003 07:24 PM

Perfect - that worked. Hope that helps anyone else that might have the same issue as well...

gopherhockey 03-04-2003 11:34 PM

I may be missing something, but is the system supposed to send an email when the verficiation option is turned on?

I see them in the Verify section in the admin cp, but never received an email. All other emails from the system are working just fine.

Then again, I don't know if emailing the admin was a built-in option?

I'd hate to have photos waiting for verification for too long..

--

Also, when editing a photo it gives me the "your photo will not appear... " message again, even though it isn't really re-sent to the admin for re-verification.

Perhaps the edit should just say "your photo has been edited"

gopherhockey 03-04-2003 11:40 PM

Would it be possible to have a link to the members photo show under the author area when viewing posts? Perhaps just above or below where the avatar is displayed...

Lots of neat options with this. Nice!

GoTTi 03-05-2003 12:38 AM

ight, here is ss of the GD section in my PHP info.

It is in there...any ideas?

It says 1.6.2 or higher on version...should it say something else?

gopherhockey 03-05-2003 12:52 AM

I tried this on 2 of my systems - one was just like yours, which is not version 2.0 or better, so it didn't work. The other says this in the gd info:

bundled (2.0 compatible)

- that one worked just fine.

I have since asked my first system to help upgrade their version.. but I seriously doubt the will. :lick:

Velocd 03-05-2003 01:22 AM

Da GoTTi, you must either have a version that states 2.0 or higher, or as gopher just said "bundled (2.0 compatible)", which just means he's running the latest version of PHP which comes pre-installed with it.

Any version of GD below 2.0 will not work.

Gopher, I noticed a few bugs you mentioned in your post #47, and will be updating the hack shortly.

Velocd 03-05-2003 03:11 AM

The zip has been updated with version 1.2, with the added file of update1.2.txt. This small update basically fixes an issue with submitting only your comments field, but leaving your photo field blank, and it giving you a verification notice.

Basically the comments field is not verified, only the photo is, since I think having to verify the comments field is going alittle out of bound.

Quote:

I may be missing something, but is the system supposed to send an email when the verification option is turned on?

I see them in the Verify section in the admin cp, but never received an email. All other emails from the system are working just fine.

Then again, I don't know if emailing the admin was a built-in option?

I'd hate to have photos waiting for verification for too long..
You seemed to be quite confused on how this works. First of all, there is no email sent to you. Via your index page of admin cp, when first entering, if you have received new unverified photos to your gallery there is a small notice in the upper left corner of the page notifying you how many unverified photos there are (hence the file edits to admin/index.php). If a member submits a photo, you will get no email, you simply have to be sure to check the admin cp regularly and then go to the pverify.php page to approve them.

ricoche 03-05-2003 08:51 AM

Very nice hack! Works well.

Thanks very much,

Ricoche

Cheffe 03-05-2003 12:51 PM

I got the following warning

Code:

Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/tmp/vbaee4c33b7) is not within the allowed path(s): (/home/www/netsh2/) in /home/www/netsh2/html/vbtest/member.php on line 1020

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/tmp/vbaee4c33b7) is not within the allowed path(s): (/home/www/netsh2/) in /home/www/netsh2/html/vbtest/member.php on line 1024

:confused: :confused: :confused:

gopherhockey 03-05-2003 01:16 PM

Quote:

Originally posted by Velocd
You seemed to be quite confused on how this works. First of all, there is no email sent to you. Via your index page of admin cp, when first entering, if you have received new unverified photos to your gallery there is a small notice in the upper left corner of the page notifying you how many unverified photos there are (hence the file edits to admin/index.php). If a member submits a photo, you will get no email, you simply have to be sure to check the admin cp regularly and then go to the pverify.php page to approve them.
Yea, I had a feeling there wasn't an email sent but wasn't sure - I didn't see the notice in admin cp, but I'll look closer next time.

Anyone want to take a stab at adding email to this? I like how photopost works, it sends an email that a new photo needs verification and includes the link to the verify page.

I am in admin quite a bit, but not enough to be able to properly watch the system for new pics. I guess I could turn verify off as well and rely on users to let me know if someone uploads porn or something like that :squareeyed:

Regardless, still cool.

Moyses 03-05-2003 01:41 PM

Very nice Hack!!! http://foros.angzone.com/images/smilies/amor.gif

*Install* http://foros.angzone.com/images/smilies/gringift.gif

Velocd 03-05-2003 03:38 PM

Quote:

Originally posted by Cheffe
I got the following warning

Code:

Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/tmp/vbaee4c33b7) is not within the allowed path(s): (/home/www/netsh2/) in /home/www/netsh2/html/vbtest/member.php on line 1020

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/tmp/vbaee4c33b7) is not within the allowed path(s): (/home/www/netsh2/) in /home/www/netsh2/html/vbtest/member.php on line 1024

:confused: :confused: :confused:

Make sure the directory "memberpics" is CHMOD 777 ;)

Cheffe 03-05-2003 04:34 PM

checked but still the same problem :(

klunderj 03-06-2003 02:38 AM

Just installed this hack.. took a while. Then I realized my system is hosted on a windows box and is not capable of running GD. Well, I modified some of the scripts and got the members photo album to work, just couldnt use the thumbnails. Modified gdresize and member.php

Gonna go click on install now

Cheffe 03-06-2003 06:10 AM

Problem fixed! Just no tmp directory :D

mbaskett 03-06-2003 06:22 PM

Quote:

Originally posted by klunderj
Just installed this hack.. took a while. Then I realized my system is hosted on a windows box and is not capable of running GD. Well, I modified some of the scripts and got the members photo album to work, just couldnt use the thumbnails. Modified gdresize and member.php

Gonna go click on install now

Windows can run GD... just install the distributable version of PHP 4.3.1 is avaiable now, edit the php.ini to remove the comment line from

extension=php_gd2.dll

Download the PHP zip for windows (not the installer package), and extract php_gd2.dll into your PHP directory... It'll work like a charm.

Mike11212 03-08-2003 02:00 AM

be cool if u could add a bio with this

dv6cougar 03-08-2003 01:52 PM

awesome job!

i like it so far, having a few problems biggest one woudl be

PHP Code:

Fatal errorCall to undefined function: imagecreatefromjpeg() in /home/tunercar/public_html/forums/gdresize.php on line 9 

but I asked my host to install the GD 2.0 now, to make sure we have it, so i bet that's it


very nicely done

installs.... :)

i'm gonna see if i can rendar this one to use a full gallery

dv6cougar 03-08-2003 09:04 PM

ok still no luck!

some body help me out please :(

thanks alot! the program is installed and i did the mod 3 times making sure i had done teh steps and all was done :(

here's the script for thsoe whoe have not seen it...

PHP Code:

<?php



function createthumb($name,$filename,$new_w,$new_h,$quality){

    
$system=explode(".",$name);

    if (
preg_match("/jpg|jpeg/",$system[1])){$src_img=imagecreatefromjpeg($name);}// LINE 9

    
if (preg_match("/png/",$system[1])){$src_img=imagecreatefrompng($name);}

    
$old_x=imageSX($src_img);

    
$old_y=imageSY($src_img);

    if (
$old_x $old_y) {

        
$thumb_w=$new_w;

        
$thumb_h=$old_y*($new_h/$old_x);

    }

    if (
$old_x $old_y) {

        
$thumb_w=$old_x*($new_w/$old_y);

        
$thumb_h=$new_h;

    }

    if (
$old_x == $old_y) {

        
$thumb_w=$new_w;

        
$thumb_h=$new_h;

    }



        
$dst_img=ImageCreateTrueColor($thumb_w,$thumb_h);

        
imagecopyresampled($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y);



    if (
preg_match("/png/",$system[1])){

        @
header ("Content-type: image/png");

        @
imagepng($dst_img,$filename);

    } else {

        @
header ("Content-type: image/jpeg");

        @
imagejpeg($dst_img,$filename,$quality);

    }

    
imagedestroy($dst_img);

    
imagedestroy($src_img);

}



?>

line 9 is throwing this error

PHP Code:


Fatal error
Call to undefined function: imagecreatefromjpeg() in /home/tunercar/public_html/forums/gdresize.php on line 9 


Velocd 03-09-2003 03:08 PM

imagecreatefromjpeg() is a GD2.0 predefined function, and if this is coming up as undefined, then you have an error in your GD installation, or maybe JPG support is not enabled for GD.

Do as I have instructed to a user in this previous post:
https://vborg.vbsupport.ru/showthrea...911#post360911

Then make sure JPG/PNG is enabled, and that PHP on the server is being started with GD support.

colby 03-10-2003 03:49 AM

:cry: Fatal error: Call to undefined function: imagecreatefromjpeg() in /home/**/public_html/forum/gdresize.php on line 5

Velocd 03-10-2003 04:19 AM

Colby, according to the link you sent to me of your Phpinfo info page, there is no reference whatsoever of GD installed. I would inform your host about this to insure that they have absolutely installed it. you are running PHP 4.2.3, also, so it does not come pre-installed with it.

colby 03-10-2003 04:25 AM

I am good friends with my host, and I was wondering if you could tell me where i could tell him to get this GD thing for his servers, please?

Velocd 03-11-2003 01:29 AM

You can download GD from http://www.boutell.com/gd/
(just search "GD library" in google)

Xyphen 03-11-2003 11:23 PM

Possible to display the member photo in their profile?

Odil 03-19-2003 07:45 AM

This only allows one photo upload per member although I have this set to allow 100 per user in the admin cp....any ideas on what is wrong?

Nitesh 03-19-2003 11:09 AM

Hi, this looks like an excellent hack but could someone tell me if this hack could be restricted so only certain usergroups could use it? Thank you

L-Mane 03-21-2003 11:03 PM

I got this error when uploading a pic

Fatal error: Call to undefined function: imagecreatefromjpeg() in D:\WebPublic\allhiphop\community\gdresize.php on line 5

Velocd 03-22-2003 03:13 AM

Quote:

This only allows one photo upload per member although I have this set to allow 100 per user in the admin cp....any ideas on what is wrong?
You must have mistaken the option in the Admin Control Panel, as there is nothing that allows members to upload more photos in this hack. The only options available via Admin CP are those shown in the following screenshot:

https://vborg.vbsupport.ru/attachmen...&postid=360348

Quote:

Hi, this looks like an excellent hack but could someone tell me if this hack could be restricted so only certain usergroups could use it? Thank you
I don't have time to do really any more coding on this hack, but achieving this is very easy. Just use:

PHP Code:

if($bbuserinfo[usergroup] == X){
show_nopermission();


Or something similar and place this in the code chunk area in member.php where the main code goes. Just change the X variable to whatever usergroup value you want to restrict.

Quote:

I got this error when uploading a pic

Fatal error: Call to undefined function: imagecreatefromjpeg() in D:\WebPublic\allhiphop\community\gdresize.php on line 5
Once again, GD2.0 is required for this hack to work, and must be enabled with JPG and PNG support.

Steve123 03-22-2003 04:41 AM

Ive installed this hack and gone over it..

When i try access

member.php?s=&action=editphoto

I get no output.. only
Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>


sabret00the 03-22-2003 08:49 AM

very nice

Steve123 03-22-2003 10:31 AM

^^ oops

fixed it... i misread an instruction :)

Thanks Very Nice :)

Steve123 03-22-2003 11:17 AM

Ok

Question..

How do u make it so when a user deletes the picture outa the database.. it will delete his/her picture from your harddrive..

Because right now it wont delete the pics on the hdd when a user changes pic... :S

Steve123 03-23-2003 10:35 AM

Add Photo To Profile..

I dident add the approval system because i know i will never use it, but its easy to encode if someone needs it..

This is the first time ive modded a hack before, so dont scream at me if im doin it wrong :)

member.php

Just Before
PHP Code:

  
  
eval("dooutput(\"".gettemplate("getinfo")."\");");
  
}
    
// ############################### start aim message ############################### 

Add
PHP Code:

$checkphoto $DB_site->query_first("SELECT comments,visible FROM memberphoto WHERE userid='$userinfo[userid]'");
 
 if(
$checkphoto){
            
$profilephoto "<img src=\"memberpics/photo$userinfo[userid]_$userinfo[photonum].$userinfo[phototype]\">";
  
        } else {
            
$profilephoto "$userinfo[username] hasen't uploaded a photo yet.";
    }

    if(
$checkphoto['comments'] != ""){
        
$photomessage $checkphoto['comments'];     
    } 

Then in your getinfo Template put
Code:

$profilephoto<br> $photomessage
Where you want the photo to appear..

Velocd 03-23-2003 07:55 PM

Quote:

How do u make it so when a user deletes the picture outa the database.. it will delete his/her picture from your harddrive..

Because right now it wont delete the pics on the hdd when a user changes pic... :S
I just noticed this bug in the code, so if a user manually deletes their photo via the link that says "[Remove this photo from the database]," it will remove the data from the database but not remove it from the server. This has been fixed, and the zip has been updated with update1.3.txt file.

I recommend browsing through your memberpics directory and deleting those old files not being used by members presently in the photo gallery.

;)


All times are GMT. The time now is 08:25 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01482 seconds
  • Memory Usage 1,867KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (6)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete