vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Admin is buddy by default. (https://vborg.vbsupport.ru/showthread.php?t=128800)

:Judge: 10-11-2006 06:50 AM

Admin is buddy by default.
 
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)

Quote:

$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

Quote:

Originally Posted by Ziki
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!


All times are GMT. The time now is 08:19 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.01114 seconds
  • Memory Usage 1,720KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete