# taboola/1.0/settings.php

Taboola, version 1.0. 194 lines.

- Page: https://pluginprobe.com/plugins/taboola/1.0/code/settings.php
- Raw: https://pluginprobe.com/plugins/taboola/1.0/raw/settings.php
- Modified: 2014-06-09T14:48:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/taboola/1.0/code/settings.php#L10-L20`.

```php
<style>
    .taboola-container {
        padding: 20px;
        padding-left: 0;
        width: 400px;
        font-size: 14px;
    }
    table {
        width: 380px;
        margin-left: 20px;
    }
    table td img {
        position: relative;
        top: 3px;
        margin-left: 5px;
    }
        /*    table {
                padding: 12px;
                border: 3px solid #467FD7;
                border-radius: 5px;
                margin-top: 10px;
                width: 100%;
            }*/
    table tr td:first-child {
        width: 110px;
    }
    table input {
        width: 100%;
    }
    input[type='text'] {
        border-radius: 3px;
    }
    hr {
        margin-top: 15px;
        margin-bottom: 15px;
        border-bottom: none;
    }
    input[type='checkbox'] {

    }
    input[type='submit']{
        float: right;
    }
    .checkbox {
        margin-bottom: 10px;
    }
    .request_link {
        float: right;
        margin-right: 10px;
        line-height: 26px;
    }
    table .tooltip {
        /*        position:relative;
                top:50px;
                left:50px;*/
    }
    .tooltip div { /* hide and position tooltip */
        background-color: black;
        color: white;
        border-radius: 5px;
        opacity: 0;
        position: absolute;
        -webkit-transition: opacity 0.5s;
        -moz-transition: opacity 0.5s;
        -ms-transition: opacity 0.5s;
        -o-transition: opacity 0.5s;
        transition: opacity 0.5s;
        width: 200px;
        padding: 10px;
        margin-left: 30px;
        margin-top: -45px;
    }
    table .tooltip:hover div { /* display tooltip on hover */
        opacity:1;
    }
    .label-success {
        font-size: 17px;
        display: block;
        margin-top: 10px;
        color: green;
    }
    .label-error {
        font-size: 17px;
        display: block;
        margin-top: 10px;
        color: red;
    }

</style>

<div class="taboola-container">
    <img src='<?php echo $this->plugin_url.'img/taboola.png' ?>' style='width:200px;'/>
    <hr>

    <form method="POST">
        <table>
            <tr>
                <td>Publisher ID</td>
                <td>
                    <input type="text" name="publisher_id" placeholder="publisher" value="<?php echo $settings->publisher_id ?>"/>
                </td>
                <td class='tooltip'>
                    <img src='<?php echo $this->plugin_url.'img/question-mark.png' ?>'/>
                    <div>Please contact your Taboola representative to receive the Publisher ID </div>
                </td>
            </tr>
            <tr>
                <td colspan='2' style='line-height: 26px; font-size: 13px;'>
                    Don't have a Publisher ID?
                    <a style='float: inherit; margin-left:5px; class='request_link' href=' http://taboola.com/contact' target='_blank'>Contact Taboola here</a>
                </td>
            </tr>
        </table>

        <hr style='margin-bottom: 25px; margin-top: 5px;'>

        <div class='checkbox'>
            <input id="first_bc_enabled" type="checkbox" <?php echo $settings->first_bc_enabled ? "checked='checked'" : "" ?> name="first_bc_enabled"/>
            Taboola widget below article
        </div>
        <table>
            <tr>
                <td>Widget ID</td>
                <td>
                    <input type="text" value="<?php echo $settings->first_bc_widget_id ?>" name="first_bc_widget_id" placeholder="Widget ID" />
                </td>
                <td class='tooltip'>
                    <img src='<?php echo $this->plugin_url.'img/question-mark.png' ?>'/>
                    <div>Please contact your Taboola representative to receive the Widget ID</div>
                </td>
            </tr>
            <!--            <tr>
                <td>Custom CSS</td>
                <td>
                    <input type="text" value="<?php echo $settings->first_bc_custom_css ?>" name="first_bc_custom_css" placeholder="Custom CSS" />
                </td>
            </tr>-->
        </table>
        <hr>

        <div class='checkbox'>
            <input id="second_bc_enabled" type="checkbox" <?php echo $settings->second_bc_enabled ? "checked='checked'" : "" ?> name="second_bc_enabled"/>
            Taboola widget below the first one
        </div>

        <table>
            <tr>
                <td>Widget ID</td>
                <td>
                    <input type="text" value="<?php echo $settings->second_bc_widget_id ?>" name="second_bc_widget_id" placeholder="Widget ID" />
                </td>
                <td class='tooltip'>
                    <img src='<?php echo $this->plugin_url.'img/question-mark.png' ?>'/>
                    <div>Please contact your Taboola representative to receive the Widget ID</div>
                </td>
            </tr>
            <!--            <tr>
                <td>Custom CSS</td>
                <td>
                    <input type="text" value="<?php echo $settings->second_bc_custom_css ?>" name="second_bc_custom_css" placeholder="Custom CSS" />
                </td>
            </tr>-->
        </table>
        <hr style='border-bottom: 1px solid #fafafa;'>

        <input class='button-secondary' type="submit" value="Apply Changes ✔"/>
        <!--         <a class='request_link' href=' http://taboola.com/contact' target='_blank'>Request Widget</a> -->
    </form>
    <div style='clear:both'></div>
    <?php
    if($_SERVER['REQUEST_METHOD'] == 'POST' && count($taboola_errors) == 0){
        echo "<span class='label-success'>Your changes have been made! You can now see them on your site</span>";
    }
    if(count($taboola_errors) > 0){
        for($i = 0; $i < count($taboola_errors); $i++){
            echo "<span class='label-error'>".$taboola_errors[$i]."</span>";
        }
    }
    ?>
</div>
<script>
    function sync_checkboxes(){
        if(jQuery('#first_bc_enabled').attr("checked")){
            jQuery('#second_bc_enabled').prop('disabled',false)
        } else {
            jQuery('#second_bc_enabled').prop('checked', false);
            jQuery('#second_bc_enabled').prop('disabled',true)
        }
    }
    jQuery('#first_bc_enabled').change(sync_checkboxes);
    setTimeout(function(){jQuery('.label-success').fadeOut()}, 6000);
    setTimeout(function(){jQuery('.label-error').fadeOut()}, 6000);
    sync_checkboxes()
</script>
```
