Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Automatically include a link to a users' photopost gallery in vbulletin Details »
Automatically include a link to a users' photopost gallery in vbulletin
Mod Version: 1.02, by wirewolf (Member) wirewolf is offline
Developer Last Online: Sep 2008 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.0.7 Rating: (0 vote - 0 average) Installs: 12
Released: 12 May 2005 Last Update: 14 May 2005 Downloads: 17
Not Supported  

Updated on May 14th, 2005 to include as an option:
Gallery stats for the user in the MEMBERINFO template that will show next to the gallery link, like this: View username's Photo Gallery - Has xxx photos in the Photo Gallery, with a total of xx,xxx views to date.
Edit to vbulletins' member.php file required and change to the MEMBERINFO template edit.

Example - Member Profile and attachment #6

readme.zip file updated to readme2.zip

I found a way to automatically include a link to a users' gallery in the users' postbit dropdown menu, in the edit line of the postbit (graphic image), and in the users' profile page. It involves adding two lines of code (a query) in the image-inc.php file, in the editphoto.php file, creating a new User Profile field (in vbulletin), and editing of the postbit and the MEMBERINFO templates. Click here to see an example and see the attached images. Photopostdev Post

Works with vBulletin Version 3.0.7 integrated with PhotoPost PHP 5.02 vB3 Enhanced, but it should work with earlier versions of both. With thanks to MarcoH64, vBulletin.org Moderator for assistance with working out the sql query.

This will work only if your photopost and vbulletin share the same database!!

