$s = html2bbcode($s);
// $s = str_replace('*','*',$s);
- // we seem to get a lot of text smushed together with links from Diaspora.
- // if it's a url that we haven't already parsed into a bbcode structure, put a space before it.
- $s = preg_replace("/([^=\"\]])(https?:\/\/)/ism",'$1 $2',$s);
$s = preg_replace("/\[url\=?(.*?)\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/url\]/ism",'[youtube]$2[/youtube]',$s);
$s = preg_replace("/\[url\=https?:\/\/www.youtube.com\/watch\?v\=(.*?)\].*?\[\/url\]/ism",'[youtube]$1[/youtube]',$s);
// remove duplicate adjacent code tags
$s = preg_replace("/(\[code\])+(.*?)(\[\/code\])+/ism","[code]$2[/code]", $s);
$s = scale_diaspora_images($s);
+
+ // we seem to get a lot of text smushed together with links from Diaspora.
+
+ $s = preg_replace('/[^ ]\[url\=(.*?)\]/',' [url=$1]' ,$s);
+ $s = preg_replace('/\[\/url\][^ ]/','[/url] ',$s);
+
return $s;
}
// These people can manage this account/page with full privilege
- $r = q("SELECT * FROM `user` WHERE `uid` = %d AND `email` = '%s' AND `password` = '%s' LIMIT 1",
- intval(local_user()),
+ $r = q("SELECT * FROM `user` WHERE `email` = '%s' AND `password` = '%s' ",
dbesc($a->user['email']),
dbesc($a->user['password'])
);
<div class="contact-block-div">
<a class="contact-block-link" href="#" >
-<img class="contact-block-img" src="$base/photo/thumb/$x.uid" title="$x.username" />
+<img class="contact-block-img" src="$base/photo/thumb/$x.uid" title="$x.username ($x.nickname)" />
</a>
</div>
<div class="contact-block-div">
<a class="contact-block-link" href="$base/delegate/remove/$x.uid" >
-<img class="contact-block-img" src="$base/photo/thumb/$x.uid" title="$x.username" />
+<img class="contact-block-img" src="$base/photo/thumb/$x.uid" title="$x.username ($x.nickname)" />
</a>
</div>
<div class="contact-block-div">
<a class="contact-block-link" href="$base/delegate/add/$x.uid" >
-<img class="contact-block-img" src="$base/photo/thumb/$x.uid" title="$x.username" />
+<img class="contact-block-img" src="$base/photo/thumb/$x.uid" title="$x.username ($x.nickname)" />
</a>
</div>