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

Reply
 
Thread Tools
Details »»

Version: , by JJR512 JJR512 is offline
Developer Last Online: Jun 2006 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 12-07-2001 Last Update: Never Installs: 80
 
No support by the author.

I have written what I consider to be my first "big" hack...well, maybe it's only medium. It's certainly my most ambitious project to date.

Basically, what it is is a gallery of photos of your members. Obviously, the hack does not include these photos! You need to get your members to submit to you a photo of themselves. You then need to use an image editing app to create a smaller thumbnail image. Create a new directory and upload the photos to it (you don't absolutely need a unique directory for the photos, but it's good for organization). You can make this directory anywhere; I have mine as a first-level directory inside my www root folder, but you can stick it inside your forums root directory or anywhere else. For each member you include in the Photo Gallery, you specify the URL to both images anyway, so it really doesn't matter.

This hack involves adding a new table to your database. Please make a backup of your database first! You are solely responsible for protecting your message board.

At this time, adding a member to the Photo Gallery involves direct database manipulation, such as through phpMyAdmin or direct query. This is easy, and full instructions are provided. I hope to be able to come up with some way to do this through the Admin CP, but that will require some more learning on my part (or assistance from one of you! ).

I have tested this on my board, and do not have any problems. However, since this is my biggest project so far, and the first one I've written that includes sql syntax that I devised, it's possible that I have not written this hack in the most optimal or efficient way possible. I don't consider this to be beta, though, as it is fully operational; however, if someone has any pointers on writing better code, please let me know.

Demo: My own Photo Gallery
Note: The server my site is hosted on has been having a lot of problems lately, so if it doesn't load or you get MySql errors, please try again a little later. Sorry!

Plans for the Future
1. Add a simple way to add a member to the Photo Gallery through the Admin CP.
2. Making the thumbnail gallery multi-page capable so a user can specify the number of thumbnails seen per page. --DONE!
3. Adding a search function.
4. Integrating into a member's profile, to either show the thumbnail there as well, or else link to it.
5. Got other ideas? Let me hear them.

Everything you need should be in the attached .ZIP file. Have fun!

Show Your Support

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

Comments
  #12  
Old 12-09-2001, 03:27 PM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had considered making it possible for a member to add his/her own photo to the photo gallery, but didn't know if everyone would like that ability. Some boards might have people that would upload inappropriate photos.
Reply With Quote
  #13  
Old 12-09-2001, 04:43 PM
xware's Avatar
xware xware is offline
 
Join Date: Nov 2001
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok.
I make a new edit now.
this hack can't display in pagenav.
If you have many member photos,It's too slowly to display and the page is too long! (I have 108 member photos)
I made a edit in main_photogallery.php and integrated pagenav to it.
In default my gallery display 10 photos perpage. If you want see more now can hit "1" "2"..."last page" and so on.
works well,thanks again.
My members love this hack.
Reply With Quote
  #14  
Old 12-09-2001, 07:42 PM
212rikanmofo 212rikanmofo is offline
 
Join Date: Nov 2001
Location: paris
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

love this hack, exactly what i need, a member profile/gallery section, can you add the ability to let other members rate them too? also can the user update his pic, and have more than 1 picture they can put up? and can they like edit all ther information? If you would like to see an example go here...

http://www.asianxo.com and goto the profile section, something how they have there, how users can upload and add pics and change info and rate other users... love the hack tho!
Reply With Quote
  #15  
Old 12-10-2001, 04:46 AM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have performed an extensive re-write on this code based on some ideas from above. Mainly, I've included the pagenav functionality, as discussed by xware. Now, the default number of thumbnails per page will be 10, and if you have more than 10 members in your photo gallery, the pagenav feature will show up. You can change the default # per page, if you want, in the main_photogallery.php file; it's documented near the top.

xware, I'd be interested to see how you did it, just for comparison.

I've also added the letters function, as the built-in member list has, per the suggestion of Jakeman.

The new .ZIP file is attached to the original post above, but here is a shortcut: https://vborg.vbsupport.ru/attachmen...&postid=205482
Reply With Quote
  #16  
Old 12-10-2001, 05:46 AM
MarkB's Avatar
MarkB MarkB is offline
 
Join Date: Oct 2001
Location: London, UK
Posts: 324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by JJR512
I had considered making it possible for a member to add his/her own photo to the photo gallery, but didn't know if everyone would like that ability. Some boards might have people that would upload inappropriate photos.
Reply With Quote
  #17  
Old 12-10-2001, 04:09 PM
xware's Avatar
xware xware is offline
 
Join Date: Nov 2001
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok,JJR512,here is your want .

I edited the main_pg.txt and main_photogallery.php
you can use pagenav in display.
I think you can do better.
wait....
Reply With Quote
  #18  
Old 12-10-2001, 08:45 PM
DarkReaper DarkReaper is offline
 
Join Date: Oct 2001
Posts: 429
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

All that's needed for this to be truly 1337 is the ability for members to upload their own pictures in the same way they can upload avatars. A report picture thing might be ok, but there isn't one for avatars, and I've never seen them abused...
Reply With Quote
  #19  
Old 12-11-2001, 01:11 AM
212rikanmofo 212rikanmofo is offline
 
Join Date: Nov 2001
Location: paris
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

agreed, the ability for users to upload there own pictures and update ther own profile and can you make it so other members can rate other users like a rating system? and also can a member upload more than 1 pic to use in there profile? like at http://www.asianxo.com love this hack, great job!
Reply With Quote
  #20  
Old 12-11-2001, 09:29 AM
TheComputerGuy's Avatar
TheComputerGuy TheComputerGuy is offline
 
Join Date: Oct 2001
Location: TX
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Find:
case 'gallery.php':
$userinfo[activity] = 'gallery';
break;

I can not find this
Reply With Quote
  #21  
Old 12-11-2001, 11:23 AM
ToraTora! ToraTora! is offline
 
Join Date: Nov 2001
Posts: 255
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Since BradC was the one who made up the photo upload in the first place.. he might be interested to know that it is being used in another script ya know

and he added the moderation part to his latest version. If I am not mistaken it was just adding another field in the database, and when the picture is uploaded it is set to I think "1" which means "Needs to be reviewed" and then.. the admins gets an email or sees that one needs to be moderated on the homepage (using vbportal) and then he can set it to "2" for "Approved" or "3" for not approved.

and as for the photo ranking.. or rating the picture, brad actually has had that set up for a long time. Last I heard once get gets it completed he was going to sell it to a few people who wanted to buy it.
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 11:06 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.10801 seconds
  • Memory Usage 2,309KB
  • 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
  • (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
  • (3)pagenav_pagelink
  • (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