This commit is contained in:
friendica 2013-12-23 12:01:53 -08:00
commit 4517bdcff1
5 changed files with 3090 additions and 3346 deletions

View File

@ -1296,15 +1296,18 @@ function prepare_page($item) {
$a = get_app(); $a = get_app();
$naked = ((get_pconfig($item['uid'],'system','nakedpage')) ? 1 : 0); $naked = ((get_pconfig($item['uid'],'system','nakedpage')) ? 1 : 0);
$observer = $a->get_observer();
$zid = ($observer['xchan_addr']);
if(array_key_exists('webpage',$a->layout) && array_key_exists('authored',$a->layout['webpage'])) { if(array_key_exists('webpage',$a->layout) && array_key_exists('authored',$a->layout['webpage'])) {
if($a->layout['webpage']['authored'] === 'none') if($a->layout['webpage']['authored'] === 'none')
$naked = 1; $naked = 1;
// ... other possible options // ... other possible options
} }
return replace_macros(get_markup_template('page_display.tpl'),array( return replace_macros(get_markup_template('page_display.tpl'),array(
'$author' => (($naked) ? '' : $item['author']['xchan_name']), '$author' => (($naked) ? '' : $item['author']['xchan_name']),
'$auth_url' => (($naked) ? '' : $item['author']['xchan_url']), '$auth_url' => (($naked) ? '' : $item['author']['xchan_url']),
'$zid' => $zid,
'$date' => (($naked) ? '' : datetime_convert('UTC',date_default_timezone_get(),$item['created'],'Y-m-d H:i')), '$date' => (($naked) ? '' : datetime_convert('UTC',date_default_timezone_get(),$item['created'],'Y-m-d H:i')),
'$title' => smilies(bbcode($item['title'])), '$title' => smilies(bbcode($item['title'])),
'$body' => prepare_body($item,true) '$body' => prepare_body($item,true)

View File

@ -7,7 +7,7 @@ function xref_init(&$a) {
// Cookie lasts 24 hours to survive a browser restart. Contains no personal // Cookie lasts 24 hours to survive a browser restart. Contains no personal
// information at all - just somebody else's xchan. // information at all - just somebody else's xchan.
$referrer = argv(1); $referrer = argv(1);
$expire=time()+60*60*24; $expire=time()+60*60*2;
$path = 'xref'; $path = 'xref';
setcookie($path, $referrer, $expire, "/"); setcookie($path, $referrer, $expire, "/");
$url = ''; $url = '';

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
<div class="generic-content-wrapper" id="page-content-wrapper" > <div class="generic-content-wrapper" id="page-content-wrapper" >
<h3 class="page-title">{{$title}}</h3> <h3 class="page-title">{{$title}}</h3>
<div class="page-author"><a class=="page-author-link" href="{{$auth_url}}">{{$author}}</a></div> <div class="page-author"><a class=="page-author-link" href="{{$auth_url}}{{if $zid}}?zrl={{$zid}}{{/if}}">{{$author}}</a></div>
<div class="page-date">{{$date}}</div> <div class="page-date">{{$date}}</div>
<div class="page-body">{{$body}}</div> <div class="page-body">{{$body}}</div>
</div> </div>