PDA

View Full Version : Miscellaneous Hacks - Add Link to User Albums in Member List


rolandogomez
02-15-2008, 10:00 PM
Well first, I'm no programmer and taking what FRDS has in his mod to add a user's link to their albums in the postbit, https://vborg.vbsupport.ru/showthread.php?t=168428

I've come up with using FRDS's helpful mod and modifying it for the member's list. So one hand, I'm hoping this code is not wrong, as it works for me, but also I can't take full credit either.

Again, no programmer, and this is my first attempt at posting a mod, but it's working on my new site,

DEMO
http://www.shotcritic.com/forums/memberlist.php

Basically it's only one edit, find the memberlist template, memberlist_resultsbit by doing the following:

1. In AdminCP, find Styles and Templates>>Style Manager>>Select Style>>Edit Templates>>Member List Templates>>memberlist_resultsbit

2. In memberlist_resultsbit, find this:
<a href="member.php?$session[sessionurl]u=$userinfo[userid]">$userinfo[musername]</a>
<if condition="$show['usertitlecol']"><div class="smallfont">$userinfo[usertitle]</div></if>
and under it put this:
<a href="album.php?$session[sessionurl]u=$userinfo[userid]" title="View $userinfo[username]'s Album" rel="nofollow"><font color="red"><i>Member's Photo Albums</i></font><img src="images/buttons/add_album.png" alt="View $userinfo[username]'s Photo Album" border="0"/></a>

Note, you can remove the italics and font tags if you don't want the linking text to stand out, or change the color to what you want, but it works! Thanks again to FRDS for his inspiration for me to go out and try something as a non-programmer. If anyone thinks the code could be better, let me know! Thanks, rg sends!

abroad
02-16-2008, 05:01 AM
Would be great if it would also show if a member has created a photos/album at all or how many pictures the member has (e.g. link should only appear if the member has an album).

Otherwise I have many links to empty albums/pages.

rolandogomez
02-16-2008, 05:45 AM
I agree, and since I'm no programmer, I'm open for ideas and would love this too. I know this function is available in the member's profile under the album stats. Wish I knew how to use that code on the member's list.

Another thing I hope for is for someone to come up with a mod that will give you a link in the tool bar for the reply boxes that would be [image] that linked to a pop-out panel with mini-thumbs of the user's albums, then the user clicks on the album mini-thumb which takes them to their mini-thumbs of the album's content. Once the user/poster selects and image, it would then drop the code in the posting area.

We have this already with PhotoPost and PhotoPlog, not sure why we can't have it with VB. Wish I was a programmer. Thanks, rg sends!

Mike-D
02-16-2008, 12:54 PM
Another thing I hope for is for someone to come up with a mod that will give you a link in the tool bar for the reply boxes that would be [image] that linked to a pop-out panel with mini-thumbs of the user's albums, then the user clicks on the album mini-thumb which takes them to their mini-thumbs of the album's content. Once the user/poster selects and image, it would then drop the code in the posting area. Rolando,
because I'm a convinced PhotoPlog customer and member in that forum, we have exactly what you'd like to have. It's called 'Popup Selector' and does exactly what you wrote. See my Attachments. That what you meant? -Mike

rolandogomez
02-16-2008, 03:37 PM
Rolando,
because I'm a convinced PhotoPlog customer and member in that forum, we have exactly what you'd like to have. It's called 'Popup Selector' and does exactly what you wrote. See my Attachments. That what you meant? -Mike

Mike,

Hi. I too am a proud member of several PhotoPlog Pro licenses. I love that software, but my newest site, I'm using only VB for the simplicity of the site. I still will use PhotoPlog where I need it though, and yes, not only is it great, but great support from them too.

On the other hand, yes, that's exactly what I want, but how do I modify that to work with the albums feature here on VB? That would be the ultimate because I run photo intensive sites. Thanks, rg sends!

masons
02-24-2008, 08:29 AM
Great . I actualy use this in my postbit_legacy as it makes it nice and clear..

jayjenxi
03-06-2008, 10:52 AM
Good job, Rolando.

It's good to see people who are willing to contribute to the best of their abilities. :) I salute your spirit!

rolandogomez
03-06-2008, 05:15 PM
Good job, Rolando.

It's good to see people who are willing to contribute to the best of their abilities. :) I salute your spirit!

Thanks, again, I'm a photographer and author, not a programmer, though webmaster of sorts. I just hope someone can create the pop-out selector of mini-thumbs for the albums in the quick reply and advanced reply box area like they have for PhotoPlog. Thanks, rg.

justchil
05-06-2008, 12:11 PM
Thanks, again, I'm a photographer and author, not a programmer, though webmaster of sorts. I just hope someone can create the pop-out selector of mini-thumbs for the albums in the quick reply and advanced reply box area like they have for PhotoPlog. Thanks, rg.

I'm also looking for something like this.... I'm hoping someone will make a mod that takes care of this feature. I've been using a free gallery mod for a few months now and it included this feature which my users loved.

If all else fails I'll start trying to do it myself. If I find something in the future I'll shoot you a PM... would appreciate it if you could to the same :D

l3it3r
07-05-2008, 01:28 PM
I was looking into this the past hour or so. It looks like it'll take a few queries to do it. Not sure it's worth the extra load to see if your user has a gallery or not on every postbit load. Maybe an addition to the user table with a null value from default (account creation), and a 'has gallery' value when one is created could be devised? I'm not terribly good with sql though. The value would have to go back to null if all of the user's galleries are deleted as well...

Then all you need to do is pull one more bit of information from the same table that the user's username, post count, location, etc is pulled from.

Not sure how to incorporate that into a vb install that has a considerable amount of galleries already though... maybe a seperate php file that 'installs' the new sql entries according to the user's id and if they have a gallery now?

MDK-Indy
07-16-2008, 09:25 AM
How i can Display the link only for Users with Albums?

greetings Indy