add some sparkle to plinks

This commit is contained in:
friendica 2012-07-11 21:04:08 -07:00
parent 24ea480276
commit 085b589468
9 changed files with 21 additions and 11 deletions

View File

@ -73,7 +73,6 @@ function item_redir_and_replace_images($body, $images, $cid) {
$newbody = str_replace('[!#saved_image' . $cnt . '#!]', '[img]' . $image . '[/img]', $newbody);
$cnt++;
}
return $newbody;
}}
@ -242,6 +241,17 @@ function localize_item(&$item){
}
}
// add sparkle links to appropriate permalinks
$x = stristr($item['plink'],'/display/');
if($x) {
$sparkle = false;
$y = best_link_url($item,$sparkle,true);
if(strstr($y,'/redir/'))
$item['plink'] = $y . '?f=&url=' . $item['plink'];
}
}

View File

@ -22,7 +22,7 @@
<div class="wall-item-actions-author">
<a href="$item.profile_url" target="redir" title="$item.linktitle" class="wall-item-name-link"><span class="wall-item-name$item.sparkle">$item.name</span></a>
<span class="wall-item-ago">-
{{ if $item.plink }}<a class="link" title="$item.plink.title" href="$item.plink.href" style="color: #999">$item.ago</a>{{ else }} $item.ago {{ endif }}
{{ if $item.plink }}<a class="link$item.sparkle" title="$item.plink.title" href="$item.plink.href" style="color: #999">$item.ago</a>{{ else }} $item.ago {{ endif }}
{{ if $item.lock }} - <span class="fakelink" style="color: #999" onclick="lockview(event,$item.id);">$item.lock</span> {{ endif }}
</span>
</div>

View File

@ -28,7 +28,7 @@
<a href="$item.profile_url" target="redir" title="$item.linktitle" class="wall-item-name-link"><span class="wall-item-name$item.sparkle">$item.name</span></a>
$item.to <a href="$item.owner_url" target="redir" title="$item.olinktitle" class="wall-item-name-link"><span class="wall-item-name$item.osparkle" id="wall-item-ownername-$item.id">$item.owner_name</span></a>
$item.vwall <span class="wall-item-ago">- &nbsp;
{{ if $item.plink }}<a class="link" title="$item.plink.title" href="$item.plink.href" style="color: #999">$item.ago</a>{{ else }} $item.ago {{ endif }}
{{ if $item.plink }}<a class="link$item.sparkle" title="$item.plink.title" href="$item.plink.href" style="color: #999">$item.ago</a>{{ else }} $item.ago {{ endif }}
{{ if $item.lock }} - <span class="fakelink" style="color: #999" onclick="lockview(event,$item.id);">$item.lock</span> {{ endif }}
</span>
</div>

View File

@ -52,7 +52,7 @@
<li><a href="#" id="filer-$item.id" onclick="itemFiler($item.id); return false;" class="filer-item icon file-as" title="$item.filer"></a></li>
{{ endif }}
{{ if $item.plink }}
<li class="wall-item-links-wrapper"><a href="$item.plink.href" title="$item.plink.title" target="external-link" class="icon remote-link"></a></li>
<li class="wall-item-links-wrapper$item.sparkle"><a href="$item.plink.href" title="$item.plink.title" target="external-link" class="icon remote-link"></a></li>
{{ endif }}
{{ if $item.edpost }}
<li><a class="editpost icon pencil" href="$item.edpost.0" title="$item.edpost.1"></a></li>

View File

@ -59,7 +59,7 @@ class="icon recycle wall-item-share-buttons" title="$item.vote.share.0" onclick
<li class="wall-item-filer-wrapper"><a href="#" id="filer-$item.id" onclick="itemFiler($item.id); return false;" class="filer-item icon file-as" title="$item.star.filer"></a></li>
{{ endif }}
{{ if $item.plink }}
<li class="wall-item-links-wrapper"><a href="$item.plink.href" title="$item.plink.title" target="external-link" class="icon remote-link"></a></li>
<li class="wall-item-links-wrapper$item.sparkle"><a href="$item.plink.href" title="$item.plink.title" target="external-link" class="icon remote-link"></a></li>
{{ endif }}
{{ if $item.edpost }}
<li><a class="editpost icon pencil" href="$item.edpost.0" title="$item.edpost.1"></a></li>

View File

@ -23,7 +23,7 @@
<div class="wall-item-location">$item.location</div>
</div>
<div class="wall-item-content">
{{ if $item.title }}<h2><a href="$item.plink.href">$item.title</a></h2>{{ endif }}
{{ if $item.title }}<h2><a href="$item.plink.href" class="$item.sparkle">$item.title</a></h2>{{ endif }}
$item.body
</div>
</div>
@ -38,7 +38,7 @@
</div>
<div class="wall-item-bottom">
<div class="">
{{ if $item.plink }}<a class="icon s16 link" title="$item.plink.title" href="$item.plink.href">$item.plink.title</a>{{ endif }}
{{ if $item.plink }}<a class="icon s16 link$item.sparkle" title="$item.plink.title" href="$item.plink.href">$item.plink.title</a>{{ endif }}
</div>
<div class="wall-item-actions">
<div class="wall-item-actions-author">

View File

@ -27,7 +27,7 @@
<div class="wall-item-location">$item.location</div>
</div>
<div class="wall-item-content">
{{ if $item.title }}<h2><a href="$item.plink.href">$item.title</a></h2>{{ endif }}
{{ if $item.title }}<h2><a href="$item.plink.href" class="$item.sparkle">$item.title</a></h2>{{ endif }}
$item.body
</div>
</div>
@ -42,7 +42,7 @@
</div>
<div class="wall-item-bottom">
<div class="wall-item-links">
{{ if $item.plink }}<a class="icon s16 link" title="$item.plink.title" href="$item.plink.href">$item.plink.title</a>{{ endif }}
{{ if $item.plink }}<a class="icon s16 link$item.sparkle" title="$item.plink.title" href="$item.plink.href">$item.plink.title</a>{{ endif }}
</div>
<div class="wall-item-actions">
<div class="wall-item-actions-author">

View File

@ -48,7 +48,7 @@
</div>
{{ endif }}
{{ if $item.plink }}
<div class="wall-item-links-wrapper"><a href="$item.plink.href" title="$item.plink.title" target="external-link" class="icon remote-link"></a></div>
<div class="wall-item-links-wrapper"><a href="$item.plink.href" title="$item.plink.title" target="external-link" class="icon remote-link$item.sparkle"></a></div>
{{ endif }}
{{ if $item.edpost }}
<a class="editpost icon pencil" href="$item.edpost.0" title="$item.edpost.1"></a>

View File

@ -52,7 +52,7 @@
</div>
{{ endif }}
{{ if $item.plink }}
<div class="wall-item-links-wrapper"><a href="$item.plink.href" title="$item.plink.title" target="external-link" class="icon remote-link"></a></div>
<div class="wall-item-links-wrapper"><a href="$item.plink.href" title="$item.plink.title" target="external-link" class="icon remote-link$item.sparkle"></a></div>
{{ endif }}
{{ if $item.edpost }}
<a class="editpost icon pencil" href="$item.edpost.0" title="$item.edpost.1"></a>