root/devel/mod/sidebar/lib/userdetails_edit.php

Revision 1539, 1.5 kB (checked in by renato, 1 year ago)

Setting prop svn:eol-style in LOTS of files.

  • Property svn:eol-style set to native
Line 
1 <?php
2 /**
3  * Sidebar plugin
4  * $id$
5  *
6  * @copyright Copyright (c) 2007 Pro Soft Resources Inc. http://www.prosoftpeople.com
7  * @author Rolando Espinoza La fuente <rho@prosoftpeople.com>
8  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
9  */
10
11     /**
12      * Displays per-block settings on account settings
13      */
14
15     global $page_owner;
16
17     $title = __gettext('Sidebar settings');
18     $blurb = __gettext("This settings allows you to configure what block you want to display on your sidebar.");
19
20     $body = "<h2>$title</h2>\n<p>$blurb</p>";
21     $settings = "<table>";
22
23     $blocks = sidebar_get_blocks();
24
25     foreach ($blocks as $b) {
26         $flag_name = 'sidebar'.$b['id'];
27         $flag = user_flag_get($flag_name, page_owner());
28         if ($flag == 'no') {
29             $yescheck = '';
30             $nocheck = 'checked="true"';
31         } else {
32             $yescheck = 'checked="true"';
33             $nocheck = '';
34         }
35
36         $name = 'flag[' . $flag_name . ']';
37         $label = $b['label'];
38
39         $yes = "<label><input type=\"radio\" name=\"$name\" value=\"yes\" $yescheck />".__gettext('Yes')."</label>";
40         $no = "<label><input type=\"radio\" name=\"$name\" value=\"no\" $nocheck />".__gettext('No')."</label>";
41
42         $settings .= "<tr><td><strong>$label</strong></td><td>$yes</td><td>$no</td></tr>";
43     }
44     $settings .= "</table>";
45
46     //FIXME preserve legacy style
47     $body .= '<div class="infoholder">' . $settings . '<p></p></div>';
48
49     $run_result .= $body;
50 ?>
51
Note: See TracBrowser for help on using the browser.