Plugin Directory

Changeset 2789063


Ignore:
Timestamp:
09/23/2022 01:49:16 AM (3 years ago)
Author:
uqrate
Message:

v1.0.0 build 2022-09-22T19.47.58Z to trunk

Location:
uqrate
Files:
5 added
10 edited

Legend:

Unmodified
Added
Removed
  • uqrate/trunk/class.admin.php

    r2786655 r2789063  
    2626    public static function admin_init() {
    2727        if ( ! is_admin() ) return;
    28         /*****************************************************************
    29          * Register the custom plugin-settings page (HTML FORM),
    30          * as a Settings-submenu page, and store in DB upon user SUBMIT.
    31          ****************************************************************/
    3228        self::settings_register();
    3329        self::remove_native_comments();
    34         return;
    35         //... nothing below is needed lest redirect on activation desired.
    36         if ( get_option( self::cfg('wp_opts_flag_jt') ) )
    37             return;
    38         if ( self::create_posts_threads_jt() ) {
    39             if ( get_option( self::cfg('wp_opts_flag_active') ) )
    40                 return;
    41             delete_option( self::cfg('wp_opts_flag_active') );
    42             if ( headers_sent() ) return;
    43             false && wp_redirect(
    44                 add_query_arg(
    45                     [ 'page' => self::SETUP_PAGE ],
    46                     admin_url( 'options-general.php' )
    47                 )
    48             );
    49         }
    5030    }
    5131    public static function admin_menu() {
  • uqrate/trunk/class.core.php

    r2786655 r2789063  
    204204    }
    205205    public static function preObj( $obj, $title = '' ) {
    206         /***
    207          * Capture obj to safe HTML string for subsequent printing
    208          ***/
    209206        if ( ! self::cfg('mode_debug') ) return;
    210207        ob_start();
     
    230227    }
    231228    protected static function GetChnKey() {
    232         /*******************************************************************
    233          * Select key from wp_options table if not already in config (cfg).
    234          * Fetch subkeys from plugin service if missing or invalid.
    235          ******************************************************************/
    236229        if (   self::cfg('chn_key')
    237             && self::cfg('chn_key')['key']
    238             && self::cfg('chn_key')['chn_id']
    239             && self::cfg('chn_key')['key_name']
     230                && self::cfg('chn_key')['key']
     231                && self::cfg('chn_key')['chn_id']
     232                && self::cfg('chn_key')['key_name']
     233                && !self::cfg('chn_key')['error']
    240234            )
    241235            return true;
     
    264258    }
    265259    protected static function keyChk() {
    266         /********************************************************
    267          * Fech API-key subkeys from plugin service,
    268          * store in wp_options table, and set cfg('chn_key'),
    269          * else store error and set cfg('err').
    270          *******************************************************/
    271260        $url = self::cfg('key_check_url');
    272261        $arr = [
  • uqrate/trunk/class.sync.php

    r2786655 r2789063  
    192192                if ( $x->error ) self::errWrap($x->error, __FUNCTION__ );
    193193                self::cfg()['exit'] = 4000;
     194                if ( $code == 424 ) self::keyChk();
    194195                return false;
    195196            }
  • uqrate/trunk/readme.txt

    r2786655 r2789063  
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1111
    12 Member-curated comments, paid subscriptions and broadcasting services. [Uqrate.org](https://uqrate.org) is all about generating revenue streams for content creators.
     12Member-curated comments, paid subscriptions and referrals, and broadcasting. This plugin is designed to generate revenue streams for content creators.
    1313
    1414== Description ==
     
    2424== Installation ==
    2525
    26 Add the Uqrate plugin, either from here or by upload (downloaded from [Uqrate.org](https://uqrate.org/app/install#wordpress)). Then activate it and enter your [Uqrate API key](https://uqrate.org/app/apikey). Done.
     26= Install From WordPress.org =
     27
     281. Add the plugin from your Dashboard's **Plugins** > **Add New** menu by Keyword search for `uqrate`. Select **Install**.
     291. From the Plugins page, select **Activate** under the plugin name.
     301. At the Dashboard's **Settings** > **Uqrate**, enter your [Uqrate API key](https://uqrate.org/app/apikey).
     31
     32= Install From Uqrate.org =
     33
     341. Downloaded the plugin from [Uqrate](https://uqrate.org/app/install#wordpress).
     351. Upload it at your WordPress Dashboard under **Plugins** > **Add New** page using the **Upload Plugin** button.
     361. Follow steps 2 and 3 of the WordPress.org procdure (above).
     37
     38= Uqrate API Key =
     39
     401. [Login](https://uqrate.org/app/login) or [Signup](https://uqrate.org/app/signup) to your Uqrate account.
     411. [Add a channel](https://uqrate.org/app/channel) to associate with your blog.
     421. [Get API Key](https://uqrate.org/app/apikey). Copy/paste it into the form provided at the **Settings** > **Uqrate** page of your WordPress Dashboard menu.
     43
     44The plugin requires this secret API key to access Uqrate services.
    2745
    2846= Minimum Requirements =
     
    4664== Screenshots ==
    4765
     661. Plugin setup
     672. Plugin settings
     683. Comments section (collapsed)
     694. Comments section (expanded)
     705. Modal : Subscribe to channel : Initial View
     716. Modal : Subscribe to channel : Selected Amount
     727. Modal : Sponsor channel : Other Amount
     738. Modal : Sponsor message : Initial View
     74
    4875== Changelog ==
    4976
    5077= 1.0.0 =
    5178
    52 *Release Date - 13 September 2022*
     79*Release Date - 15 September 2022*
    5380
    5481* The first release.
  • uqrate/trunk/uqrate.php

    r2786671 r2789063  
    2929define( 'UQRATE_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
    3030$_UQRATE_ENV = [
    31     'build'                 => "2022-09-18T22.51.30Z",
     31    'build'                 => "2022-09-22T19.47.58Z",
    3232    'mode_debug'            => false,
    3333    'mode_local'            => false,
  • uqrate/trunk/views/admin.php

    r2786655 r2789063  
    2828        color: #888;
    2929    }
     30    #uqrate_setup_prompt form .description.err {
     31        color: #fff;
     32        background: #f06;
     33    }
    3034</style>
    31 <div id="uqrate_setup_prompt" class="notice notice is-dismissible">
     35<?php $err = '';if ( Uqrate::cfg('chn_key')['error'] ) { $err = 'notice-error'; } ?>
     36<div id="uqrate_setup_prompt" class="notice <?php echo $err; ?> is-dismissible">
    3237    <form name="uqrate_activate" action="<?php echo esc_url( Uqrate_Admin::get_page_url( $type ) ); ?>" method="POST">
    3338        <div class="">
    3439            <button class="activate" type="submit"><?php _e( 'Setup your', UQRATE_TEXTDOMAIN );?> <span class="uqrate">uqrate</span> <?php _e( 'plugin', UQRATE_TEXTDOMAIN );?></button>
    3540        </div>
     41        <?php if ( $err == '' ) : ?>
    3642        <div class="description">
    3743            Speak your mind, mind your <span class="uqrate">q</span>'s and <span class="uqrate">P</span>'s, and prosper.
    3844        </div>
     45        <?php else : ?>
     46        <div class="description err">
     47            <?php echo 'Bad API Key'; ?>
     48        </div>
     49        <?php endif; ?>
    3950    </form>
    4051</div>
     
    5566    }
    5667    #uqrate_settings .uqrate_setup_footer {
     68        display: flex;
     69        align-items: center;
     70        justify-content: left;
     71    }
     72    #uqrate_settings .uqrate_setup_footer .build {
     73        font-family: monospace;
     74        opacity: .5;
     75    }
     76    #uqrate_settings .uqrate_setup_footer .uqrate_logo {
    5777        display: none;
    58         align-items: center;
    59         justify-content: right;
    6078    }
    6179    #uqrate_settings .uqrate_settings_header h2 {
    62         margin: .5em 0 .3em 0;
     80        margin: .5em 0 .1em 0;
    6381    }
    6482    #uqrate_settings .uqrate_settings_header h2,
     
    7391        color: #af9e06;
    7492    }
     93    #uqrate_settings .uqrate_settings_header .build {
     94        display: none;
     95        font-size: .8em;
     96        font-family: monospace;
     97        opacity: .7;
     98    }
    7599    #uqrate_settings .uqrate_logo {
    76100        width: 8em;
     
    141165        font-size: 2em;
    142166    }
     167    #uqrate_settings_block input[name="submit"]:focus {
     168        opacity: .9;
     169    }
    143170    #uqrate_settings_block form table th {
    144171        width: 7em;
     
    178205    <div class="uqrate_settings_header">
    179206        <h2>
    180             <span class="uqrate">u<strong>q</strong>rate</span>
    181             <?php if ( Uqrate::GetCfg('chn_key') ) { echo 'Settings'; } else { echo 'Setup';} ?>
     207            <span>
     208                <span class="uqrate">u<strong>q</strong>rate</span>
     209                <?php
     210                if ( Uqrate::GetCfg('chn_key') ) { echo 'Settings'; } else { echo 'Setup';}
     211                if ( self::GetCfg('err') ) {
     212                    echo self::notice_err( 'Try page reload, else get new key : ERR : ' . self::cfg('err') );
     213                }
     214                ?>
     215            </span>
    182216        </h2>
    183217        <!--
    184218        <h2>Uqrate Settings</h2>
    185219        -->
     220        <h5 class="build">
     221            v<?php echo esc_html( Uqrate::GetCfg('plugin_version') .' '. Uqrate::GetCfg('build') );?>
     222        </h5>
    186223    </div>
    187224    <div id="uqrate_setup" class="<?php if ( Uqrate::GetCfg('chn_key') ) echo 'hide'; ?>">
     
    247284            <dd class="">
    248285                <table class="<?php if ( ! Uqrate::GetCfg('chn_key') ) echo 'hide'; ?>">
     286                    <tr class="hide">
     287                        <td class="key">version:</td>
     288                        <td class="val">v<?php echo esc_html( Uqrate::GetCfg('plugin_version') .' '. Uqrate::GetCfg('build') ); ?></td>
     289                    </tr>
    249290                    <tr class="">
    250291                        <td class="key">key:</td>
     
    323364    </div>
    324365    <div class="uqrate_setup_footer">
     366        <div class="build">
     367            uqrate plugin v<?php
     368                echo esc_html( Uqrate::GetCfg('plugin_version')
     369                .' build '
     370                . Uqrate::GetCfg('build') );
     371            ?>
     372        </div>
    325373        <div class="uqrate_logo">
    326374            <!--
  • uqrate/trunk/views/css/a.settings.css

    r2786655 r2789063  
    4444    opacity: .7;
    4545}
    46 
    47 /*
    48     Fallback when CSP forbids inline CSS
    49 */
    50 
    51 
    52 #uqrate_settings .uqrate {
    53     color: #664;
    54     opacity: .8;
    55 }
    56 
    57 #uqrate_settings h1 {
    58     display: none;
    59 }
    60 #uqrate_settings .uqrate_settings_header {
    61     display: flex;
    62     align-items: center;
    63     justify-content: space-between;
    64 }
    65 #uqrate_settings .uqrate_setup_footer {
    66     display: none;
    67     align-items: center;
    68     justify-content: right;
    69 }
    70 
    71 #uqrate_settings .uqrate_settings_header h2 {
    72     margin: .5em 0 .3em 0;
    73 }
    74 #uqrate_settings .uqrate_settings_header h2,
    75 #uqrate_settings .uqrate_settings_header h2 span.uqrate {
    76     font-size: 3rem;
    77     font-weight: bold;
    78     color: #330;
    79     line-height: 1.2em;
    80     opacity: 1;
    81 }
    82 #uqrate_settings .uqrate_settings_header h2 span.uqrate strong {
    83     color: #af9e06;
    84 }
    85 #uqrate_settings .uqrate_logo {
    86     width: 8em;
    87     height: 8em;
    88     fill: #c6b305;
    89 }
    90 
    91 #uqrate_settings .button {
    92     font-size: 2em;
    93     border-radius: .5em;
    94     box-shadow: .1em .1em .2em rgba(0, 0, 0, 0.3); /* x, y, blur */
    95 }
    96 #uqrate_settings .button:active {
    97     opacity: .9;
    98 }
    99 
    100 #uqrate_settings dl {
    101     display: flex;
    102     align-items: center;
    103     margin-bottom: 2em;
    104     flex-wrap: wrap;
    105 }
    106 
    107 #uqrate_settings dl dt {
    108     font-size: 3em;
    109     padding: .7em;
    110     background:#c6b305;
    111     border-radius: 50%;
    112 }
    113 
    114 #uqrate_settings dd .button {
    115     width: 8em;
    116     text-align: center;
    117 }
    118 #uqrate_settings_block input.button {
    119     width: 8em; /* keep uniform */
    120 }
    121 #uqrate_settings dd.info{
    122     font-size: 1.2em;
    123     max-width: 30em;
    124     margin: 1em 0 1.5em 2em;
    125 }
    126 
    127 /** $title @ add_settings_section(..) */
    128 
    129 #uqrate_settings_block dd {
    130     width: 100%;
    131     margin: 0;
    132 }
    133 
    134 #uqrate_settings_block form {
    135     margin: 0;
    136 }
    137 
    138 #uqrate_setup dd.link,
    139 #uqrate_setup dd.info {
    140     padding-top: .2em;
    141 }
    142 
    143 #uqrate_setup a.button,
    144 #uqrate_settings_update a.button {
    145     height: auto;
    146     padding: .4em;
    147 }
    148 
    149 
    150 #uqrate_settings_block input[name="uqrate_chnkey_key"] {
    151     height: auto;
    152     width: 100%;
    153     font-size: .8em;
    154     font-family: monospace;
    155     color: #999;
    156     padding: .5em .4em .5em .4em;
    157     max-width: 53em;
    158 }
    159 #uqrate_settings_block input[name="submit"] {
    160     height: auto;
    161     padding: .4em;
    162     font-size: 2em;
    163 }
    164 #uqrate_settings_block input[name="submit"]:focus {
    165     opacity: .9;
    166 }
    167 #uqrate_settings_block form table th {
    168     width: 7em;
    169     font-size: 2em;
    170     color: #330;
    171 }
    172 
    173 /**  status  **/
    174 
    175 #uqrate_status_block dd {
    176     margin: 0;
    177     padding: 0;
    178 }
    179 #uqrate_status_block table td.key {
    180     font-family: monospace;
    181     width: 7em;
    182     text-align: right;
    183     padding-right: .7em;
    184 }
    185 #uqrate_status_block table td.val {
    186     font-family: monospace;
    187     min-width: 20em;
    188     text-align: left;
    189     padding-right: .7em;
    190 }
    191 #uqrate_status_block table td .warn {
    192     text-align: left;
    193     color: #f06;
    194     font-weight: bold;
    195     padding-left: 2em;
    196 }
    197 #uqrate_status_block table td .warn a,
    198 #uqrate_status_block table tr.warn td.key {
    199     color: #f06;
    200 }
Note: See TracChangeset for help on using the changeset viewer.