What this modification does:
Whenever a user uploads a photo, a line of code in the image-inc.php file will automatically UPDATE the userfield (vbulletin's) table by SETTING the value of 1 to a field number you create below. The link to his gallery will then show in the postbit and in the MEMBERINFO template based on the condition of this field. If the number is already set to 1 (user has previously uploaded photos), it will just overwrite with another value of 1 (no harm). If it is the first time a user is uploading photo(s), the value in this field will be null, but the line of code in the image-inc.php or editphoto.php files will now set it to a value of 1

So far the only little kink in this mod, is if a users has only uploaded one photo and if they delete this one photo (if you have allowed permissions for user delete), the field will still be set to 1, meaning the link in the postbit and MEMBERINFO will still be there. In experimenting on my board with this hack, I had such a case. But if you click the link, and even though the user has no photo(s), it doesn't generate an error, just shows the normal gallery page for this member, but with no photos to display (see attachment5). I'm trying to work out some code to check if a user has ANY photos at all in the database, and based on that condition, "reset" the field value back to NULL.

1 - Create a New User Profile field
2 - Edit two files in photopost, image-inc.php and editphoto.php.
3 - Edit two templates in vBulletin, postbit and MEMBERINFO.

See attachments

In attached zip file:
readme2.txt with the instructions

Note:
Members that already have Photos in the Gallery prior to installing this mod, will have to go to their UserCP's Options to Check the "Show Link to Photo Gallery" box, or you will have to do it in the Admin Users'. When I first installed this, I made a general announcement to my Members and included an update in our Forum's weekly Bulletin. Most did update, but I had to select just a few members that hadn't.

If a member already has photos in the Gallery, does not have the box Checked in their UserCP prior to installing this mod, but then uploads a photo(s), the "Show Link to Photo Gallery" will then be updated.

In other words, this mod will not automatically update the check boxs when you first install it. Only after, when a user uploads new photos, or uploads photos for the first time.

John

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	attachment.jpg
Views:	506
Size:	32.5 KB
ID:	26275   Click image for larger version

Name:	attachment2.jpg
Views:	177
Size:	10.0 KB
ID:	26276   Click image for larger version

Name:	attachment3.jpg
Views:	346
Size:	13.1 KB
ID:	26277   Click image for larger version

Name:	attachment4.jpg
Views:	219
Size:	6.1 KB
ID:	26278  

Click image for larger version

Name:	attachment.5.jpg
Views:	174
Size:	14.7 KB
ID:	26279   Click image for larger version

Name:	attachment6.jpg
Views:	128
Size:	12.8 KB
ID:	26318  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Integration with vBulletin Add a link to a user's Photopost Gallery iRO Wiki vBulletin 3.6 Add-ons 23 11 Oct 2008 23:58

Comments
  #2  
Old 14 May 2005, 17:13
larryd larryd is offline
 
Join Date: Nov 2001
That's awesome; now if I can get around to uninstalling the other one and installing this one
__________________
Larry Dougherty
www.newcelica.org
Reply With Quote
  #3  
Old 14 May 2005, 20:15
wirewolf's Avatar
wirewolf wirewolf is offline
 
Join Date: Jun 2004
Real name: John
Thanks larryd.
I should add that the thumbnail of the "Latest Photo" you see in the postbit attachment image above and in the sample url to my post are from this hack - Latest Photopost Photo In Postbit, by sabret00the. It works in vBulletin v 3.0.7. If you want to install his hack in combination with mine, it won't cause any conflict. Where you made the template edit to postbit and MEMBERINFO:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Just wrap his tag edit (from his hack) around mine, like this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And if you used the optional Image link in the Edit line of postbit:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Now this may seem redundant, but it works quite nicely. If a member has never uploaded a photo, then as soon as they do, then the link and the thumbnail will show in their postbit. However, if they go into their UserCP Options, they can "Uncheck" the "Show Link to Photo Gallery" box and the link will not show, and it kind of solves the little problem I described above,
So far the only little kink in this mod, ......................................(see attachment5). I'm trying to work out some code to check if a user has ANY photos at all in the database, and based on that condition, "reset" the field value back to NULL
If they ever do delete the only photo they have ever uploaded, then the userfield "x" doesn't have to be "Reset to 'NULL'", but the tag from his hack
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Will act like a master switch, the userfield will act as User Option (and Admin Option), and if you change the owner of a photo to a user that does not have any photos as yet, both the thumbnail and the link will show.

I know, sounds a bit confusing, but it works like a charm!

I'll be updating this hack soon to include some gallery stats for the user in the MEMBERINFO template that will show next to the gallery link, like this:
View username's Photo Gallery - Has xxx photos in the Photo Gallery, with a total of xx,xxx views to date.

Updated - See top post

John

Last edited by wirewolf; 14 May 2005 at 21:36.
Reply With Quote
  #4  
Old 24 May 2005, 09:03
Internet's Avatar
Internet Internet is offline
 
Join Date: May 2005
Hello,

I would only like to do this for my forum :

http://www.vbulletin.org/forum/attac...chmentid=26278

What, where, how do i get the above?

Thanks a lot.
__________________
~~
Reply With Quote
  #5  
Old 24 May 2005, 09:56
wirewolf's Avatar
wirewolf wirewolf is offline
 
Join Date: Jun 2004
Real name: John
Easy, just download the readme2.zip file, open and follow the instructions. Then only include the one graphic link at line 96:
"This is for an optional graphic image link in the edit line of postbit."
Reply With Quote
  #6  
Old 27 May 2005, 06:36
Internet's Avatar
Internet Internet is offline
 
Join Date: May 2005
Thanks Wirewolf! I got it done!
__________________
~~
Reply With Quote
  #7  
Old 27 May 2005, 15:04
David Bott David Bott is offline
 
Join Date: Dec 2001
Hello...

Ok, this is great! So here is something that is needed.

As this point we have all these people who have posted photos. At this time, unless they go in and check the box in the profile, the link will now show. If they add a new photo or edit one or something, it will auto check the box. (Unless I am mistaken.)

Need a script that can be run ONCE, that will look look though PhotoPost database and update the users VB3 profile to check the box for all members that have photos already in Photopost. Then they are all on and if they want,then they can turn them off. (Not sure why they would want to though.)

BTW...Unless I am mistaken, your code added into the Photopost files will check the box in the members profile if they add another photo or what have you. The issue is, what if they already have set their profile to NOT show it. It will set it back. (again, not sure why they would want to.)
__________________
David Bott
AVS Forum/DBSTalk
Founder - TiVoCommunity.com
http://www.avsforum.com - http://www.dbstalk.com
Reply With Quote
  #8  
Old 27 May 2005, 18:11
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Not to make issues

But there is no need to hack the photopost files... this should be a template only mod no?
I did this for a client and I didnt have to mod anything besides the Memberinfo Template...
I didnt look into this but I assume its the same.

I would love someone to make a cron job that deletes users photos if they are moved to a banned group.
__________________
http://www.t3media.com (Ideas at the speed of thought.)
http://www.sprnch.com social networking!
http://hunterex.com (cellphones super cheap!)
Reply With Quote
  #9  
Old 27 May 2005, 18:19
David Bott David Bott is offline
 
Join Date: Dec 2001
From the instructions...


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


AND


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Thus their is a changes to a PhotoPost files.
__________________
David Bott
AVS Forum/DBSTalk
Founder - TiVoCommunity.com
http://www.avsforum.com - http://www.dbstalk.com
Reply With Quote
  #10  
Old 27 May 2005, 22:55
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Real name: Ace
Why not use the /photopost/forums/vb3.php edit that changes the 'photo' total correctly?

ie: When a user adds a photo, their photo count goes up by one. If it is removed, it goes down by one.

It does remove the 'photos add to post count' functionality, but I think that function is redundant and strange.
__________________
vBulletin Styles (All styles compatible with 3.8.4 - Steel Blue 4.0 Available) | vBulletin Hosting
Reply With Quote
  #11  
Old 02 Aug 2005, 17:00
Gutspiller's Avatar
Gutspiller Gutspiller is offline
 
Join Date: Dec 2001
What if we have 2 photopost installations using the same user database of our forums?
Reply With Quote
  #12  
Old 28 Aug 2005, 07:30
Khashyar Khashyar is offline
 
Join Date: Jan 2003
Hi wirewolf...

Thanks for posting your hack.

By "This will work only if your photopost and vbulletin share the same database!!", do you mean that they have to share the same user information (i.e., photopost using Vb's users, OR... do you mean that the photopost installation must COMPLETELY share and use the VB database, and cannot have it's own database?

Thanks,

Khashyar
Reply With Quote
  #13  
Old 28 Aug 2005, 11:11
wirewolf's Avatar
wirewolf wirewolf is offline
 
Join Date: Jun 2004
Real name: John
Originally Posted by Khashyar
Hi wirewolf...

Thanks for posting your hack.

By "This will work only if your photopost and vbulletin share the same database!!", do you mean that they have to share the same user information (i.e., photopost using Vb's users, OR... do you mean that the photopost installation must COMPLETELY share and use the VB database, and cannot have it's own database?

Thanks,

Khashyar
First, you're welcome and thanks.
Well, they could be separate, but a lot more coding would have to be done to make it work. It would be essential for the user table to be the same for both vbulletin and photopost. Is your forum set up that way, separate databases?
John
Reply With Quote
  #14  
Old 28 Aug 2005, 18:58
Khashyar Khashyar is offline
 
Join Date: Jan 2003
Hi John,

Thank you for the quick reply...

Yes, my PP and VB installations share the same user info (taken from the VB database). The photos and other information are in their respective databases.

You did a great job with your hack, and I am sure that there are a lot of people who have sepreate PP and VB databases who would love to install your hack is you can post some of the additional code.

My understanding is that you would just need to include login config information for the PhotoPost database in the code that you include in VB (since it is pulling the photos from a different database that is not in the VB database).... I am wondering whether it would be a secure option to include login DB info for the Photopost database in the script.

If you have ideas as to how to alter your code for different databases (but shared user info), than I would appreciate it.

Thank you again for sharing your hack,

Khashyar
Reply With Quote
  #15  
Old 01 Dec 2005, 02:52
Kristoph Kristoph is offline
 
Join Date: Mar 2004
got this installed and running like a charm on my forums, made a few alterations, used a camera icon in the postbit for the link... I also added an extra profile field for last photo timestamp, modified the query to "SET fieldx=1,fieldy=UNIX_TIMESTAMP()" then put in a quick conditional, so as it displays a "new photos" message underneath if there's been any photos uploaded in the last 24 hours....
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 08:27.

Layout Options | Width: Wide Color: