configuration panel for more settings. This plugin is inspired from the SexyBookmarks plugin for Wordpress. This plugin is also compatible with Support Forum plugin. Version: 1.5 Author: Gautam Author URI: http://gaut.am/ Original Social It bbPress Plugin Copyright 2010 Gautam (email: admin@gaut.am) (website: http://gaut.am) Original SexyBookmarks Plugin Copyright 2010 Josh (email: josh@sexybookmarks.net), Jamie, Gautam (email: admin@gaut.am) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Main PHP File for Social It Plugin (for bbPress) by www.gaut.am */ // Create Text Domain For Translations bb_load_plugin_textdomain( 'socialit', dirname( __FILE__ ) . '/languages' ); //defines define( 'SOCIALIT_OPTIONS', 'SocialIt' ); define( 'SOCIALIT_VER', '1.6-dev' ); define( 'SOCIALIT_PLUGPATH', bb_get_option('uri').trim(str_replace(array(trim(BBPATH,"/\\"),"\\"),array("","/"),dirname(__FILE__)),' /\\').'/' ); define( 'SOCIALIT_PLUGDIR', dirname(__FILE__).'/' ); define( 'SOCIALIT_RELDIR', '/' . trim(str_replace(array(trim(BBPATH,"/\\"),"\\"),array("","/"),dirname(__FILE__)),' /\\') ); //needed for sprite-gen //load json functins if they are not present if ( !class_exists('SERVICES_JSON') ) { if ( !function_exists('json_decode') ){ function json_decode($content, $assoc=false){ require_once 'includes/JSON.php'; if ( $assoc ){ $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE); } else { $json = new Services_JSON; } return $json->decode($content); } } if ( !function_exists('json_encode') ){ function json_encode($content){ require_once 'includes/JSON.php'; $json = new Services_JSON; return $json->encode($content); } } } require_once('includes/bookmarks-data.php'); //bookmarks data file //load options $socialit_plugopts = bb_get_option(SOCIALIT_OPTIONS); if(!$socialit_plugopts){ //add defaults to an array $socialit_plugopts = array( 'reloption' => 'nofollow', // 'nofollow', or '' 'targetopt' => '_blank', // '_blank' or '_self' 'bgimg-yes' => 'yes', // 'yes' or blank 'bgimg' => 'caring', // 'sexy', 'caring', 'wealth', 'care-old', 'enjoy', 'german' 'shorty' => 'b2l', 'shortyapi' => array( 'snip' => array( 'user' => '', 'key' => '', ), 'bitly' => array( 'user' => '', 'key' => '', ), 'supr' => array( 'chk' => 0, 'user' => '', 'key' => '', ), 'trim' => array( 'chk' => 0, 'user' => '', 'pass' => '', ), 'tinyarrow' => array( 'chk' => 0, 'user' => '', ), 'cligs' => array( 'chk' => 0, 'key' => '', ), ), 'shorturls' => array(), 'topic' => '1', 'bookmark' => array_keys($socialit_bookmarks_data), 'xtrastyle' => '', 'feed' => '0', // 1 or 0 'expand' => '1', 'autocenter' => '0', 'ybuzzcat' => 'science', 'ybuzzmed' => 'text', 'twittcat' => 'Internet', 'defaulttags' => 'Forum,Internet', 'warn-choice' => '', 'sfpnonres' => 'yes', 'sfpres' => 'yes', 'sfpnonsup' => 'yes', 'mobile-hide' => 'yes', 'custom-mods' => '', 'scriptInFooter' => '1', 'custom-css' => '', //generated by sprite gen, only in php5+ & phpgd ); bb_update_option(SOCIALIT_OPTIONS, $socialit_plugopts); } /* Load admin.php file if it is the admin area */ if( bb_is_admin() ){ require_once('includes/admin.php'); }else{ /* Else load public.php file if it is the public area */ require_once('includes/mobile.php'); require_once('includes/public.php'); }