function dcwss_custom_css()
{
    $options = get_option('dcwss_options');
    $networks = dcwss_networks('networks');
    $def_color = dcwss_default_pickers();
    $out = '';
    // networks
    foreach ($networks as $k => $v) {
        $c = $options['color_' . $k] != '' ? $options['color_' . $k] : $def_color[$k];
        $out .= '.stream li.dcsns-' . $k . ' .section-intro,.filter .f-' . $k . ' a:hover, .wall-outer .dcsns-toolbar .filter .f-' . $k . ' a.iso-active{background-color:' . $c . '!important;}';
    }
    // tabs
    $c = $options['color_tab'] != '' ? $options['color_tab'] : '#777';
    $out .= '.wall-outer .dcsns-toolbar .filter li a {background:' . $c . ';}';
    // fixed widths
    if ($options['fixed'] == 'true' || $options['settings']['center'] == 'true') {
        $fw = $options['fixed_width'] != '' ? $options['fixed_width'] . 'px!important;' : '226px!important;';
        $mt = $options['fixed_margin_top'] != '' ? $options['fixed_margin_top'] . 'px ' : '0 ';
        $mr = $options['fixed_margin_right'] != '' ? $options['fixed_margin_right'] . 'px ' : '15px ';
        $mb = $options['fixed_margin_bottom'] != '' ? $options['fixed_margin_bottom'] . 'px ' : '15px ';
        $ml = $options['fixed_margin_left'] != '' ? $options['fixed_margin_left'] . 'px!important;' : '0!important;';
        $out .= '.dcwss.dc-wall .stream li {width: ' . $fw . ' margin: ' . $mt . $mr . $mb . $ml . '}';
    }
    // custom css
    $out .= $options['css'] != '' ? $options['css'] . "\n" : '';
    // Output styles
    if ($out != '') {
        $out = $out != '' ? "<!-- Custom Styling Social Stream -->\n<style type=\"text/css\">\n" . $out . "</style>\n" : '';
    }
    return $out;
}
function dc_social_wall_shortcode($atts, $content = null)
{
    extract(shortcode_atts(array('id' => '', 'twitterId' => '', 'limit' => 50, 'days' => 10, 'cols' => 4, 'max' => 'days', 'external' => 'true', 'speed' => 0.6, 'height' => 550, 'filter' => 'true', 'center' => 'false', 'controls' => 'true', 'remove' => '', 'order' => 'date', 'rotate_delay' => 8, 'rotate_direction' => 'up', 'cache' => 'true', 'iconPath' => '/images/dcwss-dark/', 'imagePath' => '/images/dcwss-dark/', 'debug' => 'false'), $atts));
    $out = '';
    $networks = array();
    $options = array();
    $defaults = array();
    $options = get_option('dcwss_options');
    $networks = dcwss_networks('networks');
    $settings = dcwss_networks('settings');
    $defaults = dcwss_networks('defaults');
    $stream = array();
    $stream = dcwss_get_stream($id);
    $i = 0;
    $t1 = 0;
    $f1 = 0;
    $feeds = 'feeds: {';
    $params = '';
    $opt = '';
    if (isset($stream['remove'])) {
        $remove = $stream['remove'];
    } else {
        $remove = '';
    }
    //	print_r($stream);
    foreach ($networks as $function => $f) {
        if ($function != '' && $stream['feeds_' . $function . '_id'] != '' && $stream['feeds_' . $function . '_id'] != ' ') {
            $feeds .= $i > 0 ? ',' . $function . ': {' : $function . ': {';
            if ($function == 'twitter' && $t1 == 0) {
                $url_p = '?1=' . trim($options['settings']['consumer_key']) . '&2=' . trim($options['settings']['consumer_secret']) . '&3=' . trim($options['settings']['access_token']) . '&4=' . trim($options['settings']['access_token_secret']);
                $feeds .= 'url: "' . plugins_url() . '/wordpress-social-stream/inc/dcwp_twitter.php' . $url_p . '",';
                //  multisite subdomain
                //	$feeds .= 'url: "' . get_bloginfo('url')  . '/wp-content/plugins/wordpress-social-stream/inc/dcwp_twitter.php'.$url_p.'",';
                $t1 = 1;
            }
            if ($function == 'facebook' && $f1 == 0) {
                $feeds .= 'url: "' . plugins_url() . '/wordpress-social-stream/inc/dcwp_facebook.php",';
                //  multisite subdomain
                //	$feeds .= 'url: "' . get_bloginfo('url')  . '/wp-content/plugins/wordpress-social-stream/inc/dcwp_facebook.php",';
                $f1 = 1;
            }
            $j = 0;
            foreach ($defaults[$function] as $k => $v) {
                if ($k == 'out') {
                    $feeds .= ',' . $k . ': "intro';
                    $section = explode(',', $defaults[$function][$k]);
                    $m = 1;
                    foreach ($section as $s) {
                        $idv = $stream['feeds_' . $function . '_' . $k . '_' . $s] != '' ? $stream['feeds_' . $function . '_' . $k . '_' . $s] : $def;
                        $x = $m > 0 ? ',' : '';
                        if ($s != 'intro') {
                            $feeds .= $stream['feeds_' . $function . '_' . $k . '_' . $s] == 'true' ? $x . $s : '';
                        }
                        $m++;
                    }
                    $feeds .= '"';
                } else {
                    if ($k == 'feed' && $function != 'facebook') {
                        $feeds .= ',' . $k . ': "';
                        $section = explode(',', $defaults[$function][$k]);
                        $m = 0;
                        foreach ($section as $s) {
                            $idv = $stream['feeds_' . $function . '_' . $k . '_' . $s] != '' ? $stream['feeds_' . $function . '_' . $k . '_' . $s] : $def;
                            $x = $m > 0 ? ',' : '';
                            $feeds .= $stream['feeds_' . $function . '_' . $k . '_' . $s] == 'true' ? $x . $s : '';
                            $m++;
                        }
                        $feeds .= '"';
                    } else {
                        if (isset($stream['feeds_' . $function . '_' . $k])) {
                            if ($function . '_' . $k == 'twitter_thumb' || $function . '_' . $k == 'twitter_retweets' || $function . '_' . $k == 'twitter_replies' || $function . '_' . $k == 'facebook_comments' || $function . '_' . $k == 'facebook_image_width' || $function . '_' . $k == 'facebook_thumb') {
                                $feeds .= $j > 0 ? ',' . $k . ': ' . $stream['feeds_' . $function . '_' . $k] : $k . ': ' . $stream['feeds_' . $function . '_' . $k];
                            } else {
                                $feeds .= $j > 0 ? ',' . $k . ': "' . $stream['feeds_' . $function . '_' . $k] . '"' : $k . ': "' . $stream['feeds_' . $function . '_' . $k] . '"';
                            }
                        }
                    }
                }
                $j++;
            }
            $feeds .= '}';
            $i++;
        }
    }
    $feeds .= '}';
    // remove specific posts
    if (isset($atts['remove'])) {
        $opt .= ',remove:"' . $atts['remove'] . '"';
    } else {
        $opt .= ',remove:"' . $remove . '"';
    }
    // get settings
    if (isset($options['settings'])) {
        foreach ($options['settings'] as $k => $v) {
            switch ($k) {
                case 'speed':
                    $v = $v * 1000;
                    $opt .= $v != $settings[$k] ? ',' . $k . ': ' . $v : '';
                    break;
                case 'controls':
                    $opt .= $v != $settings[$k] ? ',controls: "false"' : '';
                    break;
                case 'max':
                    if (isset($atts[$k])) {
                        $opt .= ',max: "' . $atts[$k] . '"';
                    } else {
                        $opt .= $v != $settings[$k] ? ',max: "' . $v . '"' : '';
                    }
                    break;
                case 'order':
                    if (isset($atts[$k])) {
                        $opt .= ',order: "' . $atts[$k] . '"';
                    } else {
                        $opt .= $v != $settings[$k] ? ',order: "' . $v . '"' : '';
                    }
                    break;
                case 'results':
                    $atts['max'] = isset($atts['max']) ? $atts['max'] : '';
                    if ($atts['max'] == '') {
                        if (isset($atts[$k])) {
                            $opt .= ',days: ' . $atts[$k];
                            $opt .= $options['settings']['max'] == 'limit' ? ',limit: ' . $atts[$k] : ',limit: 100';
                        } else {
                            $opt .= ',days: ' . $v;
                            $opt .= $options['settings']['max'] == 'limit' ? ',limit: ' . $v : ',limit: 100';
                        }
                    } else {
                        if ($atts['max'] == 'days') {
                            $opt .= ',limit: 100';
                            $opt .= $atts[$k] != '' ? ',days: ' . $atts[$k] : ',days: ' . $options['settings']['results'];
                        } else {
                            if ($atts['max'] == 'limit') {
                                $opt .= ',days: ' . $options['settings']['results'];
                                $opt .= $atts[$k] != '' ? ',limit: ' . $atts[$k] : ',limit: ' . $options['settings']['results'];
                            }
                        }
                    }
                    break;
                case 'rotate_delay':
                    break;
                case 'rotate_direction':
                    break;
                case 'consumer_key':
                    break;
                case 'consumer_secret':
                    break;
                case 'access_token':
                    break;
                case 'access_token_secret':
                    break;
                case 'fb_app_id':
                    break;
                case 'fb_app_secret':
                    break;
                case 'cache':
                    if (isset($atts[$k])) {
                        $opt .= ',cache: ' . $atts[$k];
                    } else {
                        $opt .= $v != $settings[$k] ? ',cache: ' . $v : '';
                    }
                    break;
                case 'filter':
                    if (isset($atts[$k])) {
                        $opt .= ',filter: ' . $atts[$k];
                    } else {
                        $opt .= $v != $settings[$k] ? ',filter: ' . $v : '';
                    }
                    break;
                case 'center':
                    if (isset($atts[$k])) {
                        $opt .= ',center: ' . $atts[$k];
                    } else {
                        $opt .= $v != $settings[$k] ? ',center: ' . $v : '';
                    }
                    break;
                case 'twitterId':
                    if (isset($atts[$k])) {
                        $opt .= ',twitterId: "' . $atts[$k] . '"';
                    } else {
                        $opt .= $v != $settings[$k] ? ',twitterId: "' . $v . '"' : '';
                    }
                    break;
                default:
                    if (isset($atts[$k])) {
                        $opt .= ',' . $k . ': ' . $atts[$k];
                    } else {
                        $opt .= $v != $settings[$k] ? ',' . $k . ': ' . $v : '';
                    }
                    break;
            }
        }
    }
    $opt .= ',rotate: {delay: 0';
    $opt .= ', direction: "';
    if (isset($options['settings']['rotate_direction'])) {
        $opt .= $options['settings']['rotate_direction'] != $settings['rotate_direction'] ? $options['settings']['rotate_direction'] : $settings['rotate_direction'];
    }
    $opt .= '"}';
    $config = '{' . $feeds . $opt;
    $config .= ',wall: true,container: "dcwss",cstream: "stream",content: "dcwss-content"';
    $config .= ',imagePath: "' . plugins_url() . '/wordpress-social-stream' . $imagePath . '"';
    $config .= ',iconPath: "' . plugins_url() . '/wordpress-social-stream' . $iconPath . '"}';
    $out .= '<script type="text/javascript">jQuery(document).ready(function($){';
    $out .= 'var config = ' . $config . ';';
    $out .= 'if(!jQuery().dcSocialStream) { $.getScript("' . plugins_url() . '/wordpress-social-stream/js/jquery.social.stream.wall.1.6.js", function(){}); $.getScript("' . plugins_url() . '/wordpress-social-stream/js/jquery.social.stream.1.5.13.min.js", function(){$("#social-stream-' . $id . '").dcSocialStream(config);}); } else {';
    $out .= '$("#social-stream-' . $id . '.dc-wall").dcSocialStream(config);}});</script>' . "\n";
    $out .= '<div class="wall-outer"><div id="social-stream-' . $id . '" class="dc-wall col-' . $cols . '"></div></div>';
    return $out;
}
Exemplo n.º 3
0
        function option_page()
        {
            global $wpdb;
            $this->setup_admin_page('Social Stream Settings', 'Social Streams');
            ?>

		<script type="text/javascript">
		(function($){
			var initLayout = function() {
			$('.color-selector').each(function(){
				var o = $(this);
				var c = $(this).next('.input-color');
				$(this).ColorPicker({
					color: c.val(),
					onShow: function (colpkr) {
						$(colpkr).fadeIn(500);
						return false;
					},
					onHide: function (colpkr) {
						var hx = $('.colorpicker_hex input',colpkr).val();
						var id = o.attr('id');
						$('#'+id+'_input').val('#'+hx);
						$(colpkr).fadeOut(500);
						return false;
					},
					onChange: function (hsb, hex, rgb) {
						$('div',o).css('backgroundColor', '#' + hex);
					}
				});
			});
		};
	
		EYE.register(initLayout, 'init');
})(jQuery)
		</script>
		
			<?php 
            //delete_option('dcwss_options');
            $networks = dcwss_networks('networks');
            $titles = dcwss_networks('Ids');
            $defaults = dcwss_networks('defaults');
            $settings = dcwss_networks('settings');
            $helptext = dcwss_networks('help');
            $colors = dcwss_default_pickers();
            $help = '<a href="#" class="dcwss-help"><img src="' . plugins_url() . '/wordpress-social-stream/images/help.png" alt="?" /></a>';
            $close = '<a href="#" class="dcwss-close"><img src="' . plugins_url() . '/wordpress-social-stream/images/close.png" alt="x" /></a>';
            $close_1 = '<img src="' . plugins_url() . '/wordpress-social-stream/images/close_1.png" alt="?" />';
            $close_2 = '<img src="' . plugins_url() . '/wordpress-social-stream/images/close_2_off.png" alt="?" class="img-swap" />';
            $load = '<img src="' . plugins_url() . '/wordpress-social-stream/images/loading.gif" alt="Loading" />';
            ?>
			
			  <div id="dcwss-slider">
			  <div class="dcwss-slide">
			  <?php 
            include 'dcwp_streams.php';
            ?>
			</div>
			 <div class="dcwss-slide">
			<form method="post" id="dcwss_settings_page" class="dcwp-form" action="options.php">
			<?php 
            settings_fields('dcwss_options_group');
            $options = get_option('dcwss_options');
            if (!isset($options['skin'])) {
                $options['skin'] = 'true';
            }
            $skin = $options['skin'];
            foreach ($settings as $k => $v) {
                if (!isset($options['settings'][$k])) {
                    $options['settings'][$k] = $v;
                }
            }
            ?>
			<!-- Start Settings -->
			<div class="metabox-holder">
				  <div class="meta-box-sortables min-low">
				    <div class="postbox dcwp">
					  <h3 class="hndle"><span>Settings</span><?php 
            echo $help;
            ?>
</h3>
					  <div class="inside">
					  <div class="dcwss-help-text">
						<h3>Help<?php 
            echo $close;
            ?>
</h3>
						<h4>Settings</h4>
						<p>The settings section allows you to configure the default features for displaying the social streams. Settings can be changed for individual social streams using the shortcodes:</p>
						<ul>
							<li class="clear"><label>Stream:</label> Select whether to create the stream based on the total number of days (select "days") or number of items per feed (select "limit").</li>
							<li><label>Results:</label>The maximum number of results to display based on the stream type above - e.g. 10 results per feed or 10 days.</li>
							<li><label>Order:</label>Select whether to order by date or randomly.</li>
							<li class="clear"><label>Filter:</label>When set to "on" a navigation bar of all active network icons will appear either at the bottom of the rotating feed list or above the social network wall. Clicking on these icons will allow the user to filter the stream.</li>
							<li><label>Controls:</label>When set to "on" a control bar will appear at the bottom of each tab when the user hovers over the content. The control navigation allows the user to stop/start the rotating feed or go to next/previous entry.</li>
							
							<li><label>Center:</label>Set to "on" to center the wall feed items in the page.</li>
							
							<li class="clear"><label>Open Links In New Window:</label>Select "on" to open all links in a new browser window</li>
							<li><label>Cache:</label>Select "on" to enable browser caching of feed - reduces up download time</li>
							<li class="clear"><label>Animation Speed:</label>The speed (in seconds) for the rotating animation.</li>
							<li><label>Height:</label>Only applies to the rotating feed display - The height of the widget in pixels</li>
							<li class="clear"><label>Rotate Delay:</label>Enter the number of seconds between each feed item. To disable the rotating feed option set the delay to zero.</li>
							<li><label>Rotate Direction:</label>Sets the rotating feed direction to either "up" or "down"</li>
							<li class="clear"><label>Twitter ID:</label>Enter the twitter username to use in twitter share links - will appear at the end of tweets as "via @username"</li>
							<li class="clear"><label>Twitter API Credentials:</label>To create your Twitter API credentials see plugin documentation<br />FAQ -> Twitter API Credentials</li>
						</ul>
						<div class="clear"></div>
					</div>
				
				<ul class="list-styles half list-switches">
					<li>
					<label>Stream:</label>
					<?php 
            $val = $options['settings']['max'] != '' ? $options['settings']['max'] : 'days';
            ?>
 
					<input type="radio" class="radio" value="days" name="dcwss_options[settings][max]" <?php 
            if ($val == 'days') {
                echo 'checked="checked"';
            }
            ?>
 /> Days 
					<input type="radio" class="radio" value="limit" name="dcwss_options[settings][max]" <?php 
            if ($val == 'limit') {
                echo 'checked="checked"';
            }
            ?>
/> Limit</li>
					<li>
					<label>Results:</label>
					<?php 
            $val = $options['settings']['results'] != '' ? $options['settings']['results'] : 10;
            ?>
					<input id="dcwss_setting_results" name="dcwss_options[settings][results]" class="text-input" type="text" value="<?php 
            echo $val;
            ?>
" />
				  </li>
				  <li>
					<label>Order:</label>
					<?php 
            $val = $options['settings']['order'] != '' ? $options['settings']['order'] : 'date';
            ?>
 
					<input type="radio" class="radio" value="date" name="dcwss_options[settings][order]" <?php 
            if ($val == 'date') {
                echo 'checked="checked"';
            }
            ?>
 /> Date <input type="radio" class="radio" value="random" name="dcwss_options[settings][order]" <?php 
            if ($val == 'random') {
                echo 'checked="checked"';
            }
            ?>
/> Random
				  </li>
				  <li>
					<label>Center:</label>
					<?php 
            $val = $options['settings']['center'] != '' ? $options['settings']['center'] : 'false';
            ?>
					<div class="dcwss-switch-link link-center">
						<a href="#" rel="true" class="link-true <?php 
            echo $val == 'true' ? 'active' : '';
            ?>
"></a>
						<a href="#" rel="false" class="link-false <?php 
            echo $val == 'false' ? 'active' : '';
            ?>
"></a>
					</div>
					<input id="dcwss_setting_filter" name="dcwss_options[settings][center]" class="dc-switch-value" type="hidden" value="<?php 
            echo $val;
            ?>
" />
				  </li>
				  <li>
					<label>Cache:</label>
					<?php 
            $val = $options['settings']['cache'] != '' ? $options['settings']['cache'] : 'true';
            ?>
					<div class="dcwss-switch-link">
						<a href="#" rel="true" class="link-true <?php 
            echo $val == 'true' ? 'active' : '';
            ?>
"></a>
						<a href="#" rel="false" class="link-false <?php 
            echo $val == 'false' ? 'active' : '';
            ?>
"></a>
					</div>
					<input id="dcwss_setting_cache" name="dcwss_options[settings][cache]" class="dc-switch-value" type="hidden" value="<?php 
            echo $val;
            ?>
" />
				  </li>
				   <li>
					<label>Filter:</label>
					<?php 
            $val = $options['settings']['filter'] != '' ? $options['settings']['filter'] : 'true';
            ?>
					<div class="dcwss-switch-link">
						<a href="#" rel="true" class="link-true <?php 
            echo $val == 'true' ? 'active' : '';
            ?>
"></a>
						<a href="#" rel="false" class="link-false <?php 
            echo $val == 'false' ? 'active' : '';
            ?>
"></a>
					</div>
					<input id="dcwss_setting_filter" name="dcwss_options[settings][filter]" class="dc-switch-value" type="hidden" value="<?php 
            echo $val;
            ?>
" />
				  </li>
				  <li class="tall">
					<label>Open Links In New Window:</label>
					<?php 
            $val = $options['settings']['external'] != '' ? $options['settings']['external'] : 'true';
            ?>
					<div class="dcwss-switch-link">
						<a href="#" rel="true" class="link-true <?php 
            echo $val == 'true' ? 'active' : '';
            ?>
"></a>
						<a href="#" rel="false" class="link-false <?php 
            echo $val == 'false' ? 'active' : '';
            ?>
"></a>
					</div>
					<input id="dcwss_setting_external" name="dcwss_options[settings][external]" class="dc-switch-value" type="hidden" value="<?php 
            echo $val;
            ?>
" />
				  </li>
				</ul>
				<ul class="list-styles half list-switches">
				  <li>
					<label>Animation Speed:</label>
					<?php 
            $val = $options['settings']['speed'] != '' ? $options['settings']['speed'] : 0.6;
            ?>
					<input id="dcwss_setting_speed" name="dcwss_options[settings][speed]" class="text-input" type="text" value="<?php 
            echo $val;
            ?>
" />
				  </li>
				  <li>
					<label>Height:</label>
					<?php 
            $val = $options['settings']['height'] != '' ? $options['settings']['height'] : 490;
            ?>
					<input id="dcwss_setting_height" name="dcwss_options[settings][height]" class="text-input" type="text" value="<?php 
            echo $val;
            ?>
" />
				  </li>
				  <li>
					<label>Controls:</label>
					<?php 
            $val = $options['settings']['controls'] != '' ? $options['settings']['controls'] : 'true';
            ?>
					<div class="dcwss-switch-link">
						<a href="#" rel="true" class="link-true <?php 
            echo $val == 'true' ? 'active' : '';
            ?>
"></a>
						<a href="#" rel="false" class="link-false <?php 
            echo $val == 'false' ? 'active' : '';
            ?>
"></a>
					</div>
					<input id="dcwss_setting_controls" name="dcwss_options[settings][controls]" class="dc-switch-value" type="hidden" value="<?php 
            echo $val;
            ?>
" />
				  </li>
				  <li>
					<label>Rotate Delay:</label>
					<?php 
            $val = $options['settings']['rotate_delay'] != '' ? $options['settings']['rotate_delay'] : 6;
            ?>
					<input id="dcwss_setting_rotate_delay" name="dcwss_options[settings][rotate_delay]" class="text-input" type="text" value="<?php 
            echo $val;
            ?>
" />
				  </li>
				  <li>
					<label>Rotate Direction:</label>
					<?php 
            $val = $options['settings']['rotate_direction'] != '' ? $options['settings']['rotate_direction'] : 'down';
            ?>
 
					<input type="radio" class="radio" value="up" name="dcwss_options[settings][rotate_direction]" <?php 
            if ($val == 'up') {
                echo 'checked="checked"';
            }
            ?>
 /> Up <input type="radio" class="radio" value="down" name="dcwss_options[settings][rotate_direction]" <?php 
            if ($val == 'down') {
                echo 'checked="checked"';
            }
            ?>
/> Down
				  </li>
				   <li>
					<label>Twitter ID:</label>
					<?php 
            $val = $options['settings']['twitterId'] != '' ? $options['settings']['twitterId'] : '';
            ?>
					<input id="dcwss_setting_twitterId" name="dcwss_options[settings][twitterId]" class="text-input" type="text" value="<?php 
            echo $val;
            ?>
" />
				  </li>
				  </ul>
				  
				  
				
				
				<input id="dcwss_setting_iconPath" name="dcwss_options[settings][iconPath]" type="hidden" value="" />
				<input id="dcwss_setting_imagePath" name="dcwss_options[settings][imagePath]" type="hidden" value="" />
				<div class="clear"></div>
			</div></div></div></div>
			
			
			<div class="metabox-holder">
				  <div class="meta-box-sortables">
				    <div class="postbox dcwp">
					  <h3 class="hndle"><span>Social Network APIs & Authentication</span></h3>
					  <div class="inside">
					  
					  <p class="note">For step-by-step instructions on how to create your Twitter API settings please see plugin documentation section: Social Network APIs & Authentication</p>
					 
				  <h4 class="clear">Twitter API Credentials - Required For All Twitter Feeds</h4>

				<ul class="twitter-credentials">
				  <li>
					<label>Consumer Key:</label>
					<?php 
            $val = $options['settings']['consumer_key'] != '' ? $options['settings']['consumer_key'] : '';
            ?>
					<input id="dcwss_setting_consumer_key" name="dcwss_options[settings][consumer_key]" class="text-input" type="text" value="<?php 
            echo $val;
            ?>
" />
				  </li>
				  <li>
					<label>Consumer Secret:</label>
					<?php 
            $val = $options['settings']['consumer_secret'] != '' ? $options['settings']['consumer_secret'] : '';
            ?>
					<input id="dcwss_setting_consumer_secret" name="dcwss_options[settings][consumer_secret]" class="text-input" type="text" value="<?php 
            echo $val;
            ?>
" />
				  </li>
				  <li>
					<label>OAuth Access Token:</label>
					<?php 
            $val = $options['settings']['access_token'] != '' ? $options['settings']['access_token'] : '';
            ?>
					<input id="dcwss_setting_access_token" name="dcwss_options[settings][access_token]" class="text-input" type="text" value="<?php 
            echo $val;
            ?>
" />
				  </li>
				  <li>
					<label>OAuth Access Token Secret:</label>
					<?php 
            $val = $options['settings']['access_token_secret'] != '' ? $options['settings']['access_token_secret'] : '';
            ?>
					<input id="dcwss_setting_access_token_secret" name="dcwss_options[settings][access_token_secret]" class="text-input" type="text" value="<?php 
            echo $val;
            ?>
" />
				  </li>
				  
				</ul>
				
				 <h4 class="clear">Facebook APP Details - Required For All Facebook Page Feeds</h4>

				<ul class="twitter-credentials">
				  <li>
					<label>Facebook App ID:</label>
					<?php 
            $val = $options['settings']['fb_app_id'] != '' ? $options['settings']['fb_app_id'] : '';
            ?>
					<input id="dcwss_setting_consumer_key" name="dcwss_options[settings][fb_app_id]" class="text-input" type="text" value="<?php 
            echo $val;
            ?>
" />
				  </li>
				  <li>
					<label>Facebook App Secret:</label>
					<?php 
            $val = $options['settings']['fb_app_secret'] != '' ? $options['settings']['fb_app_secret'] : '';
            ?>
					<input id="dcwss_setting_consumer_secret" name="dcwss_options[settings][fb_app_secret]" class="text-input" type="text" value="<?php 
            echo $val;
            ?>
" />
				  </li>
				</ul>
		
			</div></div></div></div>
			
			
			<?php 
            // styling
            $skin = $options['skin'] != '' ? $options['skin'] : 'true';
            $fixed = $options['fixed'] != '' ? $options['fixed'] : 'false';
            $def_color = dcwss_default_pickers();
            ?>
					  
			<div class="metabox-holder">
				  <div class="meta-box-sortables">
				    <div class="postbox dcwp">
					  <h3 class="hndle"><span>Styling</span><?php 
            echo $help;
            ?>
</h3>
					  <div class="inside">
					  <div class="dcwss-help-text">
						<h3>Help<?php 
            echo $close;
            ?>
</h3>
						<h4>Default Skin</h4>
						<p>Switch the default skin option to "Off" to stop the loading of the default CSS file.</p>
						<h4>Default Tab Color</h4>
						<p>To change the default background color of the social network wall filter tabs click on the colored box - a colorpicker should now appear. Select the new color and then click elsewhere on the screen to close the colorpicker widget. The colored box should now be updated using the new color.</p>
						<h4>Social Network Colors</h4>
						<p>These show the background colors used for the individual social networks. To change one of the network colors click on the relevant colored box - a colorpicker should now appear. Select the new color and then click elsewhere on the screen to close the colorpicker widget. The colored box should now be updated using the new color.</p>
						<h4>Social Wall Feed Item Width</h4>
						<p>The default styling for the social network wall uses % widths for the feed items. To change this to fixed widths set the "Use Fixed Widths" switch to "on" and enter the preferred width and margins (in pixels) for your wall feed items. Turn "off" to revert back to the default % widths.</p>
						<h4>Custom CSS</h4>
						<p>Custom CSS for styling the social media tabs can be entered into the text field. Any CSS rules included in this text area will automatically be inserted into the page.</p>
					</div>

				<ul class="margin-bottom">
					<li>
					  <label for="dcwss_skin">Default Skin:</label>
					  <div class="dcwss-switch-link link-skin">
						<a href="#" rel="true" class="link-true <?php 
            echo $skin == 'true' ? 'active' : '';
            ?>
"></a>
						<a href="#" rel="false" class="link-false <?php 
            echo $skin == 'false' ? 'active' : '';
            ?>
"></a>
						</div>
						<input id="dcwss_skin" name="dcwss_options[skin]" class="dc-switch-value" type="hidden" value="<?php 
            echo $skin;
            ?>
" />
					</li>
				</ul>
				
				<div class="default-styles <?php 
            echo $skin;
            ?>
">
					
					<h4 class="clear">Filter Background Color</h4>
					<ul class="list-styles list-picker">
						<?php 
            $c = $options['color_tab'] != '' ? $options['color_tab'] : '#777';
            ?>
						<li><div id="picker_tab" class="color-selector"><div style="background-color: <?php 
            echo $c;
            ?>
;"></div></div>
							<span>Background</span>
							<input class="input-color" name="dcwss_options[color_tab]" id="picker_tab_input" type="hidden" value="<?php 
            echo $c;
            ?>
" />
						</li>
					</ul>
					
					<h4 class="clear">Social Network Colors</h4>
					<ul class="list-styles list-picker">
						<?php 
            foreach ($networks as $k => $v) {
                $c = $options['color_' . $k] != '' ? $options['color_' . $k] : $def_color[$k];
                echo '<li><div id="picker_' . $k . '" class="color-selector"><div style="background-color: ' . $c . ';"></div></div>';
                echo '<span>' . $v . '</span>';
                echo '<input class="input-color" name="dcwss_options[color_' . $k . ']" id="picker_' . $k . '_input" type="hidden" value="' . $c . '" /></li>';
            }
            ?>
					</ul>
				</div>
				
				<h4 class="clear">Social Wall Feed Item Width</h4>
				
				<ul class="margin-bottom">
					<li>
					  <label for="dcwss_fixed">Use Fixed Widths:</label>
					  <div class="dcwss-switch-link link-fixed">
						<a href="#" rel="true" class="link-true <?php 
            echo $fixed == 'true' ? 'active' : '';
            ?>
"></a>
						<a href="#" rel="false" class="link-false <?php 
            echo $fixed == 'false' ? 'active' : '';
            ?>
"></a>
					  </div>
					  <input id="dcwss_fixed" name="dcwss_options[fixed]" class="dc-switch-value" type="hidden" value="<?php 
            echo $fixed;
            ?>
" />
					</li>
				</ul>
				
				<ul class="clear" id="feed-item-widths">
					<li>
						<label>Width (px):</label>
						<?php 
            $val = $options['fixed_width'] != '' ? $options['fixed_width'] : '226';
            ?>
						<input id="dcwss_fixed_width" name="dcwss_options[fixed_width]" class="text-input" type="text" value="<?php 
            echo $val;
            ?>
" />
					</li>
					<li>
						<label>Margin Top (px):</label>
						<?php 
            $val = $options['fixed_margin_top'] != '' ? $options['fixed_margin_top'] : '0';
            ?>
						<input id="dcwss_fixed_margin_top" name="dcwss_options[fixed_margin_top]" class="text-input" type="text" value="<?php 
            echo $val;
            ?>
" />
					</li>
					<li>
						<label>Margin Right (px):</label>
						<?php 
            $val = $options['fixed_margin_right'] != '' ? $options['fixed_margin_right'] : '15';
            ?>
						<input id="dcwss_fixed_margin_right" name="dcwss_options[fixed_margin_right]" class="text-input" type="text" value="<?php 
            echo $val;
            ?>
" />
					</li>
					<li>
						<label>Margin Bottom (px):</label>
						<?php 
            $val = $options['fixed_margin_bottom'] != '' ? $options['fixed_margin_bottom'] : '15';
            ?>
						<input id="dcwss_fixed_margin_bottom" name="dcwss_options[fixed_margin_bottom]" class="text-input" type="text" value="<?php 
            echo $val;
            ?>
" />
					</li>
					<li>
						<label>Margin Left (px):</label>
						<?php 
            $val = $options['fixed_margin_left'] != '' ? $options['fixed_margin_left'] : '0';
            ?>
						<input id="dcwss_fixed_margin_left" name="dcwss_options[fixed_margin_left]" class="text-input" type="text" value="<?php 
            echo $val;
            ?>
" />
					</li>
				</ul>
				
				<ul class="clear">
					<li>
						<label for="dcwss_css">Custom CSS:</label>
						<textarea class="dcwp-textarea" name="dcwss_options[css]" id="dcwss_css" rows="5"><?php 
            echo $options['css'];
            ?>
</textarea>
					</li>
				</ul>
			</div></div></div></div>
			
			
		<div class="submit-container">
			<input type="submit" class="button-primary" value="<?php 
            _e('Save Changes');
            ?>
" />
			<input name="dcwss_options[new_install]" type="hidden" value="no" />
		</div>
		</form>
		</div>
		</div>
		

		</div>

		<div id="dcwss-side" class="postbox-container" style="width:30%;">
			<div class="metabox-holder">	
				<div class="meta-box-sortables">
					<?php 
            $this->dcwp_advert();
            $this->likebox();
            $this->latest_posts();
            ?>
				
				</div>
			</div>
		</div>
	</div>
	<?php 
        }