PDA

View Full Version : Profile Enhancements - Automatically Add Friend


King Kovifor
04-26-2008, 10:00 PM
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 (https://vborg.vbsupport.ru/showpost.php?p=1500299&postcount=7), but now has the option to be a non-mutual friendship.

This was coded by request in this (https://vborg.vbsupport.ru/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
04-27-2008, 12:44 AM
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
04-27-2008, 12:58 AM
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
04-27-2008, 01:24 AM
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
04-27-2008, 01:29 AM
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
04-27-2008, 01:30 AM
Jeremy, by mutual, what exactly does that mean?

King Kovifor
04-27-2008, 01:32 AM
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
04-27-2008, 01:34 AM
Does it send out a notice to the new user that this has happened?

King Kovifor
04-27-2008, 01:35 AM
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
04-27-2008, 01:40 AM
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
04-27-2008, 01:46 AM
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
04-27-2008, 01:50 AM
I guess I don't follow you. You could do it after a user verifies through email verification.

CHIPIT
04-27-2008, 01:50 AM
Thanks
*Installed

King Kovifor
04-27-2008, 01:55 AM
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
04-27-2008, 02:23 AM
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
04-27-2008, 02:31 AM
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
04-27-2008, 02:36 AM
Validation is the best SPAM fighter vb has. ;)

Thank you for adding that in advance.

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

Thank you for adding that in advance.

Your welcome.

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

King Kovifor
04-27-2008, 02:58 AM
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
04-27-2008, 03:36 AM
Sounds like a plan, sir. Looking forward to it. ;)

King Kovifor
04-27-2008, 04:12 AM
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
04-27-2008, 04:47 AM
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
04-27-2008, 06:23 AM
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
04-27-2008, 12:52 PM
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
04-27-2008, 01:29 PM
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
04-27-2008, 02:27 PM
Thank you! Great add-on!

/installed

GoTTi
04-27-2008, 03:43 PM
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
04-27-2008, 05:37 PM
Do we need to input the Usergroup ID?

sensimilla
04-27-2008, 06:50 PM
Thanks I was looking after :D

GoTTi
04-27-2008, 06:57 PM
Do we need to input the Usergroup ID?

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

King Kovifor
04-27-2008, 07:25 PM
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
04-27-2008, 09:03 PM
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
04-28-2008, 12:11 AM
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
04-28-2008, 10:23 AM
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
04-28-2008, 11:15 AM
Great hack thanks

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

mooncreek
04-28-2008, 02:07 PM
LOL

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

Boofo
04-28-2008, 02:14 PM
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
04-28-2008, 05:00 PM
Friends can see friends private albums. Private will become a moot point.

King Kovifor
04-28-2008, 06:15 PM
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
04-28-2008, 08:22 PM
I just installed the new version and am curious, where is the code to send the PM?

King Kovifor
04-28-2008, 09:21 PM
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
04-28-2008, 10:03 PM
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
04-28-2008, 10:14 PM
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
04-28-2008, 10:17 PM
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
04-28-2008, 10:21 PM
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
04-29-2008, 02:25 AM
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
04-29-2008, 10:20 AM
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
04-29-2008, 06:17 PM
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
04-29-2008, 06:34 PM
Guess Validate e-mail didn't stop it... Hm. Gotta look into that.

GoTTi
04-29-2008, 10:59 PM
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
04-29-2008, 11:00 PM
and also, the new users that registered today were not added to my list.

Ryan Ashbrook
04-29-2008, 11:29 PM
Been waiting for this, thanks. :)

King Kovifor
04-30-2008, 12:06 AM
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
05-01-2008, 02:03 PM
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
05-01-2008, 02:14 PM
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
05-01-2008, 03:17 PM
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
05-01-2008, 11:04 PM
ok i have it uninstalled for now untill you get it fixed. lemme know. thanks.

King Kovifor
05-01-2008, 11:41 PM
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
05-02-2008, 12:20 AM
what about old users ?
can I add them also to a special user?

GoTTi
05-02-2008, 04:23 AM
cool beans pal. ur doing a great job. no rush

King Kovifor
05-02-2008, 10:16 AM
what about old users ?
can I add them also to a special user?

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

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

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

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

