PDA

View Full Version : Mini Mods - Display Friend count in Posbit


mvigod
12 Jun 2008, 13:13
One of our members asked for this so I figured I would do a quick share here.

Go to AdminCP> Styles & Templates> Postbit Legacy.

Find:
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div> Below that add:

<if condition="$post['userid']"><div>Friends: (<b><a href="member.php?u=$post[userid]">$post[friendcount]</a></b>)</div></if>Thats it. Easy breezy. If you use itrader or an award mod, you can place it below the code for that as I have done.

Coop1979
12 Jun 2008, 13:53
Nice change! It would be nice if you could get it to load directly to the Friends tab. I tried to add "#friends" to the end of the url, but it didn't work.

M-Tuning
12 Jun 2008, 16:04
Thanks, never thought of that.

redraider
12 Jun 2008, 19:19
Great one. Could we have similar for number of social groups?

mvigod
13 Jun 2008, 13:19
Nice change! It would be nice if you could get it to load directly to the Friends tab. I tried to add "#friends" to the end of the url, but it didn't work.
Yeah, it won't recognize the anchor #friends when entering the profiile. I tried it too, and ended up just leading the link to the profile page. I am sure there is a way and I'll look at it when I get some time.


Great one. Could we have similar for number of social groups?

I am not sure if there is a system count for social groups, but Ill look. If there is, it should be fairly simple.

Shill360
13 Jun 2008, 22:57
If you download the friends browser mod you can then change the link to point to friends.php?u=$post[userid] which is what i've done.

Boofo
13 Jun 2008, 23:18
What is the "friends browser mod"?

BigDog56
14 Jun 2008, 13:11
Very nice, thank you. I placed it a little differently, in postbit. not postbit legacy.

<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>

And placed above it.

<if condition="$post['userid']"><div>Friends: (<b><a href="member.php?u=$post[userid]">$post[friendcount]</a></b>)</div></if>

Nice location for me. Again, THANK YOU!

mvigod
14 Jun 2008, 16:15
If you download the friends browser mod you can then change the link to point to friends.php?u=$post[userid] which is what i've done.
I agree with Boofo, havent heard of that one.

mvigod
14 Jun 2008, 16:16
Very nice, thank you. I placed it a little differently, in postbit. not postbit legacy.

<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>And placed above it.

<if condition="$post['userid']"><div>Friends: (<b><a href="member.php?u=$post[userid]">$post[friendcount]</a></b>)</div></if>Nice location for me. Again, THANK YOU!
No problem. Thanks for sharing your postbit placement.

mA|tRiX
04 Jul 2008, 11:17
THX. Works great :)

010081
05 Jul 2008, 10:39
worked great thankx.

Q-v-n-s-Q
29 Jul 2008, 08:30
nice liltle mod, thanks

bongwater
29 Jul 2008, 13:51
havent installed this mod (yet), but I was wondering - Is the count of 0 displayed if a user doesnt have any added friends?

hotwheels
01 Aug 2008, 05:27
Yes to the above question...............

beckyvan
01 Aug 2008, 21:27
Very cool, thanks!

beckyvan
03 Aug 2008, 02:14
Can this be edited to not display for certain users. I have about 10 users that don't like it. Is there a condition I can put in by user id somewhere?

BucWiLd
11 Aug 2008, 06:13
nice hack, thanks

Regs
11 Aug 2008, 15:00
Very nice, thank you.

I needed to place it ever-so-slightly different than the instructions provided in order to keep the font size consistent with other postbit, erm, bits :) (copy the code supplied and paste right above the last </div> in the code to search for)

That's probably not too clear, but this post is unsupported.

:D

biggeorge
14 Feb 2009, 14:56
Thanks!