Plugin Directory

Changeset 166061


Ignore:
Timestamp:
10/23/2009 01:55:35 AM (16 years ago)
Author:
jeff_
Message:

changes made on the admin page ; adding the plugins unique ID system to allow faster troubleshoot ; possibility to view the complete shortcode string

Location:
frontpage-slideshow/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • frontpage-slideshow/trunk/frontpage-slideshow.php

    r159071 r166061  
    44Plugin URI: http://www.modulaweb.fr/blog/wp-plugins/frontside-slideshow/en/
    55Description: Frontpage Slideshow provides a slide show like you can see on <a href="http://linux.com">linux.com</a> or <a href="http://modulaweb.fr/">modulaweb.fr</a> front page. <a href="options-general.php?page=frontpage-slideshow">Configuration Page</a>
    6 Version: 0.7
     6Version: 0.7.1
    77Author: Jean-François VIAL
    88Author URI: http://www.modulaweb.fr/
     
    2424    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    2525*/
     26define ('FRONTPAGE_SLIDESHOW_VERSION', '0.7.1');
    2627$fs_already_displayed = false; // the slideshow dont have been displayed yet
    2728function frontpageSlideshow($content,$force_display=false,$options=array()) {
     
    374375    }
    375376}
     377
     378
     379
    376380
    377381function frontpageSlideshow_get_options($get_defaults=false,$return_unique=null) {
     
    588592}
    589593
     594// utility function
     595function frontpageSlideshow_createShortcodeString($opt=array()) {
     596    $def = frontpageSlideshow_get_options(true);
     597    if (count($opt)==0) $opt = frontpageSlideshow_get_options();
     598    $argz = '';
     599    $dont_add=array('fs_is_activated','fs_shortcode','fs_cats','fs_insert');
     600    foreach ($opt['values'] as $k=>$v) {
     601        if (!in_array($k,$dont_add) && $def['values'][$k] != $v) $argz .= " {$k}={$v}";
     602    }
     603    return "[{$opt['values']['fs_shortcode']}{$argz}]";
     604}
     605
    590606function frontpageSlideshow_admin_options() {
     607    global $wp_version;
    591608    $options = frontpageSlideshow_get_options();
    592609    $message = '';
     
    636653        <h2>Frontpage Slideshow – <?php _e('Option page','frontpage-slideshow')?></h2>
    637654            <?php  if ($message!='') { ?>
    638             <div id="message" class="updated"><?php echo $message?></div>
     655            <div id="message" class="updated fade"><?php echo $message?></div>
    639656            <?php  } ?>
    640657            <div id="poststuff" class="meta-box-sortables">
     658                <div class="postbox closed">
     659                    <h3><span><?php  _e('How to use - Getting help','frontpage-slideshow'); ?></span></h3>
     660                    <div class="inside" style="padding: 5px;">
     661                        <p><?php _e('There are 2 ways to use this plugin: ','frontpage-slideshow'); ?></p>
     662                        <ul style="list-style: disc; padding-left: 20px;">
     663                            <li>
     664                                <?php _e('If you are using a static page as the front-page, use the front-page mode','frontpage-slideshow'); ?><br />
     665                                <?php _e('With this mode, the slideshow will be automatically added in top of the front-page content, before all other content. You don\'t have anything else to do.','frontpage-slideshow'); ?><br />
     666                            </li>
     667                            <li>
     668                                <?php _e('If you are not using a static page as the front-page, use the shortcode mode','frontpage-slideshow'); ?><br />
     669                                <?php _e('With this mode, you got to put a shortcode (like [FrontpageSlideshow]) where you want the slideshow to be displayed : ','frontpage-slideshow'); ?>
     670                                <ul style="list-style: disc; padding-left: 20px;">
     671                                    <li><?php _e('Somewhere into your posts content','frontpage-slideshow'); ?></li>
     672                                    <li><?php _e('Somewhere into some sidebar text-box','frontpage-slideshow'); ?></li>
     673                                    <li><?php _e('Everywhere else into the pages by inserting the following code snippet into your theme\'s .php files where you want the slideshow to be displayed: ','frontpage-slideshow'); ?><br />
     674                                        <pre style="background-color: #f5f5f5; border: 1px solid #dadada; padding: 11px; font-size: 11px; line-height: 1.3em;">
     675&lt;?php
     676// <?php _e('added by &lt;yourname> in order to add the slideshow using the frontpage-slideshow plugin ','frontpage-slideshow'); ?>
     677<br />echo do_shortcode('[FrontpageSlideshow]');
     678?></pre>
     679                                    </li>
     680                                </ul>
     681                            </li>
     682                        </ul>
     683                        <br />
     684                        <p><?php _e('Note that this plugin is using the Wordpress API In order to include its needed Javascript files. Some other plugins or themes that are not using that API could mess up with this plugin.','frontpage-slideshow'); ?></p>
     685                        <br />
     686                        <p><big><strong><?php _e('In case of trouble:','frontpage-slideshow'); ?></strong></big></p>
     687                        <ul style="list-style: disc; padding-left: 20px;">
     688                            <li><?php _e('Read this page: ','frontpage-slideshow'); ?> <a href="http://wordpress.org/support/topic/322689">http://wordpress.org/support/topic/322689</a></li>
     689                            <li><?php _e('Look at the other support questions there: ','frontpage-slideshow'); ?> <a href="http://wordpress.org/tags/frontpage-slideshow">http://wordpress.org/tags/frontpage-slideshow</a></li>
     690                            <li><?php _e('If you want to post a support question, create a new topic by using this link: ','frontpage-slideshow'); ?> <a href="http://wordpress.org/tags/frontpage-slideshow#postform">http://wordpress.org/tags/frontpage-slideshow#postform</a></li>
     691                        </ul>
     692<?php
     693    $args = array('plugin' => 'frontpage-slideshow', 'plugin_version' => FRONTPAGE_SLIDESHOW_VERSION);
     694    $args['siteurl'] = get_option('siteurl');
     695    $args['&admin_email'] = get_option('admin_email');
     696    $args['WP_version'] = $wp_version;
     697    $args['theme'] = get_option('template');
     698    $css = file_get_contents('../wp-content/themes/'.get_option('template').'/style.css');
     699    preg_match('#Theme URI: (.*)#i',$css,$m);
     700    $args['theme_URI'] = $m[1];
     701    $req = file_get_contents('https://www.modulaweb.fr/wp-plugins-support/?args='.urlencode(json_encode($args)));
     702    $req = json_decode($req, true);
     703
     704    $plugin_ID = $req['ID'];
     705?>
     706                        <p><big><strong><?php _e('Plugin unique ID','frontpage-slideshow'); ?></strong></big></p>
     707                        <p>
     708                            <?php _e('In order to faster bug reports, troubleshoot and for some statistics, some informations are collected and sent to this plugin:\'s author.','frontpage-slideshow');?><br />
     709                            <?php _e('The informations that are sent are this site URL, this site admin email address, the Wordpress version, the used theme and its URI, and the used version of this plugin.','frontpage-slideshow');?><br />
     710                            <?php _e('If you need help to troubleshoot, dont forget to transmit your plugin unique ID','frontpage-slideshow');?><br />
     711                        </p>
     712                        <p><?php _e('Your plugin unique ID is: ','frontpage-slideshow'); echo "<big><strong>{$req['ID']}</strong></big>"; ?></p>
     713                </div>
     714                </div>
    641715                <div class="postbox">
    642716                    <h3><span><?php _e('Preview')?></span></h3>
     
    647721                        ?>
    648722                        <p><strong><?php _e('Important: ','frontpage-slideshow')?></strong> <?php _e('the slideshow may appear differently here and on your site due to the stylesheet of your theme.','frontpage-slideshow')?></p>
     723                        <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
     724                            <input name="cmd" value="_s-xclick" type="hidden">
     725                            <input name="hosted_button_id" value="9112063" type="hidden">
     726                            <p>
     727                                <?php _e('If you find this plugin useful, you can support his author by making a donation.','frontpage-slideshow'); ?>
     728                                <input name="submit" type="submit" class="button-primary" value="<?php _e('Donate to this plugin','frontpage-slideshow'); ?>" />
     729                            </p>
     730                        </form>
    649731                    </div>
    650732                </div>
    651733            <form method="post">
    652734                <div class="postbox<?php  if ($options['values']['fs_is_activated']) echo ' closed' ?>">
     735                    <div class="handlediv" title="<?php _e('Click to open/close','frontpage-slideshow')?>"><br /></div>
    653736                    <h3><span><?php  if ($options['values']['fs_is_activated']) _e('Disable the plugin','frontpage-slideshow'); else _e('Enable the plugin','frontpage-slideshow');?></span></h3>
    654737                    <div class="inside" style="padding: 5px;">
     
    670753                </div>
    671754                <div class="postbox closed">
    672                     <div class="handlediv" title="Cliquez pour ouvrir/fermer"><br /></div>
     755                    <div class="handlediv" title="<?php _e('Click to open/close','frontpage-slideshow')?>"><br /></div>
    673756                    <h3><span><?php _e('About inserting the slideshow','frontpage-slideshow')?></span></h3>
    674757                    <div class="inside" style="padding: 5px;">
     
    679762                            </li>
    680763                            <li><label for="fs_insert_2"><input type="radio" id="fs_insert_2" name="fs_insert" value="shortcode"<?php  if ($options['values']['fs_insert']=='shortcode') echo ' checked="checked"'; ?> /> <?php _e('Everywhere on content post (using the dedicated shortcode)','frontpage-slideshow')?></label><br />
    681                                 <label for="fs_insert_shortcode">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;→ <?php _e('Shortcode','frontpage-slideshow')?> : <input id="fs_shortcode" name="fs_shortcode" value="<?php echo $options['values']['fs_shortcode']?>" /></label>
     764                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label for="fs_insert_shortcode">→ <?php _e('Shortcode','frontpage-slideshow')?> : [<input id="fs_shortcode" name="fs_shortcode" value="<?php echo $options['values']['fs_shortcode']?>" />]</label>
     765                                <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;→ <?php _e('Actual complete shortcode (to insert a slideshow with the actual settins):','frontpage-slideshow')?>
     766                                <pre style="margin-left: 47px; overflow: auto; background-color: #f5f5f5; border: 1px solid #dadada; padding: 11px; font-size: 11px; line-height: 1.3em;">
     767<?php echo frontpageSlideshow_createShortcodeString($options); ?></pre>
    682768                            </li>
    683769                        </ul>
     
    690776                </div>
    691777                <div class="postbox closed">
    692                     <div class="handlediv" title="Cliquez pour ouvrir/fermer"><br /></div>
     778                    <div class="handlediv" title="<?php _e('Click to open/close','frontpage-slideshow')?>"><br /></div>
    693779                    <h3><span><?php _e('About categories','frontpage-slideshow')?></span></h3>
    694780                    <div class="inside" style="padding: 5px;">
     
    713799                </div>
    714800                <div class="postbox closed">
     801                    <div class="handlediv" title="<?php _e('Click to open/close','frontpage-slideshow')?>"><br /></div>
    715802                    <h3><span><?php _e('About slides and buttons','frontpage-slideshow')?></span></h3>
    716803                    <div class="inside" style="padding: 5px;">
     
    724811                </div>
    725812                <div class="postbox closed">
     813                    <div class="handlediv" title="<?php _e('Click to open/close','frontpage-slideshow')?>"><br /></div>
    726814                    <h3><span><?php _e('About default link','frontpage-slideshow')?></span></h3>
    727815                    <div class="inside" style="padding: 5px;">
     
    734822                </div>
    735823                <div class="postbox closed">
     824                    <div class="handlediv" title="<?php _e('Click to open/close','frontpage-slideshow')?>"><br /></div>
    736825                    <h3><span><?php _e('About sizes and positions','frontpage-slideshow')?></span></h3>
    737826                    <div class="inside" style="padding: 5px;">
     
    749838                </div>
    750839                <div class="postbox closed">
     840                    <div class="handlediv" title="<?php _e('Click to open/close','frontpage-slideshow')?>"><br /></div>
    751841                    <h3><span><?php _e('About colors and opacities','frontpage-slideshow')?></span></h3>
    752842                    <div class="inside" style="padding: 5px;">
     
    763853                </div>
    764854                <div class="postbox closed">
     855                    <div class="handlediv" title="<?php _e('Click to open/close','frontpage-slideshow')?>"><br /></div>
    765856                    <h3><span><?php _e('Reset preview or plugin','frontpage-slideshow')?></span></h3>
    766857                    <div class="inside" style="padding: 5px;">
  • frontpage-slideshow/trunk/readme.txt

    r159038 r166061  
    4343* v 0.6.1 : minor bug correction (replacing php short tags by long ones)
    4444* v 0.7 : allow to use the WP Text Widget to display the slideshow by inserting the shortcode onto the text itself, modify the original WP Text Widget to allow the use of all other shortcodes
     45* v 0.7.1 : changes made on the admin page ; adding the plugins unique ID system to allow faster troubleshoot ; possibility to view the complete shortcode string
    4546
    4647== Screenshots ==
    4748
    48491. live at http://wwww.modulaweb.fr french webagency
    49 2. live at http://www.smartyweb.org/
     502. live at http://www.smartyweb.org
    5051
    5152== How to use ==
Note: See TracChangeset for help on using the changeset viewer.