PDA

View Full Version : Auto Welcome Member Mod


SuperTaz
08-20-2012, 02:33 AM
Hello all,
I am wondering if someone can point me to a mod similar to this "Auto Welcome Members" mod from IPB:

http://community.invisionpower.com/files/file/4384-m32-auto-welcome-members/

I would like to use it on my site, but, I can't seem to find one similar to it, when I searched,here on vb.org. Any help would be great. If I have to, I might just port the one, or make one from scratch, from ipb over to vb. Just figured I would ask first.

Thanks

Taz :)

ForceHSS
08-20-2012, 03:01 AM
You already have the option in the admin panel options why don't you use that. And I am sure you can edit the auto pm it sends to your own personal message

Eosian
08-20-2012, 11:02 AM
To elaborate on ForceHSS' answer;
https://www.vbulletin.com/docs/html/vboptions_group_register

See "Send Welcome Email" and "Welcome Private Message".
The templates for each are in phrases, welcomemail and welcomepm respectively.

Also, this from last week; https://vborg.vbsupport.ru/showthread.php?t=286719

SuperTaz
08-20-2012, 05:11 PM
No, I want to modify it to post a new thread in a private forum and add a few features to check their IP's and use API's from other sites to check their status within PC games.

Eosian
08-20-2012, 05:19 PM
That's substantially different from the mod you posted... As in not remotely related.

Is this more what you're actually looking for?

140630

Pandemikk
08-20-2012, 05:19 PM
Hi,

I'm currently in the process or updating this mod: https://vborg.vbsupport.ru/showthread.php?threadid=286522

The update will include the ability to welcome new members with a new thread in a forum(s) of your choosing.

SuperTaz
08-20-2012, 05:26 PM
That's substantially different from the mod you posted... As in not remotely related.

Is this more what you're actually looking for?

140630

Yeah, kind of like that.

Eosian
08-20-2012, 05:28 PM
Are you wanting the basic concept of how to do it, so you can modify it yourself, or do you actually want someone to do it for you? If the latter you'll need to explain in more detail what the differences you want are.

