From 86d60f572f6accb086f7cd4271ababde2c5d3669 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 4 Mar 2014 14:35:42 -0800 Subject: change flags for one-way connections from hidden to unconnected so we can still use hidden for - well hiding connections --- boot.php | 1 + include/onepoll.php | 7 ++----- include/poller.php | 9 +++------ include/zot.php | 15 ++++++++++----- mod/connections.php | 47 ++++++++++++++++++++++++++++++----------------- 5 files changed, 46 insertions(+), 33 deletions(-) diff --git a/boot.php b/boot.php index 19d79941c..863085526 100755 --- a/boot.php +++ b/boot.php @@ -290,6 +290,7 @@ define ( 'ABOOK_FLAG_IGNORED' , 0x0002); define ( 'ABOOK_FLAG_HIDDEN' , 0x0004); define ( 'ABOOK_FLAG_ARCHIVED' , 0x0008); define ( 'ABOOK_FLAG_PENDING' , 0x0010); +define ( 'ABOOK_FLAG_UNCONNECTED', 0x0020); define ( 'ABOOK_FLAG_SELF' , 0x0080); diff --git a/include/onepoll.php b/include/onepoll.php index a821b76cf..e81d8bcf7 100644 --- a/include/onepoll.php +++ b/include/onepoll.php @@ -29,19 +29,16 @@ function onepoll_run($argv, $argc){ return; } - $d = datetime_convert(); - $contacts = q("SELECT abook.*, xchan.*, account.* FROM abook LEFT JOIN account on abook_account = account_id left join xchan on xchan_hash = abook_xchan where abook_id = %d - AND (( abook_flags = %d ) OR ( abook_flags = %d ) OR ( abook_flags & %d )) + AND (( abook_flags & %d ) OR ( abook_flags = %d )) AND (( account_flags = %d ) OR ( account_flags = %d )) limit 1", intval($contact_id), - intval(ABOOK_FLAG_HIDDEN), + intval(ABOOK_FLAG_HIDDEN|ABOOK_FLAG_PENDING|ABOOK_FLAG_UNCONNECTED), intval(0), - intval(ABOOK_FLAG_PENDING), intval(ACCOUNT_OK), intval(ACCOUNT_UNVERIFIED) ); diff --git a/include/poller.php b/include/poller.php index 649da30f6..423ee46c1 100644 --- a/include/poller.php +++ b/include/poller.php @@ -184,9 +184,7 @@ function poller_run($argv, $argc){ if(! $restart) proc_run('php','include/cronhooks.php'); - // Only poll from those with suitable relationships, - // and which have a polling address and ignore Diaspora since - // we are unable to match those posts with a Diaspora GUID and prevent duplicates. + // Only poll from those with suitable relationships $abandon_sql = (($abandon_days) ? sprintf(" AND account_lastlog > UTC_TIMESTAMP() - INTERVAL %d DAY ", intval($abandon_days)) @@ -197,10 +195,9 @@ function poller_run($argv, $argc){ $contacts = q("SELECT abook_id, abook_flags, abook_updated, abook_connected, abook_closeness, abook_channel FROM abook LEFT JOIN account on abook_account = account_id where 1 $sql_extra - AND (( abook_flags = %d ) OR ( abook_flags = %d )) + AND (( abook_flags & %d ) OR ( abook_flags = %d )) AND (( account_flags = %d ) OR ( account_flags = %d )) $abandon_sql ORDER BY RAND()", - - intval(ABOOK_FLAG_HIDDEN), + intval(ABOOK_FLAG_HIDDEN|ABOOK_FLAG_PENDING|ABOOK_FLAG_UNCONNECTED), intval(0), intval(ACCOUNT_OK), intval(ACCOUNT_UNVERIFIED) // FIXME diff --git a/include/zot.php b/include/zot.php index e80dabed9..cfabbae2e 100644 --- a/include/zot.php +++ b/include/zot.php @@ -351,7 +351,10 @@ function zot_refresh($them,$channel = null, $force = false) { intval(ABOOK_FLAG_SELF) ); - if($r) { + if($r) { + + $current_abook_connected = (($r[0]['abook_flags'] & ABOOK_FLAG_UNCONNECTED) ? 0 : 1); + $y = q("update abook set abook_their_perms = %d where abook_xchan = '%s' and abook_channel = %d and not (abook_flags & %d) limit 1", @@ -360,14 +363,16 @@ function zot_refresh($them,$channel = null, $force = false) { intval($channel['channel_id']), intval(ABOOK_FLAG_SELF) ); - if($connected_set === 0) { - // if they are in your address book but you aren't in theirs, mark their address book entry hidden. + if(($connected_set === 0 || $connected_set === 1) && ($connected_set !== $current_abook_unconnected)) { + + // if they are in your address book but you aren't in theirs, and/or this does not + // match your current connected state setting, toggle it. - $y1 = q("update abook set abook_flags = (abook_flags | %d) + $y1 = q("update abook set abook_flags = (abook_flags ^ %d) where abook_xchan = '%s' and abook_channel = %d and not (abook_flags & %d) limit 1", - intval(ABOOK_FLAG_HIDDEN), + intval(ABOOK_FLAG_UNCONNECTED), dbesc($x['hash']), intval($channel['channel_id']), intval(ABOOK_FLAG_SELF) diff --git a/mod/connections.php b/mod/connections.php index 679b6d79d..dbdcbdc93 100644 --- a/mod/connections.php +++ b/mod/connections.php @@ -35,7 +35,7 @@ function connections_post(&$a) { if(! $orig_record) { notice( t('Could not access contact record.') . EOL); - goaway($a->get_baseurl(true) . '/connections'); + goaway(z_root() . '/connections'); return; // NOTREACHED } @@ -170,14 +170,14 @@ function connections_content(&$a) { return login(); } - $blocked = false; - $hidden = false; - $ignored = false; - $archived = false; - $unblocked = false; - $pending = false; - - $all = false; + $blocked = false; + $hidden = false; + $ignored = false; + $archived = false; + $unblocked = false; + $pending = false; + $unconnected = false; + $all = false; $_SESSION['return_url'] = $a->query_string; @@ -212,6 +212,11 @@ function connections_content(&$a) { $pending = true; nav_set_selected('intros'); break; + case 'unconnected': + $search_flags = ABOOK_FLAG_UNCONNECTED; + $head = t('Unconnected'); + $unconnected = true; + break; case 'all': $head = t('All'); @@ -237,57 +242,65 @@ function connections_content(&$a) { $tabs = array( array( 'label' => t('Suggestions'), - 'url' => $a->get_baseurl(true) . '/suggest', + 'url' => z_root() . '/suggest', 'sel' => '', 'title' => t('Suggest new connections'), ), array( 'label' => t('New Connections'), - 'url' => $a->get_baseurl(true) . '/connections/pending', + 'url' => z_root() . '/connections/pending', 'sel' => ($pending) ? 'active' : '', 'title' => t('Show pending (new) connections'), ), array( 'label' => t('All Connections'), - 'url' => $a->get_baseurl(true) . '/connections/all', + 'url' => z_root() . '/connections/all', 'sel' => ($all) ? 'active' : '', 'title' => t('Show all connections'), ), array( 'label' => t('Unblocked'), - 'url' => $a->get_baseurl(true) . '/connections', + 'url' => z_root() . '/connections', 'sel' => (($unblocked) && (! $search) && (! $nets)) ? 'active' : '', 'title' => t('Only show unblocked connections'), ), array( 'label' => t('Blocked'), - 'url' => $a->get_baseurl(true) . '/connections/blocked', + 'url' => z_root() . '/connections/blocked', 'sel' => ($blocked) ? 'active' : '', 'title' => t('Only show blocked connections'), ), array( 'label' => t('Ignored'), - 'url' => $a->get_baseurl(true) . '/connections/ignored', + 'url' => z_root() . '/connections/ignored', 'sel' => ($ignored) ? 'active' : '', 'title' => t('Only show ignored connections'), ), array( 'label' => t('Archived'), - 'url' => $a->get_baseurl(true) . '/connections/archived', + 'url' => z_root() . '/connections/archived', 'sel' => ($archived) ? 'active' : '', 'title' => t('Only show archived connections'), ), array( 'label' => t('Hidden'), - 'url' => $a->get_baseurl(true) . '/connections/hidden', + 'url' => z_root() . '/connections/hidden', 'sel' => ($hidden) ? 'active' : '', 'title' => t('Only show hidden connections'), ), + array( + 'label' => t('Unconnected'), + 'url' => z_root() . '/connections/unconnected', + 'sel' => ($unconnected) ? 'active' : '', + 'title' => t('Only show one-way connections'), + ), + + ); $tab_tpl = get_markup_template('common_tabs.tpl'); -- cgit v1.2.3 From f2f6485a4fd535160ffa0edb2dddab5567609a7e Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Tue, 4 Mar 2014 23:18:33 +0000 Subject: Make zid() work for observers as well as local users --- include/identity.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/identity.php b/include/identity.php index 93174031c..05123d8dc 100644 --- a/include/identity.php +++ b/include/identity.php @@ -1009,8 +1009,8 @@ function advanced_profile(&$a) { function get_my_url() { if(x($_SESSION,'zrl_override')) return $_SESSION['zrl_override']; - if(x($_SESSION,'my_url')) - return $_SESSION['my_url']; + if(x($_SESSION,'my_address')) + return $_SESSION['my_address']; return false; } @@ -1223,4 +1223,4 @@ function get_channel_by_nick($nick) { ); return(($r) ? $r[0] : false); -} \ No newline at end of file +} -- cgit v1.2.3 From 39f18d0f1618ce27804d6fcf2eee15e813b17140 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 4 Mar 2014 15:25:04 -0800 Subject: fix third-party zid's --- mod/openid.php | 2 ++ mod/post.php | 1 + 2 files changed, 3 insertions(+) diff --git a/mod/openid.php b/mod/openid.php index b0d4008d4..2112e0af4 100644 --- a/mod/openid.php +++ b/mod/openid.php @@ -62,6 +62,7 @@ function openid_content(&$a) { if($r) { $_SESSION['authenticated'] = 1; $_SESSION['visitor_id'] = $r[0]['xchan_hash']; + $_SESSION['my_url'] = $r[0]['xchan_url']; $_SESSION['my_address'] = $r[0]['xchan_addr']; $arr = array('xchan' => $r[0], 'session' => $_SESSION); call_hooks('magic_auth_openid_success',$arr); @@ -169,6 +170,7 @@ function openid_content(&$a) { set_xconfig($url,'system','openid',$authid); $_SESSION['authenticated'] = 1; $_SESSION['visitor_id'] = $r[0]['xchan_hash']; + $_SESSION['my_url'] = $r[0]['xchan_url']; $_SESSION['my_address'] = $r[0]['xchan_addr']; $arr = array('xchan' => $r[0], 'session' => $_SESSION); call_hooks('magic_auth_openid_success',$arr); diff --git a/mod/post.php b/mod/post.php index 6c57bfa0d..54d0d8db9 100644 --- a/mod/post.php +++ b/mod/post.php @@ -243,6 +243,7 @@ function post_init(&$a) { $_SESSION['authenticated'] = 1; $_SESSION['visitor_id'] = $x[0]['xchan_hash']; + $_SESSION['my_url'] = $x[0]['xchan_url']; $_SESSION['my_address'] = $address; $_SESSION['remote_service_class'] = $remote_service_class; $_SESSION['remote_level'] = $remote_level; -- cgit v1.2.3 From a072668f8a92a2accf2eb270a7307e5574a389c6 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 4 Mar 2014 15:29:27 -0800 Subject: undo --- include/identity.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/identity.php b/include/identity.php index 05123d8dc..ed6920e67 100644 --- a/include/identity.php +++ b/include/identity.php @@ -1009,8 +1009,8 @@ function advanced_profile(&$a) { function get_my_url() { if(x($_SESSION,'zrl_override')) return $_SESSION['zrl_override']; - if(x($_SESSION,'my_address')) - return $_SESSION['my_address']; + if(x($_SESSION,'my_url')) + return $_SESSION['my_url']; return false; } -- cgit v1.2.3 From aa9d25f51764c7bbd2922d6e91f609e89659b2f6 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 4 Mar 2014 18:12:27 -0800 Subject: add system PDL editor (lets you change/personalise the layout for any module which has a system PDL file.) --- mod/pdledit.php | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++ view/tpl/pdledit.tpl | 14 ++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 mod/pdledit.php create mode 100644 view/tpl/pdledit.tpl diff --git a/mod/pdledit.php b/mod/pdledit.php new file mode 100644 index 000000000..e3ff2292d --- /dev/null +++ b/mod/pdledit.php @@ -0,0 +1,61 @@ + 1) + $module = 'mod_' . argv(1) . '.pdl'; + else { + $o .= '

' . t('Edit System Page Description') . '

'; + $files = glob('mod/*'); + if($files) { + foreach($files as $f) { + $name = basename($f,'.php'); + $x = theme_include('mod_' . $name . '.pdl'); + if($x) { + $o .= '' . $name . '
'; + } + } + } + + // list module pdl files + return $o; + } + + $t = get_pconfig(local_user(),'system',$module); + if(! $t) + $t = file_get_contents(theme_include($module)); + if(! $t) { + notice( t('Layout not found.') . EOL); + return ''; + } + + $o = replace_macros(get_markup_template('pdledit.tpl'),array( + '$header' => t('Edit System Page Description'), + '$mname' => t('Module Name:'), + '$module' => argv(1), + '$content' => htmlspecialchars($t,ENT_COMPAT,'UTF-8'), + '$submit' => t('Submit') + )); + + return $o; +} diff --git a/view/tpl/pdledit.tpl b/view/tpl/pdledit.tpl new file mode 100644 index 000000000..520c032e3 --- /dev/null +++ b/view/tpl/pdledit.tpl @@ -0,0 +1,14 @@ +

{{$header}}

+ +

{{$mname}} {{$module}}

+ +
+ + + +
+ + +
+ + -- cgit v1.2.3 From c43a7783c840cb41711edefd60187dad201ac1da Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 4 Mar 2014 19:30:09 -0800 Subject: spacing issue after template work --- assets/home.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/home.html b/assets/home.html index 0ec29832e..923791b98 100644 --- a/assets/home.html +++ b/assets/home.html @@ -26,7 +26,7 @@ header { z-index: 10000; }
-
Dream it. Do it.
+
Dream it. Do it.
@@ -72,4 +72,4 @@ header { z-index: 10000; }
-
Welcome to the Matrix
“The most fun you ever had without taking your clothes off.”
Public Sites | Project Home | Git | Developers
+
Welcome to the Matrix
Public Sites | Project Home | Git | Developers
-- cgit v1.2.3 From 4da73d7d841d9ed33ce83539d7faac5809cac6dc Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 4 Mar 2014 19:34:04 -0800 Subject: stopgap solution until somebody implements endless scroll on the directory --- mod/dirsearch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/dirsearch.php b/mod/dirsearch.php index 7b83b8a46..d06ccb619 100644 --- a/mod/dirsearch.php +++ b/mod/dirsearch.php @@ -99,7 +99,7 @@ function dirsearch_content(&$a) { - $perpage = (($_REQUEST['n']) ? $_REQUEST['n'] : 80); + $perpage = (($_REQUEST['n']) ? $_REQUEST['n'] : 300); $page = (($_REQUEST['p']) ? intval($_REQUEST['p'] - 1) : 0); $startrec = (($page+1) * $perpage) - $perpage; $limit = (($_REQUEST['limit']) ? intval($_REQUEST['limit']) : 0); -- cgit v1.2.3 From 267283748f676a278d180752c3af56486754e83e Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 4 Mar 2014 19:57:54 -0800 Subject: Red API: /api/red/item/new ; which is like /api/statuses/update except it uses Red semantics and returns success/failure indication. --- include/api.php | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ include/items.php | 4 ++-- mod/item.php | 2 +- 3 files changed, 51 insertions(+), 3 deletions(-) diff --git a/include/api.php b/include/api.php index dc270167b..47c78113a 100644 --- a/include/api.php +++ b/include/api.php @@ -533,6 +533,12 @@ require_once('include/items.php'); api_register_func('api/red/channel/export/basic','api_export_basic', true); + + + + + + function api_channel_stream(&$a, $type) { if(api_user() === false) { logger('api_channel_stream: no user'); @@ -691,6 +697,48 @@ require_once('include/items.php'); api_register_func('api/statuses/update','api_statuses_update', true); + function red_item_new(&$a, $type) { + + if (api_user() === false) { + logger('api_statuses_update: no user'); + return false; + } + + logger('api_statuses_update: REQUEST ' . print_r($_REQUEST,true)); + logger('api_statuses_update: FILES ' . print_r($_FILES,true)); + + + // set this so that the item_post() function is quiet and doesn't redirect or emit json + + $_REQUEST['api_source'] = true; + $_REQUEST['profile_uid'] = api_user(); + + if(x($_FILES,'media')) { + $_FILES['userfile'] = $_FILES['media']; + // upload the image if we have one + $_REQUEST['silent']='1'; //tell wall_upload function to return img info instead of echo + require_once('mod/wall_upload.php'); + $media = wall_upload_post($a); + if(strlen($media)>0) + $_REQUEST['body'] .= "\n\n".$media; + } + + require_once('mod/item.php'); + $x = item_post($a); + json_return_and_die($x); + } + + api_register_func('api/red/item/new','red_item_new', true); + + + + + + + + + + function api_status_show(&$a, $type){ $user_info = api_get_user($a); diff --git a/include/items.php b/include/items.php index 6ff984370..70e098415 100755 --- a/include/items.php +++ b/include/items.php @@ -1548,7 +1548,7 @@ function item_store($arr,$allow_exec = false) { $allow_exec = $d['allow_exec']; - $ret = array('result' => false, 'item_id' => 0); + $ret = array('success' => false, 'item_id' => 0); if(! $arr['uid']) { logger('item_store: no uid'); @@ -1933,7 +1933,7 @@ function item_store_update($arr,$allow_exec = false) { - $ret = array('result' => false, 'item_id' => 0); + $ret = array('success' => false, 'item_id' => 0); if(! intval($arr['uid'])) { logger('item_store_update: no uid'); $ret['message'] = 'no uid.'; diff --git a/mod/item.php b/mod/item.php index 2feb64a37..6ea434542 100644 --- a/mod/item.php +++ b/mod/item.php @@ -862,7 +862,7 @@ function item_post(&$a) { // figure out how to return, depending on from whence we came if($api_source) - return; + return $post; if($return_path) { goaway($a->get_baseurl() . "/" . $return_path); -- cgit v1.2.3 From d860ab3cc48b495a0ade5c1903af2c46d20a044e Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 4 Mar 2014 20:52:26 -0800 Subject: basic widget reference --- doc/Widgets.md | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/main.bb | 1 + 2 files changed, 70 insertions(+) create mode 100644 doc/Widgets.md diff --git a/doc/Widgets.md b/doc/Widgets.md new file mode 100644 index 000000000..678c1b7ac --- /dev/null +++ b/doc/Widgets.md @@ -0,0 +1,69 @@ +Core Widgets +============ + +Some/many of these widgets have restrictions which may restrict the type of page where they may appear or may require login + + +* profile - displays a profile sidebar on pages which load profiles (pages with nickname in the URL) + +* tagcloud - display a tagcloud of webpage items + + * args: count - number of items to return (default 24) + * + + +* collections - collection selector for the current logged in channel + + * args: mode - one of "conversation", "group", "abook" depending on module + * + + +* suggestions - friend suggestions for the current logged on channel + +* follow - presents a text box for following another channel + +* notes - private notes area for the current logged in channel if private_notes feature is enabled + +* savedsearch - network/matrix search with save - must be logged in and savedsearch feature enabled + +* filer - select filed items from network/matrix stream - must be logged in + +* archive - date range selector for network and channel pages + +* fullprofile - same as profile currently + +* categories - categories filter (channel page) + +* tagcloud_wall - tagcloud for channel page only + +* affinity - affinity slider for network page - must be logged in + +* settings_menu - sidebar menu for settings page, must be logged in + +* mailmenu - sidebar menu for private message page - must be logged in + +* design_tools - design tools menu for webpage building pages, must be logged in + +* findpeople - tools to find other channels + +* photo_albums - list photo albums of the current page owner with a selector menu + +* vcard - mini profile sidebar for the person of interest (page owner, whatever) + +* dirsafemode - directory selection tool - only on directory pages + +* dirsort - directory selection tool - only on directory pages + +* dirtags - directory tool - only on directory pages + +* menu_preview - preview a menu - only on menu edit pages + +* chatroom_list - list of chatrooms for the page owner + +* bookmarkedchats - list of bookmarked chatrooms collected on this site for the current observer + +* suggestechats - "interesting" chatrooms chosen for the current observer + +* item - displays a single webpage item by mid +1 args: mid - message_id of webpage to display + diff --git a/doc/main.bb b/doc/main.bb index decaa0ffc..a9ee3c5d8 100644 --- a/doc/main.bb +++ b/doc/main.bb @@ -37,6 +37,7 @@ [zrl=[baseurl]/help/install]Install[/zrl] [zrl=[baseurl]/help/comanche]Comanche Page Descriptions[/zrl] [zrl=[baseurl]/help/Creating-Templates]Creating Comanche Templates[/zrl] +[zrl=[baseurl]/help/Widgets]Core Widgets[/zrl] [zrl=[baseurl]/help/plugins]Plugins[/zrl] [zrl=[baseurl]/help/schema_development]Schemas[/zrl] [zrl=[baseurl]/help/developers]Developers[/zrl] -- cgit v1.2.3 From efc828bed52eb32e1e99d757139d1133e3ec9b8a Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 4 Mar 2014 20:58:12 -0800 Subject: add pdl editor to settings/display --- mod/settings.php | 1 + view/tpl/settings_display.tpl | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/mod/settings.php b/mod/settings.php index 13cb3cae9..1d2a5ecf9 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -758,6 +758,7 @@ function settings_content(&$a) { '$itemspage' => array('itemspage', t("Maximum number of conversations to load at any time:"), $itemspage, t('Maximum of 100 items')), '$nosmile' => array('nosmile', t("Don't show emoticons"), $nosmile, ''), '$chanview_full' => array('chanview_full', t('Do not view remote profiles in frames'), $chanview, t('By default open in a sub-window of your own site')), + '$layout_editor' => t('System Page Layout Editor - (advanced)'), '$theme_config' => $theme_config, )); diff --git a/view/tpl/settings_display.tpl b/view/tpl/settings_display.tpl index a8fb002fb..924b4b33f 100755 --- a/view/tpl/settings_display.tpl +++ b/view/tpl/settings_display.tpl @@ -16,6 +16,10 @@ +
+{{$layout_editor}} +
+ {{if $theme_config}}

Theme settings

{{$theme_config}} -- cgit v1.2.3 From cdcbc5816e21d53172c5396083b38fce4ab0ba38 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 4 Mar 2014 21:03:56 -0800 Subject: add Comanche help link to pdledit --- mod/pdledit.php | 1 + view/tpl/pdledit.tpl | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/mod/pdledit.php b/mod/pdledit.php index e3ff2292d..36b9a0c14 100644 --- a/mod/pdledit.php +++ b/mod/pdledit.php @@ -52,6 +52,7 @@ function pdledit_content(&$a) { $o = replace_macros(get_markup_template('pdledit.tpl'),array( '$header' => t('Edit System Page Description'), '$mname' => t('Module Name:'), + '$help' => t('Layout Help'), '$module' => argv(1), '$content' => htmlspecialchars($t,ENT_COMPAT,'UTF-8'), '$submit' => t('Submit') diff --git a/view/tpl/pdledit.tpl b/view/tpl/pdledit.tpl index 520c032e3..ef8ff8dce 100644 --- a/view/tpl/pdledit.tpl +++ b/view/tpl/pdledit.tpl @@ -2,6 +2,13 @@

{{$mname}} {{$module}}

+
+{{$help}} +
+
+ + +
-- cgit v1.2.3 From 61f47cd5ed6eee337d9ab30b65844b5118080b76 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 5 Mar 2014 03:19:20 -0800 Subject: move language selector to a module --- include/nav.php | 1 - mod/lang.php | 6 ++++++ version.inc | 2 +- view/theme/redbasic/css/style.css | 6 ------ view/tpl/hdr.tpl | 1 - view/tpl/lang_selector.tpl | 5 +++-- 6 files changed, 10 insertions(+), 11 deletions(-) create mode 100644 mod/lang.php diff --git a/include/nav.php b/include/nav.php index ab0eaa855..3aa50226d 100644 --- a/include/nav.php +++ b/include/nav.php @@ -59,7 +59,6 @@ EOT; $a->page['header'] .= replace_macros(get_markup_template('hdr.tpl'), array( '$baseurl' => $a->get_baseurl(), '$sitelocation' => $sitelocation, - '$langselector' => ((get_config('system','select_language')) ? lang_selector() : ''), '$banner' => $banner )); diff --git a/mod/lang.php b/mod/lang.php new file mode 100644 index 000000000..fba5f9c73 --- /dev/null +++ b/mod/lang.php @@ -0,0 +1,6 @@ +{2}{3}
{4}
-{{if $langselector}}
{{$langselector}}
{{/if}} diff --git a/view/tpl/lang_selector.tpl b/view/tpl/lang_selector.tpl index 159eeea7e..b512c759b 100755 --- a/view/tpl/lang_selector.tpl +++ b/view/tpl/lang_selector.tpl @@ -1,5 +1,6 @@ -
-