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

Onkel_Tom 04-23-2004 06:42 PM

Okay, I think I'm too stupid to understand the hack...
Now the right pictures are shown in admincp but only with 100 Pixel instead of 200. Also in album.php the pictures are still 100 pixel...

Pseudomizer 04-23-2004 08:15 PM

Quote:

Originally Posted by Onkel_Tom
Okay, I think I'm too stupid to understand the hack...
Now the right pictures are shown in admincp but only with 100 Pixel instead of 200. Also in album.php the pictures are still 100 pixel...

Hello Onkel_Tom,

just a question. This hack is for version 3.0.0 from VBulletin. Your board is running 2.3.5 ( yes, i just registered there ;-) ). Are you in the process of upgrading ?

If not, there is a version for 2.3.x VBs out.

How long does it take until a member gets full status on your site ?

Cheers,

Onkel_Tom 04-23-2004 09:30 PM

I have more than one board ;)
It depends on the admins how long the activation needs, I will have a look in 2 Minutes...
The board for the Hack is a vB3.0.1 !

Pseudomizer 04-23-2004 09:35 PM

Quote:

Originally Posted by Onkel_Tom
I have more than one board ;)
It depends on the admins how long the activation needs, I will have a look in 2 Minutes...
The board for the Hack is a vB3.0.1 !

Oh. Ok. Do you have ICQ ? It would make this much more easier. My number is in my profile.

Cheers,

Christine 04-23-2004 11:03 PM

I am attaching a file with 3 minor add-ons for anyone interested.

Included:

1. Ties the album viewing permissions to the memberlist viewing permissions
2. Adds the ability to add/update the photo with a comment in the Admin CP
3. Adds the ability to add/update the photo with a comment in the Mod CP

Thanks again, Velocd -- my members LOVE the album!!

Christine 04-24-2004 03:56 PM

Quote:

Originally Posted by Pseudomizer
Now i will add a link to my menu, but after reading your second answer with the permissions how about addind this to the memberlist as a pop-up like the search button ?

I really liked this idea, as adding the donations link for subscriptions is making Navbar a bit crowded.

Attached is a template mod for Navbar that will put the Memberlist and Velocd's album into a dropdown menu like QuickLinks is, with a fallback for those who can't view the JS.

:)

Boofo 04-24-2004 06:11 PM

Quote:

Originally Posted by Christine
I really liked this idea, as adding the donations link for subscriptions is making Navbar a bit crowded.

Attached is a template mod for Navbar that will put the Memberlist and Velocd's album into a dropdown menu like QuickLinks is, with a fallback for those who can't view the JS.

:)

What goes into the phrases? You have the titles for the phrases, but no content. ;)

Christine 04-24-2004 06:18 PM

Quote:

Originally Posted by Boofo
What goes into the phrases? You have the titles for the phrases, but no content. ;)

members and members_list are already there -- the only one that needs to be added is photo_album, unless I missed something, and if so, please let me know which ones!!

Boofo 04-24-2004 06:22 PM

Quote:

Originally Posted by Christine
members and members_list are already there -- the only one that needs to be added is photo_album, unless I missed something, and if so, please let me know which ones!!

You're right, my bad. I didn't look at it close enough. You didn't have Type, Varnme or Text there, it threw me off. Sorry about that. ;)

welo 04-25-2004 08:20 AM

Installing on 3.0.1 and receive this error in albumcp.php?do=approve

Code:

Invalid SQL:
                SELECT customprofilepic.*, user.username
                FROM vb3_customprofilepic
                LEFT JOIN vb3_user
                USING (userid)
                ORDER BY visible, username
       
mysql error: Unknown table 'customprofilepic'

mysql error number: 1051

This corresponds to line 56 of albumcp.php so for gits and shiggles I tried:

Code:

SELECT " . TABLE_PREFIX . "customprofilepic.*, " . TABLE_PREFIX . "user.username
...and it worked, except I got broken images in the ACP exactly like Bofoo was getting, and the MySQL 1064 error on album.php Calvin got.

Now you say ACP -> vB3 Member Photo -> Settings (which is actually 'Options') is the key, so I set entries per page from 18 to 12. Making progress. Now I get this error on album.php:

Code:

Invalid SQL:
                SELECT user.userid, dateline,
                comment, user.username, user.usertitle,
                user.joindate, user.usergroupid
                FROM vb3_customprofilepic
                LEFT JOIN vb3_user USING (userid)
                WHERE visible=1
               
                ORDER BY posts desc
                LIMIT 0, 12
       
