Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

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
  #2  
Old 12-08-2001, 07:45 AM
Gamingforce's Avatar
Gamingforce Gamingforce is offline
 
Join Date: Oct 2001
Location: New York City
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack!

Btw, do you know how to put the $photouserid of that person on the full page?

EDIT: I tried everything to get $photouserid onto the main_pgfull template but it doesn't display. Do you know what code I would add to main_photogallery.pho to have $photouserid display on the main_pgfull template as well?
Reply With Quote
  #3  
Old 12-08-2001, 09:23 AM
MarkB's Avatar
MarkB MarkB is offline
 
Join Date: Oct 2001
Location: London, UK
Posts: 324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you have an example installation you can show?
Reply With Quote
  #4  
Old 12-08-2001, 09:45 AM
James Cridland James Cridland is offline
 
Join Date: Nov 2001
Location: London, UK
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great idea! I've not played with this hack, but I wonder why it needs database manipulation.

For example, my username is "James Cridland", which is a valid filename. A PHP routine like (from memory) if file_exists("/pictures/James Cridland.jpg") would be able to check whether there's a photo uploaded for me, surely?

Therefore, just a little bit of code to check whether my picture exists - and a thumbnail if you want those - could produce a little camera icon for the member or a message in their profile: and you don't have to touch your database...

James
Reply With Quote
  #5  
Old 12-08-2001, 11:11 AM
afterlab's Avatar
afterlab afterlab is offline
 
Join Date: Oct 2001
Location: Dallas, TX
Posts: 327
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dude, sweet hack ya got there. I'll install it later today and tell ya how it goes. Thanks for the excellent hack.
Reply With Quote
  #6  
Old 12-08-2001, 04:44 PM
Michael2's Avatar
Michael2 Michael2 is offline
 
Join Date: Nov 2001
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

He has it on his website, just go there and click "photo gallery" at the top.
Reply With Quote
  #7  
Old 12-08-2001, 06:32 PM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, sorry, there is a demo...it is my site: http://forums.jjr512.com/main_photogallery.php?s=
I put it in the instructions, but forgot to mention it here.

James Cridland, that didn't really occur to me at the time, I guess mainly because this hack was a conversion of my older pure HTML photo gallery, which of course was just a bunch of <img> tags. But there is actually a good reason why I, personally, wouldn't want the hack to be like that: Sometimes, a member will provide a new photo. Whereas their old photo was named member.jpg, I would name their new photo member2.jpg. The reason for this is the members of my board form a pretty tight community, and I don't mind hosting more than one photo for someone or using my resources...if they want to show their photos stored on my site somewhere else, I don't mind, because it hasn't been a problem yet. So I keep their original photo with the original name to preserve any offsite links, basically.

With your version, the database would still be involved, of course, just to find the other details that I include, like your title, registration date, etc. Of course, you don't have to include all that stuff. But it's not very much data that gets added to the database, just a user id and two URLs.

Gamingforce, if all you need is the userid # to show up or be used on the full photo page, use $photoid.
Reply With Quote
  #8  
Old 12-08-2001, 08:15 PM
Jakeman's Avatar
Jakeman Jakeman is offline
 
Join Date: Nov 2001
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice idea... i think it would be a lot better if there was an alphabet on the top where you click on a letter and it lists all users starting with that letter (like the way vb handles the memberlist).
Reply With Quote
  #9  
Old 12-08-2001, 10:22 PM
Gamingforce's Avatar
Gamingforce Gamingforce is offline
 
Join Date: Oct 2001
Location: New York City
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a lot JJR512!

I installed it on my board with a lot of changes.

First, this script works in conjunction with the profile picture script. Basically on the member picture listing, their avatar is shown instead of the thumbnail and when a person clicks on that avatar, it leads to the picture they uploaded for their profile. I personally thought this was pretty cool, because a member can change their photo gallery picture by just changing their profile picture (which comes with an upload script). The only work i have to do is type in the member number to add.

The php file executes this database command: INSERT INTO photogallery VALUES ($memberid, 'null', 'null', '');
Reply With Quote
  #10  
Old 12-09-2001, 02:20 PM
xware's Avatar
xware xware is offline
 
Join Date: Nov 2001
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

good hack!
I made a addon with it and integrated it with upload photo hack .
I have installed this hack first.

yesterday I installed JJR512's this hack,
and i think it's not need to update database manipulation if you have installed the upload photo hack.
So i make a new script to INSERT INTO photogallery table the old uploaded photos.
of cause i edit the here's upload script to aoto insert and erase photogallery table too.
It works well and easy.
thanks!!
Reply With Quote
Reply

Thread Tools

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 07:28 PM.


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.09323 seconds
  • Memory Usage 2,292KB
  • Queries Executed 23 (?)
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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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