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-22-2004 07:58 AM

I will definately be interested in this if you can make that happen. maybe I'll add some code to put a little paragraph under each picture that is also randomized. ;)

Can you show me some randomizing code for my quotes?

Pseudomizer 04-22-2004 10:46 AM

Hello Boofo,

thanks for bringing this up. I just rewrote the code and brought it down to 1 single query. :nervous:

Please implement all changes like this:

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 this add:

PHP Code:

// ############## PROCESS RANDOM PIC #######################################

       
$images $DB_site->query("
        SELECT user.userid, user.username, customprofilepic.profilepicdata, customprofilepic.comment
        FROM "
.TABLE_PREFIX."customprofilepic
        LEFT JOIN "
.TABLE_PREFIX."user USING (userid)
        WHERE visible=1 and customprofilepic.profilepicdata IS NOT NULL
        ORDER BY RAND()
       "
);

        
$rows $DB_site->num_rows($images);

        if (!
$rows)
        {
            
//do nothing
        
}
        else
        {
            
$image $DB_site->fetch_array($images);
            
$output_pic "<A HREF=\"./forum/member.php?u=$image[userid]\">$image[username]<BR><BR>";
            
$output_pic .= "<img src=\"./forum/image.php?u=$image[userid]&type=pthumb\" border=\"0\" width=\"150\" height=\"150\"/></A>";
        } 

If you need comments below the pictures then...

Replace in my code above:

PHP Code:

$output_pic .= "<img src=\"./forum/image.php?u=$image[userid]&type=pthumb\" border=\"0\" width=\"150\" height=\"150\"/></A>"

With:

PHP Code:

$output_pic .= "<img src=\"./forum/image.php?u=$image[userid]&type=pthumb\" border=\"0\" width=\"150\" height=\"150\"/></A><BR>$image[comment]<BR>"


Cheers,

Boofo 04-22-2004 03:05 PM

Ah, much better. Thank you, sir. ;)

Pseudomizer 04-22-2004 03:11 PM

You're welcome. Where ever i can help.

Cheers,

Onkel_Tom 04-23-2004 12:39 AM

Hi all,
I installed this very nice hack today. Many thanks to Velocd for this great work and the simple ans clear installation instructions.

I get a problem in admincp => vB3 Member Album => Approve Images
there are no thumbnails shown, only red crosses and no images !

I run all queries, do the installation correct and GD Support is enabled for 1.6.x
My server only has PHP 4.2.3 and GD 1.6.2

My second problem is that only 4 images are shown in Admincp for aproval and on the album.php page but there must be more Pics because many users have a userpic in their profile.

any idea ?

Onkel_Tom 04-23-2004 10:26 AM

Okay, sorry, it was a little bit late last night ;)
I changed profile picture and user picture in my mind...

all profile pictures are shown on the album.php page !

but the size is still max. 100 pixel on the album.php while in the profile the size is max.200 pixel (this is my setting in the usergroup for profile pictures).
In attachment settings the sizes are 800x600 for all picure endings.

I rebuild thumbnails in admincp => vB3 Member Album => Options
but size on album.php page is only max. 100 pixel !

also images which where uploaded before the installation of this hack where showed in admincp as a red cross.

any ideas ?

Pseudomizer 04-23-2004 10:48 AM

Hi Tom,

regarding your first probem with the size: I had the same problem and i forgot to set the profile picture size for each group and not the avatar picture size. You should be fine with the attachment size of 800x600 ( a little bit large i think but ok ).

Regarding your second problem it is very obvious. This hack puts all pictures in form of a blob into the database. All previous pictures have not been implemented into the database.

About how many pictures are we talking about which you are seeing as a cross ? One or two or about 200 ?

Cheers,

Onkel_Tom 04-23-2004 11:25 AM

Hi Pseudomizer,
thanks for your quick reply.

Quote:

Originally Posted by Pseudomizer
regarding your first probem with the size: I had the same problem and i forgot to set the profile picture size for each group and not the avatar picture size. You should be fine with the attachment size of 800x600 ( a little bit large i think but ok ).

I checked the size for profile pictures twice for the usergroups and do a small change so I can be sure that the right data is in the db.

Quote:

About how many pictures are we talking about which you are seeing as a cross ? One or two or about 200 ?
only 4 at the moment ;)

Pseudomizer 04-23-2004 01:21 PM

Quote:

Originally Posted by Onkel_Tom
Hi Pseudomizer,
thanks for your quick reply.

I checked the size for profile pictures twice for the usergroups and do a small change so I can be sure that the right data is in the db.

So it does not work for you at all ?


Quote:

Originally Posted by Onkel_Tom
only 4 at the moment ;)

How about deleting these 4 pictures from the database and have the users reload them again ?

Cheers,

Onkel_Tom 04-23-2004 04:15 PM

Okay, I deleted all 4 profile pictures and then uploaded ohter pics in 200 Pixel with again on the server.
Now the thumbnails in admincp shown the old picture but not a red cross ;)

But at album.php still small pictures with 100 Pixel are shown...


All times are GMT. The time now is 09:13 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.01242 seconds
  • Memory Usage 1,758KB
  • 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_php_printable
  • (4)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