Plugin Directory

Changeset 2879152


Ignore:
Timestamp:
03/13/2023 02:28:09 PM (3 years ago)
Author:
iteras
Message:

Added automatic product prefill and fixed call-to-action styles

Location:
iteras/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • iteras/trunk/DEVELOPMENT.txt

    r2417359 r2879152  
    77   wget https://wordpress.org/latest.tar.gz && tar zxf latest.tar.gz && rm latest.tar.gz && RANDOM_STRING=`LC_ALL=C cat /dev/urandom | LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` sed -e 's/database_name_here/test.db/g' -e "s/put your unique phrase here/${RANDOM_STRING}/g" -e "s/'WP_DEBUG', false/'WP_DEBUG', true/" < wordpress/wp-config-sample.php > wordpress/wp-config.php
    88
    9    cd wordpress/wp-content/plugins/ && wget https://downloads.wordpress.org/plugin/sqlite-integration.1.8.1.zip && unzip -q sqlite-integration.1.8.1.zip && rm sqlite-integration.1.8.1.zip && cp sqlite-integration/db.php ../ && cd ../../../
     9   cd wordpress/wp-content/plugins/ && git clone https://github.com/aaemnnosttv/wp-sqlite-db.git && cp wp-sqlite-db/src/db.php ../ && cd ../../../
    1010
    1111Enable debugging in wp-config.php, the debug log is available in wp-content/debug.log:
  • iteras/trunk/README.txt

    r2851981 r2879152  
    22Tags: paywall, subscribe, subscriptions, subscription, subscribers, access-control, paid content, premium, premium content, monetize, magazine, media pass, registration, billing, membership, member, earn money
    33Requires at least: 3.5.1
    4 Tested up to: 6.0.2
    5 Stable tag: 1.4.1
    6 Requires PHP: 4.0
     4Tested up to: 6.1.1
     5Stable tag: 1.5.0
    76License: GPLv2 or later
    87License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5655There's a few shortcodes for controlling content based on the users logged in status. For showing content when the user has access use `[iteras-if-logged-in paywallid="abc123,def456"]Content only shown if the user is logged in and has access[/iteras-if-logged-in]`. `[iteras-if-not-logged-in]` does the opposite. `[iteras-if-logged-in-link paywallid="abc123,def456"]Content[/iteras-if-logged-in-link]` will automatically insert a link to the subscriber landing page that is configured with the plugin, alternatively a `url` attribute can be supplied, while `login_text` can we used to customize the link text. These shortcodes only work with server validation enabled.
    5756
     57= Is it possible to force the selection of a specifik product on an ordering form? =
     58
     59Yes! Add the GET-parameter `orderproduct` to a link to your ordering page, e.g. `/buysubscription/?orderproduct=12MPro`. This will select the "12MPro" product when the user gets to the form.
     60
    5861= Is it possble to programatically control if a page should be paywalled? =
    5962
    60 It is possible to override the decision of which content should be paywalled. Add a hook to the
    61 `iteras_override_content_paywall` filter to define a function that should have the last say in if the content should be
    62 paywalled or not. This can for example be used for handling share links the gives the user access eventhough they don't
    63 have a login. This could look something like this:
     63It is possible to override the decision of which content should be paywalled. Add a hook to the `iteras_override_content_paywall` filter to define a function that should have the last say in if the content should be paywalled or not. This can for example be used for handling share links the gives the user access eventhough they don't have a login. This could look something like this:
    6464
    6565`
     
    107107You will need to do a custom integration. The plugin attaches to the `the_content` hook in Wordpress which in some situations is called mutiple times by 3rd party plugins.
    108108
    109 In this case set the "Paywall integration method" to "Custom" and add the paywall code manually to the theme or plugin you are using. This can be done either by wrapping the post body with the shortcode `[iteras-paywall-content]...[/iteras-paywall-content]` or by calling `Iteras::get_instance().potentially_paywall_content(...)` which returns the content wrapped with the paywall.
     109In this case set the "Paywall integration method" to "Custom" and add the paywall code manually to the theme or plugin you are using. This can be done either by wrapping the post body with the shortcode `[iteras-paywall-content]...[/iteras-paywall-content]` or by calling `Iteras::get_instance()->potentially_paywall_content(...)` which returns the content wrapped with the paywall.
    110110
    111111
  • iteras/trunk/iteras.php

    r2788253 r2879152  
    1313 * Plugin URI:        https://app.iteras.dk
    1414 * Description:       Integration with ITERAS, a cloud-based state-of-the-art system for managing subscriptions/memberships and payments.
    15  * Version:           1.4.1
     15 * Version:           1.5.0
    1616 * Author:            ITERAS
    1717 * Author URI:        https://www.iteras.dk
     
    2020 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
    2121 * Domain Path:       /languages
     22 * Requires PHP:      4.0
    2223 * WordPress-Plugin-Boilerplate: v2.6.1
    2324 */
  • iteras/trunk/public/assets/css/public.css

    r2044569 r2879152  
    1 .iteras-paywall-box {
     1.entry .entry-content .iteras-paywall-box {
    22  position: relative;
    33  margin-top: -120px;
  • iteras/trunk/public/iteras-public.php

    r2788253 r2879152  
    1616class Iteras {
    1717
    18   const VERSION = '1.4.1';
     18  const VERSION = '1.5.0';
    1919
    2020  const SETTINGS_KEY = "iteras_settings";
     
    419419    }
    420420
    421     $extra = "";
     421    $extra_before = "";
     422    $extra_after = "";
    422423    // show message without paywall for editors
    423424    if (current_user_can('edit_pages') && !empty($paywall_ids)) {
     
    439440        );
    440441
    441         $extra = $box.'<script>Iteras.wall({ unauthorized: iterasPaywallContent, paywallid: '.json_encode($paywall_ids).' });</script>';
     442        $extra_after = $box.'<script>Iteras.wall({ unauthorized: iterasPaywallContent, paywallid: '.json_encode($paywall_ids).' });</script>';
    442443
    443444        /**
     
    448449         * @param string $extra The script with script tags included
    449450         */
    450         $extra = apply_filters('after_paywall_script_prepared_except_redirect', $extra);
     451        $extra_after = apply_filters('after_paywall_script_prepared_except_redirect', $extra_after);
    451452      }
    452453      else {
    453         $extra = '<script>Iteras.wall({ redirect: "'.$this->settings['subscribe_url'].'", paywallid: '.json_encode($paywall_ids).' });</script>';
     454        $extra_before = '<script>Iteras.wall({ redirect: "'.$this->settings['subscribe_url'].'", paywallid: '.json_encode($paywall_ids).' });</script>';
    454455      }
    455456
     
    465466
    466467      if (!is_feed())
    467         $content = '<div class="iteras-content-wrapper '.$truncate_class.'">'.$content.'</div>'.$extra;
     468        $content = $extra_before.'<div class="iteras-content-wrapper '.$truncate_class.'">'.$content.'</div>'.$extra_after;
    468469    }
    469470   
     
    505506  // [iteras-ordering orderingid="3for1"]
    506507  function ordering_shortcode($attrs) {
     508    // automatically product prefill if GET-paramter is supplied
     509    if (isset($_GET['orderproduct']) && !isset($_GET['prefill'])) {
     510      $attrs['prefill'] = array("products" => $_GET['orderproduct']);
     511    }
     512
    507513    return '<script>
    508514      document.write(Iteras.orderingiframe({
Note: See TracChangeset for help on using the changeset viewer.