PDA

View Full Version : Profile Enhancements - Automatically Add Friend


King Kovifor
27 Apr 2008, 02:42
Introduction
This modification acts somewhat like Myspace. When you register on Myspace, the creator of Myspace (Tom) is automatically added as a friend (mutually). This acts the same way on your forum by adding any number of users (user IDs required) to the new users friend list. This is completely mutual (http://www.vbulletin.org/forum/showpost.php?p=1500299&postcount=7), but now has the option to be a non-mutual friendship.

This was coded by request in this (http://www.vbulletin.org/forum/showthread.php?t=177154) thread.

Requirements
vBulletin 3.7.x (This should work on ALL betas & RCs!)
Installation
Upload the attached product file by following this path:
ACP -> Plugins & Products -> Manage Products -> [Add/Import Product]
Head over to the vBulletin options, open up the "User Registration Options", and set a list of users under the "Automatically Add Friends" option.
Enjoy!

King Kovifor
27 Apr 2008, 02:44
Change Log
v1.0.0 (April 26, 2008)
Initial Releasev1.0.1 (April 28, 2008)
Fixed! Grammar mistake inside the ACP that has led some users into the wrong direction on how to properly set this up.
Fixed! Removed a var_dump() from within the code, left over from debugging.
New! Added ability to make this friendship non-mutual!
New! Product Checking was added to this product for the ability to find whether your version is up to date.
New! Support URL has been added linking to this thread.
Known Bugs:
Options were added for Private Message notifications, but no code was added.
mySQL Error Using Validation code.
Code may be run twice (as friend counts is being added multiple times).

Danny-E
27 Apr 2008, 02:58
installing...

thanks


edit: ended up uninstalling it :( would have wanted it to add all current members to my friends list. maybe do this in a future release? thanks

King Kovifor
27 Apr 2008, 03:24
installing...

thanks


edit: ended up uninstalling it :( would have wanted it to add all current members to my friends list. maybe do this in a future release? thanks

I don't know. I will try that tomorrow or next week if I get a chance.

Boofo
27 Apr 2008, 03:29
installing...

thanks


edit: ended up uninstalling it :( would have wanted it to add all current members to my friends list. maybe do this in a future release? thanks

Maybe as an option as I think that would not be useful, especially on larger boards.

Boofo
27 Apr 2008, 03:30
Jeremy, by mutual, what exactly does that mean?

King Kovifor
27 Apr 2008, 03:32
Maybe as an option as I think that would not be useful, especially on larger boards.

I wouldn't make it automatic. I would always make it an option.

Jeremy, by mutual, what exactly does that mean?

The person goes on your buddy list (as the one defined that is), as well as you on theirs.

Boofo
27 Apr 2008, 03:34
Does it send out a notice to the new user that this has happened?

King Kovifor
27 Apr 2008, 03:35
Does it send out a notice to the new user that this has happened?

Nope. I based it off of MySpace, but I guess that is an easy addition to code. I will add this sometime next week. I will give you an option for this:
User Only (Default)
Admin & User
No Notification

Boofo
27 Apr 2008, 03:40
Sounds good. I was just thinking that a new member that doesn't know vb that well might not understand what the automation part is all about so they might not even know that a friend has been added.

King Kovifor
27 Apr 2008, 03:46
Sounds good. I was just thinking that a new member that doesn't know vb that well might not understand what the automation part is all about so they might not even know that a friend has been added.

The only problem with it would be is that I have the ability of multiple additions, so I would have to add them all to one PM. (And send separate PMs to those who were added).

Boofo
27 Apr 2008, 03:50
I guess I don't follow you. You could do it after a user verifies through email verification.

CHIPIT
27 Apr 2008, 03:50
Thanks
*Installed

King Kovifor
27 Apr 2008, 03:55
I guess I don't follow you. You could do it after a user verifies through email verification.

What do you mean? The modification runs with do=addmember (when it is actually "registered"). I do not limit on how many users you have automatically added to a members profile, and allow you to separate names using a comma. These are created into an array and they are systematically added to each other's friends list. My problem is that if I have 10 users in the array, I don't want to send the new member 10 different Private Messages saying "you are now friends with x". I would rather have it go something like this.

Dear New User,

The administrator has chosen to have the following members automatically added to a new member's friend list. So, the following users have been added to your friend list:
Username 1
Username 2
If you have any questions regarding this friendship, please contact a member of the administration.

Regards,
{Board Name} Staff

Obviously will be completely customizable.

Boofo
27 Apr 2008, 04:23
OK, but what happens if they do not validate with the email validation? I think it would be better to only add registered users as users who don't validate never make it back, or is that how it works already? I haven't looked at the code so sorry if I am missing something or not understanding.

King Kovifor
27 Apr 2008, 04:31
OK, but what happens if they do not validate with the email validation? I think it would be better to only add registered users as users who don't validate never make it back, or is that how it works already? I haven't looked at the code so sorry if I am missing something or not understanding.

Well not everyone uses Validation. I might add a check to see if validation is on and add it after that too.

Boofo
27 Apr 2008, 04:36
Validation is the best SPAM fighter vb has. ;)

Thank you for adding that in advance.

King Kovifor
27 Apr 2008, 04:42
Validation is the best SPAM fighter vb has. ;)

Thank you for adding that in advance.

Your welcome.

nightbloom
27 Apr 2008, 04:48
AK! Yeah, I would have to wait till after you add the post validation option as well. Gaming forums get mad spam. ^^

King Kovifor
27 Apr 2008, 04:58
AK! Yeah, I would have to wait till after you add the post validation option as well. Gaming forums get mad spam. ^^

Depending on how late I get home tomorrow, and how long it takes me to finish my homework, I will try to have this released by tomorrow night.

Boofo, the code is rather simple, it just runs a single query to add and two to update both persons friend counts. I spent about 45 minutes figuring that one out. But the validation is easy to implement as all I need to do is copy the code and add a check to the code that is in the product now. But I will also add version checking and product urls to the product XML.

Boofo
27 Apr 2008, 05:36
Sounds like a plan, sir. Looking forward to it. ;)

King Kovifor
27 Apr 2008, 06:12
Sounds like a plan, sir. Looking forward to it. ;)

It is allan but with me they don't seem to work the way they are planned. LOL. But while I am thinking about it, is there anything else someone would like to see added into this? I would be willing to add stuff to make this a much better modification. They just may come around in a 1.0.2 release instead of a 1.0.1 release.

Boofo
27 Apr 2008, 06:47
If you skip 1.0.1, then you get to answer a bunch of posts and pms asking what they missed in verion 1.0.1. ;)

GoTTi
27 Apr 2008, 08:23
cool mod, just what the doctor ordered :)

i dont care much about if the user validates their email address and then gets added to my list, myspace isnt like that. its all good. this could actually help me control spammers and pin-point them if i get any that have auto scripts that circumvent the vb system.

good job pal. thanks.

King Kovifor
27 Apr 2008, 14:52
cool mod, just what the doctor ordered :)

i dont care much about if the user validates their email address and then gets added to my list, myspace isnt like that. its all good. this could actually help me control spammers and pin-point them if i get any that have auto scripts that circumvent the vb system.

good job pal. thanks.

It was one of the easiest modifications I have ever written! Two simple queries makes life so much easier. And Boofo, that would be a great idea!

Bl4z3
27 Apr 2008, 15:29
Wait... you choose what usernames you want to be added to your list before they register?.....

Does it add every new user that registers to your list?

Phooey
27 Apr 2008, 16:27
Thank you! Great add-on!

/installed

GoTTi
27 Apr 2008, 17:43
Wait... you choose what usernames you want to be added to your list before they register?.....

Does it add every new user that registers to your list?


it will add every new registered user to the list of the userid you specify

sdfaheem
27 Apr 2008, 19:37
Do we need to input the Usergroup ID?

sensimilla
27 Apr 2008, 20:50
Thanks I was looking after :D