mysql error: Unknown table 'user' in field list

mysql error number: 1109

Yet another table prefixing issue, right? This around line 193 in album.php, so now I have:

Code:

        $images = $DB_site->query("
                SELECT ".TABLE_PREFIX."user.userid, dateline,
                comment, ".TABLE_PREFIX."user.username, ".TABLE_PREFIX."user.usertitle,
                ".TABLE_PREFIX."user.joindate, ".TABLE_PREFIX."user.usergroupid
                FROM ".TABLE_PREFIX."customprofilepic
                LEFT JOIN ".TABLE_PREFIX."user USING (userid)
                WHERE visible=1

Now it appears to be working. Beginning to look like you need to update a couple of files in your zip though.

welo 04-25-2004 08:31 AM

Oh, and everything for your sorting selectors in album.php neglects prefixes too:

Code:

        $users = $DB_site->query("
                SELECT ".TABLE_PREFIX."user.userid, ".TABLE_PREFIX."user.username, ".TABLE_PREFIX."user.usergroupid,
                ".TABLE_PREFIX."user.usertitle, ".TABLE_PREFIX."usertextfield.signature, ".TABLE_PREFIX."usertextfield.sigdateline,
                ".TABLE_PREFIX."avatar.avatarpath, ".TABLE_PREFIX."user.avatarrevision, NOT ISNULL(".TABLE_PREFIX."customavatar.avatardata) AS hascustomavatar,
                ".TABLE_PREFIX."customavatar.dateline AS avatardateline
                FROM ".TABLE_PREFIX."user
                LEFT JOIN ".TABLE_PREFIX."usertextfield
                USING (userid)
                LEFT JOIN ".TABLE_PREFIX."avatar AS ".TABLE_PREFIX."avatar
                ON(".TABLE_PREFIX."avatar.avatarid = ".TABLE_PREFIX."user.avatarid)
                LEFT JOIN ".TABLE_PREFIX."customavatar AS ".TABLE_PREFIX."customavatar
                ON(".TABLE_PREFIX."customavatar.userid = ".TABLE_PREFIX."user.userid)
                WHERE ".TABLE_PREFIX."usertextfield.signature!=''$condition
                ORDER BY " . ($sort == 'dateline' ? 'sigdateline' : $sort) . " $order
                LIMIT " . ($minlimit-1) . ", $perpage
        ");


welo 04-25-2004 09:14 AM

Okay, hate to be a pest but this one I'm not tracking down. For some reason whenever I update my profile picture info from UCP, I get an error (a VB error - not SQL) saying:

Quote:

There has been an error in the upload. Please ensure that the file has been correctly selected and that the upload has taken place successfully.
I assume this indicates a glitch either with profile.php or includes/functions_upload.php, but I'm sure not seeing it. I'm not trying to upload a pic btw, just trying to add a comment to it.

subu1 04-25-2004 06:48 PM

verry nice Hack, i installed on vB3.0 Gold and i have an error by album.php

PHP Code:

Datenbankfehler in vBulletin 3.0.0:

Ungueltige SQL-Abfrage
        
SELECT user.useriddateline
        
commentuser.usernameuser.usertitle
        
user.joindateuser.usergroupid
        FROM customprofilepic 
        LEFT JOIN user USING 
(userid
        
WHERE visible=1
         
        ORDER BY posts desc
        LIMIT 0
18
    
mysql error
Unknown column 'comment' in 'field list'

mysql error number1054

Datum
25.04.2004 21:46:36
Skript
: [url]http://www.starlight-board.net/board/album.php[/url] 

sorry i can't find my error, all queries are run :rolleyes:

Pseudomizer 04-25-2004 06:58 PM

Quote:

Originally Posted by subu1
verry nice Hack, i installed on vB3.0 Gold and i have an error by album.php

PHP Code:

Datenbankfehler in vBulletin 3.0.0:

Ungueltige SQL-Abfrage
        
SELECT user.useriddateline
        
commentuser.usernameuser.usertitle
        
user.joindateuser.usergroupid
        FROM customprofilepic 
        LEFT JOIN user USING 
(userid
        
WHERE visible=1
         
        ORDER BY posts desc
        LIMIT 0
18
    
mysql error
Unknown column 'comment' in 'field list'

mysql error number1054

Datum
25.04.2004 21:46:36
Skript
: [url]http://www.starlight-board.net/board/album.php[/url] 

sorry i can't find my error, all queries are run :rolleyes:

Hello subu1,

there is no column 'comment' in the user table. Where is this query located and when do you get this error ? Seems something to be wrong with your source code. Did you check again if you implemented all the changes correctly ?

Cheers,

subu1 04-25-2004 07:22 PM

..the query is locatet only in my profile.php

search:

PHP Code:

$profilepic $DB_site->query_first("
            SELECT userid, dateline
            FROM " 
TABLE_PREFIX "customprofilepic
            WHERE userid = 
$bbuserinfo[userid]
        "
); 

replace it with:

PHP Code:

$profilepic $DB_site->query_first("
            SELECT userid, dateline, comment, visible
            FROM " 
TABLE_PREFIX "customprofilepic
            WHERE userid = 
$bbuserinfo[userid]
        "
);
        
        
$profilepic['comment'] = fetch_censored_text($profilepic['comment']); 

it's correct i don't have 'comment' in the user table

I thing i need a command for my User Table... INSERT INTO `User....only I do not know like



what can i do :nervous:

Pseudomizer 04-25-2004 09:21 PM

Hello subu1,

no, you don't need a column in the user table. The column should be located in your customprofilepic table.

Please try in the phpmyadmin or in mysql command line the following query and tell me what you get:

PHP Code:

SELECT useriddatelinecommentvisible FROM customprofilepic WHERE userid '1'

Cheers,

subu1 04-25-2004 09:29 PM

Quote:

Originally Posted by Pseudomizer
Hello subu1,

no, you don't need a column in the user table. The column should be located in your customprofilepic table.

Please try in the phpmyadmin or in mysql command line the following query and tell me what you get:

PHP Code:

SELECT useriddatelinecommentvisible FROM customprofilepic WHERE userid '1'

Cheers,

ok I see that :disappointed:

Fehler

SQL-Befehl :

SELECT userid, dateline,
COMMENT , visible
FROM customprofilepic
WHERE userid = '1'
LIMIT 0, 30

MySQL meldet:


Unknown column 'COMMENT' in 'field list'

Pseudomizer 04-25-2004 09:36 PM

What do you get for:

PHP Code:

select from customprofilepic limit 1

If you are missing comments, is the rest there ?

Cheers,

subu1 04-25-2004 09:41 PM

now I see this :rolleyes:

Pseudomizer 04-25-2004 09:57 PM

Ok. The solution is easy:

You missed that line during the installation:

PHP Code:

ALTER TABLE `customprofilepicADD comment varchar(255NOT NULL AFTER filename

Please do this command and all should work fine.

Cheers,

Velocd 04-26-2004 11:02 PM

Sorry about my recent absence from this thread, been busy. ;)

If you still have questions, feel free to ask.

If you could provide me with a URL to your gallery, I'll add it to the first post of this thread under "Examples," as a display of some of the gallerys out there. I've added Mudxx's already. Just PM me the link. :)

Boofo 04-26-2004 11:15 PM

Mike, is there a way to have it so regular members will not be able to list the signatures when viewing the album?

Velocd 04-26-2004 11:24 PM

Regular members? As in the specific usergroup "registered" ?

Assuming your registered group ID is #2, in the template "album_display", find:

HTML Code:

<select name="type">
<option value="1"<if condition="$type == 'image'"> selected="selected"</if>>Pictures</option>
<option value="2"<if condition="$type == 'sig'"> selected="selected"</if>>Signatures</option>
</select>&nbsp;&nbsp;

Replace it with:
HTML Code:

<select name="type">
<option value="1"<if condition="$type == 'image'"> selected="selected"</if>>Pictures</option>
<if condition="$bbuserinfo['usergroupid'] != 2">
<option value="2"<if condition="$type == 'sig'"> selected="selected"</if>>Signatures</option>
</if>
</select>&nbsp;&nbsp;

They'll still be able to access signatures if they know the code, so in the album.php, find:

PHP Code:

$type $_REQUEST['type'] ? $_REQUEST['type'] : 1

Replace it with:

PHP Code:

$type $_REQUEST['type'] && $bbuserinfo['usergroupid'] != $_REQUEST['type'] : 1


welo 04-27-2004 02:53 AM

I think I found a bug but wanted to check here and make sure.

In the UCP it gives you either the option of importing your pic from a remote url or uploading it. Whenever someone imports from a url the board imports the pic and stores it in the database.

What's happening is, if a person uploads a pic everything works fine and their thumbnail is created in the member album. However, if they use a url to import it, somehow GD skips that step and a broken image shows up in the member gallery.

Anyone else have this happen? For now I just commented out the url linking feature in the modifyprofilepic template (and adjusted the corresponding phrase). Be nice not to have to though.

Velocd 04-27-2004 04:26 AM

I'll look into this. I'm quite sure I tested this out when creating the hack, but I could have overlooked it, assuming it should have worked in either case.

welo 04-27-2004 07:22 AM

Yeah, one of my staff members was having trouble with it so I just tried it myself. If you upload the pic then the thumbnail renders; import it from url and it doesn't (the pics are still in the user profile though).

I'm still having an issue trying to add a comment to an already uploaded picture, too. If I add the comment at the time of the pic upload, it works. Attempting it subsequently produces a board error.

This is a really cool script, man. Just hoping we can get these couple of bugs worked out before building on it a little more. This hack took an inordinate amount of time to install due to tracking down the lack of table prefixes in your files, so with all this effort invested I'm not gonna give up yet, hehe. ;)

Onkel_Tom 04-27-2004 10:29 AM

Quote:

Originally Posted by welo
What's happening is, if a person uploads a pic everything works fine and their thumbnail is created in the member album. However, if they use a url to import it, somehow GD skips that step and a broken image shows up in the member gallery.

same bug for me !

subu1 04-27-2004 02:59 PM

Quote:

Originally Posted by Pseudomizer
Ok. The solution is easy:

You missed that line during the installation:

PHP Code:

ALTER TABLE `customprofilepicADD comment varchar(255NOT NULL AFTER filename

Please do this command and all should work fine.

Cheers,

cool soweit sogut, hoffe mir ist niemand b?se wenn ich mal eben etwas deutsches wieder reinbringe, aber sonst bekomm ich es nicht auf die Reihe *snief*

Sah im ACP auch nur diese 4 Kreuze und das hochladen funktionierte nicht, ergo bin ich hin und habe die 4 Profilpics in der Datenbank gel?scht.

Bekomme aber trotzdem nichts hochgeladen und komme mit den gr??eneinstellungen im ACP nicht klar.

Gibs nicht nochmal ne Anleitung f?r Dummies worauf ich zu achten habe, habe auch icq ;)

greetz subu1

Finde diesen Hack klasse und die Member w?rden sich wirklich freuen :rolleyes:

W?rdest Du mir nochmal helfen;)

Pseudomizer 04-27-2004 03:54 PM

No problem. One quick help in german and one in english:

English:
VBulletin Options -> Avatar Options -> Enable profile pic to YES
Member attachment options -> Thumbnailsize -> 500
Maintenance -> Update Counters -> Message Thumbnails > Rebuild
vB3 Member Album -> Approve Images -> Rebuild profile picture thumbnails ( only available if you have an unapproved pic pending )
Usergroup -> for each specific group set the profile pic dimensions like heigth 500 and width 500

German:
VBulletin Optionen -> Benutzerbild Optionen -> Profil Bild aktivieren auf JA
Beitrag Anhang Optionen -> Thumbnail Größe -> 500
Importieren und Pflege -> Zähler aktualisieren -> Anhang Thumbnails erstellen
vB3 Member Album -> Approve Images -> Rebuild profile picture thumbnails ( geht nur, wenn ein Bild noch auf Freischaltung wartet )
Usergruppen -> für jede Usergruppe die Profilbild Dimensionen auf z.B. Höhe 500 und Breite 500 einstellen

Und ich habe keine ICQ Nummer in Deinem Profil gefunden. Meine sollte in meinem Profil stehen.

Cheers,

subu1 04-27-2004 05:16 PM

Quote:

Importieren und Pflege -> Z?hler aktualisieren -> Anhang Thumbnails erstellen
Wenn ich das ausf?hre kann ich garnicht so schnell schauen wie die Meflermeldungen der misc.php aufgerufen werden :rolleyes:


All times are GMT. The time now is 04:36 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.02440 seconds
  • Memory Usage 1,914KB
  • 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
  • (5)bbcode_code_printable
  • (2)bbcode_html_printable
  • (15)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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