King Kovifor
05-04-2008, 06:59 PM
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
05-06-2008, 02:37 AM
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
05-06-2008, 07:13 PM
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
05-06-2008, 07:36 PM
security tokens? i will be watching this thread!

King Kovifor
05-07-2008, 10:28 AM
security tokens? i will be watching this thread!

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

GoTTi
05-07-2008, 11:59 PM
when you re-releasing this king, im eager for this already :)

King Kovifor
05-08-2008, 01:24 AM
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
05-08-2008, 09:34 PM
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
05-09-2008, 07:27 PM
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
05-12-2008, 01:50 AM
testing it now

*edit*

Seems to work fine.

Stubbed
05-12-2008, 07:41 AM
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
05-13-2008, 12:41 AM
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
05-13-2008, 10:49 AM
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
05-13-2008, 06:27 PM
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
05-16-2008, 01:48 PM
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
05-16-2008, 06:23 PM
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
05-17-2008, 10:15 PM
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
05-17-2008, 11:42 PM
OK Needing this mod now so keeping an eye on it when the fixes are done.

King Kovifor
05-25-2008, 01:13 AM
For your information, I have given the new version to a beta tester.

TheInsaneManiac
05-28-2008, 04:48 PM
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
05-29-2008, 12:21 AM
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
05-29-2008, 12:42 AM
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
05-29-2008, 10:24 PM
I will ask for more help as these permissions are killing me... :(

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

Greg-J
06-03-2008, 10:15 PM
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
06-03-2008, 10:21 PM
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
06-04-2008, 01:12 AM
... I need to get it out.

Please!!!!!!!! ;)

RedeemedWarrior
06-04-2008, 11:44 AM
i use it.. its not bad :D

King Kovifor
06-04-2008, 08:15 PM
i use it.. its not bad :D

Only if you don't use Email Validation.

goddess_dix
06-05-2008, 04:35 PM
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
06-05-2008, 06:17 PM
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
06-05-2008, 08:46 PM
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
06-05-2008, 08:54 PM
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-06-2008, 05:09 PM
... by adding any number of users (user IDs required) to the new users friend list.

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

King Kovifor
06-06-2008, 06:20 PM
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
06-06-2008, 11:12 PM
I tried this and it does not work with 3.7.0

