vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Mini Mods - ZH - Default Buddy (https://vborg.vbsupport.ru/showthread.php?t=133109)

Ziki 12-02-2006 10:00 PM

ZH - Default Buddy
 
This modification was brought to you by
KXDesign
http://www.kxdesign.com/


~Hack name
Default Buddy

~Hack description
Choose the users that will be buddies by default by registration!:classic:

~Hack options
  • Turn On/Off
  • Choose buddy id

~Hack info
File uploads: 0
Template edits: 0
File edits: 0
Plugins: 1
SQL Queries: 0
Phrases: 5
Settings: 2

Install time: 3 sec
Install level: Easy

~Hack installation
Step 1: Import Product



~Hack screenshots
None


~Hack copyright
This may not be distributed,released or claimed as your work without author's permission.

Ziki 12-03-2006 12:38 PM

~Reserved~

Ziki 12-14-2006 07:02 PM

lol I just tried porting this again.Good I noticed it in time :D

YeşiLMeN 12-15-2006 08:31 PM

We Want To Demo Or Screenshot :)

Ziki 12-17-2006 02:39 PM

Excuse me but how the hell can I take a screenshot of something that happens in the backround :)

Charmedfan 01-30-2007 02:48 PM

Hey!
I have a question. Is it possible that you can modify the hack that it choose random users of the userids I write in the settings?
Because I have 5-7 useres that should ad at as Buddy but not all, only one.
I hope you can do that.

Thanks.

Charmedfan

Ziki 01-30-2007 04:25 PM

No sorry

daloosaa 10-20-2007 05:16 PM

Sure, that's possible!

Replace
Code:

$zhbuddy = $vbulletin->options['zh_buddy_id'];
with:
Code:

$ids_to_array = preg_split('/ /', $vbulletin->options['zh_buddy_id']);
$arraysize = count($ids_to_array) -1;
$selector = rand(0, $arraysize);
$zhbuddy = $ids_to_array[$selector];

Note: This is not tested yet (i had the same idea as you in the past 5 minutes), but should work.

EDIT:
It works - tested.

Charmedfan 10-21-2007 08:20 PM

Thx I will test it in the next weeks.

Two questions:

Would the new registrated users also buddies of the user IDs I write in the settings?

Is it maybe possible that the users of the IDs in the settings get a PN when a new buddy would added?

Thanks again for your work!

daloosaa 10-22-2007 02:36 PM

No, your new registered user will not become an buddy of your default buddy. But this might be changed by adding a MySQL query.

Quote:

Is it maybe possible that the users of the IDs in the settings get a PN when a new buddy would added?
There's an mod out there, that will send a PM when a user adds someone to his buddylist. BUT: I think this modification won't work, because this (Default Buddy) mod writes the buddy-ID directly into the database.

An other way: Add a MySQL query that writes a PM directly into the database. This might work.

Greetings,
Florian


All times are GMT. The time now is 01:13 PM.

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.01111 seconds
  • Memory Usage 1,729KB
  • 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_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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