Plugin Directory

Changeset 3382266


Ignore:
Timestamp:
10/22/2025 02:47:57 AM (4 months ago)
Author:
irmau
Message:

1.2.21

  • Adding icons to all tabs
  • Changed Wording of Tabs
  • Added share price installation examples
  • Fixed security issues with encoding
Location:
irm-newsroom/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • irm-newsroom/trunk/README.txt

    r3312832 r3382266  
    55Tags: ASX, ASX Announcements, ASX Listed, ASX Share Price, financial data, finance, public company, stock price, stock price feed, irm, newsroom, social, distribution, investors, subscriptions.
    66Requires at least: 4.0
    7 Tested up to: 6.8.1
     7Tested up to: 6.8.3
    88Stable tag: 4.0
    99License: GPLv2 or later
     
    105105== Changelog ==
    106106
     1071.2.21
     108* Adding icons to all tabs 
     109* Changed Wording of Tabs
     110* Added share price installation examples
     111* Fixed security issues with encoding
     112
    1071131.2.20
    108114* Fixed more issues with escaping functions
  • irm-newsroom/trunk/irm-newsroom.php

    r3312832 r3382266  
    1717 * Plugin URI:        http://www.irmnewsroom.com/
    1818 * Description:       IRM Newsroom is an ASX announcements, news and social media distribution service, which enables companies to easily communicate with investors and other stakeholders across multiple online channels – including website, email subscriptions and social media channels.
    19  * Version:           1.2.20
     19 * Version:           1.2.21
    2020 * Author:            IRM
    2121 * Author URI:        http://irmau.com
     
    172172
    173173    $irm_styles = '
    174     <style>
    175174    .irm-trial a { color:#FFF }
    176175    .irm-trial {
     
    185184        text-align: center;
    186185    }
    187     </style>
    188186    ';
    189187
    190188    // FIXED: Escaped style block output. wp_kses_post is suitable for this.
     189    echo "<style>";
    191190    echo wp_kses_post( $irm_styles );
     191    echo "</style>";
    192192
    193193    echo '<div class="wrap">';
     
    197197
    198198    $irm_tabs = '<h2 class="nav-tab-wrapper" id="irm-newsroom-tabs">
    199     <a href="?page=irm-newsroom&tab=configure" class="nr-configure nav-tab">Configure IRM Newsroom</a>
    200     <a href="?page=irm-newsroom&tab=irmevents" class="nr-irmevents nav-tab">IRM Events</a>
    201     <a href="?page=irm-newsroom&tab=list" class="nr-list nav-tab">List Page Shortcodes</a>
    202     <a href="?page=irm-newsroom&tab=flat" class="nr-flat nav-tab">HQi Featured Pages</a>
    203     <a href="?page=irm-newsroom&tab=shareprice" class="nr-shareprice nav-tab">Shareprice</a>
    204     <a href="?page=irm-newsroom&tab=menu" class="nr-menu nav-tab">Menu</a>
    205     <a href="?page=irm-newsroom&tab=events" class="nr-events nav-tab">Events Calendar</a>
     199    <a href="?page=irm-newsroom&tab=configure" class="nr-configure nav-tab"><span class="dashicons dashicons-dashboard"></span> Configure</a>
     200    <a href="?page=irm-newsroom&tab=irmevents" class="nr-irmevents nav-tab"><span class="dashicons dashicons-pressthis"></span> Events</a>
     201    <a href="?page=irm-newsroom&tab=list" class="nr-list nav-tab"><span class="dashicons dashicons-list-view"></span> List Pages</a>
     202    <a href="?page=irm-newsroom&tab=flat" class="nr-flat nav-tab"><span class="dashicons dashicons-star-filled"></span> Featured Pages</a>
     203    <a href="?page=irm-newsroom&tab=shareprice" class="nr-shareprice nav-tab"><span class="dashicons dashicons-chart-bar"></span> Shareprice</a>
     204    <a href="?page=irm-newsroom&tab=menu" class="nr-menu nav-tab"><span class="dashicons dashicons-menu"></span> Menu</a>
     205    <a href="?page=irm-newsroom&tab=events" class="nr-events nav-tab"><span class="dashicons dashicons-calendar"></span> Event Calendar</a>
    206206    </h2>';
    207207
     
    210210        'h2' => [ 'class' => [], 'id' => [] ],
    211211        'a'  => [ 'href' => [], 'class' => [] ],
     212        'span'  => [ 'class' => [] ],
    212213    ];
    213214    echo wp_kses( $irm_tabs, $allowed_html_for_tabs );
     
    258259        echo '<p><small>* Please note that this should be a full URL including your domain name, e.g: https://irmau.com/</small></p>';
    259260
    260         echo '<h3>Shareprice</h3>';
     261        echo '<h3>Legacy Shareprice</h3>';
     262        echo '<p><em>Note: This older version of the shareprice code will soon be disabled. </em></p>';
    261263        echo '<p>Toggle shareprice script in site header, if this is set to <b>on</b> this will insert the shareprice javascript in the header of this site for all pages. Do not enable this if you have manually added the scripts to the header.</p>';
    262264        echo '<select name="share_price_toggle">';
     
    272274
    273275        echo '</form></p>';
    274         echo '<p><b>For testing use: <code>irm8.live.irmau.com</code></b> <pre>v 1.2.20</pre> </p>';
     276        echo '<p><b>For testing use: <code>irm8.live.irmau.com</code></b> <pre>v 1.2.21</pre> </p>';
    275277
    276278    }
     
    305307
    306308    if ( 'shareprice' === $active_tab ) {
    307         echo '<h3>Share Price</h3>';
    308         echo '<p>If you have share prices as part of your IRM Newsroom package, you can enable them in the <b>Configure IRM Newsroom</b> Tab.</p>';
    309         echo '<h3>Share Price Shortcodes</h3>';
    310         echo '<p>Here are some shortcodes to allow you to add share prices. </p>';
    311         echo '<h4>Small Share Price Widget</h4>';
    312         echo '<p>This will add a small share price widget</p>';
    313         echo '<code>[sharepriceSnippet]</code>';
    314         echo '<h4>Share Price Table</h4>';
    315         echo '<p>This will add a large share price table. </p>';
    316         echo '<code>[sharepriceTable]</code>';
    317         echo '<h4>Share Price Chart</h4>';
    318         echo '<p>This will add a large share price chart. </p>';
    319         echo '<code>[sharepriceChart]</code>';
    320         echo '<h4>Share Price Chart Small</h4>';
    321         echo '<p>This will add a small share price chart. </p>';
    322         echo '<code>[sharepriceChartSmall]</code>';
     309
     310        $irm_price_styles = "pre {padding:10px;border-radius:5px;background:#444;color:#EEE;} .chart-sample{margin-bottom:10px;border-radius:5px;background:#EEE;box-shadow:0px 1px 20px #0000006c;padding:10px;}.chart-sample h4 {margin-top:0px;} ";
     311
     312        echo "<style>";
     313        echo wp_kses_post( $irm_price_styles );
     314        echo "</style>";
     315
     316        echo "
     317        <h2>Shareprice Installation</h2>
     318        <p><em>For the price shortcodes to work add the following scripts to your wordpress theme.</em></p>
     319        <p>Include these scripts before the <code>&lt;/body&gt;</code> tag of your site.</p>
     320        <p><pre style='padding:10px;border-radius:5px;background:#444;color:#EEE;'>&lt;script src=&quot;https://d1hr1rj5wo6cu6.cloudfront.net/proactive-main.umd.js&quot;&gt;&lt;/script&gt;
     321&lt;script src=&quot;https://d1hr1rj5wo6cu6.cloudfront.net/proactive-frontend.js&quot;&gt;&lt;/script&gt;
     322&lt;script src=&quot;https://{your newsroom site url}/site/content/js/proactive-main-config.js&quot;&gt;&lt;/script&gt;</pre></p>
     323        <p>Include these scripts in the <code>&lt;head&gt;</code> area of your site.</p>
     324        <p><pre style='padding:10px;border-radius:5px;background:#444;color:#EEE;'>&lt;link rel=&quot;stylesheet&quot; href=&quot;https://d1hr1rj5wo6cu6.cloudfront.net/proactive-main.css&quot;&gt;
     325&lt;link rel=&quot;stylesheet&quot; href=&quot;https://d1hr1rj5wo6cu6.cloudfront.net/proactive-frontend.css&quot;&gt;
     326</pre></p>
     327
     328        <h3>Shareprice Codes</h3>
     329        <p>Use the following sample code to add prices and charts to your site using the html block element. </p>
     330
     331        <div class='chart-sample'>
     332            <h4>Full Size Chart</h4>
     333            <p>You can set the following color options: </p>
     334            <ul>
     335                <li>barfill : Bar Line Volume Fill Hex Value</li>
     336                <li>linefill : Line Volume Fill Hex Value</li>
     337                <li>linestroke : Line Color Hex Value</li>
     338            </ul>
     339            <div class='code-sample'>
     340                <pre>&lt;div data-proactive=&quot;charts&quot; id=&quot;chartContainer&quot; autosize 
     341barfill=&quot;#bada55&quot; bgcolor=&quot;white&quot;
     342linefill=&quot;#bada55&quot; linestroke=&quot;darkred&quot;
     343markerRadius=&quot;3&quot;
     344navigator-enable=&quot;true&quot;       
     345rangeselector-enable=&quot;true&quot; defaultRange=&quot;1Y&quot;
     346tooltip-date-historical-display-format = &quot;Do MMM YYYY&quot;
     347tooltip-date-intraday-display-format = &quot;Do MMM YYYY HH:mm&quot;       
     348date-range-display-enable = &quot;true&quot;
     349date-range-historical-display-format = &quot;Do MMM YYYY&quot;
     350date-range-intraday-display-format = &quot;Do MMM YYYY HH:mm&quot;
     351chart-margin-bottom = &quot;50&quot;       
     352title=&quot;&quot; subtitle=&quot;&quot; volumelabel=&quot;Volume&quot;
     353data-decimal=&quot;2&quot;
     354height=&quot;500&quot; tooltipWidth=&quot;300px&quot;&gt;
     355&lt;/div&gt;</pre>
     356            </div>
     357        </div>
     358
     359
     360        <div class='chart-sample'>
     361            <h4>3 Month Chart</h4>
     362            <div class='code-sample'>
     363                <pre>&lt;div data-proactive=&quot;price3month&quot; id=&quot;price3monthContainer1&quot; autosize=&quot;true&quot; enableTooltip=&quot;true&quot; data-decimal=&quot;2&quot; width=&quot;300&quot; height=&quot;200&quot;&gt;&lt;/div&gt;</pre>
     364            </div>
     365        </div>
     366
     367        <div class='chart-sample'>
     368            <h4>Share Price Calculator Historical</h4>
     369            <p>Attribute datetime-format determines the day display format. We use moment.js to do the formatting. See: https://momentjs.com/docs/#/displaying/. If the attribute doesn't exist, the default value is Do MMMM YYYY</p>
     370            <div class='code-sample'>
     371                <pre>&lt;div data-proactive=&quot;historicalCalculator&quot; id=&quot;historicalCalculator1&quot; class=&quot;proactive-historical-price-calculator-container&quot;
     372    title=&quot;&quot; data-decimal=&quot;2&quot; datetime-format=&quot;Do MMMM YYYY&quot; &gt;
     373&lt;/div&gt;</pre>
     374            </div>
     375        </div>
     376
     377        <div class='chart-sample'>
     378            <h4>Share Price Calculator</h4>
     379            <div class='code-sample'>
     380                <pre>&lt;div data-proactive=&quot;priceCalculator&quot; id=&quot;priceCalculator1&quot; class=&quot;proactive-price-calculator-container&quot;
     381            title=&quot;&quot; data-decimal=&quot;2&quot; &gt;
     382        &lt;/div&gt;</pre>
     383            </div>
     384        </div>
     385
     386        <div class='chart-sample'>
     387            <h4>Current Price</h4>
     388            <div class='code-sample'>
     389                <pre>&lt;div data-proactive=&quot;price&quot; class=&quot;proactive-price&quot; data-decimal=&quot;2&quot;&gt;&lt;/div&gt;</pre>
     390            </div>
     391        </div>
     392
     393        ";
     394
    323395        echo "<p><a href='http://www.irmhelpcentre.com/irm/content/shareprice-installation.aspx?RID=1594&RedirectCount=1' target='_blank' class='button button-primary'>For help installing Share Price's please click here.</a></p>";
    324396    }
Note: See TracChangeset for help on using the changeset viewer.