GoTTi
27 Apr 2008, 20:57
Do we need to input the Usergroup ID?

no, the userid of the person u want the additions to goto

King Kovifor
27 Apr 2008, 21:25
Wait... you choose what usernames you want to be added to your list before they register?.....

Does it add every new user that registers to your list?

You choose what users are automatically added to a new users profile (and making it mutual so that the new users are on the profile of who ever you specified).

Do we need to input the Usergroup ID?

No, this is based off of User IDs.

Bl4z3
27 Apr 2008, 23:03
You choose what users are automatically added to a new users profile (and making it mutual so that the new users are on the profile of who ever you specified).

Lmao, I read it the wrong way round, sorry :s

Oh, and great modification. I love it.

gertoo
28 Apr 2008, 02:11
Database error in vBulletin 3.7.0 Release Candidate 4:

Invalid SQL:
INSERT INTO userlist (userid, relationid, type, friend) VALUES (956, Admin, 'buddy', 'yes'), (Admin, 956, 'buddy', 'yes');

MySQL Error : Unknown column 'Admin' in 'field list'
Error Number : 1054

King Kovifor
28 Apr 2008, 12:23
Database error in vBulletin 3.7.0 Release Candidate 4:

Invalid SQL:
INSERT INTO userlist (userid, relationid, type, friend) VALUES (956, Admin, 'buddy', 'yes'), (Admin, 956, 'buddy', 'yes');

MySQL Error : Unknown column 'Admin' in 'field list'
Error Number : 1054

Admin is supposed to be a user id. Not username. Look at "Admin"'s profile and copy the number after u=.

traxxadd
28 Apr 2008, 13:15
Great hack thanks

Hornstar
28 Apr 2008, 14:25
cool, will install this when 3.7 goes gold, and hopefully the next version will be out by then ^^

mooncreek
28 Apr 2008, 16:07
LOL

I'm thinking of what alias I want to create to mess with new members.

Boofo
28 Apr 2008, 16:14
Admin is supposed to be a user id. Not username. Look at "Admin"'s profile and copy the number after u=.

That is because of your setting description. The "Separate usernames with a comma". ;)


Upon Registration, who would you like to be added as friends to the users friend list. This friendship is mutual! Separate usernames with a comma (i.e. 1,2,3)

setishock
28 Apr 2008, 19:00
Friends can see friends private albums. Private will become a moot point.

King Kovifor
28 Apr 2008, 20:15
That is because of your setting description. The "Separate usernames with a comma". ;)

Oops. Thanks! I will make that change now. I am thinking of adding a few more things...

Boofo
28 Apr 2008, 22:22
I just installed the new version and am curious, where is the code to send the PM?

King Kovifor
28 Apr 2008, 23:21
I just installed the new version and am curious, where is the code to send the PM?

Did I seriously forget that?! Wow. I feel like an idiot. But there probably is none (cause I did this release in a rush). I will add this maybe tonight, maybe tomorrow.

Boofo
29 Apr 2008, 00:03
Also, if it uses the activate_process hook, I would have it disable the other code as the queries do not need to run for the other hook.

Should I hold my breath now? ;)

King Kovifor
29 Apr 2008, 00:14
Also, if it uses the activate_process hook, I would have it disable the other code as the queries do not need to run for the other hook.

Should I hold my breath now? ;)

It does. The other code is only run when validateemail (which turns on the validation) is set to no. I really haven't had time to test this, so if any one notices problems, please let me know.

Boofo
29 Apr 2008, 00:17
I didn't see the code wrapped in the other hook is why I asked.

You didn't test this? Shame on you. ;)

King Kovifor
29 Apr 2008, 00:21
I didn't see the code wrapped in the other hook is why I asked.

You didn't test this? Shame on you. ;)

I didn't test as I knew that since it was the same code it would work, that validate email was a boolean so !$vbulletin->options['validateemail'] would allow the code to run. It is basically the same code as before, just with some new checks.

Boofo
29 Apr 2008, 04:25
Got a major problem with this now. It added me as a friend to the new user but this is what is shows now in the Friends tab:

Showing Friends 1 to 1 of 2

And this shows in the Friends Block but with only my avatar there and no other friends showing in the block:

Showing 1 of 2 Friend(s)

I am the only friend this new user has right now. It is also showing me as having 1 more friend than I actually have, too. I am uninstalling until this can be fixed, if it can.

King Kovifor
29 Apr 2008, 12:20
Got a major problem with this now. It added me as a friend to the new user but this is what is shows now in the Friends tab:



And this shows in the Friends Block but with only my avatar there and no other friends showing in the block:



I am the only friend this new user has right now. It is also showing me as having 1 more friend than I actually have, too. I am uninstalling until this can be fixed, if it can.

What is your configuration (unless of course the validate email didn't actually stop the code from running)?

Boofo
29 Apr 2008, 20:17
What do you mean? I just set the userid to 1.

I think it did as I was talking about earlier and ran both hooks.

King Kovifor
29 Apr 2008, 20:34
Guess Validate e-mail didn't stop it... Hm. Gotta look into that.

GoTTi
30 Apr 2008, 00:59
i upgraded to 3.7.0 today, but i am still getting a error that i think is caused by this mod...



Database error in vBulletin 3.7.0:
Invalid SQL:
INSERT INTO userlist (userid, relationid, type, friend) VALUES (, 1, 'buddy', 'yes');
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 1, 'buddy', 'yes')' at line 1
Error Number : 1064
Request Date : Tuesday, April 29th 2008 @ 01:11:23 PM
Error Date : Tuesday, April 29th 2008 @ 01:11:23 PM
Script : http://www.site.com/forums/register.php?do=activate
Referrer : http://www.site.com/forums/register.php?a=ver
IP Address : IP HERE
Username : USERNAME-HERE
Classname : vB_Database
MySQL Version :


ideas?

this error was emailed to me btw

GoTTi
30 Apr 2008, 01:00
and also, the new users that registered today were not added to my list.

Ryan Ashbrook
30 Apr 2008, 01:29
Been waiting for this, thanks. :)

King Kovifor
30 Apr 2008, 02:06
i upgraded to 3.7.0 today, but i am still getting a error that i think is caused by this mod...



Database error in vBulletin 3.7.0:
Invalid SQL:
INSERT INTO userlist (userid, relationid, type, friend) VALUES (, 1, 'buddy', 'yes');
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 1, 'buddy', 'yes')' at line 1
Error Number : 1064
Request Date : Tuesday, April 29th 2008 @ 01:11:23 PM
Error Date : Tuesday, April 29th 2008 @ 01:11:23 PM
Script : http://www.site.com/forums/register.php?do=activate
Referrer : http://www.site.com/forums/register.php?a=ver
IP Address : IP HERE
Username : USERNAME-HERE
Classname : vB_Database
MySQL Version :


ideas?

this error was emailed to me btw

Um... It seems like the user id is not added into the query. I guess $userid isn't available. Thanks for letting me know...

and also, the new users that registered today were not added to my list.

DId you turn the mutual setting on?

GoTTi
01 May 2008, 16:03
i have removed the mod. i am waiting for the fix for that error. do you want me to reinstall the mod and see if it duplicates? when will you be releasing the fixed version

GoTTi
01 May 2008, 16:14
ok when i click to activate account, i get taken to /register.php?a=act&u=486&i=XXXXX and i see that error again.

"Make This A Mutual Friendship" is set to yes.

King Kovifor
01 May 2008, 17:17
i have removed the mod. i am waiting for the fix for that error. do you want me to reinstall the mod and see if it duplicates? when will you be releasing the fixed version

Sorry to hear that, but I will be able to fix starting tomorrow. But I will be able to do it...

ok when i click to activate account, i get taken to /register.php?a=act&u=486&i=XXXXX and i see that error again.

"Make This A Mutual Friendship" is set to yes.

Thanks for the information. I guess that $userid isn't used within the validation code. I need to look into the userid variable that is used by default vBulletin code.

