Plugin Directory

Changeset 1781066


Ignore:
Timestamp:
12/05/2017 12:54:01 AM (8 years ago)
Author:
tryinteract
Message:

new version 3.0.1 with shortcode option for disabling quiz cover page

Location:
interact-quiz-embed
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • interact-quiz-embed/tags/3.0.1/interact-quiz-embed.php

    r1760962 r1781066  
    55Description: Use this plugin to embed your Interact quiz into your Wordpress site.
    66Author: The Quiz Collective Inc.
    7 Version: 3.0.0
     7Version: 3.0.1
    88Author URI: https://www.tryinteract.com
    99
     
    6565
    6666function interact_embed($atts) {
    67     shortcode_atts(array('id'=>'', 'type'=>'quiz', 'w'=>'800', 'h'=>'800'), $atts);
     67    shortcode_atts(array('id'=>'', 'type'=>'quiz', 'w'=>'800', 'h'=>'800', 'no_cover'=>'false'), $atts);
    6868
    6969    if(isset($atts['w'])) { $width = $atts['w']; } else { $width = '800'; }
    7070    if(isset($atts['h'])) { $height = $atts['h']; } else { $height = '800'; }
    7171    if(isset($atts['type'])) { $type = $atts['type']; } else { $type = 'quiz'; }
     72    if(isset($atts['no_cover'])) { $no_cover = 'true'; } else { $no_cover = 'false'; }
    7273
    7374    $app_id = $atts['id'];
     
    8586                    var h = "' . $height . '";
    8687                    var host = "' . $type . '.tryinteract.com";
     88                    var no_cover = ' . $no_cover . ';
    8789
    8890                    window[ref] = new InteractApp();
    89                     window[ref].initialize({"ref":ref,"appId": app_id,"width":w,"height":h,"async":true,"host":host,"auto_resize":true,"mobile":true});
     91                    window[ref].initialize({"ref":ref,"appId": app_id,"width":w,"height":h,"async":true,"host":host,"auto_resize":true,"mobile":true,"no_cover":no_cover});
    9092                    window[ref].display();
    9193                });
     
    191193            if($app_id && $app_type) {
    192194                echo '<h4>Copy &amp; Paste your shortcode into your Post:';
    193                 echo '<pre style="display:block;max-width:600px;background: #333;padding: 20px;border-radius: 4px;color: white;font-weight: 400;">';
     195                echo '<pre style="display:block;max-width:720px;background: #333;padding: 20px;border-radius: 4px;color: white;font-weight: 400;">';
    194196                echo '[interact id="'. $app_id .'" type="'. $app_type .'"';
    195197               
     
    201203                }
    202204               
     205                if(isset($_POST['interact_disable_cover'])){
     206                    echo ' no_cover="true"';
     207                }
     208
    203209                echo ']</pre></h4>';
    204210            } else {
     
    214220                    <p>The URL above can be found in your dashboard under <br/><b>'Embed &amp; Share' &gt; 'Embed in your Website' &gt; 'WordPress'.</b></p>
    215221                    </td>
    216                     </tr>
     222                </tr>
    217223                <tr>
    218224                    <th scope="row">Embed Size</th>
     
    222228                        <label for="interact_size_h">Height</label>
    223229                        <input name="interact_size_h" type="number" step="1" min="0" id="interact_size_h" value="" class="small-text" />
    224                         <p class="description">Default size is 600x500px</p>
     230                        <p class="description">Default size is 600x500px (optional)</p>
     231                    </td>
     232                </tr>
     233                <tr>
     234                    <th scope="row">Cover Page</th>
     235                    <td>
     236                        <label for="interact_disable_cover">
     237                            <input name="interact_disable_cover" id="interact_disable_cover" type="checkbox"/> Disable Cover Page
     238                            <p class="description">Quiz will begin on the first question and skip the cover page (optional)</p>
     239                        </label>
    225240                    </td>
    226241                </tr>
    227242            </table>
     243
    228244            <p><input type="submit" name="submit" value="Generate Shortcode" class="button button-primary"></p>
    229245        </form>
  • interact-quiz-embed/tags/3.0.1/readme.txt

    r1760472 r1781066  
    33Tags: interact, quiz, poll, giveaway, embed, shortcode, promotion
    44Requires at least: 3.0.1
    5 Tested up to: 4.8.2
    6 Stable tag: 3.0.0
     5Tested up to: 4.9.1
     6Stable tag: 3.0.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5151== Changelog ==
    5252
     53= 3.0.1 =
     54* Added shortcode option to disable quiz cover page and start from first question.
     55
    5356= 3.0.0 =
    5457* Added Promotions Feature (Announcement Bar & Popup)
  • interact-quiz-embed/trunk/interact-quiz-embed.php

    r1760962 r1781066  
    55Description: Use this plugin to embed your Interact quiz into your Wordpress site.
    66Author: The Quiz Collective Inc.
    7 Version: 3.0.0
     7Version: 3.0.1
    88Author URI: https://www.tryinteract.com
    99
     
    6565
    6666function interact_embed($atts) {
    67     shortcode_atts(array('id'=>'', 'type'=>'quiz', 'w'=>'800', 'h'=>'800'), $atts);
     67    shortcode_atts(array('id'=>'', 'type'=>'quiz', 'w'=>'800', 'h'=>'800', 'no_cover'=>'false'), $atts);
    6868
    6969    if(isset($atts['w'])) { $width = $atts['w']; } else { $width = '800'; }
    7070    if(isset($atts['h'])) { $height = $atts['h']; } else { $height = '800'; }
    7171    if(isset($atts['type'])) { $type = $atts['type']; } else { $type = 'quiz'; }
     72    if(isset($atts['no_cover'])) { $no_cover = 'true'; } else { $no_cover = 'false'; }
    7273
    7374    $app_id = $atts['id'];
     
    8586                    var h = "' . $height . '";
    8687                    var host = "' . $type . '.tryinteract.com";
     88                    var no_cover = ' . $no_cover . ';
    8789
    8890                    window[ref] = new InteractApp();
    89                     window[ref].initialize({"ref":ref,"appId": app_id,"width":w,"height":h,"async":true,"host":host,"auto_resize":true,"mobile":true});
     91                    window[ref].initialize({"ref":ref,"appId": app_id,"width":w,"height":h,"async":true,"host":host,"auto_resize":true,"mobile":true,"no_cover":no_cover});
    9092                    window[ref].display();
    9193                });
     
    191193            if($app_id && $app_type) {
    192194                echo '<h4>Copy &amp; Paste your shortcode into your Post:';
    193                 echo '<pre style="display:block;max-width:600px;background: #333;padding: 20px;border-radius: 4px;color: white;font-weight: 400;">';
     195                echo '<pre style="display:block;max-width:720px;background: #333;padding: 20px;border-radius: 4px;color: white;font-weight: 400;">';
    194196                echo '[interact id="'. $app_id .'" type="'. $app_type .'"';
    195197               
     
    201203                }
    202204               
     205                if(isset($_POST['interact_disable_cover'])){
     206                    echo ' no_cover="true"';
     207                }
     208
    203209                echo ']</pre></h4>';
    204210            } else {
     
    214220                    <p>The URL above can be found in your dashboard under <br/><b>'Embed &amp; Share' &gt; 'Embed in your Website' &gt; 'WordPress'.</b></p>
    215221                    </td>
    216                     </tr>
     222                </tr>
    217223                <tr>
    218224                    <th scope="row">Embed Size</th>
     
    222228                        <label for="interact_size_h">Height</label>
    223229                        <input name="interact_size_h" type="number" step="1" min="0" id="interact_size_h" value="" class="small-text" />
    224                         <p class="description">Default size is 600x500px</p>
     230                        <p class="description">Default size is 600x500px (optional)</p>
     231                    </td>
     232                </tr>
     233                <tr>
     234                    <th scope="row">Cover Page</th>
     235                    <td>
     236                        <label for="interact_disable_cover">
     237                            <input name="interact_disable_cover" id="interact_disable_cover" type="checkbox"/> Disable Cover Page
     238                            <p class="description">Quiz will begin on the first question and skip the cover page (optional)</p>
     239                        </label>
    225240                    </td>
    226241                </tr>
    227242            </table>
     243
    228244            <p><input type="submit" name="submit" value="Generate Shortcode" class="button button-primary"></p>
    229245        </form>
  • interact-quiz-embed/trunk/readme.txt

    r1760472 r1781066  
    33Tags: interact, quiz, poll, giveaway, embed, shortcode, promotion
    44Requires at least: 3.0.1
    5 Tested up to: 4.8.2
    6 Stable tag: 3.0.0
     5Tested up to: 4.9.1
     6Stable tag: 3.0.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5151== Changelog ==
    5252
     53= 3.0.1 =
     54* Added shortcode option to disable quiz cover page and start from first question.
     55
    5356= 3.0.0 =
    5457* Added Promotions Feature (Announcement Bar & Popup)
Note: See TracChangeset for help on using the changeset viewer.