Post Milestone Thread Starter? (similar to this old VB mod)
#1
Hi guys,

When I used to have a VB 3.8 forum years ago I had this mod installed...
https://www.vbulletin.org/forum/showthread.php?t=149261

It starts a new congratulations thread when a user reaches a specified posting milestone (e.g. 100, 1000, 10000 etc.)

Can anyone recommend an existing mod that can do similar or help to convert this to MyBB?


Kind regards,

Jason


PS: This is the code of the old VB mod...
<?xml version="1.0" encoding="ISO-8859-1"?>

-<product active="1" productid="milestones">

<title>vB Milestones</title>

<description>This starts a thread congratulating a member on a post milestone in a forum of your choice.</description>

<version>1.0</version>

<url/>

<versioncheckurl/>

<dependencies> </dependencies>

<codes> </codes>

<templates> </templates>


-<plugins>


-<plugin active="1" executionorder="5">

<title>quick_reply_version</title>

<hookname>newreply_post_ajax</hookname>


-<phpcode>

-<![CDATA[if($vbulletin->options["vb_milestones_onoff"] && !isset($done)) {
	if(in_array($vbulletin->userinfo['posts']+1, explode("|", $vbulletin->options["milestones"])) && in_array($vbulletin->userinfo['usergroupid'], explode("|", $vbulletin->options["vb_milestones_usergroups"]))){
		if($vbulletin->options['vb_milestones_forum']) {
			$allowsmilie = '1';
			$visible = '1';
			$fromuser = fetch_userinfo($vbulletin->options['vb_milestones_user']);
			$message = str_replace('$t_postcount', $vbulletin->userinfo['posts']+1, str_replace('$t_user', $vbulletin->userinfo['username'], $vbulletin->options['thread_message']));
			$subject = str_replace('$t_postcount', $vbulletin->userinfo['posts']+1, str_replace('$t_user', $vbulletin->userinfo['username'], $vbulletin->options['thread_title']));
			require_once(DIR . '/includes/class_dm_threadpost.php');
			$forumid = $vbulletin->options['vb_milestones_forum'];
			$threaddm = new vB_DataManager_Thread_FirstPost($vbulletin, ERRTYPE_STANDARD);
			$threaddm->do_set('forumid', $forumid);
			$threaddm->do_set('userid', $fromuser['userid']);
			$threaddm->do_set('username', $fromuser['username']);
			$threaddm->do_set('pagetext', $message);
			$threaddm->do_set('title', $subject);
			$threaddm->do_set('allowsmilie', $allowsmilie);
			$threaddm->do_set('visible', $visible);
			$tid = $threaddm->save();
			require_once(DIR . '/includes/functions_databuild.php');
			build_forum_counters($forumid);
$done = true;
		}
	}
}]]>
</phpcode>

</plugin>


-<plugin active="1" executionorder="5">

<title>check_and_start</title>

<hookname>newreply_post_complete</hookname>


-<phpcode>

-<![CDATA[if($vbulletin->options["vb_milestones_onoff"] && !isset($done)) {
	if(in_array($vbulletin->userinfo['posts']+1, explode("|", $vbulletin->options["milestones"])) && in_array($vbulletin->userinfo['usergroupid'], explode("|", $vbulletin->options["vb_milestones_usergroups"]))){
		if($vbulletin->options['vb_milestones_forum']) {
			$allowsmilie = '1';
			$visible = '1';
			$fromuser = fetch_userinfo($vbulletin->options['vb_milestones_user']);
			$message = str_replace('$t_postcount', $vbulletin->userinfo['posts']+1, str_replace('$t_user', $vbulletin->userinfo['username'], $vbulletin->options['thread_message']));
			$subject = str_replace('$t_postcount', $vbulletin->userinfo['posts']+1, str_replace('$t_user', $vbulletin->userinfo['username'], $vbulletin->options['thread_title']));
			require_once(DIR . '/includes/class_dm_threadpost.php');
			$forumid = $vbulletin->options['vb_milestones_forum'];
			$threaddm = new vB_DataManager_Thread_FirstPost($vbulletin, ERRTYPE_STANDARD);
			$threaddm->do_set('forumid', $forumid);
			$threaddm->do_set('userid', $fromuser['userid']);
			$threaddm->do_set('username', $fromuser['username']);
			$threaddm->do_set('pagetext', $message);
			$threaddm->do_set('title', $subject);
			$threaddm->do_set('allowsmilie', $allowsmilie);
			$threaddm->do_set('visible', $visible);
			$tid = $threaddm->save();
			require_once(DIR . '/includes/functions_databuild.php');
			build_forum_counters($forumid);
$done = true;
		}
	}
}]]>
</phpcode>

</plugin>


-<plugin active="1" executionorder="5">

<title>check_and_start_newthread</title>

<hookname>newthread_post_complete</hookname>


-<phpcode>

