viewing source for "fancy-categories-ui.php"

last commit

commit 2023770d4aea75baa7dd033df9b6402e134da37b Author: andy <andy@a04a6e75-5819-0410-a511-8dafea38c924> Date: Wed Dec 12 18:28:18 2007 +0000
code cleanup and changelog / readme update

source code

01: <?php
02: /*
03: Copyright 2007 Andrew Rader
04: 
05: This file is part of Fancy Categories
06: 
07: Fancy Categories is free software; you can redistribute it and/or modify
08: it under the terms of the GNU General Public License as published by
09: the Free Software Foundation; either version 2 of the License, or
10: (at your option) any later version.
11: 
12: Fancy Categories is distributed in the hope that it will be useful,
13: but WITHOUT ANY WARRANTY; without even the implied warranty of
14: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15: GNU General Public License for more details.
16: 
17: You should have received a copy of the GNU General Public License
18: along with Fancy Categories; if not, write to the Free Software
19: Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20: */
21: 
22: check_admin_referer();
23: 
24:     if( isset($_POST['info_update']) ) {
25:         fancat::set_show_post_count( isset($_POST['show-post-count']) );
26:         fancat::set_show_count_total( isset($_POST['show-count-total']) );
27:         fancat::set_show_ellipsis( isset($_POST['show-ellipsis']) );
28:         fancat::set_post_string( $_POST['post-string'] );
29:         fancat::set_title_size( $_POST['title-size'] );
30:     }
31: ?>
32: <div class="wrap">
33:  <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
34:   <h2>Fancy Categories Options</h2>
35:   <fieldset>
36:    <legend><b><?php _e('Display Options:'); ?></b></legend>
37:    <ul style="list-style-type: none;">
38:     <li>
39:      <input type="checkbox" name="show-post-count" <?php if(fancat::get_show_post_count()) echo 'checked="checked"'; ?> id="show-post-count"></input> <label for="show-post-count">Show Post Count in Category Links</label>
40:      <ul>
41:       <li>
42:        <input type="checkbox" name="show-count-total" <?php if(fancat::get_show_count_total()) echo 'checked="checked"'; ?> id="show-count-total"></input> <label for="show-count-total">Include sub-category post counts in parent's count</label>
43:       </li>
44:      </ul>
45:     </li>
46:     <li>
47:      <label for="post-string">Text to show for post links:</label>
48:      <input type="text" name="post-string" id="post-string" value="<?php echo fancat::get_post_string(); ?>"></input> <label for="post-string"><small>See below for a list of special strings</small></label>
49:      <ul>
50:       <li>
51:        <label for="title-size">Limit %title Length <small>(0 for full title)</small>:</label>
52:        <input type="text" name="title-size" id="title-size" value="<?php echo fancat::get_title_size(); ?>"></input>
53:       </li>
54:       <li>
55:        <input type="checkbox" name="show-ellipsis" id="show-ellipsis" <?php if(fancat::get_show_ellipsis()) echo 'checked="checked"'; ?></input> <label for="show-ellipsis">Show Ellipsis in shortened titles</label>
56:       </li>
57:      </ul>
58:     </li>
59:    </ul>
60:   </fieldset>
61:   <fieldset>
62:    <legend><b><?php _e('Special Strings for Post Links'); ?></b></legend>
63:    <ul style="list-style-type: none;">
64:     <li>%title - This will be replaced with the Post's title, trimmed to size</li>
65:     <li>%id - This will be replaced with the Post's ID</li>
66:    </ul>
67:   </fieldset>
68:   <div class="submit">
69:    <input type="submit" name="info_update" value="<?php _e('Update options', 'Fancy Categories'); ?> &raquo;" />
70:   </div>
71:  </form>
72: </div>