linkify hash tags
This commit is contained in:
parent
9f606be540
commit
098478e3a5
2 changed files with 8 additions and 3 deletions
|
@ -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://'))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue