Hi all
I have the same prob as mgorey:
The Facebook display button can't be selected for "yes". It automatically reverts to "no" when the settings are saved.
Any ideas on how to make it work?





Hi all
I have the same prob as mgorey:
The Facebook display button can't be selected for "yes". It automatically reverts to "no" when the settings are saved.
Any ideas on how to make it work?
Activate and Deactivate de plugin bbSocialize, it works for me.
same here! the enabled facebook setting jumps always back after "save bbsocialize settings" to disabled.
mhhhh it worked after a reset and then you have to save the prefered setting.
Hi y'all,
I added Hyves, LinkedIn and Last FM to the script:
<?php
/*
Plugin Name: bbSocialize
Description: Allows you to set and display your social media websites link in your profile.
Plugin URI: http://astateofmind.eu/freebies/bbsocialize
Author: F.Thion
Author URI: http://astateofmind.eu
Version: 0.0.3
license: CC-GNU-GPL http://creativecommons.org/licenses/GPL/2.0/
donate: http://astateofmind.eu/about/support/
TO DO:
- Add support for
- Technorati
- MyBlogLog
- MySpace
History for 0.0.3:
- If profiles are empty and are not set by user, then they are not displayed;
- Added support for technorati;
- Changed images names, from x.gif to bb_x.gif;
- Minor modifications to look of management page;
- Added support to display profile links in single posts;
- Added "Reset Button" - you can now reset all settings to default (minor error, changes won't appear without page refresh)
*/
function bb_socialize_initialize() {
global $bb, $bb_current_user, $bb_socialize, $bb_signatures_type;
if ( !isset( $bb_socialize ) )
{
$bb_socialize = bb_get_option('bb_socialize');
if ( !$bb_socialize )
{
$bb_socialize['minimum_user_level'] = "participate";
$bb_socialize['images_url'] = bb_get_option('uri');
$bb_socialize['links_rel'] = "nofollow";
$bb_socialize['plurk'] = "true";
$bb_socialize['twitter'] = "true";
$bb_socialize['pownce'] = "true";
$bb_socialize['facebook'] = "true";
$bb_socialize['myspace'] = "true";
$bb_socialize['flickr'] = "true";
$bb_socialize['delicious'] = "true";
$bb_socialize['digg'] = "true";
$bb_socialize['technorati'] = "true";
$bb_socialize['hyves'] = "true";
$bb_socialize['linkedin'] = "true";
$bb_socialize['lastfm'] = "true";
}
}
}
add_action( 'bb_init', 'bb_socialize_initialize');
// Let's get some profiles to display
function get_plurk($user_id) {
$user = bb_get_user( $user_id );
$bb_plurk = $user->social_plurk;
if ( $bb_plurk ) { return $bb_plurk; } else { return ""; }
}
function get_twitter($user_id) {
$user = bb_get_user( $user_id );
$bb_twitter = $user->social_twitter;
if ( $bb_twitter ) { return $bb_twitter; } else { return ""; }
}
function get_pownce($user_id) {
$user = bb_get_user( $user_id );
$bb_pownce = $user->social_pownce;
if ( $bb_pownce ) { return $bb_pownce; } else { return ""; }
}
function get_facebook($user_id) {
$user = bb_get_user( $user_id );
$bb_facebook = $user->social_facebook;
if ( $bb_facebook ) { return $bb_facebook; } else { return ""; }
}
function get_myspace($user_id) {
$user = bb_get_user( $user_id );
$bb_myspace = $user->social_myspace;
if ( $bb_myspace ) { return $bb_myspace; } else { return ""; }
}
function get_flickr($user_id) {
$user = bb_get_user( $user_id );
$bb_flickr = $user->social_flickr;
if ( $bb_flickr ) { return $bb_flickr; } else { return ""; }
}
function get_delicious($user_id) {
$user = bb_get_user( $user_id );
$bb_delicious = $user->social_delicious;
if ( $bb_delicious ) { return $bb_delicious; } else { return ""; }
}
function get_digg($user_id) {
$user = bb_get_user( $user_id );
$bb_digg = $user->social_digg;
if ( $bb_digg ) { return $bb_digg; } else { return ""; }
}
function get_technorati($user_id) {
$user = bb_get_user( $user_id );
$bb_technorati = $user->social_technorati;
if ( $bb_technorati ) { return $bb_technorati; } else { return ""; }
}
function get_hyves($user_id) {
$user = bb_get_user( $user_id );
$bb_hyves = $user->social_hyves;
if ( $bb_hyves ) { return $bb_hyves; } else { return ""; }
}
function get_linkedin($user_id) {
$user = bb_get_user( $user_id );
$bb_linkedin = $user->social_linkedin;
if ( $bb_linkedin ) { return $bb_linkedin; } else { return ""; }
}
function get_lastfm($user_id) {
$user = bb_get_user( $user_id );
$bb_lastfm = $user->social_lastfm;
if ( $bb_lastfm ) { return $bb_lastfm; } else { return ""; }
}
// Now, let's add input fields to our profile-edit page
function add_socialize_to_profile_edit() {
global $user_id, $bb_current_user, $bb_socialize;
if (bb_current_user_can($bb_socialize['minimum_user_level']) && bb_is_user_logged_in() ) :
$bb_plurk = get_plurk($user_id);
$bb_twitter = get_twitter($user_id);
$bb_pownce = get_pownce($user_id);
$bb_facebook = get_facebook($user_id);
$bb_myspace = get_myspace($user_id);
$bb_flickr = get_flickr($user_id);
$bb_delicious = get_delicious($user_id);
$bb_digg = get_digg($user_id);
$bb_technorati = get_technorati($user_id);
$bb_hyves = get_hyves($user_id);
$bb_linkedin = get_linkedin($user_id);
$bb_lastfm = get_lastfm($user_id);
echo '<div class="socialize_edit">
<fieldset>
<legend>'. __('Social Media Profiles') .'</legend>
<p>Set your Social Media Profiles below.</p>
<table>';
if ( $bb_socialize['plurk'] == true ) {
echo '<tr class="form-field">
<th scope="row">Plurk</th>
<td>
<input type="text" name="bb_plurk" value="'. $bb_plurk .'" />
</td>
</tr>';
}
if ( $bb_socialize['twitter'] == true ) {
echo '<tr class="form-field">
<th scope="row">Twitter</th>
<td>
<input type="text" name="bb_twitter" value="'. $bb_twitter .'" />
</td>
</tr>';
}
if ( $bb_socialize['pownce'] == true ) {
echo '<tr class="form-field">
<th scope="row">Pownce</th>
<td>
<input type="text" name="bb_pownce" value="'. $bb_pownce .'" />
</td>
</tr>';
}
if ( $bb_socialize['facebook'] == true ) {
echo '<tr class="form-field">
<th scope="row">Facebook Account #</th>
<td>
<input type="text" name="bb_facebook" value="'. $bb_facebook .'" />
</td>
</tr>';
}
if ( $bb_socialize['myspace'] == true ) {
echo '<tr class="form-field">
<th scope="row">MySpace</th>
<td>
<input type="text" name="bb_myspace" value="'. $bb_myspace .'" />
</td>
</tr>';
}
if ( $bb_socialize['flickr'] == true ) {
echo '<tr class="form-field">
<th scope="row">Flickr</th>
<td>
<input type="text" name="bb_flickr" value="'. $bb_flickr .'" />
</td>
</tr>';
}
if ( $bb_socialize['delicious'] == true ) {
echo '<tr class="form-field">
<th scope="row">Delicious</th>
<td>
<input type="text" name="bb_delicious" value="'. $bb_delicious .'" />
</td>
</tr>';
}
if ( $bb_socialize['digg'] == true ) {
echo '<tr class="form-field">
<th scope="row">Digg</th>
<td>
<input type="text" name="bb_digg" value="'. $bb_digg .'" />
</td>
</tr>';
}
if ( $bb_socialize['technorati'] == true ) {
echo '<tr class="form-field">
<th scope="row">Technorati</th>
<td>
<input type="text" name="bb_technorati" value="'. $bb_technorati .'" />
</td>
</tr>';
}
if ( $bb_socialize['hyves'] == true ) {
echo '<tr class="form-field">
<th scope="row">Hyves</th>
<td>
<input type="text" name="bb_hyves" value="'. $bb_hyves .'" />
</td>
</tr>';
}
if ( $bb_socialize['linkedin'] == true ) {
echo '<tr class="form-field">
<th scope="row">LinkedIn</th>
<td>
<input type="text" name="bb_linkedin" value="'. $bb_linkedin .'" /> <br /><i>(Use this part of your public profile URL http://www.linkedin.com/in/<u>YourName</u></i>)
</td>
</tr>';
}
if ( $bb_socialize['lastfm'] == true ) {
echo '<tr class="form-field">
<th scope="row">Last FM</th>
<td>
<input type="text" name="bb_lastfm" value="'. $bb_lastfm .'" />
</td>
</tr>';
}
echo '</table></fieldset>
</div>';
endif;
}
add_action('extra_profile_info', 'add_socialize_to_profile_edit');
// The following function can be used to display profiles on user-profile-page
function get_socialize() {
global $user_id, $bb_current_user, $bb_socialize;
$user_id = bb_get_user( $user_id );
$bb_plurk = $user_id->social_plurk;
$bb_twitter = $user_id->social_twitter;
$bb_facebook = $user_id->social_facebook;
$bb_myspace = $user_id->social_myspace;
$bb_flickr = $user_id->social_flickr;
$bb_pownce = $user_id->social_pownce;
$bb_delicious = $user_id->social_delicious;
$bb_digg = $user_id->social_digg;
$bb_technorati = $user_id->social_technorati;
$bb_hyves = $user_id->social_hyves;
$bb_linkedin = $user_id->social_linkedin;
$bb_lastfm = $user_id->social_lastfm;
echo '<div class="socialize_wrap">';
if ( $bb_socialize['plurk'] == true ) { if ( !empty( $bb_plurk ) ) { echo '<dd><img src="'.$bb_socialize['images_url'].'/bb_plurk.png" width="16" height="16" border="0" /><a href="http://plurk.com/'.$bb_plurk.'" title="User Plurk account" rel="'.$bb_socialize['links_rel'].'"><span>'.$bb_plurk.'</span></a></dd>'; } }
if ( $bb_socialize['twitter'] == true ) { if ( !empty( $bb_twitter ) ) { echo '<dd><img src="'.$bb_socialize['images_url'].'/bb_twitter.png" width="16" height="16" border="0" /><a href="http://twitter.com/'.$bb_twitter.'" title="User Twitter account" rel="'.$bb_socialize['links_rel'].'"><span>'.$bb_twitter.'</span></a></dd>'; } }
if ( $bb_socialize['pownce'] == true ) { if ( !empty( $bb_pownce ) ) { echo '<dd><img src="'.$bb_socialize['images_url'].'/bb_pownce.png" width="16" height="16" border="0" /><a href="http://pownce.com/'.$bb_pownce.'" title="User Pownce account" rel="'.$bb_socialize['links_rel'].'"><span>'.$bb_pownce.'</span></a></dd>'; } }
if ( $bb_socialize['facebook'] == true ) { if ( !empty( $bb_facebook ) ) { echo '<dd><img src="'.$bb_socialize['images_url'].'/bb_facebook.png" width="16" height="16" border="0" /><a href="http://www.facebook.com/profile.php?id='.$bb_facebook.'" title="User Facebook account" rel="'.$bb_socialize['links_rel'].'"><span>'.$bb_facebook.'</span></a></dd>'; } }
if ( $bb_socialize['myspace'] == true ) { if ( !empty( $bb_myspace ) ) { echo '<dd><img src="'.$bb_socialize['images_url'].'/bb_myspace.png" width="16" height="16" border="0" /><a href="http://myspace.com/'.$bb_myspace.'" title="User MySpace page" rel="'.$bb_socialize['links_rel'].'"><span>'.$bb_myspace.'</span></a></dd>'; } }
if ( $bb_socialize['flickr'] == true ) { if ( !empty( $bb_flickr ) ) { echo '<dd><img src="'.$bb_socialize['images_url'].'/bb_flickr.png" width="16" height="16" border="0" /><a href="http://flickr.com/photos/'.$bb_flickr.'" title="User Flickr account" rel="'.$bb_socialize['links_rel'].'"><span>'.$bb_flickr.'</span></a></dd>'; } }
if ( $bb_socialize['delicious'] == true ) { if ( !empty( $bb_delicious ) ) { echo '<dd><img src="'.$bb_socialize['images_url'].'/bb_delicious.png" width="16" height="16" border="0" /><a href="http://delicious.com/'.$bb_delicious.'" title="User Delicious account" rel="'.$bb_socialize['links_rel'].'"><span>'.$bb_delicious.'</span></a></dd>'; } }
if ( $bb_socialize['digg'] == true ) { if ( !empty( $bb_digg ) ) { echo '<dd><img src="'.$bb_socialize['images_url'].'/bb_digg.png" width="16" height="16" border="0" /><a href="http://digg.com/users/'.$bb_digg.'" title="User Digg account" rel="'.$bb_socialize['links_rel'].'"><span>'.$bb_digg.'</span></a></dd>'; } }
if ( $bb_socialize['technorati'] == true ) { if ( !empty( $bb_technorati) ) { echo '<dd><img src="'.$bb_socialize['images_url'].'/bb_technorati.png" width="16" height="16" border="0" /><a href="http://technorati.com/people/technorati/'.$bb_technorati.'" title="User Technorati account" rel="'.$bb_socialize['links_rel'].'"><span>'.$bb_technorati.'</span></a></dd>'; } }
if ( $bb_socialize['hyves'] == true ) { if ( !empty( $bb_hyves) ) { echo '<dd><img src="'.$bb_socialize['images_url'].'/bb_hyves.png" width="16" height="16" border="0" /><a href="http://'.$bb_hyves.'.hyves.nl/" title="User Technorati account" rel="'.$bb_socialize['links_rel'].'"><span>'.$bb_hyves.'</span></a></dd>'; } }
if ( $bb_socialize['linkedin'] == true ) { if ( !empty( $bb_linkedin) ) { echo '<dd><img src="'.$bb_socialize['images_url'].'/bb_linkedin.png" width="16" height="16" border="0" /><a href="http://www.linkedin.com/in/'.$bb_linkedin.'/" title="User LinkedIn public profile page" rel="'.$bb_socialize['links_rel'].'"><span>'.$bb_linkedin.'</span></a></dd>'; } }
if ( $bb_socialize['lastfm'] == true ) { if ( !empty( $bb_lastfm) ) { echo '<dd><img src="'.$bb_socialize['images_url'].'/bb_lastfm.png" width="16" height="16" border="0" /><a href="http://www.last.fm/user/'.$bb_lastfm.'" title="User Last FM radio station" rel="'.$bb_socialize['links_rel'].'"><span>'.$bb_lastfm.'</span></a></dd>'; } }
echo '</div>';
}
// The following function can be used in posts; just put get_socialize_post(get_post_author_id()); somewhere :)
function get_socialize_post( $user_id ) {
global $bb, $bb_socialize;
$user_id = bb_get_user( $user_id );
$bb_plurk = $user_id->social_plurk;
$bb_twitter = $user_id->social_twitter;
$bb_pownce = $user_id->social_pownce;
$bb_facebook = $user_id->social_facebook;
$bb_myspace = $user_id->social_myspace;
$bb_flickr = $user_id->social_flickr;
$bb_delicious = $user_id->social_delicious;
$bb_digg = $user_id->social_digg;
$bb_technorati = $user_id->social_technorati;
$bb_hyves = $user_id->social_hyves;
$bb_linkedin = $user_id->social_linkedin;
$bb_lastfm = $user_id->social_lastfm;
echo '<div class="post_socialize_wrap">';
if ( $bb_socialize['plurk'] == true ) { if ( !empty( $bb_plurk ) ) { echo '<span><a href="http://plurk.com/'.$bb_plurk.'" title="User Plurk account" rel="'.$bb_socialize['links_rel'].'"><img src="'.$bb_socialize['images_url'].'/bb_plurk.png" width="16" height="16" border="0" /></a></span>'; } }
if ( $bb_socialize['twitter'] == true ) { if ( !empty( $bb_twitter ) ) { echo '<span><a href="http://twitter.com/'.$bb_twitter.'" title="User Twitter account" rel="'.$bb_socialize['links_rel'].'"><img src="'.$bb_socialize['images_url'].'/bb_twitter.png" width="16" height="16" border="0" /></a></span>'; } }
if ( $bb_socialize['pownce'] == true ) { if ( !empty( $bb_pownce ) ) { echo '<span><a href="http://pownce.com/'.$bb_pownce.'" title="User Pownce account" rel="'.$bb_socialize['links_rel'].'"><img src="'.$bb_socialize['images_url'].'/bb_pownce.png" width="16" height="16" border="0" /></a></span>'; } }
if ( $bb_socialize['facebook'] == true ) { if ( !empty( $bb_facebook ) ) { echo '<span><a href="http://www.facebook.com/profile.php?id='.$bb_facebook.'" title="User Facebook account" rel="'.$bb_socialize['links_rel'].'"><img src="'.$bb_socialize['images_url'].'/bb_facebook.png" width="16" height="16" border="0" /></a></span>'; } }
if ( $bb_socialize['myspace'] == true ) { if ( !empty( $bb_myspace ) ) { echo '<span><a href="http://myspace.com/'.$bb_myspace.'" title="User MySpace page" rel="'.$bb_socialize['links_rel'].'"><img src="'.$bb_socialize['images_url'].'/bb_myspace.png" width="16" height="16" border="0" /></a></span>'; } }
if ( $bb_socialize['flickr'] == true ) { if ( !empty( $bb_flickr ) ) { echo '<span><a href="http://flickr.com/photos/'.$bb_flickr.'" title="User Flickr account" rel="'.$bb_socialize['links_rel'].'"><img src="'.$bb_socialize['images_url'].'/bb_flickr.png" width="16" height="16" border="0" /></a></span>'; } }
if ( $bb_socialize['delicious'] == true ) { if ( !empty( $bb_delicious ) ) { echo '<span><a href="http://delicious.com/'.$bb_delicious.'" title="User Delicious account" rel="'.$bb_socialize['links_rel'].'"><img src="'.$bb_socialize['images_url'].'/bb_delicious.png" width="16" height="16" border="0" /></a></span>'; } }
if ( $bb_socialize['digg'] == true ) { if ( !empty( $bb_digg ) ) { echo '<span><a href="http://digg.com/users/'.$bb_digg.'" title="User Digg account" rel="'.$bb_socialize['links_rel'].'"><img src="'.$bb_socialize['images_url'].'/bb_digg.png" width="16" height="16" border="0" /></a></span>'; } }
if ( $bb_socialize['technorati'] == true ) { if ( !empty( $bb_technorati) ) { echo '<span><a href="http://technorati.com/people/technorati/'.$bb_technorati.'" title="User Technorati account" rel="'.$bb_socialize['links_rel'].'"><img src="'.$bb_socialize['images_url'].'/bb_technorati.png" width="16" height="16" border="0" /></a></span>'; } }
if ( $bb_socialize['hyves'] == true ) { if ( !empty( $bb_hyves) ) { echo '<span><a href="http://'.$bb_hyves.'.hyves.nl/" title="User hyves account" rel="'.$bb_socialize['links_rel'].'"><img src="'.$bb_socialize['images_url'].'/bb_hyves.png" width="16" height="16" border="0" /></a></span>'; } }
if ( $bb_socialize['linkedin'] == true ) { if ( !empty( $bb_linkedin) ) { echo '<span><a href="http://www.linkedin.com/in/'.$bb_linkedin.'/" title="User LinkedIn public profile page" rel="'.$bb_socialize['links_rel'].'"><img src="'.$bb_socialize['images_url'].'/bb_linkedin.png" width="16" height="16" border="0" /></a></span>'; } }
if ( $bb_socialize['lastfm'] == true ) { if ( !empty( $bb_lastfm) ) { echo '<span><a href="http://www.last.fm/user/'.$bb_lastfm.'/" title="User lastfm radio station" rel="'.$bb_socialize['links_rel'].'"><img src="'.$bb_socialize['images_url'].'/bb_lastfm.png" width="16" height="16" border="0" /></a></span>'; } }
echo '</div>';
}
function update_user_socialize() {
global $user_id, $bb_socialize;
$bb_plurk = $_POST['bb_plurk'];
$bb_twitter = $_POST['bb_twitter'];
$bb_pownce = $_POST['bb_pownce'];
$bb_facebook = $_POST['bb_facebook'];
$bb_myspace = $_POST['bb_myspace'];
$bb_flickr = $_POST['bb_flickr'];
$bb_delicious = $_POST['bb_delicious'];
$bb_digg = $_POST['bb_digg'];
$bb_technorati = $_POST['bb_technorati'];
$bb_hyves = $_POST['bb_hyves'];
$bb_linkedin = $_POST['bb_linkedin'];
$bb_lastfm = $_POST['bb_lastfm'];
if ( $bb_plurk )
{
$bb_plurk = bb_filter_kses( stripslashes( balanceTags( bb_code_trick( bb_encode_bad($bb_plurk) ), true) ) );
bb_update_usermeta($user_id, "social_plurk",$bb_plurk);
}
else {bb_delete_usermeta($user_id, "social_plurk");}
if ( $bb_twitter )
{
$bb_twitter = bb_filter_kses( stripslashes( balanceTags( bb_code_trick( bb_encode_bad($bb_twitter) ), true) ) );
bb_update_usermeta($user_id, "social_twitter",$bb_twitter);
}
else {bb_delete_usermeta($user_id, "social_twitter");}
if ( $bb_pownce )
{
$bb_pownce = bb_filter_kses( stripslashes( balanceTags( bb_code_trick( bb_encode_bad($bb_pownce) ), true) ) );
bb_update_usermeta($user_id, "social_pownce",$bb_pownce);
}
else {bb_delete_usermeta($user_id, "social_pownce");}
if ( $bb_facebook )
{
$bb_facebook = bb_filter_kses( stripslashes( balanceTags( bb_code_trick( bb_encode_bad($bb_facebook) ), true) ) );
bb_update_usermeta($user_id, "social_facebook",$bb_facebook);
}
else {bb_delete_usermeta($user_id, "social_facebook");}
if ( $bb_myspace )
{
$bb_myspace = bb_filter_kses( stripslashes( balanceTags( bb_code_trick( bb_encode_bad($bb_myspace) ), true) ) );
bb_update_usermeta($user_id, "social_myspace",$bb_myspace);
}
else {bb_delete_usermeta($user_id, "social_myspace");}
if ( $bb_flickr )
{
$bb_flickr = bb_filter_kses( stripslashes( balanceTags( bb_code_trick( bb_encode_bad($bb_flickr) ), true) ) );
bb_update_usermeta($user_id, "social_flickr",$bb_flickr);
}
else {bb_delete_usermeta($user_id, "social_flickr");}
if ( $bb_delicious )
{
$bb_delicious = bb_filter_kses( stripslashes( balanceTags( bb_code_trick( bb_encode_bad($bb_delicious) ), true) ) );
bb_update_usermeta($user_id, "social_delicious",$bb_delicious);
}
else {bb_delete_usermeta($user_id, "social_delicious");}
if ( $bb_digg )
{
$bb_digg = bb_filter_kses( stripslashes( balanceTags( bb_code_trick( bb_encode_bad($bb_digg) ), true) ) );
bb_update_usermeta($user_id, "social_digg",$bb_digg);
}
else {bb_delete_usermeta($user_id, "social_digg");}
if ( $bb_technorati )
{
$bb_technorati = bb_filter_kses( stripslashes( balanceTags( bb_code_trick( bb_encode_bad($bb_technorati) ), true) ) );
bb_update_usermeta($user_id, "social_technorati",$bb_technorati);
}
else {bb_delete_usermeta($user_id, "social_technorati");}
if ( $bb_hyves )
{
$bb_hyves = bb_filter_kses( stripslashes( balanceTags( bb_code_trick( bb_encode_bad($bb_hyves) ), true) ) );
bb_update_usermeta($user_id, "social_hyves",$bb_hyves);
}
else {bb_delete_usermeta($user_id, "social_hyves");}
if ( $bb_linkedin )
{
$bb_linkedin = bb_filter_kses( stripslashes( balanceTags( bb_code_trick( bb_encode_bad($bb_linkedin) ), true) ) );
bb_update_usermeta($user_id, "social_linkedin",$bb_linkedin);
}
else {bb_delete_usermeta($user_id, "social_linkedin");}
if ( $bb_lastfm )
{
$bb_lastfm = bb_filter_kses( stripslashes( balanceTags( bb_code_trick( bb_encode_bad($bb_lastfm) ), true) ) );
bb_update_usermeta($user_id, "social_lastfm",$bb_lastfm);
}
else {bb_delete_usermeta($user_id, "social_lastfm");}
}
add_action('profile_edited', 'update_user_socialize');
function bb_socialize_admin_page() {
global $bb_socialize;
?>
<h2>bbPress Social Profiles Management</h2>
<form method="post" name="bb_socialize_form" id="bb_socialize_form">
<fieldset>
<input type="hidden" name="bb_socialize" value="1">
<table class="widefat">
<thead>
<tr><th width="170">Option</th><th>Setting</th></tr>
</thead>
<tbody>
<tr>
<td><label for="images_url"><b>URL to images</b></label></td>
<td>
<input type="text" name="images_url" class="text long" value="<?php echo $bb_socialize['images_url']; ?>"> Please provide full url, but without final slash.
</td>
</tr>
<tr>
<td><label for="links_rel"><b>Links REL</b></label></td>
<td>
<input type="text" name="links_rel" class="text long" value="<?php echo $bb_socialize['links_rel']; ?>"> e.g. follow
</td>
</tr>
</tbody>
</table>
<h3>Set social sites</h3>
<p>Use the settings below to decide, which social media websites will be used on your forum. Set "yes" if you want to allow users to set their account for this specific website, or set "no" to hide the specific website. You can change these settings anytime you want.</p>
<table class="widefat">
<thead>
<tr><th width="170">Social Media Site</th><th>Display</th></tr>
</thead>
<tbody>
<tr>
<td><img src="<?php echo $bb_socialize['images_url']; ?>/bb_plurk.png" width="16" height="16" border="0" /> <label for="plurk"><b>Plurk</b></label></td>
<td>
<input name="plurk" value="1" type="radio" <?php if ( $bb_socialize['plurk'] == true ) { echo 'checked="checked"'; } ?>> Yes
<input name="plurk" value="0" type="radio" <?php if ( $bb_socialize['plurk'] == false ) { echo 'checked="checked"'; } ?>>No
</td>
</tr>
<tr>
<td><img src="<?php echo $bb_socialize['images_url']; ?>/bb_twitter.png" width="16" height="16" border="0" /> <label for="twitter"><b>Twitter</b></label></td>
<td>
<input name="twitter" value="1" type="radio" <?php if ( $bb_socialize['twitter'] == true ) { echo 'checked="checked"'; } ?>> Yes
<input name="twitter" value="0" type="radio" <?php if ( $bb_socialize['twitter'] == false ) { echo 'checked="checked"'; } ?>>No
</td>
</tr>
<tr>
<td><img src="<?php echo $bb_socialize['images_url']; ?>/bb_pownce.png" width="16" height="16" border="0" /> <label for="pownce"><b>Pownce</b></label></td>
<td>
<input name="pownce" value="1" type="radio" <?php if ( $bb_socialize['pownce'] == true ) { echo 'checked="checked"'; } ?>> Yes
<input name="pownce" value="0" type="radio" <?php if ( $bb_socialize['pownce'] == false ) { echo 'checked="checked"'; } ?>>No
</td>
</tr>
<tr>
<td><img src="<?php echo $bb_socialize['images_url']; ?>/bb_facebook.png" width="16" height="16" border="0" /> <label for="facebook"><b>Facebook</b></label></td>
<td>
<input name="facebook" value="1" type="radio" <?php if ( $bb_socialize['facebook'] == true ) { echo 'checked="checked"'; } ?>> Yes
<input name="facebook" value="0" type="radio" <?php if ( $bb_socialize['facebook'] == false ) { echo 'checked="checked"'; } ?>>No
</td>
</tr>
<tr>
<td><img src="<?php echo $bb_socialize['images_url']; ?>/bb_myspace.png" width="16" height="16" border="0" /> <label for="myspace"><b>MySpace</b></label></td>
<td>
<input name="myspace" value="1" type="radio" <?php if ( $bb_socialize['myspace'] == true ) { echo 'checked="checked"'; } ?>> Yes
<input name="myspace" value="0" type="radio" <?php if ( $bb_socialize['myspace'] == false ) { echo 'checked="checked"'; } ?>>No
</td>
</tr>
<tr>
<td><img src="<?php echo $bb_socialize['images_url']; ?>/bb_flickr.png" width="16" height="16" border="0" /> <label for="flickr"><b>Flickr</b></label></td>
<td>
<input name="flickr" value="1" type="radio" <?php if ( $bb_socialize['flickr'] == true ) { echo 'checked="checked"'; } ?>> Yes
<input name="flickr" value="0" type="radio" <?php if ( $bb_socialize['flickr'] == false ) { echo 'checked="checked"'; } ?>>No
</td>
</tr>
<tr>
<td><img src="<?php echo $bb_socialize['images_url']; ?>/bb_delicious.png" width="16" height="16" border="0" /> <label for="delicious"><b>Delicious</b></label></td>
<td>
<input name="delicious" value="1" type="radio" <?php if ( $bb_socialize['delicious'] == true ) { echo 'checked="checked"'; } ?>> Yes
<input name="delicious" value="0" type="radio" <?php if ( $bb_socialize['delicious'] == false ) { echo 'checked="checked"'; } ?>>No
</td>
</tr>
<tr>
<td><img src="<?php echo $bb_socialize['images_url']; ?>/bb_digg.png" width="16" height="16" border="0" /> <label for="digg"><b>Digg</b></label></td>
<td>
<input name="digg" value="1" type="radio" <?php if ( $bb_socialize['digg'] == true ) { echo 'checked="checked"'; } ?>> Yes
<input name="digg" value="0" type="radio" <?php if ( $bb_socialize['digg'] == false ) { echo 'checked="checked"'; } ?>>No
</td>
</tr>
<tr>
<td><img src="<?php echo $bb_socialize['images_url']; ?>/bb_technorati.png" width="16" height="16" border="0" /> <label for="technorati"><b>Technorati</b></label></td>
<td>
<input name="technorati" value="1" type="radio" <?php if ( $bb_socialize['technorati'] == true ) { echo 'checked="checked"'; } ?>> Yes
<input name="technorati" value="0" type="radio" <?php if ( $bb_socialize['technorati'] == false ) { echo 'checked="checked"'; } ?>>No
</td>
</tr>
<tr>
<td><img src="<?php echo $bb_socialize['images_url']; ?>/bb_hyves.png" width="16" height="16" border="0" /> <label for="hyves"><b>Hyves</b></label></td>
<td>
<input name="hyves" value="1" type="radio" <?php if ( $bb_socialize['hyves'] == true ) { echo 'checked="checked"'; } ?>> Yes
<input name="hyves" value="0" type="radio" <?php if ( $bb_socialize['hyves'] == false ) { echo 'checked="checked"'; } ?>>No
</td>
</tr>
<tr>
<td><img src="<?php echo $bb_socialize['images_url']; ?>/bb_linkedin.png" width="16" height="16" border="0" /> <label for="linkedin"><b>LinkedIn</b></label></td>
<td>
<input name="linkedin" value="1" type="radio" <?php if ( $bb_socialize['linkedin'] == true ) { echo 'checked="checked"'; } ?>> Yes
<input name="linkedin" value="0" type="radio" <?php if ( $bb_socialize['linkedin'] == false ) { echo 'checked="checked"'; } ?>>No
</td>
</tr>
<tr>
<td><img src="<?php echo $bb_socialize['images_url']; ?>/bb_lastfm.png" width="16" height="16" border="0" /> <label for="lastfm"><b>Last FM</b></label></td>
<td>
<input name="lastfm" value="1" type="radio" <?php if ( $bb_socialize['lastfm'] == true ) { echo 'checked="checked"'; } ?>> Yes
<input name="lastfm" value="0" type="radio" <?php if ( $bb_socialize['lastfm'] == false ) { echo 'checked="checked"'; } ?>>No
</td>
</tr>
</tbody>
</table>
<p class="submit"><input type="submit" name="bb_socialize_submit" value="Save bbSocialize settings"> <input type="submit" name="bb_socialize_reset" value="Reset settings"></p>
</fieldset>
</form>
<hr />
<p>If you like this plugin, please donate few bucks so I could keep developing it. Or at least <a href="http://twitter.com/t_thion/">follow me on Twitter</a> :).
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="wojciech.usarzewicz@gmail.com">
<input type="hidden" name="item_name" value="bbPages Donation">
<input type="hidden" name="item_number" value="bbPages Donation">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD" />
Type donation amount: $ <input type="text" name="amount" value="1" />
<input type="hidden" name="tax" value="0">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="bn" value="PP-DonationsBF">
<input type="submit" name="submit" value="Donate with PayPal!" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/pl_PL/i/scr/pixel.gif" width="1" height="1">
</form>
</p>
<?php
}
function bb_socialize_process_post() {
if ( isset( $_POST['bb_socialize_submit'] ) && isset( $_POST['bb_socialize'] ) )
{
global $bb_socialize;
foreach( array_keys($bb_socialize) as $key) {
if ( isset( $_POST[$key] ) ) { $bb_socialize[$key] = $_POST[$key]; }
}
bb_update_option('bb_socialize',$bb_socialize);
} elseif ( isset( $_POST['bb_socialize_reset'] ) ) {
global $bb_socialize;
foreach( array_keys($bb_socialize) as $key) {
if ( isset( $_POST[$key] ) ) { $bb_socialize[$key] = $_POST[$key]; }
}
bb_delete_option('bb_socialize');
}
}
add_action( 'bb_admin-header.php','bb_socialize_process_post');
function bb_socialize_add_admin_page() {
bb_admin_add_submenu(__('Social Profiles'), 'administrate', 'bb_socialize_admin_page' );
}
add_action( 'bb_admin_menu_generator', 'bb_socialize_add_admin_page' );
?>A workaround for the problem when config settings are not saved:
edit line 33 of bb-socialize.php to:
if ( $bb_socialize )
upload the file to your site and load the admin-configscreen of the plugin. set your prefs and hit save. Note that your previously settings are overwritten by the default values. Then
edit line 33 of bb-socialize.php back to:
if ( !$bb_socialize )
upload this file again and reload the page
You must log in to post.