GoTTi
02 May 2008, 01:04
ok i have it uninstalled for now untill you get it fixed. lemme know. thanks.

King Kovifor
02 May 2008, 01:41
ok i have it uninstalled for now untill you get it fixed. lemme know. thanks.

At least I am getting the reports now. :) I am not going to code tonight, but will code tomorrow or this weekend. So you should have an update by monday.

egyptsons
02 May 2008, 02:20
what about old users ?
can I add them also to a special user?

GoTTi
02 May 2008, 06:23
cool beans pal. ur doing a great job. no rush

King Kovifor
02 May 2008, 12:16
what about old users ?
can I add them also to a special user?

Not yet. I haven't coded that into the product.

carrlos
03 May 2008, 04:57
Not working for me. Same problem as GoTTi. Let us know when it's ready. I really like this mod.

King Kovifor
03 May 2008, 16:25
I am working on it. I got what I think should work for PMs but it is giving me errors...

GoTTi
04 May 2008, 18:09
well post up what you have so far and lets see if the error duplicates

King Kovifor
04 May 2008, 20:59
well post up what you have so far and lets see if the error duplicates

I haven't actually touched that code. And registration just gives a blank page...

carrlos
06 May 2008, 04:37
I say just forget the email registration. Just make the friendship mutual like on MySpace and be done with it. That was the whole idea in the beginning. If the new member doesn't want to be friends, he/she can just delete the person (again, a la MySpace).

My two cents!

King Kovifor
06 May 2008, 21:13
I say just forget the email registration. Just make the friendship mutual like on MySpace and be done with it. That was the whole idea in the beginning. If the new member doesn't want to be friends, he/she can just delete the person (again, a la MySpace).

My two cents!

That is now a working option. You can turn that on/off as you please (and I feel that users requiring validation shouldn't be added as friends till AFTER validation occurs; so that needs fixed.).

gamerfu
06 May 2008, 21:36
security tokens? i will be watching this thread!

King Kovifor
07 May 2008, 12:28
security tokens? i will be watching this thread!

It shouldn't need any. Are you getting the error?

GoTTi
08 May 2008, 01:59
when you re-releasing this king, im eager for this already :)

King Kovifor
08 May 2008, 03:24
when you re-releasing this king, im eager for this already :)

Let's say when I get some time. As I have been pretty much non stop school for the past week and have been attempting to meet a deadline for a project which has taken up my free time. Depending on whether or not I can sit down and do it on Friday, Saturday, or Sunday.

moger
08 May 2008, 23:34
ok installed and i get this error everytime someone signs up...and noone is added as friends....

Database error in vBulletin 3.7.0:
Invalid SQL:INSERT INTO userlist (userid, relationid, type, friend) VALUES (96, bugzy, 'buddy', 'yes');
MySQL Error : Unknown column 'bugzy' in 'field list'Error Number : 1054
Request Date : Thursday, May 8th 2008 @ 05:19:11 PM
Error Date : Thursday, May 8th 2008 @ 05:19:11 PM
Script : http://mysite.com/register.php?do=addmember
Referrer : http://mysite.com/register.php?do=addmember
IP Address : 84.**.***.**
Username : LORANS
Classname : vb_database
MySQL Version :

is this a part of the problens that you are fixing??

King Kovifor
09 May 2008, 21:27
ok installed and i get this error everytime someone signs up...and noone is added as friends....

Database error in vBulletin 3.7.0:
Invalid SQL:INSERT INTO userlist (userid, relationid, type, friend) VALUES (96, bugzy, 'buddy', 'yes');
MySQL Error : Unknown column 'bugzy' in 'field list'Error Number : 1054
Request Date : Thursday, May 8th 2008 @ 05:19:11 PM
Error Date : Thursday, May 8th 2008 @ 05:19:11 PM
Script : http://mysite.com/register.php?do=addmember
Referrer : http://mysite.com/register.php?do=addmember
IP Address : 84.**.***.**
Username : LORANS
Classname : vb_database
MySQL Version :

is this a part of the problens that you are fixing??

Within the Administrators CP, you don't want to set "Bugzy" to be added as friends. You want to use "Bugzy"'s user ID.

indie2industry
12 May 2008, 03:50
testing it now


*edit*

Seems to work fine.

Stubbed
12 May 2008, 09:41
This mod has a lot of promise! I'll be installing it when I can do a mass query to add everyone to a friends list...

:)

King Kovifor
13 May 2008, 02:41
This mod has a lot of promise! I'll be installing it when I can do a mass query to add everyone to a friends list...

:)

That may be a few versions away.

gettingbetter
13 May 2008, 12:49
Any progress King? I had to uninstall mine due to the MySQL Syntax Error that other people have been getting, but would love to install this one soon! :)

Thanks for the hard work.

King Kovifor
13 May 2008, 20:27
Any progress King? I had to uninstall mine due to the MySQL Syntax Error that other people have been getting, but would love to install this one soon! :)

Thanks for the hard work.

I have some free time today, and will be attempting to finish the update.

Conner85
16 May 2008, 15:48
Any news on the database error? 'Cause I'm getting the same thing as the others. And I have to keep email validation on because of another hack I installed. Any news would be awesome.

King Kovifor
16 May 2008, 20:23
Any news on the database error? 'Cause I'm getting the same thing as the others. And I have to keep email validation on because of another hack I installed. Any news would be awesome.

As I finished the class last night that took up all my time, I have to do one more thing for the class today, but after today I will be devoting a lot of time to finishing this. ;) So hopefully tomorrow night. But don't hold me on that.

EDIT: Hopefully by monday night. As I am having troubles with the data manager class.

Conner85
18 May 2008, 00:15
That's awesome. I'll keep checking back to see if you have anything new on this. Thanks a lot for being as informing as you are.

Zaiaku
18 May 2008, 01:42
OK Needing this mod now so keeping an eye on it when the fixes are done.

King Kovifor
25 May 2008, 03:13
For your information, I have given the new version to a beta tester.

TheInsaneManiac
28 May 2008, 18:48
It is allan but with me they don't seem to work the way they are planned. LOL. But while I am thinking about it, is there anything else someone would like to see added into this? I would be willing to add stuff to make this a much better modification. They just may come around in a 1.0.2 release instead of a 1.0.1 release.
An option to mass add all members to your buddy list. Since you seem to be forgetful make sure to add a check to verify if a member is already on your buddy list. Also you have been going off and on about releasing a new version for a month now, but nothing has been out yet.

King Kovifor
29 May 2008, 02:21
An option to mass add all members to your buddy list. Since you seem to be forgetful make sure to add a check to verify if a member is already on your buddy list. Also you have been going off and on about releasing a new version for a month now, but nothing has been out yet.

Yeah. Haven't been home much. But I am having problems with permissions. So I need to get that fixed. Gotti confirmed that one... :(

carrlos
29 May 2008, 02:42
Maybe another coder can take a look at this and help out. I've seen so many repeated hacks on vbulletin.org. I can't believe no one else is trying to do this. It obviously is a great hack but no one (who is capable) seems to be interested in doing it.

I guess I will keep holding out hope......

King Kovifor
30 May 2008, 00:24
I will ask for more help as these permissions are killing me... :(

TheInsaneManiac
01 Jun 2008, 06:59
I will ask for more help as these permissions are killing me... :(
Please and thank you.

Greg-J
04 Jun 2008, 00:15
I fail to see the point in this mod for established forums. Why would I want all the new members that I don't know to be my friends (or I to be theirs) and not all the existing members?

If you're worried about having to do them all at once, hook it to the login. When a user logs in, check to see if the admin userids are their friends. If not, add it.

King Kovifor
04 Jun 2008, 00:21
I fail to see the point in this mod for established forums. Why would I want all the new members that I don't know to be my friends (or I to be theirs) and not all the existing members?

If you're worried about having to do them all at once, hook it to the login. When a user logs in, check to see if the admin userids are their friends. If not, add it.

That's not a bad Idea. I may code that sooner or later. Maybe after this version... I need to get it out.

carrlos
04 Jun 2008, 03:12
... I need to get it out.

Please!!!!!!!! ;)

RedeemedWarrior
04 Jun 2008, 13:44
i use it.. its not bad :D

King Kovifor
04 Jun 2008, 22:15
i use it.. its not bad :D

Only if you don't use Email Validation.

goddess_dix
05 Jun 2008, 18:35
i've been watching this one...in terms of feature requests, i'd be interested in

1. making it a friend request, not automatic add to friends list, although this is not a huge deal.

2. resolution of issues with email validation, as my forum requires it and turning it off would be a dealbreaker for me.

3. some instructions on at least a manual query that could be run to add the friend request for existing site members.

i do think this is a very cool idea, and think we could have some fun with it on my forum, as i had a few ideas for how i might use it. i also think it would be a nice way to get the members more involved in the new social networking features.

regardless, thank you for your work. :)

