- $a = get_app();
- if (x($item,'plink') && ($item['private'] != 1)) {
- return array(
- 'href' => $item['plink'],
- 'title' => t('link to source'),
- );
- }
- else {
- return false;
- }
+ $a = get_app();
+
+ if ($a->user['nickname'] != "") {
+ $ret = array(
+ //'href' => $a->get_baseurl()."/display/".$a->user['nickname']."/".$item['id'],
+ 'href' => $a->get_baseurl()."/display/".$item['guid'],
+ 'orig' => $a->get_baseurl()."/display/".$item['guid'],
+ 'title' => t('link to source'),
+ );
+
+ if (x($item,'plink'))
+ $ret["href"] = $item['plink'];
+
+ } elseif (x($item,'plink') && ($item['private'] != 1))
+ $ret = array(
+ 'href' => $item['plink'],
+ 'orig' => $item['plink'],
+ 'title' => t('link to source'),
+ );
+ else
+ $ret = array();
+
+ //if (x($item,'plink') && ($item['private'] != 1))
+
+ return($ret);