]> git.mxchange.org Git - friendica.git/commitdiff
add some sparkle to plinks
authorfriendica <info@friendica.com>
Thu, 12 Jul 2012 04:04:08 +0000 (21:04 -0700)
committerfriendica <info@friendica.com>
Thu, 12 Jul 2012 04:04:08 +0000 (21:04 -0700)
include/conversation.php
view/theme/diabook/wall_item.tpl
view/theme/diabook/wallwall_item.tpl
view/theme/dispy/wall_item.tpl
view/theme/dispy/wallwall_item.tpl
view/theme/quattro/wall_item.tpl
view/theme/quattro/wallwall_item.tpl
view/wall_item.tpl
view/wallwall_item.tpl

index 240cd374f375a02a73a8b0bfc14edfab01d83c1c..71627918189902b2f195af715e73bd2cb8aa7e03 100644 (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'];
+       } 
+
+
 
 }
 
index 12383406479ccaa51d5ffcbcbc5232406f8b9061..5b9de296894d84537fe536e30d55abba51986852 100644 (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>
index bee75ad99a236b4063b2a902241c5bb93b9f913d..b2c980c78de460e10596881328dea3ad0d7d812e 100644 (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>
index 8ffae040373859a82222b9b9b88bd9b374653bf6..8d6f258e6e3745a9c0d5a92e5921db91323ef50a 100644 (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>
index 84da598cd652eefad8afa2d76b40ece900b86458..f5187b710f474f453ff08c8d57d88bb04fea6f03 100644 (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>
index e771db0682f3e48f9db8a0c12606a51bd37d1580..2b12ce6324df79bc3ef7a3f750ec83aaa2b008cb 100644 (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">
index 693ebaba6f3a81e082480e55770a8404224d49f2..a1d92773b61967f8f0bff83ff4b95fbaedf3c773 100644 (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">
index dae33b3f75a209ad9deefa194927cf105109db3a..60dde76000d72012fea6933ea7bbea3776d4f54e 100644 (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>
index a48acfec5bfad5ab2ff3fb2eccbff198857759dc..b7cca3fab9c9839ee71e6a6ac0aa16fefc6d6680 100644 (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>