skariko
05 Jun 2008, 20:17
It give me a database error when i try to validate the registration with the link.

Invalid SQL:
INSERT INTO userlist (userid, relationid, type, friend) VALUES (, 7903, 'buddy', 'yes');

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 7903, 'buddy', 'yes')' at line 1

volarium
05 Jun 2008, 22:46
Is it possible to modify the usergroup that this modules uses to add friends? In other words, I don't want to add a new friend to new users of the "Registered" usergroup. Instead, I want to add a new friend to anyone who joins the "Subscriber" usergroup (or similar). Is it possible to just modify the code and change the usergroup number to accomplish this?

King Kovifor
05 Jun 2008, 22:54
i've been watching this one...in terms of feature requests, i'd be interested in

1. making it a friend request, not automatic add to friends list, although this is not a huge deal.

2. resolution of issues with email validation, as my forum requires it and turning it off would be a dealbreaker for me.

3. some instructions on at least a manual query that could be run to add the friend request for existing site members.

i do think this is a very cool idea, and think we could have some fun with it on my forum, as i had a few ideas for how i might use it. i also think it would be a nice way to get the members more involved in the new social networking features.

regardless, thank you for your work. :)

1. I might code this for the next major version.

2. I need to finish that update. :(

3. I will be coding that for the next major version, as it isn't a single query. It requires 2 queries per every user you are adding.

It give me a database error when i try to validate the registration with the link.

Invalid SQL:
INSERT INTO userlist (userid, relationid, type, friend) VALUES (, 7903, 'buddy', 'yes');

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 7903, 'buddy', 'yes')' at line 1

I know of this error and am attempting to fix it...

Is it possible to modify the usergroup that this modules uses to add friends? In other words, I don't want to add a new friend to new users of the "Registered" usergroup. Instead, I want to add a new friend to anyone who joins the "Subscriber" usergroup (or similar). Is it possible to just modify the code and change the usergroup number to accomplish this?

That would require major modifications... Since changing groups can be done in several ways.

Taragon
06 Jun 2008, 19:09
... by adding any number of users (user IDs required) to the new users friend list.

Im not really sure if I understand correct.
Would it be possible to use this product exactly like Tom?
Say Im Tom (administrator), and Id like to have everyone automatically added to my friends list after they have registered?

King Kovifor
06 Jun 2008, 20:20
This is what's supposed to happen. If you have email validation turned on it doesn't work correctly for now.

You have to add your user id to that option.

WiseOne38221
07 Jun 2008, 01:12
I tried this and it does not work with 3.7.0

:(

King Kovifor
07 Jun 2008, 04:30
I tried this and it does not work with 3.7.0

:(

Do you use email validation?

bdude
07 Jun 2008, 07:51
Thanks, this is a fabulous mod!

cykelmyggen
08 Jun 2008, 18:05
Hi
Great hack, but I got this error on the first time new users signed up on my forum: Anything I can do about it:

Database error in vBulletin 3.7.1:

Invalid SQL:

INSERT INTO vbuserlist (userid, relationid, type, friend) VALUES (, 5, 'buddy', 'yes');

MySQL Error : You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near ' 5,
'buddy', 'yes')' at line 1
Error Number : 1064
Request Date : Sunday, June 8th 2008 @ 04:20:26 PM
Error Date : Sunday, June 8th 2008 @ 04:20:27 PM
Script : http://www.boggnasker.dk/vbforum/register.php?a=act&u=852&i=78043473
Referrer :
IP Address : XXXXXXXXXXX
Username : Jofa
Classname : XX_database
MySQL Version :

King Kovifor
08 Jun 2008, 18:12
Hi
Great hack, but I got this error on the first time new users signed up on my forum: Anything I can do about it:

Database error in vBulletin 3.7.1:

Invalid SQL:

INSERT INTO vbuserlist (userid, relationid, type, friend) VALUES (, 5, 'buddy', 'yes');

MySQL Error : You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near ' 5,
'buddy', 'yes')' at line 1
Error Number : 1064
Request Date : Sunday, June 8th 2008 @ 04:20:26 PM
Error Date : Sunday, June 8th 2008 @ 04:20:27 PM
Script : http://www.boggnasker.dk/vbforum/register.php?a=act&u=852&i=78043473
Referrer :
IP Address : XXXXXXXXXXX
Username : Jofa
Classname : XX_database
MySQL Version :

Caused by you requiring email activation.

cykelmyggen
08 Jun 2008, 18:42
Hi
Great hack, but I got this error on the first time new users signed up on my forum: Anything I can do about it:

Database error in vBulletin 3.7.1:

Invalid SQL:

INSERT INTO vbuserlist (userid, relationid, type, friend) VALUES (, 5, 'buddy', 'yes');

MySQL Error : You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near ' 5,
'buddy', 'yes')' at line 1
Error Number : 1064
Request Date : Sunday, June 8th 2008 @ 04:20:26 PM
Error Date : Sunday, June 8th 2008 @ 04:20:27 PM
Script : http://www.boggnasker.dk/vbforum/register.php?a=act&u=852&i=78043473
Referrer :
IP Address : XXXXXXXXXXX
Username : Jofa
Classname : XX_database
MySQL Version :

Just saw the posts about email-registration. Any chance this will work with email-reg. turned on in the future?

King Kovifor
08 Jun 2008, 18:45
Just saw the posts about email-registration. Any chance this will work with email-reg. turned on in the future?

Absolutely. v1.0.2 will include this fix.

cykelmyggen
08 Jun 2008, 18:59
Absolutely. v1.0.2 will include this fix.
Sounds great, I'll be looking forward to 1.0.2 :up:

King Kovifor
08 Jun 2008, 20:55
Sounds great, I'll be looking forward to 1.0.2 :up:

You and everyone else... Maybe when I am not so sick I will finally get this finished.

TimberFloorAu
09 Jun 2008, 22:56
Perhaps I sound a bit thick, but it doesnt seem to work.

Correct me if I am wrong.

MySpace Tom, is added immediately without notification to your friends list.

Hence this is what we thought this mod would do.
With the option, to get shot of Tom, if he didnt fit your friend circle.

However, this mod, seems to just send a pm, to new registered users, inviting them to be your friend.

Not quite what we had in mind, will leave mod on the boards, and follow this mod for the short term.

Ozzy

King Kovifor
09 Jun 2008, 23:38
Perhaps I sound a bit thick, but it doesnt seem to work.

Correct me if I am wrong.

MySpace Tom, is added immediately without notification to your friends list.

Hence this is what we thought this mod would do.
With the option, to get shot of Tom, if he didnt fit your friend circle.

However, this mod, seems to just send a pm, to new registered users, inviting them to be your friend.

Not quite what we had in mind, will leave mod on the boards, and follow this mod for the short term.

Ozzy

What do you mean? Right now, no PM is sent, but what ever users you define are added (when not using email validation).

TimberFloorAu
09 Jun 2008, 23:40
What do you mean? Right now, no PM is sent, but what ever users you define are added (when not using email validation).

Not on ours they are not.

We have added the auto friends id in the options menu.

