vb.org Archive

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

Boofo 04-12-2004 01:00 AM

Did you read that your new version fixed the problems that I was having? ;)

And what do I do about the first replacement in the modifyprofilepic, sir? Since I am using RC3, it is different than your code.

nando415 04-12-2004 01:28 AM

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

Velocd 04-12-2004 02:34 AM

Boofo, just place the code where it seems appropriate (use your HTML wisdom ;) ). This was developed for vB3 Gold, so I can't help for older versions where the templates are different, since I don't know what the templates look like. If you want to post the template, I'll have a look.

Quote:

What is GD Graphics library? I did everything exactly as asked in the set up and I get the same exact error as calvin
http://www.boutell.com/gd/
http://www.php.net/gd

It's an image library for advance image manipulation in PHP. For this hack, you need it to resize images. If you have PHP4.3.0 or above, you have GD2 installed. To check if it's installed and what version, use:

PHP Code:

<?php

gd_info
();

?>

It'll return an error if not installed.

You must also have the option enabled via your AdminCP -> Options page.

Christine 04-12-2004 03:06 AM

Velocd,

I tried to run the rebuild to make the images a bit bigger tonight, and it is locking up. I have 300 pics loaded, but set it as low as 10 trying to make it go through. It gets to image 7 and then just flashes.

New pics load in fine, but I can't get the old ones to change (and really don't want to manually load them a second time!)

Any thoughts on what to look at?

My GD version is 2.0.15 if that matters.

Thanks!

Boofo 04-12-2004 03:37 AM

Mike, I just noticed that the avatars aren't showing up for the signatures when I list them. I am using avatars as files in a dir on the server. Can this be what is causing it not to show the avartars and show the red x instead?

The code in the modifyprofilepic template is as follows:

HTML Code:

<script type="text/javascript">
<!--
function check_yes(objid)
{
        yes = fetch_object(objid);
        if (yes)
        {
                yes.checked = true;
        }
}
//-->

</script>

<form enctype="multipart/form-data" action="profile.php" method="post">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="updateprofilepic" />

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="tcat" colspan="2">$vbphrase[edit_profile_picture]</td>
</tr>
<tr>
        <td class="panelsurround" align="center">
        <div class="panel">
                <div style="width:$stylevar[formwidth_usercp]" align="$stylevar[left]">
               
                        <fieldset class="fieldset">
                                <legend>$vbphrase[your_current_profile_picture]</legend>
                                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                                <tr valign="top">
                                        <td><img src="image.php?u=$bbuserinfo[userid]&amp;type=profile&amp;dateline=$profilepic[dateline]" alt="$vbphrase[your_profile_picture]" border="0" /></td>
                                        <td class="smallfont">
                                                <div style="margin-bottom:$stylevar[formspacer]px">$vbphrase[use_profile_picture] :</div>
                                                <div>
                                                        <label for="profilepic_yes"><input type="radio" name="profilepic" value="1" id="profilepic_yes" $profilepicchecked[1] />$vbphrase[yes]</label>
                                                        <label for="profilepic_no"><input type="radio" name="profilepic" value="0" id="profilepic_no" $profilepicchecked[0] />$vbphrase[no]</label>
                                                </div>
                                                <div style="margin-top:$stylevar[formspacer]px">$vbphrase[if_have_profile_picture_no_will_delete]</div>
                                        </td>
                                </tr>
                                </table>
                        </fieldset>
                       
                        <fieldset class="fieldset">
                                <legend>$vbphrase[custom_profile_picture]</legend>
                                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                                <tr>
                                        <td>$vbphrase[may_upload_custom_image_controls]</td>
                                </tr>
                                <tr>
                                        <td>
                                                $vbphrase[enter_profile_picture_url]:<br />
                                                <input type="text" class="bginput" name="avatarurl" value="http://www." onchange="check_yes('profilepic_yes')" size="50" />
                                        </td>
                                </tr>
                                <tr>
                                        <td>
                                                <input type="hidden" name="MAX_FILE_SIZE" value="$inimaxattach" />
                                                $vbphrase[upload_profile_picture_from_computer]:<br />
                                                <input type="file" class="bginput" name="upload" onchange="check_yes('profilepic_yes')" size="50" />
                                        </td>
                                </tr>
                                <tr>
                                        <td class="smallfont">
                                                If you want, enter a comment about your picture:<br />
                                                <input type="text" class="bginput" name="comment" maxlength="40" size="50" />
                                        </td>
                                </tr>
                                <tr>
                                        <td><phrase 1="$permissions[profilepicmaxwidth]" 2="$permissions[profilepicmaxheight]" 3="$permissions[profilepicmaxsize]">$vbphrase[note_maximum_size_x_y_or_z]</phrase></td>
                                </tr>
                                </table>
                        </fieldset>
                       
                </div>
        </div>
       
        <div style="margin-top:$stylevar[cellpadding]px">
                <input type="submit" class="button" value="$vbphrase[save_changes]" accesskey="s" />
                <input type="reset" class="button" value="$vbphrase[reset_fields]" accesskey="r" />
        </div>
        </td>
