Plugin Directory

Changeset 1757745


Ignore:
Timestamp:
11/02/2017 11:44:40 PM (8 years ago)
Author:
irmau
Message:

Added tabs to configuration screen

Location:
irm-newsroom/trunk
Files:
2 edited

Legend:

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

    r1742990 r1757745  
    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: 3.0.1
    7 Tested up to: 4.8.1
     7Tested up to: 4.8.3
    88Stable tag: 4.3
    99License: GPLv2 or later
     
    105105== Changelog ==
    106106
     107= 1.0.6 =
     108* Added tabs to configuration screen
     109
     110= 1.0.5 =
     111* Fixed wording on configuration screen
     112
    107113= 1.0.4 =
    108114* Fixed issue with site_type when showing flat pages
  • irm-newsroom/trunk/irm-newsroom.php

    r1748361 r1757745  
    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.0.5
     19 * Version:           1.0.6
    2020 * Author:            IRM
    2121 * Author URI:        http://irmau.com
     
    151151    echo '<p><img src="http://www.irmau.com/irm/showmedia.aspx?MediaId=1" style="background:#FFFFFF;border-radius:20px;padding:10px 50px;width:100px;"></p>';
    152152    echo '<p class="irm-trial">If you\'d like to organise a free trial of IRM Newsroom, <a href="http://irmau.com/site/websites/newsroom-trial" target="_blank">please click here</a>.</p>';
    153     echo '<h2>Configure IRM Newsroom Below</h2>';
    154     echo '<p>';
    155     echo '<label><b>Site Key:</b> &nbsp;';
    156     echo '<p>You will need a site key to link your wordpress website to the IRM Newsroom software to enable your feeds.</p>';
    157     echo '<p><i>If you dont have a site key, please <a href="http://www.irmhelpcentre.com/irm/content/contact-support.aspx?RID=333" target="_blank">request one from here</a>. </i></p>';
    158     echo '<form method="post" action="options.php">';
    159     echo '<input type="text" name="site_type" value="'.$site_type.'" maxlength="5" placeholder="http/s" />';
    160     echo '://';
    161     echo '<input type="text" name="site_key" value="'.$site_key.'" placeholder="Site URL" />';
    162     echo ' / <input type="text" name="site_directory" value="'.$site_directory.'" placeholder="Site Directory" /> / ';
    163 
    164     echo '<h3>Email Alerts</h3>';
    165     echo '<p>To show the Email Alerts Signup Form please copy and paste the shortcode below to a page on your website: </p>';
    166     echo '<pre><code>[email_alerts_form]</code></pre>';
    167 
    168     echo '<p><label>Email Alerts Success Page: </label> <input type="text" name="email_landing_page" value="'.$email_landing_page.'" /></p>';
    169     settings_fields( 'irm-newsroom-group' );
    170     do_settings_sections( 'irm-newsroom-group' );
    171     submit_button();
    172     echo '</form></p>';
    173     echo '<p><b>For testing use: <code>www.irmau.com</code></b></p>';
    174     echo '<h3>Menu</h3>';
    175     echo '<p>IRM Generated Menu : <pre><code>[irmmenu]</code></pre></p>';
    176     echo '<p>IRM Generated Menu in Wordpress Theme : <pre><code>echo do_shortcode("[irmmenu]");</code></pre></p>';
    177     echo '<h3>Shortcodes</h3>';
    178     echo '<p>Use these to embed newsfeeds into your wordpress site.</p>';
    179     echo '<h2>List Page Shortcodes</h2><pre>';
    180     echo $irm_shortcodes_list;
    181     echo '</pre><h2>Flat Page Shortcodes</h2><pre>';
    182     echo $irm_shortcodes_flat;
    183     echo '</pre></div>';
    184 
    185     echo "<p><a href='http://www.irmhelpcentre.com/irm/content/how-do-i-install-my-irm-newsroom-free-trial.aspx?RID=1654' target='_blank' class='button button-primary'>For help installing IRM Newsroom please click here.</a></p>";
    186 
    187 }
    188 
    189 // add some shortcodes
    190  
    191 //add_shortcode("irm", get_url("http://demo.test.irmau.com/irm/ShowListPage.aspx?CategoryID=8"));
    192 
    193 // import this: http://demo.test.irmau.com/irm/SiteData.aspx
     153
     154    if( isset( $_GET[ 'tab' ] ) ) {
     155        $active_tab = $_GET[ 'tab' ];
     156    } else {
     157        $active_tab = "configure";
     158    }
     159
     160    echo $irm_tabs = '<h2 class="nav-tab-wrapper">
     161    <a href="?page=irm-newsroom&tab=configure" class="nav-tab">Configure IRM Newsroom</a>
     162    <a href="?page=irm-newsroom&tab=list" class="nav-tab">List Page Shortcodes</a>
     163    <a href="?page=irm-newsroom&tab=flat" class="nav-tab">Flat Page Shortcodes</a>
     164    <a href="?page=irm-newsroom&tab=shareprice" class="nav-tab">Shareprice</a>
     165    <a href="?page=irm-newsroom&tab=menu" class="nav-tab">Menu</a>
     166    </h2>';
     167
     168    if( ($active_tab == "") || ($active_tab == "configure") ) {
     169
     170        echo '<h2>Configure IRM Newsroom Below</h2>';
     171        echo '<p>';
     172        echo '<label><b>Site Key:</b> &nbsp;';
     173        echo '<p>You will need a site key to link your wordpress website to the IRM Newsroom software to enable your feeds.</p>';
     174        echo '<p><i>If you dont have a site key, please <a href="http://www.irmhelpcentre.com/irm/content/contact-support.aspx?RID=333" target="_blank">request one from here</a>. </i></p>';
     175        echo '<form method="post" action="options.php">';
     176        echo '<input type="text" name="site_type" value="'.$site_type.'" maxlength="5" placeholder="http/s" />';
     177        echo '://';
     178        echo '<input type="text" name="site_key" value="'.$site_key.'" placeholder="Site URL" />';
     179        echo ' / <input type="text" name="site_directory" value="'.$site_directory.'" placeholder="Site Directory" /> / ';
     180
     181        echo '<h3>Email Alerts</h3>';
     182        echo '<p>To show the Email Alerts Signup Form please copy and paste the shortcode below to a page on your website: </p>';
     183        echo '<pre><code>[email_alerts_form]</code></pre>';
     184
     185        echo '<p><label>Email Alerts Success Page: </label> <input type="text" name="email_landing_page" value="'.$email_landing_page.'" /></p>';
     186        settings_fields( 'irm-newsroom-group' );
     187        do_settings_sections( 'irm-newsroom-group' );
     188        submit_button();
     189        echo '</form></p>';
     190        echo '<p><b>For testing use: <code>www.irmau.com</code></b></p>';
     191
     192    }
     193
     194    if( $active_tab == "menu" ) {
     195        echo '<h3>Menu</h3>';
     196        echo '<p>If you would like to replicate the menu from your IRM site into your wordpress site you can use the following codes.</p>';
     197        echo '<p>IRM Generated Menu : <pre><code>[irmmenu]</code></pre></p>';
     198        echo '<p>IRM Generated Menu in Wordpress Theme : <pre><code>echo do_shortcode("[irmmenu]");</code></pre></p>';
     199    }
     200
     201    if( $active_tab == "shareprice" ) {
     202        echo '<h3>Share Price</h3>';
     203        echo '<p>If you have share prices as part of your IRM Newsroom package, you can enable them below.</p>';
     204        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>";
     205        //
     206    }
     207
     208    $shortcodes_text = "<h3>Shortcodes</h3><p>Use these to embed newsfeeds into your wordpress site.</p>";
     209
     210    if( $active_tab == "list" ) {
     211        echo $shortcodes_text;
     212        echo '<h2>List Page Shortcodes</h2><pre>';
     213        echo $irm_shortcodes_list;
     214        echo '</pre>';
     215    }
     216
     217    if( $active_tab == "flat" ) {
     218        echo $shortcodes_text;
     219        echo '</pre><h2>Flat Page Shortcodes</h2><pre>';
     220        echo $irm_shortcodes_flat;
     221        echo '</pre>';
     222    }
     223
     224    echo "</div>";
     225
     226    echo "<p><br><a href='http://www.irmhelpcentre.com/irm/content/how-do-i-install-my-irm-newsroom-free-trial.aspx?RID=1654' target='_blank' class='button button-primary'>For help installing IRM Newsroom please click here.</a></p>";
     227
     228}
    194229
    195230function get_data($url) {
Note: See TracChangeset for help on using the changeset viewer.