Zilch !

Must be conflicting with a n other mod :(

TheInsaneManiac
10 Jun 2008, 00:14
An option to mass add all members to your buddy list. Since you seem to be forgetful make sure to add a check to verify if a member is already on your buddy list. Also you have been going off and on about releasing a new version for a month now, but nothing has been out yet.

Still waiting...

King Kovifor
10 Jun 2008, 03:37
Not on ours they are not.

We have added the auto friends id in the options menu.

Zilch !

Must be conflicting with a n other mod :(

Hm. Can you send me a PM for me to look into it?

Still waiting...

I know. Hopefully soon.

ti07shadow
11 Jun 2008, 09:25
See I thought this was a great mod, but the known mysql errofor emal activations really caused a issue, and I cant have that. but I love the mod, and hope that bug gtes fixed in the future! (man that bug was a menace...)

TheInsaneManiac
13 Jun 2008, 07:15
Hm. Can you send me a PM for me to look into it?



I know. Hopefully soon.
I hope it's real soon, I wish you would just release a mod that would add everyone to your buddy list lol.

King Kovifor
14 Jun 2008, 03:39
I hope it's real soon, I wish you would just release a mod that would add everyone to your buddy list lol.

That's a planned feature... :) But since it is more of a tool, I may think about it as a separate mod.

Captain Tycoon
14 Jun 2008, 22:37
Marked and Installed! Working Perfectly!

Megatr0n
16 Jun 2008, 01:17
King Kovifor,

Hack installed and three new people signed upto my site today. When I clicked on their profiles, I was not showing on their friends list by default. I double checked my UserID and it is the one I inserted under User Registration options.

Any ideas?

King Kovifor
16 Jun 2008, 01:27
King Kovifor,

Hack installed and three new people signed upto my site today. When I clicked on their profiles, I was not showing on their friends list by default. I double checked my UserID and it is the one I inserted under User Registration options.

Any ideas?

Do you use email validation?

Megatr0n
16 Jun 2008, 13:14
You mean where users have to confirm their e-mail addresses before they can post?

I do.

King Kovifor
16 Jun 2008, 15:15
You mean where users have to confirm their e-mail addresses before they can post?

I do.

Can you check your email and see if you have been getting mySQL errors? As this is most likely the cause as there were problems with Email Validation.

Megatr0n
16 Jun 2008, 16:04
No, errors.

You can take a look yourself if you want?

King Kovifor
16 Jun 2008, 16:11
Odd, as email validation has mysql errors...

Megatr0n
16 Jun 2008, 16:33
Do you want me to PM you e-mail adminCP details?

King Kovifor
16 Jun 2008, 20:30
I probably won't have time to look into it.

Megatr0n
16 Jun 2008, 22:37
OK, so this hack only works if users don't have to verify their e-mail?

I read in an earlier post it won't work if it's switched on?

xxalexkimxx
16 Jun 2008, 22:38
Installed today, thanks

King Kovifor
17 Jun 2008, 01:22
OK, so this hack only works if users don't have to verify their e-mail?

I read in an earlier post it won't work if it's switched on?

Correct, as of right now it does not work if Email Validation is on.

carrlos
17 Jun 2008, 06:04
.....as of right now it does not work if Email Validation is on.
And it appears that it never will...........:(

King Kovifor
17 Jun 2008, 15:00
And it appears that it never will...........:(

Soon. Once I sit down to write to check variables (I think they are right) and get some stupid permissions fixed.

Megatr0n
17 Jun 2008, 16:10
Uninstalled until the fix is enabled.

Tagged in the meantime.

OsideRida06
29 Jun 2008, 06:12
I will be waiting for it to get fixed for email validation as well.

Boofo
29 Jun 2008, 06:31
Soon. Once I sit down to write to check variables (I think they are right) and get some stupid permissions fixed.

Or you could break down and ask for some help with the issues.

nightbloom
29 Jun 2008, 06:34
Yes, Id really like this to work.

ASK FOR HELP!

King Kovifor
29 Jun 2008, 15:58
Yes, Id really like this to work.

ASK FOR HELP!

I have, the person had no idea what was wrong. We have narrowed it down to permissions somehow being set to no (which I might just change manually).

blogcrash
11 Jul 2008, 00:56
I will be waiting for it to get fixed for email validation as well.

Me to :(

Phooey
12 Aug 2008, 23:24
I'll have this installed the second that it works with email verification.

patsfans
14 Aug 2008, 15:01
I also had the same problem, with 30+ registrations piling up that I had to manually go in and activate as e-mail confirmations are definitely a problem. But keep your chin up, because this is an excellent idea and I look forward to seeing it after you modify it! :D

Greek76
16 Aug 2008, 01:37
I wish I would of read about the email msql errors lol. I tested it out myself and saw the problems.

King Kovifor
16 Aug 2008, 20:39
Yeah. My time is super limited now, so it may take a bit longer...

GoTTi
31 Aug 2008, 21:01
yo you got any time to finish this mod up?

King Kovifor
01 Sep 2008, 03:52
yo you got any time to finish this mod up?

Right now, no. But hopefully I will soon.

seax19
05 Sep 2008, 21:04
Count me among those eagerly awaiting just the simple element of auto-add Administrator to ALL registered users friends lists. That's all I really want it to do, but again, I can't use it now as email validation during signup on our system is a must

JesusLiv3s
06 Sep 2008, 00:49
The auto-add all current users is a feature I am looking for. E-mail validation is NOT a must at this point, at least for me.

Can you release a version that works WITHOUT e-mail validation that will allow the auto-add?

It's been months since you released the first version, I'm a bit disappointed at how long it's taken, but I'm willing to wait if you can promise me your working on it.

Budget101
25 Sep 2008, 14:06
Great idea, but didnt work at all, not for previously existing users, not for new registrations.

djxcee
17 Oct 2008, 05:57
I'm hoping you can email validation problem fixed soon.
This is an add I would love for soon to be live community/site.

carrlos
17 Oct 2008, 06:04
This hack appears to be dead. :rolleyes:

King Kovifor
17 Oct 2008, 20:27
This hack appears to be dead. :rolleyes:

It appears I have a life that takes up to much time.

carrlos
17 Oct 2008, 21:00
It appears I have a life that takes up to much time.

I can totally understand that. But maybe a note that this will no longer be pursued would be good for those that are waiting. Maybe even close the thread..... ;)

djxcee
17 Oct 2008, 22:55
It appears I have a life that takes up to much time.
Maybe someone else can take over?

King Kovifor
18 Oct 2008, 20:46
I can totally understand that. But maybe a note that this will no longer be pursued would be good for those that are waiting. Maybe even close the thread..... ;)

Maybe someone else can take over?

It will be completed as soon as I can. :( The time I have is limited. :(

galenwollenberg
27 Oct 2008, 21:49
broke my new user email registration activation code system. 3.7.3. new user would get this error page on clicking the activation link in the email, but not be moved into Registered Users group

Database error in vBulletin 3.7.3:

Invalid SQL:
INSERT INTO vb_userlist (userid, relationid, type, friend) VALUES (, 1, 'buddy', 'yes');

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 1, 'buddy', 'yes')' at line 1
Error Number : 1064
Request Date : Monday, October 27th 2008 @ 12:41:54 PM
Error Date : Monday, October 27th 2008 @ 12:41:55 PM
Script : http://cleanboxentertainment.com/vb/register.php?a=act&u=229&i=84073303
MySQL Version : 4.1.21-Max-log

disabling the plugin fixed it

carrlos
27 Oct 2008, 22:31
If you read the thread, you would have seen that this bug is already known. This only works without email registration activation.

King Kovifor
28 Oct 2008, 01:04
broke my new user email registration activation code system. 3.7.3. new user would get this error page on clicking the activation link in the email, but not be moved into Registered Users group

Database error in vBulletin 3.7.3:

Invalid SQL:
INSERT INTO vb_userlist (userid, relationid, type, friend) VALUES (, 1, 'buddy', 'yes');

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 1, 'buddy', 'yes')' at line 1
Error Number : 1064
Request Date : Monday, October 27th 2008 @ 12:41:54 PM
Error Date : Monday, October 27th 2008 @ 12:41:55 PM
Script : http://cleanboxentertainment.com/vb/register.php?a=act&u=229&i=84073303
MySQL Version : 4.1.21-Max-log

disabling the plugin fixed it

Sorry, known bug. I really really really need to finish this. * I need to get a life in coding again *.

karlm
31 Oct 2008, 04:16
Hi KK,

Have you managed to get anywhere towards amending this bug as yet? It's a great addon - but unusable in it's current state, sadly. I look forward to reinstalling it :)

King Kovifor
31 Oct 2008, 18:53
Hi KK,

Have you managed to get anywhere towards amending this bug as yet? It's a great addon - but unusable in it's current state, sadly. I look forward to reinstalling it :)

The code is somewhere on my computer.

ChaosBurnt
10 Nov 2008, 10:28
Uninstalled sadly, shame, it's a great idea but messing up new registrations is a totally unacceptable bug.

King Kovifor
10 Nov 2008, 20:37
I'll try to have a working fix before the month's out.

iNRoC
15 Nov 2008, 16:51
Thanks. Installed.

kalleklorin
04 Dec 2008, 00:26
interesting

joh
06 Dec 2008, 17:12
is it safe to reinstall this mod.
has the bug been fix seen that we are now in December.

King Kovifor
06 Dec 2008, 19:57
is it safe to reinstall this mod.
has the bug been fix seen that we are now in December.

no update has been released yet.

TigerC10
13 Dec 2008, 04:48
Sorry, known bug. I really really really need to finish this. * I need to get a life in coding again *.

Yeah... Well, since people want the fix here's the only problem...


$userid


I'm sure you used that for good reason, and later on in the plugin code you also (correctly) use


$userinfo[userid]


That's the same thing... So swapping them out resulted in the fix (I tested it, works great). In order to make this compatable with the e-mail activation here's the plugin code:





Plugin: Add Friend After Validation
Hook: register_activate_process

if(!empty($vbulletin->options['kk_auto_friends']))
{
$friends = explode(',', $vbulletin->options['kk_auto_friends']);

foreach($friends AS $friendid)
{
$db->query("INSERT INTO " . TABLE_PREFIX . "userlist (userid, relationid, type, friend) VALUES ({$userinfo['userid']}, {$friendid}, 'buddy', 'yes')");
if($vbulletin->options['kk_auto_friends_mutual'])
{
$db->query("INSERT INTO " . TABLE_PREFIX . "userlist (userid, relationid, type, friend) VALUES ({$friendid}, {$userinfo['userid']}, 'buddy', 'yes')");
}
$db->query_write("UPDATE " . TABLE_PREFIX . "user SET friendcount = friendcount + 1 WHERE userid IN ($userinfo[userid], " . $vbulletin->userinfo['userid'] . ")");
$db->query_write("UPDATE " . TABLE_PREFIX . "user SET friendcount = friendcount + 1 WHERE userid={$friendid}");
}
}





Plugin: Automatically Add Friend
Hook: register_addmember_complete

if(!empty($vbulletin->options['kk_auto_friends']) && !$vbulletin->options['verifyemail'])
{
$friends = explode(',', $vbulletin->options['kk_auto_friends']);
foreach($friends AS $friendid)
{
$db->query("INSERT INTO " . TABLE_PREFIX . "userlist (userid, relationid, type, friend) VALUES ({$userinfo['userid']}, {$friendid}, 'buddy', 'yes')");
if($vbulletin->options['kk_auto_friends_mutual'])
{
$db->query("INSERT INTO " . TABLE_PREFIX . "userlist (userid, relationid, type, friend) VALUES ({$friendid}, {$userinfo['userid']}, 'buddy', 'yes')");
}
$db->query_write("UPDATE " . TABLE_PREFIX . "user SET friendcount = friendcount + 1 WHERE userid IN ($userinfo[userid], " . $vbulletin->userinfo['userid'] . ")");
$db->query_write("UPDATE " . TABLE_PREFIX . "user SET friendcount = friendcount + 1 WHERE userid={$friendid}");
}
}





Cheers on the great mod, King Kovifor. :)

