aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-09-02 20:25:33 -0700
committerfriendica <info@friendica.com>2013-09-02 20:25:33 -0700
commit615bf237330519f0d21fccfe6a8f69b5bb4c0f69 (patch)
tree7ade1a37899df8db4afb308f9f563cd8e21ce19f /include/text.php
parent1a7bb1fb75084fbcd4d81c8c24820631e3df4d64 (diff)
downloadvolse-hubzilla-615bf237330519f0d21fccfe6a8f69b5bb4c0f69.tar.gz
volse-hubzilla-615bf237330519f0d21fccfe6a8f69b5bb4c0f69.tar.bz2
volse-hubzilla-615bf237330519f0d21fccfe6a8f69b5bb4c0f69.zip
add a layout selector
Diffstat (limited to 'include/text.php')
-rwxr-xr-xinclude/text.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php
index bbd538f15..004efc08d 100755
--- a/include/text.php
+++ b/include/text.php
@@ -1321,6 +1321,29 @@ function unamp($s) {
return str_replace('&amp;', '&', $s);
}
+function layout_select($channel_id, $current = '') {
+ $r = q("select mid,sid from item left join item_id on iid = item.id where service = 'PDL' and item.uid = item_id.uid and item_id.uid = %d and (item_restrict & %d)",
+ intval($channel_id),
+ intval(ITEM_PDL)
+ );
+ if($r) {
+ $o = t('Select a page layout: ');
+ $o .= '<select name="layout_mid" id="select-layout_mid" >';
+ $empty_selected = (($current === '') ? ' selected="selected" ' : '');
+ $o .= '<option value="" ' . $empty_selected . '>' . t('default') . '</option>';
+ foreach($r as $rr) {
+ $selected = (($rr['mid'] == $current) ? ' selected="selected" ' : '');
+ $o .= '<option value="' . $rr['mid'] . '"' . $selected . '>' . $rr['sid'] . '</option>';
+ }
+ $o .= '</select>';
+ }
+
+ return $o;
+}
+
+
+
+
function mimetype_select($channel_id, $current = 'text/bbcode') {