Page 2 of 20

Re: [RC] Steam Mod

Posted: Fri Nov 26, 2010 4:36 am
by eric0279

Re: [RC] Steam Mod

Posted: Fri Nov 26, 2010 5:13 am
by Prosk8er
already found a fix
*mod updated

if you have it installed already do the edits below
Open: styles/prosilver/template/memberlist_view.html
Find:

Code: Select all

			<div class="steam" style="border-top:none; margin-top: 0;"><a href="http://steamcommunity.com/id/{STEAM}"><img src="http://steamprofile.com/profile/extended/steam/{STEAM}.png" border="0" /></a></div>
Replace With:

Code: Select all

			<div class="steam" style="border-top:none; margin-top: 0;"><a href="http://steamcommunity.com/id/{STEAM}"><img src="http://badges.steamprofile.com/profile/extended/steam/{STEAM}.png" border="0" /></a></div>
Open: styles/prosilver/template/viewtopic_body.html
Find:

Code: Select all

  			<!-- IF postrow.U_STEAM --><a href="http://steamcommunity.com/id/{postrow.U_STEAM}"><img src="http://steamprofile.com/profile/simple/steam/{postrow.U_STEAM}.png" border="0" width=160 height=45 /></a><!-- ENDIF -->
Replace With:

Code: Select all

  			<!-- IF postrow.U_STEAM --><a href="http://steamcommunity.com/id/{postrow.U_STEAM}"><img src="http://badges.steamprofile.com/profile/simple/steam/{postrow.U_STEAM}.png" border="0" width=160 height=45 /></a><!-- ENDIF -->
Open: styles/subsilver2/template/memberlist_view.html
Find:

Code: Select all

					<div class="steam" style="border-top:none; margin-top: 0;"><a href="http://steamcommunity.com/id/{STEAM}"><img src="http://steamprofile.com/profile/extended/steam/{STEAM}.png" border="0" /></a></div>
Replace With:

Code: Select all

					<div class="steam" style="border-top:none; margin-top: 0;"><a href="http://steamcommunity.com/id/{STEAM}"><img src="http://badges.steamprofile.com/profile/extended/steam/{STEAM}.png" border="0" /></a></div>
Open: styles/subsilver2/template/viewtopic_body.html
Find:

Code: Select all

			<!-- IF postrow.U_STEAM and S_USER_LOGGED_IN -->&nbsp;<a href="http://steamcommunity.com/id/{postrow.U_STEAM}"><img src="http://steamprofile.com/profile/simple/steam/{postrow.U_STEAM}.png" border="0" width=160 height=45 /></a><!-- ENDIF -->
Replace With:

Code: Select all

			<!-- IF postrow.U_STEAM and S_USER_LOGGED_IN -->&nbsp;<a href="http://steamcommunity.com/id/{postrow.U_STEAM}"><img src="http://badges.steamprofile.com/profile/simple/steam/{postrow.U_STEAM}.png" border="0" width=160 height=45 /></a><!-- ENDIF -->

Re: [RC] Steam Mod

Posted: Fri Nov 26, 2010 7:14 pm
by Gazanimal
When I run the db_update.php on my local testboard & also via my web testboard it says I don't have access to run the update even though I am logged in as an Admin.

All edits are done, but I can't run the update.php

Can you tell me the SQL code so I can manually run it in phpMyAdmin

Cheers.

Re: [RC] Steam Mod

Posted: Fri Nov 26, 2010 9:01 pm
by Prosk8er
^here you go

Code: Select all

ALTER TABLE phpbb_users ADD user_steam VARCHAR( 255 ) NOT NULL DEFAULT '';

Re: [RC] Steam Mod

Posted: Fri Nov 26, 2010 10:34 pm
by Gazanimal
bprsk8r4272 wrote:^here you go

Code: Select all

ALTER TABLE phpbb_users ADD user_steam VARCHAR( 255 ) NOT NULL DEFAULT '';
Cheers!

Re: [RC] Steam Mod

Posted: Mon Nov 29, 2010 5:32 am
by eric0279
Thanks !

and how to make this field required registration?

Re: [RC] Steam Mod

Posted: Mon Nov 29, 2010 5:34 pm
by Prosk8er
eric0279 wrote:Thanks !

and how to make this field required registration?
i'll look in to this later on today

Re: [RC] Steam Mod

Posted: Sat Dec 04, 2010 5:50 am
by eric0279
Hello,

And how to make it mandatory after the members are enrolled (forced users to edit their profile) :?:

Re: [RC] Steam Mod

Posted: Sat Dec 04, 2010 2:32 pm
by Mess
eric0279 wrote:Hello,

And how to make it mandatory after the members are enrolled (forced users to edit their profile) :?:
http://www.phpbb.com/community/viewtopi ... &t=1726675

:)

Re: [RC] Steam Mod

Posted: Sat Dec 04, 2010 6:12 pm
by Prosk8er
eric0279 wrote:Thanks !

