Esempio n. 1
0
    function weaver_st_pick_theme($altID)
    {
        // display a picker for the list of themes.
        global $weaver_theme_list;
        // the master list
        $themeimgs = get_template_directory_uri() . '/subthemes/';
        /* define control items for theme picker */
        $curTheme = weaver_getopt('ttw_subtheme');
        $showImg = 'custom.jpg';
        $selectID = 'ttw_subtheme' . $altID;
        // allows more than one form on the same admin page
        $subName = 'setsubtheme' . $altID;
        ?>

    <form name="weaver_select_theme_form" method="post">  <table class="optiontable">
     <tr>
	<th style="width:110px;">Select a theme: &nbsp;</th>
	<td>
	<select <?php 
        echo "name='{$selectID}' id='{$selectID}'";
        ?>
 >
        <?php 
        foreach ($weaver_theme_list as $theme) {
            $name = $theme['name'];
            ?>
	    <option<?php 
            if ($curTheme == $name) {
                $showImg = $theme['img'];
                echo ' selected="selected"';
            }
            ?>
><?php 
            echo $name;
            ?>
</option>
	    <?php 
        }
        ?>
 	</select>
	</td>
	<td ><small>Select a predefined sub-theme from the list.</small>
	<?php 
        echo "&nbsp; &nbsp;<small>Current theme: <strong>{$curTheme}</strong></small>";
        ?>
	</td>
	<td valign="middle" align="left" style="width:120px;">
	<?php 
        echo "&nbsp;&nbsp;<img src='" . $themeimgs . $showImg . "' width=67 height=50 />";
        ?>
	</td>
	</tr>

	<tr><td>&nbsp;</td><td><span class='submit' style="padding-right:15px;"><input <?php 
        echo "name='{$subName}'";
        ?>
 type='submit' value='Set to Selected Sub-Theme'/></span></td>
<?php 
        if (!weaver_allow_multisite()) {
            ?>
                <td ><small><strong>Please note:</strong> Changing sub-theme will replace all theme related your current "Main Options" settings.
		<em>Per site options</em> (those marked with a &diams; on
		the Main Options Page are not changed.)
		You can save them first with the "Save in My Saved Theme" button below.</small></td>
                </tr>
		<tr><td>&nbsp;</td>
		<td><span class='submit'><input name='savemytheme' type='submit' value='Save in My Saved Theme'/></span></td>
		<td colspan='2'><small>Save <u>all</u> currently saved options as <strong>My Saved Theme</strong>.
 You will be able to restore these later by selecting <strong>My Saved Theme</strong>. Please note: be sure to click <em>Save Current Settings</em>
 on the Main Options panel first to save any changes you might have made.</td>
		</tr>
<?php 
        } else {
            ?>
                <td><small><strong>Please note:</strong> Changing sub-theme will replace all theme related settings. <em>Per site options</em> (those marked with a &diams; on
		the Main Options Page, as well as most "Advanced Options" are not changed. (Important: Using "My Saved Theme" saves and restores ALL settings. You can also backup all
		current settings from the Save/Restore tab).</small></td>
                </tr>
<?php 
        }
        /* end TTW_MULTISITE */
        ?>
        </table>
	<?php 
        weaver_nonce_field($subName);
        weaver_nonce_field('savemytheme');
        ?>
    </form>
<?php 
    }
Esempio n. 2
0
function weaver_check_for_2010_weaver()
{
    /* see if old 2010 Weaver settings found, and tell them how to upgrade */
    if (!weaver_getopt('wvr_hide_if_are_oldWeaver_opts') && get_option('ttw_options')) {
        ?>
      <div style="background-color:#FFEEEE; border: 5px ridge red; margin: 0px 60px 0px 20px; padding:15px;">
        <form name="wvr_hide_import_old_form" method="post"
	      onSubmit="return confirm('You can show this notice again with an Administrative Option on the bottom of the Advanced Options tab.');">
	<h4 style="margin-top:0px;">IMPORTANT! Previously existing settings from an older version of 2010 Weaver or Weaver found.</h4>
	    <p>Settings from an older version of Weaver have been found. If you are using this version of Weaver for the first time,
	    you can import all your previous settings, and your site will then look the same as it did before. (You don't have
	    to decide right now -  the previous settings won't go away while you check out this version of Weaver.)
	    <br /> <br />
	     Note: if you have used <em>Appearance->Menus</em> to define Custom Menus, you will have to manually re-activate your menus.
	    Weaver Version 2 has other small incompatibilities with earlier Weaver versions. Click for details:
	    <?php 
        weaver_help_link('help.html#v2incompatibilities', __('Weaver Version 2.0 Differences', WEAVER_TRANSADMIN));
        ?>
	    </p>
	    <span class="submit"><input type="submit" name="hide_import_old_weaver" value="Hide This Notice From Now On" /></span>
	    &nbsp;<small>This will hide this notice box. There's an option at the bottom of the Advanced Options tab to show it again.</small><br />
	    <?php 
        weaver_nonce_field('hide_import_old_weaver');
        ?>
	</form> <!-- ttw_importold_form -->
	<?php 
        if (true) {
            ?>
        <form name="wvr_import_old_form" method="post"
	      onSubmit="return confirm('If you made any changes, you might want to use the Backup option on the Save/Restore tab first. Are you sure you want to overwrite your current settings with the previously existing Weaver settings?');">
	    <span class="submit"><input type="submit" name="import_old_weaver" value="Load Previous Weaver Settings"/></span>
	    &nbsp;<small>Load the previous Weaver settings into the current settings. Those previous settings will not be deleted.</small>
	    <?php 
            weaver_nonce_field('import_old_weaver');
            ?>
	</form> <!-- ttw_importold_form -->
	<?php 
        }
        ?>
	</div>
      <?php 
    }
}
Esempio n. 3
0
function weaver_ftp_form()
{
    // display warning message, and ftp info
    $readme = get_template_directory_uri() . '/help.html';
    ?>
      <br /><br /><br /><div style="background-color:#FFEEEE; border: 5px ridge red; margin: 10px 60px 0px 20px; padding:15px;">
<strong style="color:#f00; line-height:150%;">*** IMPORTANT NOTICE! ***</strong> <small style="padding-left:20px;">(But don't panic!)</small>
<?php 
    weaver_help_link('help.html#File_access_plugin', 'Weaver File Access Plugin');
    ?>
	<p>Your web host configuration needs "FTP" file access for full Weaver functionality. You need to use one of the following options. There are more details in the help file. <?php 
    weaver_help_link('help.html#File_access_plugin', 'Weaver File Access Plugin');
    ?>
</p>
	<ul style="list-style-type:disc !important;list-style-position:inside !important;">
	  <li><strong>For a shared web host</strong>: Provide FTP credentials to enable file access. You can do this by filling the form below, or by adding the proper information to your wp-config.php file as described in the help file. <small>Note: most shared hosts do not need FTP file access, and won't generate this message.</small></li>
      <li><strong>For a private server or VPS</strong>: Provide FTP credentials, or install the <a href="http://wordpress.org/extend/plugins/weaver-file-access-plugin/" target="_blank">Weaver File Access Plugin</a>. The Weaver File Access Plugin will provide the required file access with the most efficiency.</li>
      <li><strong>For compatibility with existing Weaver installations:</strong> install the <a href="http://wordpress.org/extend/plugins/weaver-file-access-plugin/" target="_blank">Weaver File Access Plugin</a>. This will provide the required file access with the most compatibility with previous versions, but with a very small security risk. See the help file.
      If you have an existing Weaver installation, you may find switching file access methods (Weaver File Access Plugin to FTP, or the opposite) may result in file or directory access permission issues. See the help file.</li>
      <li><strong>For reduced functionality mode:</strong> Check the <em>Hide FTP Access Start up Dialog</em> below.
      Weaver <strong>will continue to operate</strong> in reduced functionality mode (no editor styling, no save/restore, Inline CSS)
	until you provide FTP credentials, or download and activate the <em>Weaver File Access Plugin</em>, either from <a href="http://wordpress.org/extend/plugins/weaver-file-access-plugin/" target="_blank">WordPress.org</a>, or <a href="http://wpweaver.info/themes/weaver/weaver-file-access-plugin/" target="_blank">WPWeaver.info</a>.</li>
</ul>
	<ul style="list-style-type:disc !important;list-style-position:inside !important;">
	    <li>If your host requires secure FTP or SSH access, you will need to provide the proper credentials using the wp-config.php file.</li>
      <li>Installing the <a href="http://wordpress.org/extend/plugins/weaver-file-access-plugin/" target="_blank">Weaver File Access Plugin</a> will allow full Weaver functionality on any host, but sometimes with a small security risk</li>
</ul>
	<p><strong>Please read more details in the
<?php 
    echo '<a href="' . $readme . '#File_access_plugin" target="_blank">';
    ?>
	Weaver File Access Plugin</a> topic from the <em>Weaver Help tab</em></strong>.
	</p>
	</div><br />


    <form name="weaver_set_ftp_form" method="post">
      <p><span style="color:#00f; font-weight:bold; font-size: larger;"><strong>Provide FTP File Access Credentials</strong></span></p>
	<?php 
    if (!(defined('FTP_HOST') && defined('FTP_USER') && defined('FTP_PASS'))) {
        echo "<p>\n";
        _e('Please enter your FTP credentials to proceed.', WEAVER_TRANSADMIN);
        echo ' ';
        _e('If you do not remember your credentials, you should contact your web host.', WEAVER_TRANSADMIN);
        echo "</p>\n";
        ?>
	<label><?php 
        _e('Hostname', WEAVER_TRANSADMIN);
        ?>
: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label><input name="ftp_hostnamex" id="ftp_hostnamex" type="text" style="width:300px;height:20px;" class="regular-text" value="<?php 
        echo weaver_esc_textarea(weaver_getopt('ftp_hostname'));
        ?>
" />
    <small>Specify the name of your host. Usually something like 'example.com'.</small>
    <br /><label><?php 
        echo __('FTP Username', WEAVER_TRANSADMIN);
        ?>
: </label><input name="ftp_usernamex" id="ftp_usernamex" type="text" style="width:300px;height:20px;" class="regular-text" value="<?php 
        echo weaver_esc_textarea(weaver_getopt('ftp_username'));
        ?>
" />
    <small>Specify your FTP Username.</small>
    <br /><label><?php 
        _e('FTP Password', WEAVER_TRANSADMIN);
        ?>
: </label><input name="ftp_passwordx" id="ftp_passwordx" type="password" style="width:300px;height:20px;" class="regular-text" value="<?php 
        echo weaver_esc_textarea(weaver_decrypt(weaver_getopt('ftp_password')));
        ?>
" />
    <small>Specify your FTP Password. This will be saved in an encrypted form.</small>
<br />
<?php 
    } else {
        ?>
<p><em>Credentials provided in the wp-config.php file.</em> There must be some kind of problem because you shouldn't be seeing
this page unless you need to provide FTP access credentials. Perhaps the password is not included in wp-config.php.</p>
<?php 
    }
    ?>
<p>If you continue to get this message even after entering your credentials, please double check the values. If that
	that continues to fail, you can install the
	<a href="http://wordpress.org/extend/plugins/weaver-file-access-plugin/" target="_blank">Weaver File Access Plugin</a> instead.</p><br />

<p><span style="color:#00f; font-weight:bold; font-size: larger;"><strong>Install Weaver File Access Plugin</strong></span><br />
      The easiest way to install the <em>Weaver File Access Plugin</em> is to open the Plugins&rarr;Add New panel, and enter
      <em>Weaver File Access Plugin</em> into the search box. Then install and activate the plugin.
</p>

<p><span style="color:#00f; font-weight:bold; font-size: larger;"><strong>Continue with reduced file access</strong></span><br />
      If want to continue to use Weaver without full file access, check
the box below. You can still use all of Weaver's options. You just won't be able to use the Save/Restore features, the
Page/Post editor will use plain styling, and CSS rules will be included Inline on your site's pages. <em>You can still
install the Weaver File Access Plugin, or provide FTP credentials later.</em></p>

<label><strong>Hide FTP Access Start up Dialog:</strong> </label><input type="checkbox" name="ftp_hide_check_messagex" id="ftp_hide_check_messagex" <?php 
    checked(weaver_getopt_checked('ftp_hide_check_message'));
    ?>
 />
	<small>If you check this, then this FTP File Access message box when you enter Weaver Admin will not be displayed. Weaver will function in
	reduced functionality mode: no editor styling, no save/restore, Inline CSS.</small><br /><br />

<input class="button-primary" type="submit" name="ftp_save_form" value="Save FTP File Access Options"/>
	<?php 
    weaver_nonce_field('ftp_save_form');
    ?>
    </form>



    </div> <!-- #wrap -->
<?php 
}