|
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 |
$title = __gettext("Comment wall"); |
|---|
| 3 |
$blurb = __gettext("This setting allows you to configure who can post to your comment wall."); |
|---|
| 4 |
|
|---|
| 5 |
$access = user_flag_get("commentwall_access", $page_owner); |
|---|
| 6 |
if (!$access) $access = "LOGGED_IN"; |
|---|
| 7 |
|
|---|
| 8 |
$pub = ""; |
|---|
| 9 |
$logi = ""; |
|---|
| 10 |
$pri = ""; |
|---|
| 11 |
$fo = ""; |
|---|
| 12 |
if ($access == "PUBLIC") $pub = " selected=\"y\" "; |
|---|
| 13 |
if ($access == "LOGGED_IN") $logi = " selected=\"y\" "; |
|---|
| 14 |
if ($access == "PRIVATE") $pri = " selected=\"y\" "; |
|---|
| 15 |
if ($access == "FRIENDS_ONLY") $fo = " selected=\"y\" "; |
|---|
| 16 |
|
|---|
| 17 |
$run_result .= "<h2>$title</h2>"; |
|---|
| 18 |
$run_result .= "<p>$blurb</p>"; |
|---|
| 19 |
|
|---|
| 20 |
$pubtext = __gettext("Public"); |
|---|
| 21 |
$logitext = __gettext("Logged in users"); |
|---|
| 22 |
$pritext = __gettext("Private"); |
|---|
| 23 |
$fotext = __gettext("Friends only"); |
|---|
| 24 |
|
|---|
| 25 |
$select_box = <<< END |
|---|
| 26 |
<select name="flag[commentwall_access]"> |
|---|
| 27 |
<option name="flag[commentwall_access]" value="PUBLIC" $pub>$pubtext</option> |
|---|
| 28 |
<option name="flag[commentwall_access]" value="LOGGED_IN" $logi>$logitext</option> |
|---|
| 29 |
<option name="flag[commentwall_access]" value="FRIENDS_ONLY" $fo>$fotext</option> |
|---|
| 30 |
<option name="flag[commentwall_access]" value="PRIVATE" $pri>$pritext</option> |
|---|
| 31 |
</select> |
|---|
| 32 |
END; |
|---|
| 33 |
|
|---|
| 34 |
$run_result .= templates_draw(array( |
|---|
| 35 |
'context' => 'databox', |
|---|
| 36 |
'name' => __gettext("Access level: "), |
|---|
| 37 |
'column1' => $select_box |
|---|
| 38 |
) |
|---|
| 39 |
); |
|---|
| 40 |
?> |
|---|