Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Closed Thread
 
Thread Tools
vB Member Photo Details »»
vB Member Photo
Version: 1.00, by Velocd Velocd is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 03-02-2003 Last Update: Never Installs: 102
 
No support by the author.

vB Member Photo
by Velocd

This hack, as well all my other vB2 hacks, I no longer provide support for (being I run vB3 and it's too much hassel to debug vB2). When vB3 Release Candidate comes out, by request I might convert some of my hacks.

Updates:

Latest update was version 1.3b on 08.01.03.


Description:

It's been ages since my last hack, due to my lack of time for coding lately. This feature here though is one I developed for my forum about a week ago, and just recently completed making the instructions for it so I could release it on vBulletin.org.

Just as the name implies, this hack will allow your members to upload a photo of themselves (or whatever you allow), then that photo will be stored in a directory of your website. In addition to just the photo, using the GD2.0 Library, thumbnails are generated corresponding to each members photo and placed inside the directory. A new link via the memberlist nav page will then be able for access to view these images all organized neatly in a photo gallery.

In addition to just this, there is a verification system integrated with the ACP for easy checking of images the members upload, before they are placed in the photo gallery.

The main reason I developed this hack is because all the other photo gallery hacks are pretty.. well, ineffective.

Features:
  • Utilizes GD2.0 to automatically generate thumbnails for your uploaded images
  • Organized photo gallery with a very easy-to-browse interface
  • Verification system allows efficient methods of regulating what is shown in the photo gallery
  • A wide variety of customizable options via the Admin CP

Requirements/Restrictions:
  • GD2.0 Library is absolutely needed, which comes pre-installed with the latest PHP version, 4.3.0.
  • This script does not support multiple-image uploads, and I will not be releasing a version of this hack does!
  • Because the GD library does not support the GIF image format, the photo gallery does not either. The only images that can be uploaded are PNG and JPG. (I hardly think this will be an issue for the most of us)
Installation:
  1. Upload install_photo.php to your admin directory, and run it through your browser. All instructions for this hack are listed in there.
  2. After the hack is installed, go to your "admin cp -> options" page and set the member photo gallery options to your own preference.

Screenshots:

Refer to the next several posts.

---------------

If you use this hack, please remember to click install!

Show Your Support

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

Comments
  #142  
Old 05-23-2003, 05:56 PM
Logik's Avatar
Logik Logik is offline
 
Join Date: Nov 2002
Location: Tx
Posts: 432
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

lord help me.. It says i need GD 2.0, or course, how would i go about installin this.. dont laugh too hard
  #143  
Old 05-23-2003, 11:28 PM
LangTuDaTinh LangTuDaTinh is offline
 
Join Date: Dec 2001
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

>>>>> IF U HAVE IMAGEMAGICK <<<<<<

u can resize the orignal image if it's file size is bigger than the max size

in member.php looks for

PHP Code:
  if ($filename!="") {
      
// check valid image
      
if ($imginfo=@getimagesize($filename)) {
        if (
$imginfo[0]>$photomaxdimension or $imginfo[1]>$photomaxdimension) {

.
.
.
.
..
        }
        if (
$imginfo[2] != and $imginfo[2] != 3) {
            @
unlink($filename);
            eval(
"standarderror(\"".gettemplate("error_photonotimage")."\");");
        } 

replace /w this
PHP Code:
   if ($filename!="") {
      
// check valid image
      
if ($imginfo=@getimagesize($filename)) {
        if (
$imginfo[0]>$photomaxdimension or $imginfo[1]>$photomaxdimension) {
                
$image_width $imginfo[0];
                
$image_height$imginfo[1]; 
                        if (
$image_height $image_width
                            { 
                                
$sizefactor = (double) ($photomaxdimension $image_height);
                            } 
                        else 
                            {
                                
$sizefactor = (double) ($photomaxdimension $image_width) ;
                            }
                                
$newwidth = (int) ($image_width $sizefactor);
                                
$newheight = (int) ($image_height $sizefactor); 
                                
$newsize $newwidth "x" $newheight;
                                
$cmd "mogrify  -quality 80 -resize $newsize "."$filename 2>&1"
                                
exec($cmd$exec_output$exec_retval);

        }
        if (
$imginfo[2] != and $imginfo[2] != 3) {
            @
unlink($filename);
            eval(
"standarderror(\"".gettemplate("error_photonotimage")."\");");
        } 

after that go to admin option then change max file size to 500kb or more....
  #144  
Old 05-25-2003, 04:44 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
lord help me.. It says I need GD 2.0, or course, how would I go about installin this.. don?t laugh too hard
Heh, you'll have to go to the GD-website for help on that, for I have a hosted server and little experience on how to install PHP libraries. Maybe Zend.com, PHPBuilder.com, or Evolt.org will have some easy-to-follow tutorials.

Quote:
Is there a way an admin can manually add someone's pic to the gallery?
Manually? Yes. Here are the steps:
  1. You will have to temporarily have your photo erased, or you can create a test account, for this is the quickest way to do this. Go to your usercp -> modify photo, and upload the photo you wanted to do manually for someone else.
  2. Go into PhpMyAdmin, and run this query:
    Code:
    SELECT * FROM `memberphoto` WHERE userid='your_userid'
    Ensuring to replace 'your_userid' with your userid.
  3. Once you find the entry, edit the userid and/or comments field to that other members preference, making sure to replace the userid with their userid, not yours. Submit the changes.
  4. Run the following query:
    Code:
    SELECT photonum,phototype FROM `user` WHERE userid='members_userid'
    This time round, make sure 'members_userid' is their userid.
  5. Edit the entry, and change photonum to 1, and phototype to "jpg" if the uploaded image was a JPG, or "png" if it was a PNG.
  6. Via FTP, browse to your memberpics dirctory, and find the thumbnail for the image, which should be in the format:
    Code:
    thumb$YourUSERID_$PhotoNUM.PhotoTYPE
    Replace those variables with the members userid, photonum, and phototype.

    You now need to find the actual full-size image, located in the same directory prefixed with "photo", and make the same similar changes to it.
  7. All should be good to go. If you were doing this under your account, you may want to re-upload your image if you had overwritten it.
  #145  
Old 05-25-2003, 06:29 AM
subu1 subu1 is offline
 
Join Date: Sep 2002
Location: Germany
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi,

can everybody tell me why my signature Hack, work now with 256 color, after ich install GD2.0 (have install a new bundel PHP 4.3.1 with new Apache and mysql)

before install this bundel my signature Hack works with more Color's.

Look in my signature *cry*
  #146  
Old 05-26-2003, 04:39 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to replace whenever you see ImageCreate function, with the ImageCreateTrueColor function.
  #147  
Old 05-26-2003, 05:18 AM
subu1 subu1 is offline
 
Join Date: Sep 2002
Location: Germany
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thxxx Velocd, it works great :-)
  #148  
Old 05-27-2003, 03:30 PM
Nickos Nickos is offline
 
Join Date: Apr 2003
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok i just had a stupid idea... maybe my admin control over the pics is not there because im running 2.2.9? if i turn verify photos, everything works fine, people can upload their photos and what not and everything is displayed ok
  #149  
Old 05-29-2003, 07:08 PM
mbaskett mbaskett is offline
 
Join Date: Jan 2002
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I love this hack.. have it up and running on our dev site.. wish I could show you all, as I've tweaked it (like we do with all things on our site) and am currently incorperating it into our member of the week section... (auto rotation)
  #150  
Old 05-31-2003, 12:12 AM
Merc Merc is offline
 
Join Date: Aug 2002
Location: San Juan, Puerto Rico
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
05-21-03 at 11:10 AM tinbin said this in Post #133
Merc:
I had the same problem and i changed the memberlist_userphoto to this:
Code:
<a href="memberlist.php?s=$session[sessionhash]&action=viewphoto&userid=$getphoto[id]">
$getphoto[comments]</a>
This will make the comments a clickable link to the photo.
Then u would have to delete the $getphoto[comments] where it originally is to avoid it being displayed double
Thank you SO much. I really appreciate it.
  #151  
Old 05-31-2003, 12:13 AM
Sulaiti Sulaiti is offline
 
Join Date: Mar 2002
Location: Qatar
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great I install it and make it an Arabic version

Thanks
Closed Thread


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:18 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06648 seconds
  • Memory Usage 2,338KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete