Uncripple zids.
This commit is contained in:
parent
dc80dce95e
commit
6e2e8f101a
@ -23,6 +23,8 @@ function get_features() {
|
|||||||
array('multi_profiles', t('Multiple Profiles'), t('Ability to create multiple profiles')),
|
array('multi_profiles', t('Multiple Profiles'), t('Ability to create multiple profiles')),
|
||||||
array('webpages', t('Web Pages'), t('Provide managed web pages on your channel')),
|
array('webpages', t('Web Pages'), t('Provide managed web pages on your channel')),
|
||||||
array('prettyphoto', t('Enhanced Photo Albums'), t('Enable photo album with enhanced features')),
|
array('prettyphoto', t('Enhanced Photo Albums'), t('Enable photo album with enhanced features')),
|
||||||
|
//FIXME - needs a description, but how the hell do we explain this to normals?
|
||||||
|
array('sendzid', t('Extended Identity Sharing'), t(' ')),
|
||||||
array('expert', t('Expert Mode'), t('Enable Expert Mode to provide advanced configuration options')),
|
array('expert', t('Expert Mode'), t('Enable Expert Mode to provide advanced configuration options')),
|
||||||
|
|
||||||
|
|
||||||
|
@ -1128,14 +1128,22 @@ function prepare_text($text,$content_type = 'text/bbcode') {
|
|||||||
|
|
||||||
|
|
||||||
function zidify_callback($match) {
|
function zidify_callback($match) {
|
||||||
$replace = '<a' . $match[1] . 'class="zrl"' . $match[2] . ' href="' . zid($match[3]) . '"';
|
if (feature_enabled(local_user(),'sendzid')) {
|
||||||
|
$replace = '<a' . $match[1] . ' href="' . zid($match[2]) . '"';}
|
||||||
|
|
||||||
|
else {
|
||||||
|
$replace = '<a' . $match[1] . 'class="zrl"' . $match[2] . ' href="' . zid($match[3]) . '"';}
|
||||||
|
|
||||||
$x = str_replace($match[0],$replace,$match[0]);
|
$x = str_replace($match[0],$replace,$match[0]);
|
||||||
return $x;
|
return $x;
|
||||||
}
|
}
|
||||||
|
|
||||||
function zidify_links($s) {
|
function zidify_links($s) {
|
||||||
$s = preg_replace_callback('/\<a(.*?)class\=\"zrl\"(.*?)href\=\"(.*?)\"/ism','zidify_callback',$s);
|
if (feature_enabled(local_user(),'sendzid')) {
|
||||||
|
$s = preg_replace_callback('/\<a(.*?)href\=\"(.*?)\"/ism','zidify_callback',$s);}
|
||||||
|
else {
|
||||||
|
$s = preg_replace_callback('/\<a(.*?)class\=\"zrl\"(.*?)href\=\"(.*?)\"/ism','zidify_callback',$s);}
|
||||||
|
|
||||||
return $s;
|
return $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user