and how to make this field required registration?
sorry havent had time to look into that yet i'll try to get to it soon
*i got it done thanks to this post http://www.phpbb.com/community/viewtopi ... 6&t=598049 and tested it
*i'll add this to the download as a option in the contrib folder later

open: includes/ucp/ucp_register.php
Find:

Code: Select all

		$cp = new custom_profile();
After Add:

Code: Select all

		// steam mod
		$user->add_lang('mods/steam');
Find:

Code: Select all

		$data = array(
			'username'			=> utf8_normalize_nfc(request_var('username', '', true)),
			'new_password'		=> request_var('new_password', '', true),
After Add:

Code: Select all

// Steam Required For Registration
			'steam'				=> request_var('steam', '', true),
// Steam Required For Registration
Find:

Code: Select all

				'password_confirm'	=> array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
				'email'				=> array(
					array('string', false, 6, 60),
					array('email')),
				'email_confirm'		=> array('string', false, 6, 60),
After Add:

Code: Select all

// Steam Required For Registration
				'steam'				=> array('string', false, 2, 60),
// Steam Required For Registration
Find:

Code: Select all

				$user_row = array(
					'username'				=> $data['username'],
					'user_password'			=> phpbb_hash($data['new_password']),
					'user_email'			=> $data['email'],
After Add:

Code: Select all

// Steam Required For Registration
					'user_steam'            => $data['steam'],
// Steam Required For Registration
Find:

Code: Select all

		$template->assign_vars(array(
			'ERROR'				=> (sizeof($error)) ? implode('<br />', $error) : '',
			'USERNAME'			=> $data['username'],
			'PASSWORD'			=> $data['new_password'],
			'PASSWORD_CONFIRM'	=> $data['password_confirm'],
After Add:

Code: Select all

// Steam Required For Registration
			'STEAM'				=> $data['steam'],
			'STEAM_EXPLAIN'		=> sprintf($user->lang['STEAM_EXPLAIN'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx") . '">', '</a>'),
// Steam Required For Registration
Open: styles/prosilver/template/ucp_register.html
Find:

Code: Select all

	<dl>
		<dt><label for="password_confirm">{L_CONFIRM_PASSWORD}:</label></dt>
		<dd><input type="password" tabindex="5" name="password_confirm" id="password_confirm" size="25" value="{PASSWORD_CONFIRM}" class="inputbox autowidth" title="{L_CONFIRM_PASSWORD}" /></dd>
	</dl>
After Add:

Code: Select all

	<dl>
		<dt><label for="steam">{L_STEAM}:</label><br /><span>{STEAM_EXPLAIN}</span></dt>
		<dd><input type="text" name="steam" id="steam" size="25" maxlength="255" value="{STEAM}" class="inputbox autowidth" title="{L_STEAM}" /></dd>
	</dl>
Open: styles/subsilver2/template/ucp_register.html
Find:

Code: Select all

<tr>
	<td class="row1"><b class="genmed">{L_CONFIRM_PASSWORD}: </b></td>
	<td class="row2"><input class="post" type="password" name="password_confirm" size="25" value="{PASSWORD_CONFIRM}" /></td>
</tr>
After Add:

Code: Select all

<tr>
	<td class="row1"><b class="genmed">{L_STEAM}: </b><br /><span class="gensmall">{STEAM_EXPLAIN}</span></td>
	<td class="row2"><input class="post" type="text" name="steam" size="25" maxlength="255" value="{STEAM}" /></td>
</tr>

Re: [RC] Steam Mod

Posted: Sat Dec 04, 2010 7:40 pm
by Prosk8er
Mess wrote:
eric0279 wrote:Hello,

And how to make it mandatory after the members are enrolled (forced users to edit their profile) :?:
http://www.phpbb.com/community/viewtopi ... &t=1726675

:)
yeah try that and let me know how it goes

Re: [RC] Steam Mod

Posted: Mon Dec 06, 2010 12:46 pm
by eric0279
I've done this part, it is only when members register on the forum to make the required field, I asked you how to force members already enrolled to complete the field SteamID.

Forcing editing the field SteamID for members already registered, do you understand?

Re: [RC] Steam Mod

Posted: Mon Dec 06, 2010 1:38 pm
by Mess
eric0279 wrote:I've done this part, it is only when members register on the forum to make the required field, I asked you how to force members already enrolled to complete the field SteamID.

Forcing editing the field SteamID for members already registered, do you understand?
Did you try the link I gave you?

Re: [RC] Steam Mod

Posted: Mon Dec 06, 2010 3:03 pm
by Prosk8er
eric0279 wrote:I've done this part, it is only when members register on the forum to make the required field, I asked you how to force members already enrolled to complete the field SteamID.

Forcing editing the field SteamID for members already registered, do you understand?
you asked how to make it required by registartion a few posts up then you also asked how to force it for members which mess already answered

Re: [RC] Steam Mod

Posted: Mon Dec 06, 2010 6:34 pm
by eric0279
you asked how to make it required by registartion a few posts up
solved
then you also asked how to force it for members which mess already answered
Yes ;)