View Full Version : Link to Member Gallery?
OrionGirl
07-15-2007, 02:44 AM
I have PhotoPost vB3 running on vBulletin v. 3.6.4. My users have requested adding a link to the profile block that appears on the user with each post, so they can upload an image to their gallery and allow other members an easy and quick way to locate said gallery. I was hoping to have it appear as a clickable icon next to the messenger icons, or the 'online' button.
I'm fairly new to this...So please let me know what other info I need to provide!
Kirk Y
07-15-2007, 02:56 AM
Find your respective postbit template:
$post[skypeicon]</div>
Add after:
<a href="linktogallery.php"><img src="/path/to/image.gif" /></a>
OrionGirl
07-21-2007, 12:59 AM
Sorry--I see where to add the tag, but how does that add the field for entering the link? Do I need to develop the .php file? I can generate the image to display, but where do the users enter the address for the gallery? Not everyone creates a gallery, though the address would be standardized based on their username...So I'm hoping that I could create a variable that always equalled the username to put in?
Sorry...I'm slow.
Kirk Y
07-21-2007, 01:06 AM
I don't know much about PhotoPost, but I'd assume that when you're viewing a specific members images, you're given a URL like: http://yoursite.com/forums/photopost.php?do=viewimages&userid=99.
If this is the case, then you would replace the "linktogallery.php" in my original example with "./photopost.php?do=viewimages&userid=$post[userid]". That way the UserID in the link would change for each user's post.
OrionGirl
07-21-2007, 01:27 AM
Okay, that makes sense. I added the text and an image to the postbit...But it's not showing up. Hmmmm...I'll have to keep fiddling--I expected at least a red X! :)
Kirk Y
07-21-2007, 01:31 AM
If you're using Firefox, we don't get the little red x sadly. :(
OrionGirl
07-21-2007, 01:37 AM
Nope, IE. I'm fiddling with the link, still nothing. I appreciate the help--I'll post back if...Hopefully when...I get something working. :)
Kirk Y
07-21-2007, 01:57 AM
If you still having trouble, I'm not busy and don't mind looking under the hood for you.
OrionGirl
07-21-2007, 02:07 AM
Please! :D
http://www.aquariumboard.com/gallery/showgallery.php/cat/500/ppuser/2 is the link to my own gallery.
<a href="http://www.aquariumboard.com/gallery/showgallery/php/cat/500/ppuser/userid=$postuserid"> <img src="http://www.aquariumboard.com/forums/images/misc/camera.gif"></a>
Is the code...The image is valid, the link should be valid--but nothing shows up!
Kirk Y
07-21-2007, 02:10 AM
userid=$postuserid should be just $post[userid].
Can you show me where you are sticking this in your postbit template?
OrionGirl
07-21-2007, 02:18 AM
<tr>
<td class="alt2" style="padding:0px">
<!-- user info -->
<table cellpadding="0" cellspacing="$stylevar[cellpadding]" border="0" width="100%">
<tr>
<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>
<td nowrap="nowrap">
<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
$post[onlinestatus]
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>
</div>
<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
</td>
<td width="100%"> </td>
<td valign="top" nowrap="nowrap">
<div class="smallfont">
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
<if condition="$show['infraction']"><div>$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>
<if condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><div><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]
<--! This text will need to be edited to include the correct image for a gallery, once the gallery links are implemented. http://www.aquariumboard.com/gallery/showgallery.php/cat/500/ppuser/2-->
<a href="http://www.aquariumboard.com/gallery/showgallery/php/cat/500/ppuser/$post[userid]"> <img src="http://www.aquariumboard.com/forums/images/misc/camera.gif"></a> </div>
</div>
</td>
</tr>
</table>
<!-- / user info -->
</td>
</tr>
There's the full row content.
Kirk Y
07-21-2007, 02:20 AM
Are you editing the postbit or postbit_legacy template? Because I see you're using the latter.
OrionGirl
07-21-2007, 02:28 AM
It shows postbit as the title for the default style under Style Manager. Am I in the wrong spot?
Kirk Y
07-21-2007, 02:31 AM
There are two different types of postbits: vertical postbit and horizontal postbit (also called legacy postbit, as it was the first generation postbit); each type of postbit has its own template: (respectively) postbit and postbit_legacy.
Your forum is using the legacy postbit, so any modifications you want to make to your postbit need to be done in the postbit_legacy template.
What I'm trying to get at here is that the reason you're not seeing anything is because you're editing the wrong postbit template. :p
OrionGirl
07-21-2007, 02:36 AM
LOL...Did I mention that I am new to this?
OK--so I found the postbit_legacy, inserted the code in the same location otherwise, and voila, the image appears.
It doesn't open the gallery, gives a 404 error...So I'm going to have to work on the link to see why it's not working.
You ROCK! :)
Edit: Muhahahaha...There was a / instead of a . in the link. It works!
If you ever need help with aquariums...Let me know! :D
Kirk Y
07-21-2007, 02:42 AM
Seems it's working now, looking at your forum.
If you want to remove the border around the camera image, use this:
<img src="http://www.aquariumboard.com/forums/images/misc/camera.gif" border="0" />
OrionGirl
07-21-2007, 02:46 AM
:cool: Ooo, that's much cleaner! Thank you...Now to update all the styles.
Kirk Y
07-21-2007, 02:49 AM
No problem. I can't say that I'm a big fan of fish... they're pretty dull; but if I ever get an aquarium, I'll let you know. :p
OrionGirl
07-21-2007, 02:53 AM
Meet Lincoln...
http://i153.photobucket.com/albums/s227/Maevinn/th_100_2144.jpg (http://s153.photobucket.com/albums/s227/Maevinn/?action=view¤t=100_2144.flv)
:) There's more to fish than just a guppy... :) But to each their own. :p I'm also aces on databases.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.