PDA

View Full Version : VB3 & Photopost (GALLERY BUTTON)


larryd
04-29-2005, 11:15 PM
I know this can be done because I managed to do it in VB2 and if I recall it was much simpler in VB3 but I can't for the life of me find it on the forums.

I'd like a button to appear down by the edit/quote buttons that says gallery if that persons gallery in photopost has any pictures. If it does not have any pictures then the button would not appear. Can anyone remind me how to do this?

Lizard King
04-29-2005, 11:38 PM
<a href="https://vborg.vbsupport.ru/showthread.php?goto=newpost&t=73040" target="_blank">https://vborg.vbsupport.ru/showt...ewpost&t=73040</a>

larryd
04-30-2005, 12:29 AM
Though useful that is not what I'm looking for. I just want users to have a gallery image on the showthread I guess in postbit that would open up another window with that users gallery.

wirewolf
04-30-2005, 02:07 AM
Though useful that is not what I'm looking for. I just want users to have a gallery image on the showthread I guess in postbit that would open up another window with that users gallery.Do you mean like these? (see attachments). I have links to the users photo gallery in the postbit member drop down menu (with lastest photo), and the member profile info, with user select in the UserCP - options.
If you want to know how, just post here. The one for the lastest photo in the postbit is a hack from here or from the devs at Photopost. I forget which right now. I'll have to find it.

The link to the gallery is done with creating custom profile fields, and then adding the appropiate conditional in the postbit and memberinfo templates along with the proper url code to link it to the user's photo gallery. If you wanted the link to be where the 'Edit' buttons, etc are, that's no problem. It's just a matter of where you place the conditional and you could use an image for the link instead of a text link.

John

PS; If you want to see the real thing, go to this thread (http://shipmodeling.net/vb_forum/showthread.php?t=580) and use this members' drop down menu.

larryd
04-30-2005, 02:19 AM
Thats actually really nice. It would do the job; the only difference is I'd prefer for it to be on the bar where edit/reply etc etc is. That way the person browsing can see wether or not the user they are viewing a post from has a gallery or not without hitting the drop down.

wirewolf
04-30-2005, 10:58 AM
Thats actually really nice. It would do the job; the only difference is I'd prefer for it to be on the bar where edit/reply etc etc is. That way the person browsing can see wether or not the user they are viewing a post from has a gallery or not without hitting the drop down.Like this? See this thread (http://shipmodeling.net/vb_forum/showthread.php?t=580) again.

Here's how:
In the User Profile Field Manager:
Create a New User Profile field - Profile Field Type - Multiple-Selection Checkbox
With these attributes:
1 - Title - Show Link to Photo Gallery
2 - Description - Checking this box will show a link to your Photo Gallery in postview.
3 - Limit Selection - 2
4 - Boxes Per Line - 1
5 - Options (Enter the options that the user can choose from. Separate each option with a new-line (carriage return):
Check Box for Yes
Uncheck for No
6 - Display Order - Your option
7 - Field Required - No
8 - Field Editable by User - Yes
9 - Private Field - No
10 - Field Searchable on Members List - No
11 - Show on Members List - Your Option (I have No. Takes up too much space.
And you'll have to edit the memberlist template to add it anyway)
12 - Display Page - Which page displays this option? - Options:Other

Save and make note of the field number. Replace x below with this new field number.
User can select the Yes/No option in their UserCP under 'Edit Options'
And you, as Admin, can check it off in a members Profile in the 'Users' control panel.
If the Box is Checked, then the if conditional $post['fieldx'] is true, and the link is displayed.

Edit the postbit template (backup,backup,backup!!):
Find -
<if condition="$post['editlink']">
<a href="$post[editlink]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>Add Above (x being the number of the field you created above. target="_blank" your choice. Edit the name of your photopost directory.) -
<if condition="$post['fieldx']">
<a target="_blank" href="/directory_name_of_your_photopost/showgallery.php?cat=500&ppuser=$userinfo[userid]"><img src="$stylevar[imgdir_button]/gallery.gif" alt="View this Members' Photo Gallery" border="0" /></a>
</if>Photopost has a button in it's image folder called - gallery.gif -
Just copy it into the images/buttons/ folder of your forum, or make your own.

John

PS; This is not automatically made true when a user uploads photos. If a user has photos in the gallery, or has just uploaded photos, either they or you will have to - "Check Box for Yes"

larryd
04-30-2005, 02:52 PM
This is probably what I will end up doing; thanks for the work. Just one question... Is there any way to Vbulletin to automatically know wether or not the user has images uploaded to the gallery in Photo Post?

I wrote my own script back in VB2 but if I recall I think I added a column to the table that designated wether or not the user had photos based upon an action they did in Photopost.

wirewolf
05-14-2005, 01:55 PM
This is probably what I will end up doing; thanks for the work. Just one question... Is there any way to Vbulletin to automatically know wether or not the user has images uploaded to the gallery in Photo Post?
I wrote my own script back in VB2 but if I recall I think I added a column to the table that designated wether or not the user had photos based upon an action they did in Photopost.Yes. See this Post (https://vborg.vbsupport.ru/showthread.php?threadid=81395)

nymyth
08-17-2005, 11:43 PM
Do you mean like these? (see attachments). I have links to the users photo gallery in the postbit member drop down menu (with lastest photo), and the member profile info, with user select in the UserCP - options.
If you want to know how, just post here. The one for the lastest photo in the postbit is a hack from here or from the devs at Photopost. I forget which right now. I'll have to find it.

The link to the gallery is done with creating custom profile fields, and then adding the appropiate conditional in the postbit and memberinfo templates along with the proper url code to link it to the user's photo gallery. If you wanted the link to be where the 'Edit' buttons, etc are, that's no problem. It's just a matter of where you place the conditional and you could use an image for the link instead of a text link.

John

PS; If you want to see the real thing, go to this thread (http://shipmodeling.net/vb_forum/showthread.php?t=580) and use this members' drop down menu.


CAN YOU SHOW ME HOW TO DO THIS, its just what ive been looking for... PLEASE!! :-)

Peace

wirewolf
08-18-2005, 02:02 AM
CAN YOU SHOW ME HOW TO DO THIS, its just what ive been looking for... PLEASE!! :-)

PeaceGo to this thread and follow the instructions:
https://vborg.vbsupport.ru/showthread.php?threadid=81395

nymyth
08-18-2005, 01:15 PM
yeah i found it, i also edited it to work even if you dont have photopost and vbulletin in the same database....thanks anyway

Peace

Stoneyreef
02-05-2006, 06:19 AM
OK I did exactly what is says in post #6 and it is not showing up. I have 3.5.0

Stoneyreef
02-12-2006, 12:47 AM
bumpity bump

Aaron_j
03-07-2006, 10:28 PM
I am using this with 3.5.3 and it sort of works. When you click a user's gallery button it takes you to the main member gallery page, not to the gallery that actually belongs to the member.

This is what you get: ..../photopost53/showgallery.php?cat=500&ppuser=

The problem is this part:

<a target="_blank" href="/photopost53/showgallery.php?cat=500&ppuser=$userinfo[userid]">

For some reason it isn't generating a userid and passing that on to Photopost. Is this because Photopost isn't installed in the same database as the forum?

Can anyone help with this?

EDIT: I have a fix for my own problem. I'll put it here in case anyone else needs it.

Change this:
<a target="_blank" href="/directory_name_of_your_photopost/showgallery.php?cat=500&ppuser=$userinfo[userid]">

to this:

<a target="_blank" href="/directory_name_of_your_photopost/showgallery.php?cat=500&ppuser=$post[userid]">

It now takes me to the correct gallery.