</tr>
</table>

</form>


Velocd 04-12-2004 06:47 AM

Quote:

Velocd,

I tried to run the rebuild to make the images a bit bigger tonight, and it is locking up. I have 300 pics loaded, but set it as low as 10 trying to make it go through. It gets to image 7 and then just flashes.

New pics load in fine, but I can't get the old ones to change (and really don't want to manually load them a second time!)

Any thoughts on what to look at?
Christine, you ran the rebuild option originally after installing the hack, correct? No errors showed then?


Quote:

Mike, I just noticed that the avatars aren't showing up for the signatures when I list them. I am using avatars as files in a dir on the server. Can this be what is causing it not to show the avartars and show the red x instead?
Ah, I missed a field in album.php that should have been added. It only affects one if they have custom avatars in folders, such as your case. I'll update the file, but here are the quick directions for you:

In album.php, find:

PHP Code:

avatar.avatarpath 

Replace it with:

PHP Code:

avatar.avatarpathuser.avatarrevision 

As for that template, for step #1 find:
HTML Code:

<td><img src="image.php?u=$bbuserinfo[userid]&amp;type=profile&amp;dateline=$profilepic[dateline]" alt="$vbphrase[your_profile_picture]" border="0" /></td>
Replace it with:
HTML Code:

<td><img src="image.php?u=$bbuserinfo[userid]&amp;type=profile&amp;dateline=$profilepic[dateline]" alt="$vbphrase[your_profile_picture]" border="0" /><if condition="!$profilepic[visible]"><br /><u><b><i>This image is awaiting approval status!</i></b></u></if><if condition="$profilepic[comment]"><br /><i>$profilepic[comment]</i><br /></if></td>
Should be good. :up:

Boofo 04-12-2004 07:07 AM

Ok, the avatars work now in the signatures listing and the message shows up in the modifyprofilepic area like it should when they ate awaiting approval. I'm all set to go. Thank you, sir. ;)

I know you said you don't like adding things and I dont blame you, but (and there is always a but, isn't there?) would there be away to stop the picture from also showing up in the profile until it is verified? That part bypasses this and that would really be a great idea if you ever had users that were to upload a porn pic or something. ;)

Velocd 04-12-2004 02:28 PM

Actually Boofo, that is already applied. ^^

Only the user can view his/her own profile picture in their profile page (member.php) if it is unapproved, but no one else can. However, even if unapproved, it wont show in the gallery (album.php).

Boofo 04-12-2004 04:44 PM

Quote:

Originally Posted by Velocd
Actually Boofo, that is already applied. ^^

Only the user can view his/her own profile picture in their profile page (member.php) if it is unapproved, but no one else can. However, even if unapproved, it wont show in the gallery (album.php).

Ok, I see it now. I was looking at my own pic so it was showing up no matter what. I tested in on another pic and it worked as you said. Sorry about that. ;)

I think the sig editor is a great addition to this. It makes checking for a user's sig a lot faster than going through posts or profiles one by one.

Excellent hack, sir! Thank you! ;)

Christine 04-12-2004 09:32 PM

Quote:

Originally Posted by Velocd
Christine, you ran the rebuild option originally after installing the hack, correct? No errors showed then?

Yes, I ran it for the default 100x100 and all was fine. It was when I tried to up it to 175x175 that it choked on me each time, about the same place between #7 and #11.

Any thoughts?


All times are GMT. The time now is 03:30 AM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01480 seconds
  • Memory Usage 1,792KB
  • 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
  • (3)bbcode_html_printable
  • (3)bbcode_php_printable
  • (5)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