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

Reply
 
Thread Tools
vB3 Member Album 2.0 Details »»
vB3 Member Album 2.0
Version: 1.00, by Velocd Velocd is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 04-09-2004 Last Update: Never Installs: 100
 
No support by the author.



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:
    [sql]
    ALTER TABLE `customprofilepic` ADD disapproved smallint(5) not null default'0';
    ALTER TABLE `customprofilepic` ADD reason varchar(100) not null;
    [/sql]

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.
  • Pseudomizer also posted a portal-integration allowing you to display a random profile picture on your portal.
    Click here to view.
  • Thanks to those who posted add-ons!

Galleries in Action
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.

Show Your Support

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

Comments
  #72  
Old 04-16-2004, 02:58 PM
d3nnis d3nnis is offline
 
Join Date: Jun 2003
Location: Singapore
Posts: 211
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Velocd
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)
Reply With Quote
  #73  
Old 04-16-2004, 03:00 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Velocd
Yep, and that actually makes more sense. Will update the install.html.

In the template album_sig_list, find:

HTML Code:
<br /><br />Last modified:<br />$user[sigdate], <font class="time">$user[sigtime]</font>
Replace it with:

HTML Code:
<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.
Reply With Quote
  #74  
Old 04-17-2004, 04:21 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
Reply With Quote
  #75  
Old 04-17-2004, 09:24 AM
Pseudomizer's Avatar
Pseudomizer Pseudomizer is offline
 
Join Date: Mar 2002
Location: Germany
Posts: 614
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Velocd
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,
Reply With Quote
  #76  
Old 04-17-2004, 02:37 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #77  
Old 04-20-2004, 11:03 PM
Pseudomizer's Avatar
Pseudomizer Pseudomizer is offline
 
Join Date: Mar 2002
Location: Germany
Posts: 614
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Velocd
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,
Reply With Quote
  #78  
Old 04-20-2004, 11:17 PM
Pseudomizer's Avatar
Pseudomizer Pseudomizer is offline
 
Join Date: Mar 2002
Location: Germany
Posts: 614
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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....0&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:

PHP Code:
// #############################################################################
// 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:

PHP Code:
// ############## PROCESS RANDOM PIC #######################################

$profilepic 0;

       while (
$profilepic == )
    {
       
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:

PHP Code:
Block $box Content 
Replace this with:

PHP Code:
$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,
Reply With Quote
  #79  
Old 04-22-2004, 03:32 AM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #80  
Old 04-22-2004, 03:58 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Pseudomizer
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:

PHP Code:
// #############################################################################
// 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:

PHP Code:
// ############## PROCESS RANDOM PIC #######################################

$profilepic 0;

       while (
$profilepic == )
    {
       
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:

PHP Code:
Block $box Content 
Replace this with:

PHP Code:
$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.
Reply With Quote
  #81  
Old 04-22-2004, 07:51 AM
Pseudomizer's Avatar
Pseudomizer Pseudomizer is offline
 
Join Date: Mar 2002
Location: Germany
Posts: 614
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
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,
Reply With Quote
Reply


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:56 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.09029 seconds
  • Memory Usage 2,358KB
  • 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
  • (2)bbcode_html
  • (8)bbcode_php
  • (7)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