[upd] change via message (@via to Origine =>)
[fix] via field for atom
This commit is contained in:
parent
e8633c6bbe
commit
06d803e78e
2 changed files with 15 additions and 11 deletions
|
@ -954,7 +954,7 @@ function showRSS()
|
||||||
if ($usepermalinks===true) $descriptionlink = '(<a href="'.$absurl.'">Link</a>)';
|
if ($usepermalinks===true) $descriptionlink = '(<a href="'.$absurl.'">Link</a>)';
|
||||||
if (strlen($link['description'])>0) $descriptionlink = '<br>'.$descriptionlink;
|
if (strlen($link['description'])>0) $descriptionlink = '<br>'.$descriptionlink;
|
||||||
if(!empty($link['via'])){
|
if(!empty($link['via'])){
|
||||||
$via = '<br>via '.text2clickable(htmlspecialchars($link['via']));
|
$via = '<br>Origine => <a href="'.htmlspecialchars($link['via']).'">'.htmlspecialchars(getJustDomain($link['via'])).'</a>';
|
||||||
} else {
|
} else {
|
||||||
$via = '';
|
$via = '';
|
||||||
}
|
}
|
||||||
|
@ -1020,7 +1020,11 @@ function showATOM()
|
||||||
|
|
||||||
// Add permalink in description
|
// Add permalink in description
|
||||||
$descriptionlink = htmlspecialchars('(<a href="'.$guid.'">Permalink</a>)');
|
$descriptionlink = htmlspecialchars('(<a href="'.$guid.'">Permalink</a>)');
|
||||||
$via = htmlspecialchars('</br> via '.(text2clickable(htmlspecialchars($link['via']))));
|
if(isset($link['via']) && !empty($link['via'])){
|
||||||
|
$via = htmlspecialchars('</br> Origine => <a href="'.$link['via'].'">'.getJustDomain($link['via']).'</a>');
|
||||||
|
} else {
|
||||||
|
$via = '';
|
||||||
|
}
|
||||||
// If user wants permalinks first, put the final link in description
|
// If user wants permalinks first, put the final link in description
|
||||||
if ($usepermalinks===true) $descriptionlink = htmlspecialchars('(<a href="'.$absurl.'">Link</a>)');
|
if ($usepermalinks===true) $descriptionlink = htmlspecialchars('(<a href="'.$absurl.'">Link</a>)');
|
||||||
if (strlen($link['description'])>0) $descriptionlink = '<br>'.$descriptionlink;
|
if (strlen($link['description'])>0) $descriptionlink = '<br>'.$descriptionlink;
|
||||||
|
|
|
@ -43,14 +43,14 @@
|
||||||
<span class="linktitle"><a href="{$redirector}{$value.url|htmlspecialchars}">{$value.title|htmlspecialchars}</a></span>
|
<span class="linktitle"><a href="{$redirector}{$value.url|htmlspecialchars}">{$value.title|htmlspecialchars}</a></span>
|
||||||
<br>
|
<br>
|
||||||
{if="$value.description"}<div class="linkdescription"{if condition="$search_type=='permalink'"} style="max-height:none !important;"{/if}>{$value.description}</div>{/if}
|
{if="$value.description"}<div class="linkdescription"{if condition="$search_type=='permalink'"} style="max-height:none !important;"{/if}>{$value.description}</div>{/if}
|
||||||
{if condition="isset($value.via) && !empty($value.via)"}<div><a href="{$value.via}">@ via {$value.via|getJustDomain}</a></div>{/if}
|
{if condition="isset($value.via) && !empty($value.via)"}<div><a href="{$value.via}">Origine => {$value.via|getJustDomain}</a></div>{/if}
|
||||||
{if="!$GLOBALS['config']['HIDE_TIMESTAMPS'] || isLoggedIn()"}
|
{if="!$GLOBALS['config']['HIDE_TIMESTAMPS'] || isLoggedIn()"}
|
||||||
<span class="linkdate" title="Permalink"><a href="?{$value.linkdate|smallHash}">{$value.localdate|htmlspecialchars} - permalink</a> - </span>
|
<span class="linkdate" title="Permalink"><a href="?{$value.linkdate|smallHash}">{$value.localdate|htmlspecialchars} - permalink</a> - </span>
|
||||||
{else}
|
{else}
|
||||||
<span class="linkdate" title="Short link here"><a href="?{$value.linkdate|smallHash}">permalink</a> - </span>
|
<span class="linkdate" title="Short link here"><a href="?{$value.linkdate|smallHash}">permalink</a> - </span>
|
||||||
{/if}
|
{/if}
|
||||||
<div style="position:relative;display:inline;"><a href="http://qrfree.kaywa.com/?l=1&s=8&d={$scripturl|urlencode}%3F{$value.linkdate|smallHash}"
|
<div style="position:relative;display:inline;"><a href="http://qrfree.kaywa.com/?l=1&s=8&d={$scripturl|urlencode}%3F{$value.linkdate|smallHash}"
|
||||||
onclick="showQrCode(this); return false;" class="qrcode" data-permalink="{$scripturl}?{$value.linkdate|smallHash}"><img src="images/qrcode.png#" width="13" height="13" title="QR-Code"></a></div> -
|
onclick="showQrCode(this); return false;" class="qrcode" data-permalink="{$scripturl}?{$value.linkdate|smallHash}"><img src="images/qrcode.png#" width="13" height="13" title="QR-Code"></a></div> -
|
||||||
<span class="linkurl" title="Short link">{$value.url|htmlspecialchars}</span><br>
|
<span class="linkurl" title="Short link">{$value.url|htmlspecialchars}</span><br>
|
||||||
{if="$value.tags"}
|
{if="$value.tags"}
|
||||||
<div class="linktaglist">
|
<div class="linktaglist">
|
||||||
|
@ -67,12 +67,12 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{include="page.footer"}
|
{include="page.footer"}
|
||||||
|
|
||||||
<script language="JavaScript">
|
<script language="JavaScript">
|
||||||
// Remove any displayed QR-Code
|
// Remove any displayed QR-Code
|
||||||
function remove_qrcode()
|
function remove_qrcode()
|
||||||
{
|
{
|
||||||
var elem = document.getElementById("permalinkQrcode");
|
var elem = document.getElementById("permalinkQrcode");
|
||||||
if (elem) elem.parentNode.removeChild(elem);
|
if (elem) elem.parentNode.removeChild(elem);
|
||||||
return false;
|
return false;
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
|
|
||||||
// Show the QR-Code of a permalink (when the QR-Code icon is clicked).
|
// Show the QR-Code of a permalink (when the QR-Code icon is clicked).
|
||||||
function showQrCode(caller,loading=false)
|
function showQrCode(caller,loading=false)
|
||||||
{
|
{
|
||||||
// Dynamic javascript lib loading: We only load qr.js if the QR code icon is clicked:
|
// Dynamic javascript lib loading: We only load qr.js if the QR code icon is clicked:
|
||||||
if (typeof(qr)=='undefined') // Load qr.js only if not present.
|
if (typeof(qr)=='undefined') // Load qr.js only if not present.
|
||||||
{
|
{
|
||||||
|
@ -96,18 +96,18 @@
|
||||||
|
|
||||||
// Remove previous qrcode if present.
|
// Remove previous qrcode if present.
|
||||||
remove_qrcode();
|
remove_qrcode();
|
||||||
|
|
||||||
// Build the div which contains the QR-Code:
|
// Build the div which contains the QR-Code:
|
||||||
var element = document.createElement('div');
|
var element = document.createElement('div');
|
||||||
element.id="permalinkQrcode";
|
element.id="permalinkQrcode";
|
||||||
// Make QR-Code div commit sepuku when clicked:
|
// Make QR-Code div commit sepuku when clicked:
|
||||||
if ( element.attachEvent ){ element.attachEvent('onclick', 'this.parentNode.removeChild(this);' ); } // Damn IE
|
if ( element.attachEvent ){ element.attachEvent('onclick', 'this.parentNode.removeChild(this);' ); } // Damn IE
|
||||||
else { element.setAttribute('onclick', 'this.parentNode.removeChild(this);' ); }
|
else { element.setAttribute('onclick', 'this.parentNode.removeChild(this);' ); }
|
||||||
|
|
||||||
// Build the QR-Code:
|
// Build the QR-Code:
|
||||||
var image = qr.image({size: 8,value: caller.dataset.permalink});
|
var image = qr.image({size: 8,value: caller.dataset.permalink});
|
||||||
if (image)
|
if (image)
|
||||||
{
|
{
|
||||||
element.appendChild(image);
|
element.appendChild(image);
|
||||||
element.innerHTML+= "<br>Click to close";
|
element.innerHTML+= "<br>Click to close";
|
||||||
caller.parentNode.appendChild(element);
|
caller.parentNode.appendChild(element);
|
||||||
|
|
Loading…
Reference in a new issue