peugeot405
08-20-2012, 07:32 PM
have a look at this (https://vborg.vbsupport.ru/showthread.php?t=236147&highlight=vsa) mod.

SuperTaz
08-20-2012, 08:55 PM
Are you wanting the basic concept of how to do it, so you can modify it yourself, or do you actually want someone to do it for you? If the latter you'll need to explain in more detail what the differences you want are.

What I am looking for is when a new member registers, a new thread is created in a private forum with the ability to check the IP address of the member to make sure it is not a spam member and also to later add the functionality of checking members via other sites API systems to check if they have been banned or not from gaming, etc.

have a look at this (https://vborg.vbsupport.ru/showthread.php?t=236147&highlight=vsa) mod.

That is a good mod, however, it is for replies, not the initial post/thread creation that I am looking for.

peugeot405
08-20-2012, 09:15 PM
What I am looking for is when a new member registers, a new thread is created in a private forum with the ability to check the IP address of the member to make sure it is not a spam member and also to later add the functionality of checking members via other sites API systems to check if they have been banned or not from gaming, etc.



That is a good mod, however, it is for replies, not the initial post/thread creation that I am looking for.

sorry for the mix-up.
what about this (https://vborg.vbsupport.ru/showthread.php?t=286719)?

Eosian
08-20-2012, 09:57 PM
Read through the comments for ways to tweak/adjust and things you need to set.

Create prefixes named Registration_Mult & Registration_BAN
I use [MULT] and [BAN], you can use whatever you want.


**Note these were intended for use in a forum with a table mod, so if you don't have one you'll need to adjust them to some other style of conveying the same info, or install one.

Create templates:
registration_iplog_results

<vb:if condition="$item[banned] == 'False'">{vb:raw username} ({vb:raw vboptions.bburl}/member.php?u={vb:raw userid})|{vb:raw userid}|{vb:raw ipaddress}|{vb:raw firstuse}|{vb:raw lastuse}|{vb:raw banned}<vb:else />{vb:raw username} ({vb:raw vboptions.bburl}/member.php?u={vb:raw userid})|{vb:raw userid}|{vb:raw ipaddress}|{vb:raw firstuse}|{vb:raw lastuse}|{vb:raw banned}</vb:if>


registration_iplog

UserName : {vb:raw username}
Member Link: {vb:raw memberlink}
Email Address : {vb:raw email}
IP Address: {vb:raw ipaddress}
Proxy For: {vb:raw proxyfor}

UserName|UserID|IPAddress|FirstUse|LatestUse|Curre ntlyBanned
{vb:raw resultlist}



Create a plugin
Hook: register_addmember_complete


$ipaddress = IPADDRESS;
// Declaritive proxy?
$proxyfor = $_SERVER['HTTP_X_FORWARDED_FOR'];

$memberlink = fetch_seo_url('member|nosession', array('userid' => $userid, 'username' => htmlspecialchars_uni($vbulletin->GPC['username'])));
$memberlink = $vbulletin->options['bburl'] . $memberlink;

$db->hide_errors();

// This query may be slow if you do not have an index on ipaddress in both users and posts.
$query = "select u.username, l.userid, l.ipaddress, min(l.firstuse) firstuse, max(l.lastuse) lastuse, case COALESCE((select min(liftdate) from userban where userid = u.userid and ( UNIX_TIMESTAMP() between bandate and liftdate OR liftdate = 0 ) ),1) when 1 then 'False' when 0 then 'Perma' else 'True' end as banned from (select userid, ipaddress, min(joindate) firstuse, max(joindate) lastuse from user group by userid, ipaddress UNION ALL select userid, ipaddress, min(dateline) firstuse, max(dateline) lastuse from post group by userid, ipaddress ) l left outer join user u on l.userid = u.userid where l.IpAddress = '$ipaddress' group by u.username, l.userid, l.ipaddress order by max(lastuse) desc";

$result = $vbulletin->db->query_read( $query );
$prefix = '';

// Loop through all results
while ($item = $vbulletin->db->fetch_array($result))
{
if ( $item[banned] != 'False')
$prefix = 'Registrations_BAN';

if ($prefix == '')
$prefix = 'Registration_Mult';

// Generate Variables to be used
$templater = vB_Template::create('registration_iplog_results');

$templater->register('username', $item[username]);
$templater->register('userid', $item[userid]);
$templater->register('ipaddress', $item[ipaddress]);
$templater->register('firstuse', $item[firstuse]);
$templater->register('lastuse', $item[lastuse]);
$templater->register('banned', $item[banned]);
$resultlist .= $templater->render();
}

// Unset the row returned.
unset($item);

// free the resultset
$db->free_result($result);


$templater = vB_Template::create('registration_iplog');
$templater->register_page_templates();
$templater->register('username', $username);
$templater->register('memberlink', $memberlink);
$templater->register('email', $email);
$templater->register('ipaddress', $ipaddress);
$templater->register('proxyfor', $proxyfor);
$templater->register('resultlist', $resultlist);
$postmessage = $templater->render();

// The forum you wish to post threads to
$forumid = 9999;
$foruminfo = fetch_foruminfo( $forumid );

$dataman =& datamanager_init('Thread_FirstPost', $vbulletin, ERRTYPE_SILENT, 'threadpost');
$dataman->set_info('forum', $foruminfo);
$dataman->set_info('is_automated', true);
$dataman->set('showsignature', true);
$dataman->set_info('mark_thread_read', true);
$dataman->set('allowsmilie', true);


// We're making them post as themselves to avoid IPs being attributed to the bot in this example

// Uncomment this and assign it to a user id you wish these to show up as being by if you don't want them to show up as the user.
//$posterid = 3;

$dataman->setr('userid', $userid);
$dataman->set('title', $username);
$dataman->setr('pagetext', $postmessage);
$dataman->set('prefixid', $prefix);
// Uncomment this if you want to use a static account instead of the registering account.
//$dataman->set('ipaddress', '127.0.0.1');

$dataman->setr('forumid', $foruminfo['forumid']);
$dataman->set('visible', true);
$threadid = $dataman->save();

SuperTaz
08-20-2012, 11:48 PM
Hmmm...I'll have to give them a try on my test site and see what it looks like.