Plugin Directory

Changeset 407267


Ignore:
Timestamp:
07/09/2011 05:59:36 AM (15 years ago)
Author:
n33rav
Message:
  • Advanced option for excluding/including blogs
  • Fix for tinymce to work with Wordpress 3.2
  • Improved options page layout
Location:
wpms-global-content/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wpms-global-content/trunk/assets/css/admin.css

    r379435 r407267  
    1 #wpmsgc-options h1 {
    2     font-family: Georgia, "Times New Roman", Times, Serif;
    3     font-weight: normal;
    4     font-size: 2.2em;
     1#wpmsgc-options form{
     2    width:794px;
     3    background: #ECECEC;
     4    padding: 8px 8px 0 8px;
     5    margin-top: 10px;
    56}
    6 .form-table tr:hover{
    7     background-color:#eeeeee;
     7#wpmsgc-options form > table{
     8    width:794px;
     9    background: #FFF;
     10    margin: 0;
    811}
    9 #wpmsgc-options h1.v-trial {
    10     float: left;
    11     margin: 5px 0 0 0;
     12#wpmsgc-options form table td.label{
     13    width: 110px;
    1214}
    13 div.wpmsgc-option h3 {
    14     margin: 15px 0 0 0;
    15     padding: 15px 15px 15px 40px;
    16     font-size: 1.2em;
    17     color: #4e4c41;
    18     background: #f1f1f1 url(../images/toggle.gif) no-repeat 10px 13px;
    19     border: 1px solid #e6e6e6;
    20     -moz-border-radius: 6px;
    21     -webkit-border-radius: 6px;
    22     cursor: pointer;
     15#wpmsgc-options form table td{
     16    border-bottom: 1px solid #DFDFDF;
    2317}
    24 div.wpmsgc-option h3.open {
    25     -moz-border-radius: 6px 6px 0 0;
    26     -webkit-border-top-left-radius: 6px;
    27     -webkit-border-top-right-radius: 6px;
    28     background-position: 10px -27px;
     18#wpmsgc-options form input[type=text]{
     19    width: 250px;
    2920}
    30 div.wpmsgc-option h3 span {
    31     font-size: .9em;
    32     font-weight: normal;
    33     float: right;
    34     color: #aaa;
    35 }
    36 div.wpmsgc-option-body {
    37     margin: 0;
    38     padding: 15px;
    39     background: #fbfbfa;
    40     border: 1px solid #e6e6e6;
    41     border-top: none;
    42     -moz-border-radius: 0 0 6px 6px;
    43     -webkit-border-bottom-left-radius: 6px;
    44     -webkit-border-bottom-right-radius: 6px;
     21#wpmsgc-options form textarea{
     22    width: 550px;
     23    height: 200px;
    4524}
    4625
    47 div.wpmsgc-notice, div.wpmsgc-info {
    48     margin:15px 0 0;
    49     padding: 20px;
    50     -moz-border-radius: 6px;
    51     -webkit-border-radius: 6px;   
    52     padding:10px 2em;
     26#wpmsgc-options span.notice{
     27    color:#F00;
    5328}
    54 div.wpmsgc-notice{
    55     background: #ffcccc;
    56     border: 1px solid #ff3366;
    57 }
    58 div.wpmsgc-info{
    59     background: #ccffcc;
    60     border: 1px solid #33cc00;
    61 }
    62 span.wpmsgc-notice{
    63     color:#ff0000;
    64 }
    65 
    66 .wpmsgctextarea{
    67     width:100%;
    68     height:200px;
    69 }
    70 
    71 
  • wpms-global-content/trunk/readme.txt

    r379443 r407267  
    44Donate Link: http://www.vareen.co.cc/
    55Requires at least: 3.0
    6 Tested up to: 3.1.2
    7 Stable tag: 1.0.1
     6Tested up to: 3.2
     7Stable tag: 1.1
    88
    99WPMS Global Content allow wordpress multisite network admin to set common header and footer content.
     
    2727
    2828== Changelog ==
     29= 1.1 =
     30* Advanced option for excluding/including blogs
     31* Fix for tinymce to work with Wordpress 3.2
     32* Improved options page layout
     33
    2934= 1.0.1 =
    3035* Fix plugin name in readme file
  • wpms-global-content/trunk/wpms-global-content.php

    r379444 r407267  
    44 * Plugin URI: http://www.vareen.co.cc/
    55 * Description: WPMS Global Content allow wordpress multisite network admin to set common header and footer content.
    6  * Version: 1.0.1
     6 * Version: 1.1
    77 * Author: Neerav Dobaria
    88 * Author URI: http://www.vareen.co.cc
     
    5858
    5959                add_filter("plugin_action_links_" . WPMSGC_BASENAME, array(&$this, 'action_links'));
    60                 add_action( 'admin_print_footer_scripts', 'wp_tiny_mce_preload_dialogs', 30 );
     60
     61                // since wp 3.2 function name has been changed
     62                if(get_bloginfo('version') >= 3.2){
     63                    add_action( 'admin_print_footer_scripts', 'wp_preload_dialogs', 30 );
     64                } else {
     65                    add_action( 'admin_print_footer_scripts', 'wp_tiny_mce_preload_dialogs', 30 );
     66                }
    6167            } else {
     68                $include = $this->options['include'];
    6269                $exclude = explode(',', $this->options['exclude']);
    63                 if (!in_array($blog_id, $exclude)) {
    64                     add_action('init', array(&$this, 'load_script'));
    65                     add_filter('wp_footer', array(&$this, 'add_global_content'));
    66                 }
     70
     71                // return nothing if blog in exclude list
     72                if ($include and !in_array($blog_id, $exclude))
     73                    return;
     74
     75                // return nothing if blog not in include list
     76                if (!$include and in_array($blog_id, $exclude))
     77                    return;
     78
     79                add_action('init', array(&$this, 'load_script'));
     80                add_filter('wp_footer', array(&$this, 'add_global_content'));
    6781            }
    6882        }
     
    118132        {
    119133            $default = array(
     134                'include' => '0',
    120135                'exclude' => '1',
    121136                'header' => 'This will be displayed in header.',
  • wpms-global-content/trunk/wpmsgc-options.php

    r379435 r407267  
    1010
    1111            <tr valign="top">
    12                 <th scope="row">Exclude Following Blogs</th>
     12                <td class="label" scope="row">Exclude/Include</td>
    1313                <td>
     14                    <input name="wpmsgc[include]"
     15                           value="0" <?php echo ($wpmsgcopts['include']) ? '' : 'checked="checked"'; ?>
     16                           type="radio"/> Exclude Following&nbsp;&nbsp;&nbsp;
     17                    <input name="wpmsgc[include]"
     18                           value="1" <?php echo ($wpmsgcopts['include']) ? 'checked="checked"' : ''; ?>
     19                           type="radio"/> Include Following
     20                    <br/>
    1421                    <input type="text" name="wpmsgc[exclude]" value="<?php echo $wpmsgcopts['exclude']?>"/>
    1522                    <br/>
    16                     <small>Comma separated list of blog ids you want to exclude. Leave this fiel empty if you want to
    17                         show it on all blogs.
     23                    <small>Comma separated list of blog ids you want to exclude/include.
     24                        Select Exclude Following and leave textbox empty if you want to show it on all blogs.
    1825                    </small>
    1926                </td>
     
    2128
    2229            <tr valign="top">
    23                 <th scope="row">Header Content</th>
     30                <td scope="row">Header Content</td>
    2431                <td>
    2532                    <p align="right">
     
    3542
    3643            <tr valign="top">
    37                 <th scope="row">Footer Content</th>
     44                <td scope="row">Footer Content</td>
    3845                <td>
    3946                    <p align="right">
     
    5663    <p>If you find this plugin useful, please donate to continue development of this and several other plugins</p>
    5764
    58     <form method="get" action="https://www.paypal.com/cgi-bin/webscr">
     65    <form style="background:none;" method="get" action="https://www.paypal.com/cgi-bin/webscr">
    5966        <div class="paypal-donations"><input type="hidden" value="_donations" name="cmd">
    6067            <input type="hidden" value="[email protected]" name="business">
Note: See TracChangeset for help on using the changeset viewer.