nightbloom
14 Dec 2008, 05:24
Yeah... Well, since people want the fix here's the only problem...


$userid
I'm sure you used that for good reason, but later on in the plugin code you also use


$userinfo[userid]
That's the same thing... So swapping them out resulted in the fix (I tested it, works great).

So you just find all the instances of $userinfo[userid] and replace with $userid or the other way around in the product xml?. >< I'm a little newbish at this and I wanna make this mod work. I have had this thread tagged since it was opened.

TigerC10
14 Dec 2008, 18:39
The other way around (find all instances of $userid and replace with $userinfo[userid]), I put the code brackets in my post containing the exact code I used to get it working with e-mail activation. If you go to your plugin manager you can find them and just copy/paste the code from my example.

nightbloom
15 Dec 2008, 17:05
FOr some reason, when I add this, i get no ACP settings... =.= I installed, uninstalled, etc... Nothing. Grrrrrrr.... I really want this to work.

TigerC10
15 Dec 2008, 18:41
Are you sure? The admin options are under "User Registration Options", it's not separated out to its own section...

King Kovifor
17 Dec 2008, 02:32
FOr some reason, when I add this, i get no ACP settings... =.= I installed, uninstalled, etc... Nothing. Grrrrrrr.... I really want this to work.

I added them to a previous category as it is an add-on to specific features. They should appear in "User Registration Options" as TigerC10 has already noted.

Are you sure? The admin options are under "User Registration Options", it's not separated out to its own section...

Thanks for replying.

TigerC10
17 Dec 2008, 05:49
Thanks for replying.

What about the bug fix? I mean, it does fix it for me and I know a bunch of people uninstalled this because of that bug.

King Kovifor
17 Dec 2008, 20:43
Like I said, I will have time in the coming weeks to release the fixed version.

TigerC10
18 Dec 2008, 05:00
Like I said, I will have time in the coming weeks to release the fixed version.

But... I... Gave you the fix. How would it take you weeks to get to?

King Kovifor
18 Dec 2008, 21:37
But... I... Gave you the fix. How would it take you weeks to get to?

It won't take me weeks. I am done with school on Tuesday. That will be my planned upgrade week. Next week. This product, and at least 2 others.

TheInsaneManiac
22 Dec 2008, 06:11
What was in the update that just came out?

King Kovifor
22 Dec 2008, 23:45
What was in the update that just came out?

The link in the update email fixes the problems with email activation.

buyinflatables
30 Dec 2008, 03:50
I installed it... and new members sign on.. and neither they or I have them listed as friends?

What's up with it?

Checked the settings and all seems to be okay

King Kovifor
30 Dec 2008, 05:33
If you followed the instructions, it should work just fine...

TandyServices
30 Dec 2008, 22:24
Re-installed.. Thanks works great now.. Will be looking for more patches.. Again good work..

Jasmin
02 Jan 2009, 00:44
The link in the update email fixes the problems with email activation.

I think this is a great mod! :) Can you share the link here?

I just installed this the other day, so I don't have the benefit of the update email that was sent. I see that the version in this thread is still very old, not the December version.

I followed instructions w/the current version posted in this thread the other day, but, sadly it doesn't work. I get the same database error everyone else used to get.

