diff options
-rw-r--r-- | include/nav.php | 7 | ||||
-rw-r--r-- | mod/directory.php | 33 | ||||
-rw-r--r-- | mod/profiles.php | 4 | ||||
-rwxr-xr-x | view/tpl/profile_edit.tpl | 4 |
4 files changed, 32 insertions, 16 deletions
diff --git a/include/nav.php b/include/nav.php index 80e4955e5..8133ecf67 100644 --- a/include/nav.php +++ b/include/nav.php @@ -34,6 +34,10 @@ EOT; if(local_user()) { $channel = $a->get_channel(); $observer = $a->get_observer(); + $prof = q("select id from profile where uid = %d and is_default = 1", + intval($channel['channel_id']) + ); + } elseif(remote_user()) $observer = $a->get_observer(); @@ -81,6 +85,9 @@ EOT; $nav['usermenu'][] = Array('profile/' . $channel['channel_address'], t('View Profile'), "", t('Your profile page')); if(feature_enabled(local_user(),'multi_profiles')) $nav['usermenu'][] = Array('profiles', t('Edit Profiles'),"", t('Manage/Edit profiles')); + else + $nav['usermenu'][] = Array('profiles/' . $prof[0]['id'], t('Edit Profile'),"", t('Edit your profile')); + $nav['usermenu'][] = Array('photos/' . $channel['channel_address'], t('Photos'), "", t('Your photos')); $nav['usermenu'][] = Array('cloud/' . $channel['channel_address'],t('Files'),"",t('Your files')); diff --git a/mod/directory.php b/mod/directory.php index b11b0d410..e80e9661d 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -201,18 +201,27 @@ function directory_content(&$a) { // logger('mod_directory: entries: ' . print_r($entries,true), LOGGER_DATA); - $o .= replace_macros($tpl, array( - '$search' => $search, - '$desc' => t('Find'), - '$finddsc' => t('Finding:'), - '$safetxt' => htmlspecialchars($search,ENT_QUOTES,'UTF-8'), - '$entries' => $entries, - '$dirlbl' => t('Directory'), - '$submit' => t('Find') - )); - - - $o .= alt_pager($a,$j['records'], t('next page'), t('previous page')); + + if($dynamic) { + + + } + else { + + $o .= "<script> var page_query_args = '" . $a->query_string . "'; </script>"; + $o .= replace_macros($tpl, array( + '$search' => $search, + '$desc' => t('Find'), + '$finddsc' => t('Finding:'), + '$safetxt' => htmlspecialchars($search,ENT_QUOTES,'UTF-8'), + '$entries' => $entries, + '$dirlbl' => t('Directory'), + '$submit' => t('Find') + )); + + $o .= alt_pager($a,$j['records'], t('next page'), t('previous page')); + + } } else { diff --git a/mod/profiles.php b/mod/profiles.php index f6392d4ab..60e7efa1f 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -505,8 +505,8 @@ function profiles_content(&$a) { $o .= replace_macros($tpl,array( '$form_security_token' => get_form_security_token("profile_edit"), - '$profile_clone_link' => 'profiles/clone/' . $r[0]['id'] . '?t=' - . get_form_security_token("profile_clone"), + '$profile_clone_link' => ((feature_enabled(local_user(),'multi_profiles')) ? 'profiles/clone/' . $r[0]['id'] . '?t=' + . get_form_security_token("profile_clone") : ''), '$profile_drop_link' => 'profiles/drop/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_drop"), diff --git a/view/tpl/profile_edit.tpl b/view/tpl/profile_edit.tpl index 196b3ac6d..edc93143e 100755 --- a/view/tpl/profile_edit.tpl +++ b/view/tpl/profile_edit.tpl @@ -6,9 +6,9 @@ <ul> <li><a href="profile_photo" id="profile-photo_upload-link" title="{{$profpic}}">{{$profpic}}</a></li> <li><a href="profile/{{$profile_id}}/view" id="profile-edit-view-link" title="{{$viewprof}}">{{$viewprof}}</a></li> -<li><a href="{{$profile_clone_link}}" id="profile-edit-clone-link" title="{{$cr_prof}}">{{$cl_prof}}</a></li> +{{if $profile_clone_link}}<li><a href="{{$profile_clone_link}}" id="profile-edit-clone-link" title="{{$cr_prof}}">{{$cl_prof}}</a></li>{{/if}} <li></li> -<li><a href="{{$profile_drop_link}}" id="profile-edit-drop-link" title="{{$del_prof}}" {{$disabled}} >{{$del_prof}}</a></li> +{{if ! $default}}<li><a href="{{$profile_drop_link}}" id="profile-edit-drop-link" title="{{$del_prof}}" {{$disabled}} >{{$del_prof}}</a></li>{{/if}} </ul> </div> |