'."\n\n";
return $socials;
}
}
// This function is what allows people to insert the menu wherever they please rather than above/below a post...
function selfserv_socialit() {
echo get_socialit();
}
//write the code
function socialit_public() {
if(bb_get_topicmeta(get_topic_id(), 'hide_socialit') == true) {
echo "\n\n".''."\n\n";
}else{
global $socialit_plugopts;
echo "\n\n".''."\n";
wp_register_style('social-it', SOCIALIT_PLUGPATH.'css/style.css', false, SOCIALIT_vNum, 'all');
wp_print_styles('social-it');
if ($socialit_plugopts['expand'] || $socialit_plugopts['autocenter'] || $socialit_plugopts['targetopt']=='_blank') {
wp_register_script('social-it-public-js', SOCIALIT_PLUGPATH."js/social-it-public.js", array('jquery'), SOCIALIT_vNum);
wp_print_scripts('social-it-public-js');
}
echo ''."\n\n";
}
}
//styles for admin area
function socialit_admin() {
if($_GET['plugin'] == 'socialit_settings_page'){
echo "\n\n".''."\n";
wp_register_style('social-it', SOCIALIT_PLUGPATH.'css/admin-style.css', false, SOCIALIT_vNum, 'all');
wp_print_styles('social-it');
if (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') !== false)){ //ie, as usual, doesnt render the css properly :| and creates problems for the developers
wp_register_style('ie-social-it', SOCIALIT_PLUGPATH.'css/ie7-admin-style.css', false, SOCIALIT_vNum, 'all');
wp_print_styles('ie-social-it');
}
echo ''; //loads newer version of jquery. bbpress uses old version
echo ''; //ui core & sortable script not included in bbpress :-(
echo '';
echo ''; //social-it admin js script
echo ''."\n\n";
}
}
function socialit_insert_in_post($post_content) {
global $socialit_plugopts, $bbdb;
// decide whether or not to generate the bookmarks.
$istopic = bb_is_topic();
if (($istopic && $socialit_plugopts['topic'] == 1) || (bb_is_feed() && $socialit_plugopts['feed'] == 1) && (bb_get_topicmeta(get_topic_id(), 'hide_socialit') != "true")){ //socials should be generated and added
$post_id_fc = get_post_id(); //post id for check
if(bb_is_first($post_id_fc)){
$post_content .= get_socialit();
}
}
return $post_content;
}
?>