Version: 1.00, by Cloud-Warrior
Developer Last Online: Apr 2010
Version: 3.0.3
Rating:
Released: 06-22-2004
Last Update: Never
Installs: 40
No support by the author.
As with vBFOAF, I've just released this mod. (There are no modications needed really, so it's more of an add-on.)
Please note that your buddy list becomes public (to other registered users) with vBFriends, so you will have to notify people of the small change in policy.
Put the attached file in your vbulletin folder, and call with the u=1 parameter, e.g.
You can surf your social network (similar to orkut), and view connections you have made to others and that others have made to you (similar to FOAF, or as illustrated with plink.org).
Screenshot attached.
The code contains some hardcoded HTML to avoid the use of templates (for now), but it uses standard vB3 CSS classes such as tcat, thead, smallfont, alt1 and alt2 - so should be fine with most styles.
Changelog:
PHP Code:
// 0.1 - 2004-06-23 - First version
// 0.2 - 2004-06-24 - Added missing trailing slash
// 0.3 - 2004-06-28 - Added missing TABLE_PREFIX to tables
// 0.4 - 2004-07-01 - Added functionality for enemies
// 1.0 - 2004-07-21 - No comment
// 1.1 - 2004-09-09 - Added mutual percentage, in and out counts, link and unlink options for own account
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
The easiest would be a separate column which gets updated as people are added or removed from the buddy list. When I have time I was going to look into it. But I'm just too busy. It's not hard - same queries only when people are added to buddy list, adds to the column in user table with list of userids.
I'm afraid work priorities have put me off track on this hack - it'll be a few weeks before I can take a look.
There's three ideas - see if the existing SQL and code can be optimised, create a new table to store buddy IDs, or cache the output to a HTML file that only gets updated every so often...
Sorry - but I do want to do this, just can't at the moment.
Mods and admins can see anyone's list, but regular users can only see their own list. (For example user# 123 could not see user # 456's friends list.) How could that be done?
Re-vamping the buddy portion of VB would be excellent for this hack so that a PM is sent when you ask to add a buddy and they can either accept you or deny you.
If they accept you, it would be cool if it automatically created the reverse (add me as one of their friends too).
And having the capability of viewing the buddies from the profile with a limit (say 8) shown. Would be cool if they could be shown in random order too so every time you open the profile it would be different. There should then be a link saying view full buddy list which will take you to friends.php
I can mess around with the profile integration thing (not that good at coding mind you) if some expert can handle the whole back end buddy pm sending, accepting, denying and checking.
Anyone willing to take my suggestions above on?? As I stated I am not a coder so all I can help with is suggestions!! This would be amazing if someone could take it on.
Hey a few if statements do not work in this.
I never noticed before. The enemy and " <!-- // If already on list, will want to change this to remove... -->" part.
if you look there isnt code there for the if statement. should be a else but I am not sure what string to put.
If your around think you can fix that small mishap?
Quote:
Originally Posted by sabret00the
fixed code, it was dirty but it works
replace the template with this
HTML Code:
$stylevar[htmldoctype]
<head><title>$vboptions[bbtitle] vBFriends</title>
$headinclude
</head><body>
$header
$navbar
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"><tr><td class="tcat" width="200">
User
</td><if condition="$whichlist == 'buddylist'"><td class="tcat" colspan="2">
Friends ($inoutcounter) ... $mutual% Mutual
</td><else /><td class="tcat" colspan="2">
Enemies ($inoutcounter) ... $mutual% Mutual
</td></if></tr><tr><td class="alt1" valign="top" align="center" rowspan="3"><if condition="!$userinfo[profilepicdateline]"><img src="$vboptions[bburl]/$userinfo[avatarurl]\ /"><br /><else /><img src="$vboptions[bburl]/image.php?u=$userinfo[userid]&type=profile&dateline=$userinfo[profilepicdateline]" /><br /></if>
$userinfo[username] ($inoutcounter)<br /><br /><a class="smallfont" href="$vboptions[bburl]/member.php?u=$userinfo[userid]">View Full Profile</a><br /><!-- // If already on list, will want to change this to remove... --><if condition="$userinfo[userid] != $bbuserinfo[userid]"><a class="smallfont" href="$vboptions[bburl]/profile.php?do=addlist&userlist=$whichlistshort&u=$userinfo[userid]">Add to Your $whichlistshort List</a></if></td><td class="alt2" colspan="2"><table><tr>
$inoutuserlist
</tr></table></td></tr><tr><td class="thead" height="20">
Is Linked To ($outcounter)
</td><td class="thead" height="20">
Is Linked From ($incounter)
</td></tr><tr><td class="alt2" valign="top"><div class="smallfont">
$outuserlist
</div></td><td class="alt2" valign="top"><div class="smallfont">
$inuserlist
</div></td></tr></table>
$footer
Hey a few if statements do not work in this.
I never noticed before. The enemy and " <!-- // If already on list, will want to change this to remove... -->" part.
if you look there isnt code there for the if statement. should be a else but I am not sure what string to put.
If your around think you can fix that small mishap?
i have no idea what so ever what you mean, this template is working properly for me.
<if condition="$userinfo[userid] != $bbuserinfo[userid]">
<a class="smallfont" href="$vboptions[bburl]/profile.php?do=addlist&userlist=$whichlistshort&u= $userinfo[userid]">Add to Your $whichlistshort List</a>
</if>
this is always true. On top of that there isnt a remove there.
shouldnt it not show all the time? I can see it even if they are on my list.
as for enemies I never see that.
is it just me?
what the if condition is asking is "if you are not this user => do you want to add him/her to your userlist?" and NOT "if you're a buddy do you wanna add me?".