TigerC10
02 Jan 2009, 04:25
@Jasmin - I posted the fix on page 17 (http://www.vbulletin.org/forum/showpost.php?p=1684273&postcount=165). I included the plugin code at the bottom, just edit the plugins and change the code to what I put at the bottom of my post.

Jasmin
02 Jan 2009, 19:13
@Jasmin - I posted the fix on page 17 (http://www.vbulletin.org/forum/showpost.php?p=1684273&postcount=165). I included the plugin code at the bottom, just edit the plugins and change the code to what I put at the bottom of my post.

Oh, ok. I thought they implied up there that he issued a new .xml with all that stuff included so I didn't have to mess w/it.

Thanks, though. I'll try this. :)

TigerC10
02 Jan 2009, 19:25
Yeah, I'm not sure why he didn't change the XML file - perhaps he did and it's being reviewed for approval right now.

buyinflatables
02 Jan 2009, 23:08
Thank you TigerC10... Followed your instructions and examples and it now works!

Thank you again!!

King Kovifor
02 Jan 2009, 23:41
Yeah, I'm not sure why he didn't change the XML file - perhaps he did and it's being reviewed for approval right now.

I just haven't gotten around to installing it on a dev server and adding the patch.

Stubbed
12 Jan 2009, 01:05
How is getting around to installing it on a Dev server King Kovifor?

I'll be keen to run this on 3.8, but require the option to add all current members as friends..

King Kovifor
13 Jan 2009, 22:53
How is getting around to installing it on a Dev server King Kovifor?

I'll be keen to run this on 3.8, but require the option to add all current members as friends..

It's been installed, but a package is not ready.

Shaliza
15 Jan 2009, 04:03
Nice mod! Thanks. =)

Nadavy
18 Jan 2009, 21:08
This mod was actually restricting users from being able to confirm their emails on my forums :(

King Kovifor
19 Jan 2009, 01:44
This mod was actually restricting users from being able to confirm their emails on my forums :(

Odd. I wouldn't know why as I only do so on email verification (after it's been verified) and on the add member process.

TigerC10
20 Jan 2009, 00:30
This mod was actually restricting users from being able to confirm their emails on my forums :(

Odd. I wouldn't know why as I only do so on email verification (after it's been verified) and on the add member process.

Isn't that the widely known bug? It seems obvious to me that Nadavy didn't apply the fixes that I supplied to you, King Kovifor (since you still haven't put the patches in the XML file, I'm sure a lot of people are downloading that without reading through the posts for the fix).

King Kovifor
20 Jan 2009, 01:16
Isn't that the widely known bug? It seems obvious to me that Nadavy didn't apply the fixes that I supplied to you, King Kovifor (since you still haven't put the patches in the XML file, I'm sure a lot of people are downloading that without reading through the posts for the fix).

The bug was email validation not adding friends correctly (or whatever), but it wasn't as he said. I've never had a report of that.

GCC LLC
20 Jan 2009, 02:51
Installed but its not sending a notification to the user when its not mutual...or mutual for that matter. any ideas?

sensimilla
20 Jan 2009, 12:08
Its not working for me on vb 3.8 , any ideas ? TIA

King Kovifor
20 Jan 2009, 22:06
I will try to check this out later.

TigerC10
22 Jan 2009, 06:26
The bug was email validation not adding friends correctly (or whatever), but it wasn't as he said. I've never had a report of that.

Well consider this your second report of that, then. When I had e-mail activation enabled with your original version, I encountered a database error which would not allow someone to validate the e-mail link. Every time the link was clicked, database error. No move from the "awaiting activation" group. When I was coming up with the fix, I encountered this a lot of times. I would click the link again, and it would complain that the activation link wasn't valid. I would have to re-send the activation link and eventually when I finished the fix it worked fine.

Maybe something changed in the error handling code for vB between the version that you developed this on and 3.7.5, but when people were complaining about how this plugin didn't work and when some people complained (http://www.vbulletin.org/forum/showthread.php?p=1654038#post1654038) that it broke their board (http://www.vbulletin.org/forum/showthread.php?p=1662820#post1662820) - I thought you knew about it.


Its not working for me on vb 3.8 , any ideas ? TIA

It works for me on 3.8, apply the fixes mentioned on page 17 (http://www.vbulletin.org/forum/showthread.php?p=1684273#post1684273) of this thread and it should work for you too.

MrBig
08 Feb 2009, 03:35
how do i delete friends if its a large amount , i have over 4,000+ since i installed it and i would like to delete them and start fresh , and ideas besides doing it manually?

King Kovifor
08 Feb 2009, 04:10
Not a clue. I don't think you can prune friends. Sadly, that's a disadvantage of this modification.

MrBig
09 Feb 2009, 03:51
Not a clue. I don't think you can prune friends. Sadly, that's a disadvantage of this modification.

thanks for the quick reply , hopefully someone finds this that can help :(

TigerC10
09 Feb 2009, 07:53
MrBig, you can query the database yourself. If you've set your permissions properly (in the config.php file, look for $config['SpecialUsers']['canrunqueries'] and make sure your userID is allowed), then in the AdminCP at the bottom under the "Maintenance" section, go to "Execute Database Query".

It goes without saying that you should make a database back up before doing this, just in case something goes wrong. This code is untested, but should work. Be 100% sure that you get a database backup before trying this.

Reset your friend count

UPDATE vb_user SET friendcount="0" WHERE userid="1"


Delete all friends from your list

DELETE FROM vb_userlist WHERE userid="1" AND type="buddy" AND friend="yes"

---------------------------------------------------------------------------

Reduce friend counts from everyone else that lists you as a friend

UPDATE vb_user LEFT JOIN vb_userlist ON vb_user.userid = vb_userlist.userid SET vb_user.friendcount = vb_user.friendcount-1 WHERE vb_userlist.relationid="1"


Delete yourself from everyone else's friend lists

DELETE FROM vb_userlist WHERE relationid="1" AND type="buddy" and friend="yes"


Of course, replace "vb_" with your table prefix, or delete it if you don't have a table prefix. And replace the 1 with your userid, assuming you're not userid 1 (don't forget to change the "relationid" variables away from 1). The first two and the last two must be done together as pairs, but you do not have to do all 4 of them. If you just want to clear YOUR friend list, and still let other people list you as a friend, just do the first two.


Then go to your trusty Maintenance section, and open the "Update Counters" page, and "Fix Broken Profiles" (this is just in case - it shouldn't have an effect, I don't think it even resets the friend counts properly).




@King Kovifor - Maybe adding in a friend establisher/resetter feature would be good. I know some people complained (http://www.vbulletin.org/forum/showthread.php?p=1500271#post1500271) when it didn't retroactively make friendships for existing users. And here you see MrBig wants to be able to start fresh on his friend list. You need to update the .xml file because of the e-mail activation bug anyway - might as well just throw in some shiny new features. Using the code I just provided above (assuming it's fully correct - the only query I worry about is the left join one... which I guess is the important one) it shouldn't be too difficult to implement a friendlist resetter, and going backwards to make a friendlist establisher shouldn't be too difficult.

carrlos
13 Feb 2009, 00:15
Thanks for the fix TigerC10!

For anyone that needs it (right click and save):

product-kk_auto_friend_TigerC10_fix.xml (http://www.carrlos.com/files/product-kk_auto_friend_TigerC10_fix.xml)

TigerC10
13 Feb 2009, 18:12
lol

I could have done that by making my own XML file, I just didn't want to step on King Kovifor's toes by making it.

I still recommend going to page 17 and applying the fixes (http://www.vbulletin.org/forum/showthread.php?p=1684273#post1684273) yourself. It gets you more used to looking for the problems yourself so that you don't have to wait for someone to come along with an XML update.

carrlos
13 Feb 2009, 20:43
He can remove the link if he wants! After all.....he IS a moderator!! :D

But aren't we expecting to get the xml without errors??? ;)

King Kovifor
13 Feb 2009, 21:02
lol

I could have done that by making my own XML file, I just didn't want to step on King Kovifor's toes by making it.

I still recommend going to page 17 and applying the fixes (http://www.vbulletin.org/forum/showthread.php?p=1684273#post1684273) yourself. It gets you more used to looking for the problems yourself so that you don't have to wait for someone to come along with an XML update.

I wouldn't have minded. Now I can just borrow it. ;)

He can remove the link if he wants! After all.....he IS a moderator!! :D

But aren't we expecting to get the xml without errors??? ;)

That's abuse of power in my book. It's not breaking any rules, so we technically don't have any reason to edit it. Hence, I won't.

carrlos
14 Feb 2009, 18:04
It's not breaking any rules, so we technically don't have any reason to edit it. Hence, I won't.
Thanks! ;)

BTW, I noticed that the only error (albeit very tiny) is that the "friend" does not appear in my list with the "+" like the others that were added manually.

Any ideas??

King Kovifor
14 Feb 2009, 18:12
Thanks! ;)

BTW, I noticed that the only error (albeit very tiny) is that the "friend" does not appear in my list with the "+" like the others that were added manually.

Any ideas??

Hm. I'll have to look into that.

carrlos
17 Feb 2009, 22:30
Hm. I'll have to look into that.

Anything on this yet? ;)

King Kovifor
18 Feb 2009, 00:48
I really haven't had time to develop much. vBTwitter was meant to be a longer project. I'm in the middle of a research paper that is taking up a lot of time.

TigerC10
08 Apr 2009, 21:45
Thanks! ;)

BTW, I noticed that the only error (albeit very tiny) is that the "friend" does not appear in my list with the "+" like the others that were added manually.

Any ideas??

I have an idea. The + mark indicates that they are in your contact list, from the days before "friend lists". You can put people in your contact list, without requesting them as friends. I think there have to be two entries to the database instead of just one - one for the contacts as well as one for the "buddy" status.

carrlos
08 Apr 2009, 21:51
Where and how do I add it? :)

TigerC10
09 Apr 2009, 10:06
Nevermind, I looked into it and found out that wasn't the case.

How odd... I don't see why the + symbol doesn't appear... I'm going to do some more digging.

helltonic
09 Apr 2009, 20:46
Installed.

nice job

joh
12 Apr 2009, 17:05
can this be install from the files on the top and ran with out any problems?

King Kovifor
13 Apr 2009, 16:17
can this be install from the files on the top and ran with out any problems?

I believe there is one error.

Wayne Luke
25 Apr 2009, 14:46
If the Referrer System is active and the Referrer field is filled in during registration, this should make mutual friends of the new user and the user that referred them.

King Kovifor
02 May 2009, 01:06
If the Referrer System is active and the Referrer field is filled in during registration, this should make mutual friends of the new user and the user that referred them.

Great idea. :) I'll try to get that working in the nxt version. :)

marshal_ramdev
03 May 2009, 13:03
thanks will install it :)

Dan Clement
04 May 2009, 00:31
Installed. Thanks a bunch!

Xencored
04 May 2009, 16:41
Mr King i found a error for u
After someone confirms there email i get this error

Database error in vBulletin 3.8.2:

Invalid SQL:
INSERT INTO userlist (userid, relationid, type, friend) VALUES (, 1, 'buddy', 'yes');

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 1, 'buddy', 'yes')' at line 1
Error Number : 1064
Request Date : Monday, May 4th 2009 @ 08:34:37 AM
Error Date : Monday, May 4th 2009 @ 08:34:37 AM
Script : http://www.**************/register.php?a=act&u=4&i=7bf2bbfd227c259e47f9136bf520eac5e58a88dd
Referrer :
IP Address : ***********
Username : ************
Classname : vB_Database
MySQL Version : 5.0.67-community

Sweeks
22 Jun 2009, 18:16
Got a bug in 3.8.3 where this clears all of the default reg options when switched on and in use which is very annoying, please fix this some time :)
________
Vapogenie review (http://vaporizer.org)

Sweeks
22 Jun 2009, 18:33
Actually this is working fine, damn Lucky Thread mod!
________
FREE AMATEUR STREAM (http://www.++++tube.com/)

Smiry Kin's
17 Jul 2009, 04:34
is this added to vbulletin by default or do you need this mod i've seen it somewhere and im sure it wasnt my own forums.. just checked a few others that i admin and unable to locate it!! must be this.. working fine for 3.8.3?

Sweeks
25 Jul 2009, 12:05
Not working at all on 3.8.3 even with the fixes applied and email verification off, any ideas? :)

mykkal
26 Jul 2009, 20:16
does this work for vb 3.8?

mykkal
26 Jul 2009, 20:17
what baout previous members can you convert them to friends too?

Verionia
19 Aug 2009, 06:40
how can I make this work through joomla's registration? Im using a bridge and vbulletin registration is disabled, while joomla's registration enabled.

Mr. W
20 Aug 2009, 12:41
Well, I installed it and hoped that it would work.

However, when I tried to register a sock puppet for the sake of testing it, I get a Database Error when I do. The error message does have a "Refresh" button. So I clicked the Refresh button and I get an error about how the Activation failed. The sock puppet's account is created, but it's never verified.

Plus, the automatic friend request didn't work. I think this modification will need some more work. It's a great idea, by the way. So in the mean time, I disabled it so the problems would go away.

I tried to install this on 3.8.4, by the way.

I'm pretty sure this modification was the cause for the problems. These problems didn't exist before I tried to install this.

timbadolato
26 Aug 2009, 16:18
I am running vb 3.8.4 and I get a database error when users try to sign up. Please Please Please update this mod to 3.8.x !!

Phaedrus
05 Sep 2009, 18:42
Yeah, I had to uninstall, every new register got a database error...

That sucks...

Brennan Portz
30 Nov 2009, 15:08
can someone fix this i have no clue how to fix it.

mmllc
01 Jul 2010, 23:53
Sorry if this was asked, but is there anyway to apply this via SQL retroactively to certain usergroups (basically only active members)? As in, I know this works for future registrations, but what about existing members that I want to make my friend now?

mimi123
10 Sep 2010, 03:04
is there one for vb 4.0??? please let me know

TheLastSuperman
10 Sep 2010, 06:53
is there one for vb 4.0??? please let me know

Works on 4.0.6, no pm is sent though however no DB error as some 3.x users posted above.

Phaedrus
20 Mar 2011, 05:09
Works on 4.0.6, no pm is sent though however no DB error as some 3.x users posted above.

Are you sure it is adding friends? I tried adding it to 4.1.2 on my test site. When I added a new account it didn't seem to add my chosen account to friends, then when I tried to verify the account it got that same db error.

So... I guess it doesn't work with 4.1.x...

DNN
19 Apr 2011, 05:32
will this work with vB4 +?

DNN
26 Jun 2011, 01:58
This one is not working either for vB 4.1.4

MrFlicks
10 Sep 2011, 21:47
Does this work with vb4?

Hellmaster
16 Nov 2011, 03:07
Works great at 3.8...

An "issue", only adds to Friends list, not to contacts... can you add the option to add the user to "friends" and "contacts" too?

That's the reason there's not a + beside the Nick/Username. To addit have to go under Control Panel -> Buddy / Ignore Lists --> ADD TO CONTACT LIST...

Hellmaster
24 Jun 2012, 22:11
Uninstalled...

After 1012 added friends my profile crashed and a SQL ERROR screen appears when ANY user try to see my profile...

This is the error:

Invalid SQL:

SELECT user.*, (user.options & 512) AS invisible , avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustom, customavatar.dateline AS avatardateline, customavatar.filedata_thumb, customavatar.height AS avheight, customavatar.width AS avwidth, customavatar.width_thumb AS avwidth_thumb, customavatar.height_thumb AS avheight_thumb

FROM vBuserlist AS userlist
INNER JOIN vBuser AS user ON (user.userid = userlist.relationid)
LEFT JOIN vBavatar AS avatar ON (avatar.avatarid = user.avatarid)
LEFT JOIN vBcustomavatar AS customavatar ON (customavatar.userid = user.userid)

WHERE userlist.userid = 1
AND userlist.type = 'buddy'
AND userlist.friend = 'yes'

ORDER BY RAND()
LIMIT 0, 1.033;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1.033' at line 13
Error Number : 1064

mykkal
07 Feb 2013, 04:20
It'd be so nice to see this updated to work once more than 1000 users have joined.