Code: Select all
break;
}
return false;
}
/**
* Build profile cache, used for display
* @access private
*/
function build_cache()
Code: Select all
/*** 2013-06-14 BEGIN AmigoJack
http://www.phpbb.com/community/viewtopic.php?t=2186548 ***/
$aCustomCheck= array
( 'the_facebook_field_identification'=> '#^https?://(www\\.)?facebook\\.com/.+$#i'
, 'the_twitter_field_identification'=> '#^https?://(www\\.)?twitter\\.com/.+$#i'
);
foreach( $aCustomCheck as $sIdent=> $sRE ) {
if( $field_data['field_ident']== $sIdent ) {
if( !preg_match( $sRE, trim( $field_value ) ) ) return 'AVATAR_URL_INVALID';
}
}
/*** 2013-06-14 END ***/
Code: Select all
case 'FIELD_INVALID_DATE':
case 'FIELD_INVALID_VALUE':
case 'FIELD_REQUIRED':
Code: Select all
/*** 2013-06-14 BEGIN AmigoJack
http://www.phpbb.com/community/viewtopic.php?t=2186548 ***/
case 'AVATAR_URL_INVALID':
/*** 2013-06-14 END ***/
the_facebook_field_identification
and the_twitter_field_identification
to appropriate values.Code: Select all
<dl>
<dt><label for="facebook">{L_UCP_FACEBOOK}:</label><br /><span>{L_FACEBOOK_EXPLAIN}</span></dt>
<dd><input type="text" name="facebook" id="facebook" maxlength="255" value="{FACEBOOK}" class="inputbox" /></dd>
</dl>
http://www.facbook.com/phpbb
, I get the invalid URL message. Are you sure you did it correctly?Code: Select all
$data['facebook'] = request_var('facebook', $user_row['user_facebook']);
'facebook' => array(array('string', true, 12, 255),array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
Code: Select all
'USER_FACEBOOK_SN' => $data['user_facebook'],
'U_FACEBOOK_SN' => ($data['user_facebook']) ? urlencode($data['user_facebook']) : '',
Code: Select all
$template->assign_var('FACEBOOK_IMG', $user->img('icon_contact_fb', 'FACEBOOK'));
$user_cache[$poster_id]['facebook'] = '';
$user_cache[$poster_id]['facebook'] = $row['user_facebook'];
$postrow['U_FACEBOOK_SN'] = $user_cache[$poster_id]['facebook']
Code: Select all
<dl>
<dt><label for="facebook">{L_UCP_FACEBOOK}:</label></dt>
<dd><input type="text" name="facebook" id="facebook" value="{FACEBOOK}" /></dd>
</dl>
Code: Select all
$this->imageset_keys['icons'][] = 'icon_contact_fb';
includes/acp/acp_users.php
$data['facebook'] = request_var('facebook', $user_row['user_facebook']);
'facebook' => array(array('string', true, 12, 255),array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
$sql_ary['user_facebook'] = $data['facebook']
$template->assign_var('FACEBOOK', $data['facebook']);
Code: Select all
$template->assign_var('U_FACEBOOK_SN', ($user_info['user_facebook']) ? $user_info['user_facebook'] : '');
Code: Select all
$data['facebook'] = request_var('facebook', $user->data['user_facebook']);
'facebook' => array(array('string', true, 12, 255),array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
$sql_ary['user_facebook'] = $data['facebook'];
$template->assign_var('FACEBOOK', $data['facebook']);
styles/prosilver/imageset/imageset.cfg
img_icon_contact_fb = icon_contact_fb.gif*20*20
Code: Select all
<!-- IF USER_FACEBOOK_SN --><dt>{L_FACEBOOK}:</dt> <dd><a href="{USER_FACEBOOK_SN}" title="{L_VIEW_FACEBOOK}: {USER_FACEBOOK_SN}">{L_VIEW_FACEBOOK}</a></dd><!-- ENDIF -->
styles/prosilver/template/ucp_pm_viewmessage.html
<!-- IF U_FACEBOOK_SN --><li class="facebooksn-icon"><a href="{U_FACEBOOK_SN}" title="{L_FACEBOOK}"><span>{L_FACEBOOK}</span></a></li><!-- ENDIF -->
Code: Select all
<dl>
<dt><label for="facebook">{L_UCP_FACEBOOK}:</label><br /><span>{L_FACEBOOK_EXPLAIN}</span></dt>
<dd><input type="text" name="facebook" id="facebook" maxlength="255" value="{FACEBOOK}" class="inputbox" /></dd>
</dl>
styles/prosilver/template/viewtopic_body.html
<!-- IF postrow.U_FACEBOOK_SN --><li class="facebooksn-icon"><a href="{postrow.U_FACEBOOK_SN}" title="{L_FACEBOOK}"><span>{L_FACEBOOK}</span></a></li><!-- ENDIF -->
array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')
array('match', true, '#^https?://(www\\.)?facebook\\.com/.+$#i')
Mod I linked to does that too (put an icon in the mini profile and profile); though you're right, it just has FB and Twitter while the social buttons one has a lot more.techman41973 wrote:Jessica, I prefer the social buttons MOD. It puts a nice icon in the user's profile and mini profile
and also has Linkedin.
All I needed was this small change from Amigo Jack. Enjoy!
/*** 2013-06-14 BEGIN AmigoJack
http://www.phpbb.com/community/viewtopic.php?t=2186548 ***/
$aCustomCheck= array
( 'my_twitter'=> '#^https?://(www\\.)?twitter\\.com/.+$#i'
, 'my_facebook'=> '#^https?://(www\\.)?facebook\\.com/.+$#i'
, 'my_plusgoogle'=> '#^https?://(plus\\.)?google\\.com/.+$#i'
, 'my_instagram'=> '#^https?://(www\\.)?instagram\\.com/.+$#i'
, 'my_linkedin'=> '#^https?://(www\\.)?linkedin\\.com/pub/.+$#i'
);
foreach( $aCustomCheck as $sIdent=> $sRE ) {
if( $field_data['field_ident']== $sIdent ) {
if( !preg_match( $sRE, trim( $field_value ) ) ) return 'AVATAR_URL_INVALID';
}
}
/*** 2013-06-14 END ***/
Code: Select all
foreach( $aCustomCheck as $sIdent=> $sRE ) {
if( $field_data['field_ident']== $sIdent ) {
if( !preg_match( $sRE, trim( $field_value ) ) ) return 'AVATAR_URL_INVALID';
'AVATAR_URL_INVALID'
for example?