1
0
Fork 0

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); $newbody = str_replace('[!#saved_image' . $cnt . '#!]', '[img]' . $image . '[/img]', $newbody);
$cnt++; $cnt++;
} }
return $newbody; 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"> <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> <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">- <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 }} {{ if $item.lock }} - <span class="fakelink" style="color: #999" onclick="lockview(event,$item.id);">$item.lock</span> {{ endif }}
</span> </span>
</div> </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> <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.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; $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 }} {{ if $item.lock }} - <span class="fakelink" style="color: #999" onclick="lockview(event,$item.id);">$item.lock</span> {{ endif }}
</span> </span>
</div> </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> <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 }} {{ endif }}
{{ if $item.plink }} {{ 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 }} {{ endif }}
{{ if $item.edpost }} {{ if $item.edpost }}
<li><a class="editpost icon pencil" href="$item.edpost.0" title="$item.edpost.1"></a></li> <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> <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 }} {{ endif }}
{{ if $item.plink }} {{ 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 }} {{ endif }}
{{ if $item.edpost }} {{ if $item.edpost }}
<li><a class="editpost icon pencil" href="$item.edpost.0" title="$item.edpost.1"></a></li> <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 class="wall-item-location">$item.location</div>
</div> </div>
<div class="wall-item-content"> <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 $item.body
</div> </div>
</div> </div>
@ -38,7 +38,7 @@
</div> </div>
<div class="wall-item-bottom"> <div class="wall-item-bottom">
<div class=""> <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>
<div class="wall-item-actions"> <div class="wall-item-actions">
<div class="wall-item-actions-author"> <div class="wall-item-actions-author">

View file

@ -27,7 +27,7 @@
<div class="wall-item-location">$item.location</div> <div class="wall-item-location">$item.location</div>
</div> </div>
<div class="wall-item-content"> <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 $item.body
</div> </div>
</div> </div>
@ -42,7 +42,7 @@
</div> </div>
<div class="wall-item-bottom"> <div class="wall-item-bottom">
<div class="wall-item-links"> <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>
<div class="wall-item-actions"> <div class="wall-item-actions">
<div class="wall-item-actions-author"> <div class="wall-item-actions-author">

View file

@ -48,7 +48,7 @@
</div> </div>
{{ endif }} {{ endif }}
{{ if $item.plink }} {{ 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 }} {{ endif }}
{{ if $item.edpost }} {{ if $item.edpost }}
<a class="editpost icon pencil" href="$item.edpost.0" title="$item.edpost.1"></a> <a class="editpost icon pencil" href="$item.edpost.0" title="$item.edpost.1"></a>

View file

@ -52,7 +52,7 @@
</div> </div>
{{ endif }} {{ endif }}
{{ if $item.plink }} {{ 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 }} {{ endif }}
{{ if $item.edpost }} {{ if $item.edpost }}
<a class="editpost icon pencil" href="$item.edpost.0" title="$item.edpost.1"></a> <a class="editpost icon pencil" href="$item.edpost.0" title="$item.edpost.1"></a>