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)

Logik 05-23-2003 05:56 PM

lord help me.. It says i need GD 2.0, or course, how would i go about installin this.. dont laugh too hard :)

LangTuDaTinh 05-23-2003 11:28 PM

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

Velocd 05-25-2003 04:44 AM

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.

subu1 05-25-2003 06:29 AM

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*

Velocd 05-26-2003 04:39 AM

You need to replace whenever you see ImageCreate function, with the ImageCreateTrueColor function.

subu1 05-26-2003 05:18 AM

thxxx Velocd, it works great :-)

Nickos 05-27-2003 03:30 PM

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

mbaskett 05-29-2003 07:08 PM

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)

Merc 05-31-2003 12:12 AM

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.

Sulaiti 05-31-2003 12:13 AM

Great I install it and make it an Arabic version

Thanks


All times are GMT. The time now is 12:59 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.01251 seconds
  • Memory Usage 1,768KB
  • 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
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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