webfinger profile linker
This commit is contained in:
parent
608d424b0b
commit
4978ee12d1
2
boot.php
2
boot.php
|
@ -9,7 +9,7 @@ require_once('include/nav.php');
|
|||
require_once('include/cache.php');
|
||||
|
||||
define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
||||
define ( 'FRIENDICA_VERSION', '3.0.1361' );
|
||||
define ( 'FRIENDICA_VERSION', '3.0.1362' );
|
||||
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
||||
define ( 'DB_UPDATE_VERSION', 1146 );
|
||||
|
||||
|
|
|
@ -52,6 +52,8 @@ function bb_unspacefy_and_trim($st) {
|
|||
|
||||
function bbcode($Text,$preserve_nl = false) {
|
||||
|
||||
$a = get_app();
|
||||
|
||||
// Hide all [noparse] contained bbtags spacefying them
|
||||
|
||||
$Text = preg_replace_callback("/\[noparse\](.*?)\[\/noparse\]/ism", 'bb_spacefy',$Text);
|
||||
|
@ -114,6 +116,11 @@ function bbcode($Text,$preserve_nl = false) {
|
|||
$Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<a href="$1" target="external-link">$2</a>', $Text);
|
||||
//$Text = preg_replace("/\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="_blank">$2</a>', $Text);
|
||||
|
||||
// we may need to restrict this further if it picks up too many strays
|
||||
// link acct:user@host to a webfinger profile redirector
|
||||
|
||||
$Text = preg_replace('/acct:(.*?)@(.*?)([ ,])/', '<a href="' . $a->get_baseurl() . '/acctlink?addr=' . "$1@$2"
|
||||
. '" target="extlink" >acct:' . "$1@$2$3" . '</a>',$Text);
|
||||
|
||||
// Perform MAIL Search
|
||||
$Text = preg_replace("/\[mail\]([$MAILSearchString]*)\[\/mail\]/", '<a href="mailto:$1">$1</a>', $Text);
|
||||
|
|
|
@ -891,6 +891,7 @@ function prepare_body($item,$attach = false) {
|
|||
} else
|
||||
$s = prepare_text($item['body']);
|
||||
|
||||
|
||||
$prep_arr = array('item' => $item, 'html' => $s);
|
||||
call_hooks('prepare_body', $prep_arr);
|
||||
$s = $prep_arr['html'];
|
||||
|
|
16
mod/acctlink.php
Normal file
16
mod/acctlink.php
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
require_once('include/Scrape.php');
|
||||
|
||||
function acctlink_init(&$a) {
|
||||
|
||||
if(x($_GET,'addr')) {
|
||||
$addr = trim($_GET['addr']);
|
||||
$res = probe_url($addr);
|
||||
//logger('acctlink: ' . print_r($res,true));
|
||||
if($res['url']) {
|
||||
goaway($res['url']);
|
||||
killme();
|
||||
}
|
||||
}
|
||||
}
|
469
util/messages.po
469
util/messages.po
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue