View Single Post
12-16-2008   #4 (permalink)
Kabuto
MMOG Lurker
 
Join Date: Dec 2008
Posts: 4
iTrader: (0)
Kabuto is on a distinguished road
Default

I think I figured how to add more custom groups

In your wiki create a group Custom (respect the case)

edit "product-mmog_wiki.xml"

before

Code:
			<phrase name="settinggroup_mmog_wiki" date="1222796687" username="MMOG" version="2.0.0.0"><![CDATA[MMOG Wiki Options]]></phrase>
add

Code:
			<phrase name="options_options_mmog_wiki_custom_ug_text" date="1223157636" username="MMOG" version="2.0.1.0"><![CDATA[Enter the usergroups you wish to map to Wiki Customs, separated by commas (<em>i.e. 6,7</em>).]]></phrase>
			<phrase name="options_options_mmog_wiki_custom_ug_title" date="1223157636" username="MMOG" version="2.0.1.0"><![CDATA[Custom Usergroups]]></phrase>
before

Code:
			<phrase name="settinggroup_mmog_wiki" date="1222796687" username="MMOG" version="2.0.0.0"><![CDATA[MMOG Wiki Options]]></phrase>
add

Code:
			<phrase name="setting_mmog_wiki_custom_ug_desc" date="1223157636" username="MMOG" version="2.0.1.0"><![CDATA[Enter the usergroups you wish to map to Wiki Customs, separated by commas (<em>i.e. 6,7</em>).<br /><br />Defaults to Customs.]]></phrase>
			<phrase name="setting_mmog_wiki_custom_ug_title" date="1223157636" username="MMOG" version="2.0.1.0"><![CDATA[Custom Usergroups]]></phrase>
before

Code:
		</settinggroup>
	</options>
	<helptopics>
add

Code:
			<setting varname="mmog_wiki_custom_ug" displayorder="7">
				<datatype>free</datatype>
				<defaultvalue>9</defaultvalue>
			</setting>
replace the number 9 for your custom group id in the forum!!

re-import the product and check "allow overwrite"


edit AuthPlugin_vBSSO.php (in wiki/includes/ )

after

// Check Sysop Groups

add

Code:
			$mmog_customgroup = explode( ',', str_replace( ' ', '', $vbulletin->options['mmog_wiki_custom_ug'] ) );

			foreach ( $mmog_customgroup as $customgroup ) {
			    if ( is_member_of( $vbulletin->userinfo, $customgroup ) ) {
				$user->addGroup( 'Custom' );
				break;
			}   }
(respect the case)


I HAVEN'T TESTED BUT IT SHOULD WORK, LET ME KNOW IF IT DOESN'T WORK PLEASE

Last edited by Kabuto; 12-16-2008 at 07:56 PM.