/*
Plugin Name: BungeeBones Remotely Hosted Web Directory
Plugin URI: http://BungeeBones.com
Description: The BungeeBones Remotely Hosted Web Directory plugin for Wordpress provides a "Collaborative" web directory for your Wordpress site. It is designed so that installers share the links submitted so the number of links in it becomes larger and more comprehensive to the end user. Collaborating is an easy way to operate and maintain a directory page for your users because all the category and link maintenance is provided by BungeeBones (free). Your "webmaster" users still get to submit a listing through your web directory but because of the collaboration their link shows up on your blog and also on all the other blogs and websites (BungeeBones is available for multiple platforms besides WordPress) that have installed the directory too. The amount of web traffic viewing the links is, as a result, increased with each new install and that is a great advantage to the lister. In addition, their link will continue to be added to all newly installed directories as they join so the amount of advertising it receives keeps growing. To get started: 1) Click the "Activate" link to the left of this description, 2) Add your link to BungeeBones (get your link/affiliate ID), and 3) Go to your bunbones-config.php page, and save your API key (click the "Edit" link below the BungeeBones plugin)..
To get the WordPress Plugin to work properly it helps to understand the basics of how it works.
You first must have added your link to the directory on the BungeeBones.com website and received a unique link ID from BungeeBones.com. Then you install and activate the plugin and add it as the affiliate ID on the bunbones_config.php file of the plugin. Now the plugin has a unique ID to identify itself and retrieve the categories and links from BungeeBones.
Next you have to tell BungeeBones where you have installed the plugin (i.e. the location of the page where you added the shortcode that activates the plugin). You do this on a form in your BungeeBones Control panel at BungeeBones.com. There are some good screenshots on the BungeeBones site to help you locate the right settings.
After you have pinpointed the correct location then you add that information through a simple form (two inputs) on the BungeeBones.com website. That should get the web directory functioning.
So, again, to get the plugin to work requires registration and adding your link to the web directory. That is absolutely free. You can then access the full installation instructions and screenshots from the BungeeBones User Control Panel. Installation of the web directory plugin does not affect the advertising your link will get.
For more install instructions visit the help page at your BungeeBones User Control Panel.
Version: 1.3
Author: Robert Lefebure
Author URI: http://BungeeBones.com
*/
remove_filter('template_redirect', 'redirect_canonical');
add_shortcode("bungeebones_directory","bungeebones_directory_shortcode");
register_activation_hook(__FILE__,'bungeebones_install');
do_action("activate_bungeebones-directory/bungeebones-directory.php");
function bungeebones_directory_shortcode($atts) {
global $wpdb;
extract(shortcode_atts(array('width'=>'100%','name'=>' the BungeeBones Distributed Directory'),$atts));
include('bunbones_config.php');
$var = explode("/", $_SERVER['REQUEST_URI']);
$url_cat = $var[4 + $offset] ;
$cat_page_num = $var[5 + $offset] ;
$link_page_num = $var[6 + $offset] ;
$pagem_url_cat = $var[7 + $offset] ;
$link_page_id = $var[8 + $offset] ;
$link_page_total = $var[9 + $offset] ;
$link_record_num = $var[10 + $offset] ;
$regional_number = $var[11 + $offset] ;
if($debug_bungeebones == 1){
print_r($var);
echo '
$url_cat = ',$url_cat;
echo '
$cat_page_num = ',$cat_page_num;
echo '
$link_page_num = ',$link_page_num;
echo '
$pagem_url_cat = ',$pagem_url_cat;
echo '
$link_page_id = ',$link_page_id;
echo '
$link_page_total = ',$link_page_total;
echo '
$link_record_num = ',$link_record_num;
echo '
$regional_number = ',$regional_number;
}?>
$file="http://Bungeebones.com/link_exchange/index.php/$affiliate_num/$url_cat/$cat_page_num/$link_page_num/$pagem_url_cat/$link_page_id/$link_page_total/$link_record_num/$regional_number";
if($debug_bungeebones == 1){
echo '
';
print_r($file);
echo '
';
}
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $file);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data3 = curl_exec($ch);
curl_close($ch);
echo($data3);
}