-<![CDATA[if($vbulletin->options["vb_milestones_onoff"] && !isset($done)) {
	if(in_array($vbulletin->userinfo['posts']+1, explode("|", $vbulletin->options["milestones"])) && in_array($vbulletin->userinfo['usergroupid'], explode("|", $vbulletin->options["vb_milestones_usergroups"]))){
		if($vbulletin->options['vb_milestones_forum']) {
			$allowsmilie = '1';
			$visible = '1';
			$fromuser = fetch_userinfo($vbulletin->options['vb_milestones_user']);
			$message = str_replace('$t_postcount', $vbulletin->userinfo['posts']+1, str_replace('$t_user', $vbulletin->userinfo['username'], $vbulletin->options['thread_message']));
			$subject = str_replace('$t_postcount', $vbulletin->userinfo['posts']+1, str_replace('$t_user', $vbulletin->userinfo['username'], $vbulletin->options['thread_title']));
			require_once(DIR . '/includes/class_dm_threadpost.php');
			$forumid = $vbulletin->options['vb_milestones_forum'];
			$threaddm = new vB_DataManager_Thread_FirstPost($vbulletin, ERRTYPE_STANDARD);
			$threaddm->do_set('forumid', $forumid);
			$threaddm->do_set('userid', $fromuser['userid']);
			$threaddm->do_set('username', $fromuser['username']);
			$threaddm->do_set('pagetext', $message);
			$threaddm->do_set('title', $subject);
			$threaddm->do_set('allowsmilie', $allowsmilie);
			$threaddm->do_set('visible', $visible);
			$tid = $threaddm->save();
			require_once(DIR . '/includes/functions_databuild.php');
			build_forum_counters($forumid);
$done = true;
		}
	}
}]]>
</phpcode>

</plugin>

</plugins>


-<phrases>


-<phrasetype fieldname="vbsettings" name="vBulletin Settings">


-<phrase name="setting_milestones_desc" version="1.0" username="GTSCH" date="1181348258">

-<![CDATA[Enter the milestones you want threads started for seperated by |. For example 1000|2000|5000|10000]]>
</phrase>


-<phrase name="setting_milestones_title" version="1.0" username="GTSCH" date="1181348258">

-<![CDATA[Milestones]]>
</phrase>


-<phrase name="setting_thread_message_desc" version="1.0" username="GTSCH" date="1181353389">

-<![CDATA[Enter the message to appear in the thread started, you can use the variables $t_user and $t_postcount in the message.]]>
</phrase>


-<phrase name="setting_thread_message_title" version="1.0" username="GTSCH" date="1181353389">

-<![CDATA[Thread Message]]>
</phrase>


-<phrase name="setting_thread_title_desc" version="1.0" username="GTSCH" date="1181353513">

-<![CDATA[Enter the thread title, you may use the variables $t_user and $_postcount.]]>
</phrase>


-<phrase name="setting_thread_title_title" version="1.0" username="GTSCH" date="1181353513">

-<![CDATA[Thread Title]]>
</phrase>


-<phrase name="setting_vb_milestones_forum_desc" version="1.0" username="GTSCH" date="1181342222">

-<![CDATA[Enter the forumid:]]>
</phrase>


-<phrase name="setting_vb_milestones_forum_title" version="1.0" username="GTSCH" date="1181342222">

-<![CDATA[Forum to start thread in]]>
</phrase>


-<phrase name="setting_vb_milestones_onoff_desc" version="1.0" username="GTSCH" date="1181342188">

-<![CDATA[Turn this product on/off]]>
</phrase>


-<phrase name="setting_vb_milestones_onoff_title" version="1.0" username="GTSCH" date="1181342188">

-<![CDATA[On/Off]]>
</phrase>


-<phrase name="setting_vb_milestones_user_desc" version="1.0" username="GTSCH" date="1181345854">

-<![CDATA[Enter the userid of the poster that you want to start the thread.]]>
</phrase>


-<phrase name="setting_vb_milestones_user_title" version="1.0" username="GTSCH" date="1181345854">

-<![CDATA[Threadstarter]]>
</phrase>


-<phrase name="setting_vb_milestones_usergroups_desc" version="1.0" username="GTSCH" date="1181342449">

-<![CDATA[Enter the usergroup IDs that will have a thread started for them. Seperate them with |. For example ( 2|3|4|8 ),  no parenthesis.]]>
</phrase>


-<phrase name="setting_vb_milestones_usergroups_title" version="1.0" username="GTSCH" date="1181342449">

-<![CDATA[Usergroups]]>
</phrase>


-<phrase name="settinggroup_vb_milestones" version="1.0" username="GTSCH" date="1181341656">

-<![CDATA[vB Milestones]]>
</phrase>

</phrasetype>

</phrases>


-<options>


-<settinggroup name="vb_milestones" displayorder="65535">


-<setting displayorder="10" varname="vb_milestones_onoff">

<datatype>boolean</datatype>

<optioncode>yesno</optioncode>

</setting>


-<setting displayorder="20" varname="vb_milestones_forum">

<datatype>number</datatype>

</setting>


-<setting displayorder="30" varname="vb_milestones_usergroups">

<datatype>free</datatype>

</setting>


-<setting displayorder="40" varname="vb_milestones_user">

<datatype>number</datatype>

</setting>


-<setting displayorder="50" varname="milestones">

<datatype>free</datatype>

</setting>


-<setting displayorder="55" varname="thread_title">

<datatype>free</datatype>

</setting>


-<setting displayorder="60" varname="thread_message">

<datatype>free</datatype>

<optioncode>textarea</optioncode>

</setting>

</settinggroup>

</options>

<helptopics> </helptopics>

<cronentries> </cronentries>

<faqentries> </faqentries>

</product>
Reply
#2
wee bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)