vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Profile Enhancements - Automatically Add Friend (https://vborg.vbsupport.ru/showthread.php?t=177269)

King Kovifor 04-26-2008 10:00 PM

Automatically Add Friend
 
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, but now has the option to be a non-mutual friendship.

This was coded by request in this thread.

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

King Kovifor 04-27-2008 12:44 AM

Change Log
v1.0.0 (April 26, 2008)
  • Initial Release
v1.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

Quote:

Originally Posted by Danny-E (Post 1500271)
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

Quote:

Originally Posted by Danny-E (Post 1500271)
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

Quote:

Originally Posted by Boofo (Post 1500296)
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.

Quote:

Originally Posted by Boofo (Post 1500297)
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

Quote:

Originally Posted by Boofo (Post 1500303)
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:
  1. User Only (Default)
  2. Admin & User
  3. 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

Quote:

Originally Posted by Boofo (Post 1500311)
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

Quote:

Originally Posted by Boofo (Post 1500320)
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.

Quote:

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

Quote:

Originally Posted by Boofo (Post 1500338)
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

Quote:

Originally Posted by Boofo (Post 1500346)
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

Quote:

Originally Posted by nightbloom (Post 1500353)
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

Quote:

Originally Posted by Boofo (Post 1500392)
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

Quote:

Originally Posted by GoTTi (Post 1500486)
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

Quote:

Originally Posted by Bl4z3 (Post 1500697)
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

Quote:

Originally Posted by sdfaheem (Post 1500837)
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

Quote:

Originally Posted by Bl4z3 (Post 1500697)
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).

Quote:

Originally Posted by sdfaheem (Post 1500837)
Do we need to input the Usergroup ID?

No, this is based off of User IDs.

Bl4z3 04-27-2008 09:03 PM

Quote:

Originally Posted by King Kovifor (Post 1500909)
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

Quote:

Originally Posted by gertoo (Post 1501075)
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

Quote:

Originally Posted by King Kovifor (Post 1501343)
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". ;)

Quote:

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.


All times are GMT. The time now is 06:01 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01604 seconds
  • Memory Usage 1,828KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (21)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete