Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammedcha authored Jul 6, 2021
1 parent ec63434 commit a100230
Show file tree
Hide file tree
Showing 6 changed files with 188 additions and 0 deletions.
105 changes: 105 additions & 0 deletions botsplit.re-skinning.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<?php function reskinning_splitter_admin_page(){ ?>
<div class="wrap">
<div id="poststuff">
<div id="post-body" class="metabox-holder columns-2">
<div id="post-body-content" style="position: relative">
<div class="stuffbox" style="padding:20px">
<h1>
<img src="<?php echo plugin_dir_url( __FILE__ ) . '/imgs/icon.png'; ?>" /> Re-skinning URL splitter By Mohammed Cha
</h1>
<hr>
<p class="description"><b><code>NB :</code> The sum of the percentages divided on the links must equal 100%</b> <code>Ex : 20 - 30 - 30 - 20</code></p>
<b>use Shortcode <code>[reskinning_splitter]</code> to display your button where you want</b>
<hr>
<form method="post" action="options.php">
<?php
settings_fields("reskinning_splitter_section");
do_settings_sections("reskinning_splitter_options");
submit_button();
?>
</form>
<br class="clear">
<span style="float:right;">Re-skinning URL splitter coded with <b style="color:red; font-size:20px;">&hearts;</b> By <a target="_blank" color="brown" href="https://re-skinning.com"> Mohammed Cha </a></span>
<br class="clear">
</div>
</div>
<div id="postbox-container-1" class="postbox-container">
<div class="postbox">
<h2 style="font-size:19px;" class="hndle ui-sortable-handle"><strong>Re-skinning URL splitter</strong></h2>
<div class="inside">
<div class="main">
<img style="max-width: 100%;" class="maxwidth" src="<?php echo plugin_dir_url( __FILE__ ) . '/imgs/logo.png'; ?>">
<hr>
<p>Divide / Split your Wordpress Blog visitors into 4 links by using Re-skinning URL splitter.</p>
<p>Re-skinning URL splitter By <a href="https://cutt.ly/NmvJcDE" target="_blank">Mohammed Cha</a></p>
<hr>
<h3>How to !</h3>
<b>use Shortcode <code>[reskinning_splitter]</code> to display your button where you want</b>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br class="clear">
<?php }
function reskinning_splitter() {
error_reporting(0);
$linkone = get_option('reskinning_url_one');
if (empty($linkone)) { $linkone = "#"; }else{ $linkone = get_option('reskinning_url_one'); }
$linkonepercent = get_option('reskinning_url_one_percent');
if (empty($linkonepercent)) { $linkonepercent = "0"; }else{ $linkonepercent = get_option('reskinning_url_one_percent'); }
$linktwo = get_option('reskinning_url_two');
if (empty($linktwo)) { $linktwo = "#"; }else{ $linktwo = get_option('reskinning_url_two'); }
$linktwopercent = get_option('reskinning_url_two_percent');
$linkthree = get_option('reskinning_url_three');
if (empty($linkthree)) { $linkthree = "#"; }else{ $linkthree = get_option('reskinning_url_three'); }
$linkthreepercent = get_option('reskinning_url_three_percent');
if (empty($linkthreepercent)) { $linkthreepercent = "0"; }else{ $linkthreepercent = get_option('reskinning_url_three_percent'); }
$linkfour = get_option('reskinning_url_four');
if (empty($linkfour)) { $linkfour = "#"; }else{ $linkfour = get_option('reskinning_url_four'); }
$linkfourpercent = get_option('reskinning_url_four_percent');
if (empty($linkfourpercent)) { $linkfourpercent = "0"; }else{ $linkfourpercent = get_option('reskinning_url_four_percent'); }
$link[0] = array('link' => $linkone, 'percent' => $linkonepercent);
$link[1] = array('link' => $linktwo, 'percent' => $linktwopercent);
$link[2] = array('link' => $linkthree, 'percent' => $linkthreepercent);
$link[3] = array('link' => $linkfour, 'percent' => $linkfourpercent);
$percent_arr = array();
foreach($link as $k => $_l) {
$percent_arr = array_merge($percent_arr, array_fill(0, $_l['percent'], $k));
}
$random_key = $percent_arr[mt_rand(0,count($percent_arr)-1)];
$redirectlink = $link[$random_key]['link'];
$btn_splitter_bg_color = get_option('reskinning_splitter_button_color');
return '
<style>
.reskinning_splitter_btn { text-align:center; }
.reskinning_splitter_btn a { background-color: #'.$btn_splitter_bg_color.'; border: none; border-radius:4px; color: white; padding: 15px 32px; text-align: center; text-decoration: none; display: inline-block; font-size: 1em;}
</style>
<div class="reskinning_splitter_btn">
<p>'.get_option('reskinning_splitter_button_description').'</p>
<a href="'.$redirectlink.'" target="_blank">'.get_option('reskinning_splitter_button_text').'</a>
</div>';
}add_shortcode('reskinning_splitter', 'reskinning_splitter');
class reskinning_splitter_widget extends WP_Widget {
public function __construct() {
$options = array(
'classname' => 'reskinning_splitter_cost_widget',
'description' => 'Re-Skinning Url Splitter Widget',
);
parent::__construct(
'reskinning_splitter_cost_widget', 'Re-Skinning URL Splitter', $options
);
}
public function widget( $args, $instance ) {
echo $args['before_widget'];
echo do_shortcode('[reskinning_splitter]');
echo $args['after_widget'];
}
}
function reskinning_splitter_widget_add() {
register_widget( 'reskinning_splitter_widget' );
}add_action( 'widgets_init', 'reskinning_splitter_widget_add' );


66 changes: 66 additions & 0 deletions botsplitter.re-skinning.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?php
function add_reskinning_splitter_admin_page() {
$icon_url = plugin_dir_url( __FILE__ ). '/imgs/icon.png';
add_menu_page("Re-skinning Url splitter", "Re-skinning SP", "administrator", "splitteradminpage", "reskinning_splitter_admin_page", $icon_url, 3);
}
add_action('admin_menu', 'add_reskinning_splitter_admin_page' );
function display_reskinning_url_one(){ ?>
<input type="text" name="reskinning_url_one" style="min-width: 500px;" placeholder="The First URL" id="reskinning_url_one" value="<?php echo get_option('reskinning_url_one'); ?>" />
<input type="text" name="reskinning_url_one_percent" style="min-width: 60px;" placeholder="Percentage" id="reskinning_url_one_percent" value="<?php echo get_option('reskinning_url_one_percent'); ?>" />
<p class="description"><?php _e('Enter the first URL and the percentage of visitors you want to direct to it'); ?></p>
<?php }
function display_reskinning_url_one_percent(){}
function display_reskinning_url_two(){ ?>
<input type="text" name="reskinning_url_two" style="min-width: 500px;" placeholder="The Second URL" id="reskinning_url_two" value="<?php echo get_option('reskinning_url_two'); ?>" />
<input type="text" name="reskinning_url_two_percent" style="min-width: 60px;" placeholder="Percentage" id="reskinning_url_two_percent" value="<?php echo get_option('reskinning_url_two_percent'); ?>" />
<p class="description"><?php _e('Enter the second URL and the percentage of visitors you want to direct to it'); ?></p>
<?php }
function display_reskinning_url_two_percent(){}
function display_reskinning_url_three(){ ?>
<input type="text" name="reskinning_url_three" style="min-width: 500px;" placeholder="The Second URL" id="reskinning_url_three" value="<?php echo get_option('reskinning_url_three'); ?>" />
<input type="text" name="reskinning_url_three_percent" style="min-width: 60px;" placeholder="Percentage" id="reskinning_url_three_percent" value="<?php echo get_option('reskinning_url_three_percent'); ?>" />
<p class="description"><?php _e('Enter the third URL and the percentage of visitors you want to direct to it'); ?></p>
<?php }
function display_reskinning_url_three_percent(){}
function display_reskinning_url_four(){ ?>
<input type="text" name="reskinning_url_four" style="min-width: 500px;" placeholder="The Second URL" id="reskinning_url_four" value="<?php echo get_option('reskinning_url_four'); ?>" />
<input type="text" name="reskinning_url_four_percent" style="min-width: 60px;" placeholder="Percentage" id="reskinning_url_four_percent" value="<?php echo get_option('reskinning_url_four_percent'); ?>" />
<p class="description"><?php _e('Enter the fourth URL and the percentage of visitors you want to direct to it'); ?></p>
<?php }
function display_reskinning_url_four_percent(){}
function display_reskinning_splitter_button_text(){ ?>
<input type="text" name="reskinning_splitter_button_text" style="min-width: 600px;" placeholder="Button text here" id="reskinning_splitter_button_text" value="<?php echo get_option('reskinning_splitter_button_text'); ?>" />
<p class="description"><?php _e('Enter your CPA button text here'); ?></p>
<?php }
function display_reskinning_splitter_button_description(){ ?>
<input type="text" name="reskinning_splitter_button_description" style="min-width: 600px;" placeholder="Button description here" id="reskinning_splitter_button_description" value="<?php echo get_option('reskinning_splitter_button_description'); ?>" />
<p class="description"><?php _e('Enter your CPA button description here'); ?></p>
<?php }
function display_reskinning_splitter_button_color(){ ?>
<input type="text" name="reskinning_splitter_button_color" style="min-width: 200px;" placeholder="Button Color here" id="reskinning_splitter_button_color" value="<?php echo get_option('reskinning_splitter_button_color'); ?>" />
<p class="description"><?php _e('Enter your CPA button <code>HEX COLOR CODE</code> here - <code>Example: eb4034</code>'); ?></p>
<p class="description"><?php _e('You can use <a target="_blank" href="https://www.google.com/search?q=color+picker">Google Color Picker</a> to choose a nice color'); ?></p>
<?php }
function display_splitter_panel_fieldset(){
add_settings_section("reskinning_splitter_section", null, null, "reskinning_splitter_options");
add_settings_field("reskinning_splitter_button_text", "Button Text", "display_reskinning_splitter_button_text", "reskinning_splitter_options", "reskinning_splitter_section");
register_setting("reskinning_splitter_section", "reskinning_splitter_button_text");
add_settings_field("reskinning_splitter_button_description", "Button Desctiption", "display_reskinning_splitter_button_description", "reskinning_splitter_options", "reskinning_splitter_section");
register_setting("reskinning_splitter_section", "reskinning_splitter_button_description");
add_settings_field("reskinning_splitter_button_color", "Button Color", "display_reskinning_splitter_button_color", "reskinning_splitter_options", "reskinning_splitter_section");
register_setting("reskinning_splitter_section", "reskinning_splitter_button_color");
add_settings_field("reskinning_url_one", "URL One", "display_reskinning_url_one", "reskinning_splitter_options", "reskinning_splitter_section");
register_setting("reskinning_splitter_section", "reskinning_url_one");
register_setting("reskinning_splitter_section", "reskinning_url_one_percent");
add_settings_field("reskinning_url_two", "URL Two", "display_reskinning_url_two", "reskinning_splitter_options", "reskinning_splitter_section");
register_setting("reskinning_splitter_section", "reskinning_url_two");
register_setting("reskinning_splitter_section", "reskinning_url_two_percent");
add_settings_field("reskinning_url_three", "URL Three", "display_reskinning_url_three", "reskinning_splitter_options", "reskinning_splitter_section");
register_setting("reskinning_splitter_section", "reskinning_url_three");
register_setting("reskinning_splitter_section", "reskinning_url_three_percent");
add_settings_field("reskinning_url_four", "URL Four", "display_reskinning_url_four", "reskinning_splitter_options", "reskinning_splitter_section");
register_setting("reskinning_splitter_section", "reskinning_url_four");
register_setting("reskinning_splitter_section", "reskinning_url_four_percent");
}add_action("admin_init", "display_splitter_panel_fieldset");
include( plugin_dir_path( __FILE__ ) . 'botsplit.re-skinning.php');

Binary file added imgs/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php // shuuuuuuuuuuuuuuuuuuut
16 changes: 16 additions & 0 deletions re-skinning.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

/*
Plugin Name: Re-skinning bot splitter
Plugin URI: https://re-skinning.com/
Description: Re-skinning BotCloaker : automatically coloak bots and add a SMART button at the end of any post. by Mohammed Cha / Re-Skinnig Group
Version: 1.0
Author: Mohammed Cha
Author URI: https://cutt.ly/bmkzGGi
License: GPLv2 or later
Text Domain: Re-skinning
*/

include( plugin_dir_path( __FILE__ ) . 'botsplitter.re-skinning.php');


0 comments on commit a100230

Please sign in to comment.