:(

King Kovifor
06-07-2008, 02:30 AM
I tried this and it does not work with 3.7.0

:(

Do you use email validation?

bdude
06-07-2008, 05:51 AM
Thanks, this is a fabulous mod!

cykelmyggen
06-08-2008, 04:05 PM
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
06-08-2008, 04:12 PM
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
06-08-2008, 04:42 PM
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
06-08-2008, 04:45 PM
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
06-08-2008, 04:59 PM
Absolutely. v1.0.2 will include this fix.
Sounds great, I'll be looking forward to 1.0.2 :up:

King Kovifor
06-08-2008, 06:55 PM
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
06-09-2008, 08:56 PM
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
06-09-2008, 09:38 PM
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
06-09-2008, 09:40 PM
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
06-09-2008, 10:14 PM
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
06-10-2008, 01:37 AM
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
06-11-2008, 07:25 AM
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
06-13-2008, 05:15 AM
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
06-14-2008, 01:39 AM
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
06-14-2008, 08:37 PM
Marked and Installed! Working Perfectly!

Megatr0n
06-15-2008, 11:17 PM
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
06-15-2008, 11:27 PM
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
06-16-2008, 11:14 AM
You mean where users have to confirm their e-mail addresses before they can post?

I do.

King Kovifor
06-16-2008, 01:15 PM
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
06-16-2008, 02:04 PM
No, errors.

You can take a look yourself if you want?

King Kovifor
06-16-2008, 02:11 PM
Odd, as email validation has mysql errors...

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

King Kovifor
06-16-2008, 06:30 PM
I probably won't have time to look into it.

Megatr0n
06-16-2008, 08:37 PM
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
06-16-2008, 08:38 PM
Installed today, thanks

King Kovifor
06-16-2008, 11:22 PM
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
06-17-2008, 04:04 AM
.....as of right now it does not work if Email Validation is on.
And it appears that it never will...........:(

King Kovifor
06-17-2008, 01:00 PM
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
06-17-2008, 02:10 PM
Uninstalled until the fix is enabled.

Tagged in the meantime.

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

Boofo
06-29-2008, 04:31 AM
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
06-29-2008, 04:34 AM
Yes, Id really like this to work.

ASK FOR HELP!

King Kovifor
06-29-2008, 01:58 PM
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
07-10-2008, 10:56 PM
I will be waiting for it to get fixed for email validation as well.

Me to :(

Phooey
08-12-2008, 09:24 PM
I'll have this installed the second that it works with email verification.

patsfans
08-14-2008, 01:01 PM
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
08-15-2008, 11:37 PM
I wish I would of read about the email msql errors lol. I tested it out myself and saw the problems.

King Kovifor
08-16-2008, 06:39 PM
Yeah. My time is super limited now, so it may take a bit longer...

GoTTi
08-31-2008, 07:01 PM
yo you got any time to finish this mod up?

King Kovifor
09-01-2008, 01:52 AM
yo you got any time to finish this mod up?

Right now, no. But hopefully I will soon.

seax19
09-05-2008, 07:04 PM
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
09-05-2008, 10:49 PM
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
09-25-2008, 12:06 PM
Great idea, but didnt work at all, not for previously existing users, not for new registrations.

djxcee
10-17-2008, 03:57 AM
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
10-17-2008, 04:04 AM
This hack appears to be dead. :rolleyes:

King Kovifor
10-17-2008, 06:27 PM
This hack appears to be dead. :rolleyes:

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

carrlos
10-17-2008, 07:00 PM
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
10-17-2008, 08:55 PM
It appears I have a life that takes up to much time.
Maybe someone else can take over?

King Kovifor
10-18-2008, 06:46 PM
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
10-27-2008, 07:49 PM
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
10-27-2008, 08:31 PM
If you read the thread, you would have seen that this bug is already known. This only works without email registration activation.

King Kovifor
10-27-2008, 11:04 PM
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
10-31-2008, 02:16 AM
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
10-31-2008, 04:53 PM
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
11-10-2008, 08:28 AM
Uninstalled sadly, shame, it's a great idea but messing up new registrations is a totally unacceptable bug.

King Kovifor
11-10-2008, 06:37 PM
I'll try to have a working fix before the month's out.

iNRoC
11-15-2008, 02:51 PM
Thanks. Installed.

kalleklorin
12-03-2008, 10:26 PM
interesting

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

King Kovifor
12-06-2008, 05:57 PM
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
12-13-2008, 02:48 AM
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
12-14-2008, 03:24 AM
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
12-14-2008, 04:39 PM
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
12-15-2008, 03:05 PM
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
12-15-2008, 04:41 PM
Are you sure? The admin options are under "User Registration Options", it's not separated out to its own section...

King Kovifor
12-17-2008, 12:32 AM
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
12-17-2008, 03:49 AM
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
12-17-2008, 06:43 PM
Like I said, I will have time in the coming weeks to release the fixed version.

TigerC10
12-18-2008, 03:00 AM
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
12-18-2008, 07:37 PM
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
12-22-2008, 04:11 AM
What was in the update that just came out?

King Kovifor
12-22-2008, 09:45 PM
What was in the update that just came out?

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

buyinflatables
12-30-2008, 01:50 AM
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
12-30-2008, 03:33 AM
If you followed the instructions, it should work just fine...

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

Jasmin
01-01-2009, 10:44 PM
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
01-02-2009, 02:25 AM
@Jasmin - I posted the fix on page 17 (https://vborg.vbsupport.ru/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
01-02-2009, 05:13 PM
@Jasmin - I posted the fix on page 17 (https://vborg.vbsupport.ru/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
01-02-2009, 05:25 PM
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
01-02-2009, 09:08 PM
Thank you TigerC10... Followed your instructions and examples and it now works!

Thank you again!!

King Kovifor
01-02-2009, 09:41 PM
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
01-11-2009, 11:05 PM
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
01-13-2009, 08:53 PM
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
01-15-2009, 02:03 AM
Nice mod! Thanks. =)

Nadavy
01-18-2009, 07:08 PM
This mod was actually restricting users from being able to confirm their emails on my forums :(

King Kovifor
01-18-2009, 11:44 PM
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
01-19-2009, 10:30 PM
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
01-19-2009, 11:16 PM
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
01-20-2009, 12:51 AM
Installed but its not sending a notification to the user when its not mutual...or mutual for that matter. any ideas?

sensimilla
01-20-2009, 10:08 AM
Its not working for me on vb 3.8 , any ideas ? TIA

King Kovifor
01-20-2009, 08:06 PM
I will try to check this out later.

TigerC10
01-22-2009, 04:26 AM
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 (https://vborg.vbsupport.ru/showthread.php?p=1654038#post1654038) that it broke their board (https://vborg.vbsupport.ru/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 (https://vborg.vbsupport.ru/showthread.php?p=1684273#post1684273) of this thread and it should work for you too.

MrBig
02-08-2009, 01:35 AM
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
02-08-2009, 02:10 AM
Not a clue. I don't think you can prune friends. Sadly, that's a disadvantage of this modification.

MrBig
02-09-2009, 01:51 AM
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
02-09-2009, 05:53 AM
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 (https://vborg.vbsupport.ru/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
02-12-2009, 10:15 PM
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
02-13-2009, 04:12 PM
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 (https://vborg.vbsupport.ru/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
02-13-2009, 06:43 PM
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
02-13-2009, 07:02 PM
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 (https://vborg.vbsupport.ru/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
02-14-2009, 04:04 PM
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
02-14-2009, 04:12 PM
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
02-17-2009, 08:30 PM
Hm. I'll have to look into that.

Anything on this yet? ;)

King Kovifor
02-17-2009, 10:48 PM
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
04-08-2009, 07:45 PM
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
04-08-2009, 07:51 PM
Where and how do I add it? :)

TigerC10
04-09-2009, 08:06 AM
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
04-09-2009, 06:46 PM
Installed.

nice job

joh
04-12-2009, 03:05 PM
can this be install from the files on the top and ran with out any problems?

King Kovifor
04-13-2009, 02:17 PM
can this be install from the files on the top and ran with out any problems?

I believe there is one error.

Wayne Luke
04-25-2009, 12:46 PM
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
05-01-2009, 11:06 PM
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
05-03-2009, 11:03 AM
thanks will install it :)

Dan Clement
05-03-2009, 10:31 PM
Installed. Thanks a bunch!

Xencored
05-04-2009, 02:41 PM
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
06-22-2009, 04:16 PM
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
06-22-2009, 04:33 PM
Actually this is working fine, damn Lucky Thread mod!
________
FREE AMATEUR STREAM (http://www.++++tube.com/)

Smiry Kin's
07-17-2009, 02:34 AM
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
07-25-2009, 10:05 AM
Not working at all on 3.8.3 even with the fixes applied and email verification off, any ideas? :)

mykkal
07-26-2009, 06:16 PM
does this work for vb 3.8?

mykkal
07-26-2009, 06:17 PM
what baout previous members can you convert them to friends too?

Verionia
08-19-2009, 04:40 AM
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
08-20-2009, 10:41 AM
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
08-26-2009, 02:18 PM
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
09-05-2009, 04:42 PM
Yeah, I had to uninstall, every new register got a database error...

That sucks...

Brennan Portz
11-30-2009, 01:08 PM
can someone fix this i have no clue how to fix it.

mmllc
07-01-2010, 09:53 PM
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
09-10-2010, 01:04 AM
is there one for vb 4.0??? please let me know

TheLastSuperman
09-10-2010, 04:53 AM
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
03-20-2011, 03:09 AM
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
04-19-2011, 03:32 AM
will this work with vB4 +?

DNN
06-25-2011, 11:58 PM
This one is not working either for vB 4.1.4

MrFlicks
09-10-2011, 07:47 PM
Does this work with vb4?

Hellmaster
11-16-2011, 02:07 AM
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
06-24-2012, 08:11 PM
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
02-07-2013, 03:20 AM
It'd be so nice to see this updated to work once more than 1000 users have joined.