The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
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
|
Comments |
#2
|
||||
|
||||
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? |
#3
|
||||
|
||||
Do you have an example installation you can show?
|
#4
|
|||
|
|||
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 |
#5
|
||||
|
||||
Dude, sweet hack ya got there. I'll install it later today and tell ya how it goes. Thanks for the excellent hack.
|
#6
|
||||
|
||||
He has it on his website, just go there and click "photo gallery" at the top.
|
#7
|
||||
|
||||
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. |
#8
|
||||
|
||||
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).
|
#9
|
||||
|
||||
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', ''); |
#10
|
||||
|
||||
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!! |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|