PDA

View Full Version : Admin is buddy by default.


:Judge:
10-11-2006, 06:50 AM
Looking for something that will always add the #1 Administrator as a buddy. I figured this has already had to have been done but I cannot find anything.

Thanks.

Lionel
10-13-2006, 06:30 PM
looking for the same thing too.

:Judge:
10-21-2006, 03:19 AM
Yeah basicly the same thing as MySpace but it's not like you can contact Tom for support but on smaller boards such as mine this could be useful if someone is looking for help and this way they know who to ask.

Lionel
10-21-2006, 03:57 AM
That's very easy to do actually. Create a plugin at register_addmember_complete and put this in it (replace YOURADMINID with the id you want to be a buddy of every one)

$db->query("
UPDATE " . TABLE_PREFIX . "usertextfield
SET buddylist = IF(buddylist <> '', CONCAT(buddylist, ' ', 'YOURADMINID'),
'YOURADMINID')
WHERE userid = '$userid';
");

I also made sure that no one can remove admin as a buddy

Ziki
10-24-2006, 07:29 PM
Use my hack.Check out my profile

Lionel
10-24-2006, 07:39 PM
Use my hack.Check out my profile

your hack will make it non compatible with other hacks adding refered buddy by wiping out existing buddies. If someone has been refered by a member and you are using the auto buddy hack, you will kill that.

That is why it is better to append instead of updating

buddylist <> '', CONCAT(

Maddogz420
08-24-2007, 08:19 AM
This should be put in a little modification release of its own, something alot of people have been looking for it seems. I'd click install! =)

Thanks lionel!