1
0
Fork 0

linkify hash tags

This commit is contained in:
Friendika 2010-11-08 22:39:03 -08:00
commit 098478e3a5
2 changed files with 8 additions and 3 deletions

View file

@ -121,6 +121,11 @@ function item_post(&$a) {
if(count($tags)) {
foreach($tags as $tag) {
if(strpos($tag,'#') === 0) {
$basetag = substr($tag,1);
$body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?search=' . urlencode($basetag) . ']' . $basetag . '[/url]',$body);
continue;
}
if(strpos($tag,'@') === 0) {
$name = substr($tag,1);
if((strpos($name,'@')) || (strpos($name,'http://'))) {