viewing source for "expand-comments-ui.php"

last commit

commit ec9726ece091495bad03d1d5096e468fbba6ca06 Author: andy <andy@a04a6e75-5819-0410-a511-8dafea38c924> Date: Thu Mar 22 13:42:47 2007 +0000
Added 1.3.1 info

source code

001: <?php
002: //This file is part of Expand Comments ver 1.3.1
003: // Copyright 2006 Andrew Rader (http://nymb.us)
004: 
005:     check_admin_referer();
006: 
007:     if( isset($_POST['info_update']) ) {
008:         if( isset($_POST['shownocomments']) ) {
009:             $shownocomments = true;
010:         }
011:         else {
012:             $shownocomments = false;
013:         }
014: 
015:         if( isset($_POST['showform']) ) {
016:             $showform = true;
017:         }
018:         else {
019:             $showform = false;
020:         }
021: 
022:         if( isset($_POST['ajaxsubmit']) ) {
023:             $ajaxsubmit = true;
024:         }
025:         else {
026:             $ajaxsubmit = false;
027:         }
028: 
029:         if( isset($_POST['moofxsubmit']) ) {
030:             $moofxsubmit = true;
031:         }
032:         else {
033:             $moofxsubmit = false;
034:         }
035: 
036:         $jump = isset($_POST['comments-jump']);
037: 
038:         $intro = $_POST['intro'];
039:         $outro = $_POST['outro'];
040:         $expand = $_POST['expand'];
041:         $collapse = $_POST['collapse'];
042:         $loading = stripslashes($_POST['loadingtext']);
043: 
044:         $comlistclass = $_POST['commentlistclass'];
045:         $comtextauthor = $_POST['commentclassauthor'];
046:         $comtexteven = $_POST['commentclass'];
047:         $comtextodd = $_POST['commentclassodd'];
048:         $comcontent = $_POST['commentcontent'];
049:         $authorclass = $_POST['authorclass'];
050:         $dateclass = $_POST['dateclass'];
051:         $collapseclass = $_POST['collclass'];
052:         $loadingclass = $_POST['loadingclass'];
053: 
054:         expcom::set_show_without_comments($shownocomments);
055:         expcom::set_show_form($showform);
056:         expcom::set_ajax_submit($ajaxsubmit);
057:         expcom::set_moofx_submit($moofxsubmit);
058:         expcom::set_comments_jump($jump);
059: 
060:         expcom::set_intro($intro);
061:         expcom::set_outro($outro);
062:         expcom::set_expand($expand);
063:         expcom::set_collapse($collapse);
064:         expcom::set_loading_text($loading);
065: 
066:         expcom::set_commentlist_class( $comlistclass );
067:         expcom::set_commenttext_author_class( $comtextauthor );
068:         expcom::set_commenttext_even_class( $comtexteven );
069:         expcom::set_commenttext_odd_class( $comtextodd );
070:         expcom::set_commentcontent_class( $comcontent );
071:         expcom::set_author_class( $authorclass );
072:         expcom::set_date_class( $dateclass );
073:         expcom::set_collapse_class( $collapseclass );
074:         expcom::set_loading_class( $loadingclass );
075:     }
076: ?>
077: <div class="wrap">
078:  <form method="post" action="">
079:   <h2><?php _e('Expand Comments Options'); ?></h2>
080:   <fieldset>
081:    <legend><b><?php _e('Display Options'); ?></b></legend>
082:    <ul style="list-style-type: none;">
083:       <li>
084:          <input type="checkbox" name="shownocomments" id="shownocomments" <?php if( expcom::get_show_without_comments() ) { echo 'checked="checked"'; } ?>></input> <label for="shownocomments">Show Expand link when there aren't any Comments</label>
085:         </li>
086:     <li>
087:      <input type="checkbox" name="comments-jump" id="comments-jump" <?php if( expcom::get_comments_jump() ) { echo 'checked="checked"'; } ?>></input> <label for="comments-jump">Jump to comments when expanded</label>
088:     </li>
089:     <li>
090:      <input type="checkbox" name="showform" id="showform" <?php if( expcom::get_show_form() ) { echo 'checked="checked"'; } ?>></input> <label for="showform">Show Submit New Comment Form</label>
091:     </li>
092:         <li>
093:             <input type="checkbox" name="ajaxsubmit" id="ajaxsubmit" <?php if( expcom::get_ajax_submit() ) { echo 'checked="checked"'; } ?>></input> <label for="ajaxsubmit">Enable AJAXified Comment Submitting</label>
094:             <ul>
095:                 <li><b>Note</b>: If you have a custom <code>inline-comment-form.php</code> file, you might need to add a call to &lt;?php expand_comment_submit_onclick(); ?&gt; to the submit button (this adds an onclick javascript attribute)</li>
096:             </ul>
097:         </li>
098:         <li>
099:             <input type="checkbox" name="moofxsubmit" id="moofxsubmit" <?php if( expcom::get_moofx_submit() ) { echo 'checked="checked"'; } ?>></input> <label for="moofxsubmit">Enable moo.fx fade effect on AJAX submissions</label>
100:         </li>
101:    </ul>
102:      </fieldset>
103:      <br />
104:      <fieldset>
105:    <legend><b><?php _e('Link Options'); ?></b></legend>
106:    <ul style="list-style-type: none;">
107:     <li>
108:      <label for="intro">Intro Text:</label>
109:      <input type="text" name="intro" value="<?php echo expcom::get_intro(); ?>" id="intro" />
110:     </li>
111:    <li>
112:     <label for="outro">Outro Text:</label>
113:     <input type="text" name="outro" value="<?php echo expcom::get_outro(); ?>" id="outro" />
114:    </li>
115:    <li>
116:     <label for="expand">Expand Text:</label>
117:     <input type="text" name="expand" value="<?php echo expcom::get_expand(); ?>" id="expand" />
118:     <small>(<b>Note</b>: the string $count will be replaced with the current number of comments)</small>
119:    </li>
120:    <li>
121:     <label for="collapse">Collapse Text:</label>
122:     <input type="text" name="collapse" value="<?php echo expcom::get_collapse(); ?>" id="collapse" />
123:    </li>
124:    </ul>
125:   </fieldset>
126:   <br />
127:   <fieldset>
128:    <legend><b><?php _e('Loading Options'); ?></b></legend>
129:    <ul style="list-style-type: none;">
130:     <li>
131:      <label for="loadingtext">Loading Text <small>(can include html)</small>:</label>
132:      <br />
133:      <textarea name="loadingtext" id="loadingtext" style="width: 60%; height: 6em;"><?php echo expcom::get_loading_text(); ?></textarea>
134:     </li>
135:    </ul>
136:   </fieldset>
137:     <br />
138:     <fieldset>
139:         <legend><b><?php _e('CSS Options'); ?></b></legend>
140:         <blockquote>The values here can be modified to adjust the CSS properties of the elements listed in order to better match your theme. If your theme is fairly unique, it may be easier to add your own style information to the file <em>style.css</em> located in the <em>plugins/expand-comments</em> directory.</blockquote>
141:         <table style="margin-left: 20px">
142:             <tr>
143:                 <td><label for="commentlistclass">Comment List Class (div):</label></td>
144:                 <td>
145:                 <?php
146:                     $class = expcom::get_commentlist_class();;
147:                     echo "<input type=\"text\" id=\"commentlistclass\" name=\"commentlistclass\" value=\"$class\" />\n";
148:                 ?>
149:                 </td>
150:             </tr>
151:             <tr>
152:                 <td><label for="commentclassauthor">Comment Class for Post Author (div):</label></td>
153:                 <td>
154:                 <?php
155:                     $class = expcom::get_commenttext_author_class();
156:                     echo "<input type=\"text\" id=\"commentclassauthor\" name=\"commentclassauthor\" value=\"$class\" />\n";
157:                 ?>
158:                 </td>
159:             </tr>
160:             <tr>
161:                 <td><label for="commentclass">Comment Text Class Even (div):</label></td>
162:                 <td>
163:                 <?php
164:                     $class = expcom::get_commenttext_even_class();
165:                     echo "<input type=\"text\" id=\"commentclass\" name=\"commentclass\" value=\"$class\" />\n";
166:                 ?>
167:                 </td>
168:             </tr>
169:             <tr>
170:                 <td><label for="commentclassodd">Comment Text Class Odd (div):</label></td>
171:                 <td>
172:                 <?php
173:                     $class = expcom::get_commenttext_odd_class();
174:                     echo "<input type=\"text\" id=\"commentclassodd\" name=\"commentclassodd\" value=\"$class\" />\n";
175:                 ?>
176:                 </td>
177:             </tr>
178:             <tr>
179:                 <td><label for="commentcontent">Comment Content Class (div):</label></td>
180:                 <td>
181:                 <?php
182:                     $class = expcom::get_commentcontent_class();
183:                     echo "<input type=\"text\" id=\"commentcontent\" name=\"commentcontent\" value=\"$class\" />\n"
184:                 ?>
185:                 </td>
186:             </tr>
187:             <tr>
188:                 <td><label for="loadingclass">Comment Loading Class (div):</label></td>
189:                 <td>
190:                 <?php
191:                     $class = expcom::get_loading_class();
192:                     echo "<input type=\"text\" id=\"loadingclass\" name=\"loadingclass\" value=\"$class\" />\n";
193:                 ?>
194:                 </td>
195:             <tr>
196:                 <td><label for="authorclass">Author Text Class (cite):</label></td>
197:                 <td>
198:                 <?php
199:                     $class = expcom::get_author_class();
200:                     echo "<input type=\"text\" id=\"authorclass\" name=\"authorclass\" value=\"$class\" />\n";
201:                 ?>
202:                 </td>
203:             </tr>
204:             <tr>
205:                 <td><label for="dateclass">Date/Link Text Class (small):</label></td>
206:                 <td>
207:                 <?php
208:                     $class = expcom::get_date_class();;
209:                     echo "<input type=\"text\" id=\"dateclass\" name=\"dateclass\" value=\"$class\" />\n";
210:                 ?>
211:                 </td>
212:             </tr>
213:             <tr>
214:                 <td><label for="collclass">Bottom Collapse Class (div):</label></td>
215:                 <td>
216:                 <?php
217:                     $class = expcom::get_collapse_class();
218:                     echo "<input type=\"text\" id=\"collclass\" name=\"collclass\" value=\"$class\" />\n";
219:                 ?>
220:                 </td>
221:             </tr>
222:         </table>
223:     </fieldset>
224: 
225:   <div class="submit">
226:    <input type="submit" name="info_update" value="<?php
227:          _e('Update options', 'Expand Comments'); ?> &raquo;" />
228:   </div>
229:  </form>
230: </div>