Merge branch 'moretagging' of git://github.com/pafcu/red into pafcu-moretagging
Conflicts: mod/profiles.php
This commit is contained in:
commit
111bbe65d9
@ -1205,21 +1205,9 @@ function advanced_profile(&$a) {
|
|||||||
|
|
||||||
if($txt = prepare_text($a->profile['dislikes'])) $profile['dislikes'] = array( t('Dislikes:'), $txt);
|
if($txt = prepare_text($a->profile['dislikes'])) $profile['dislikes'] = array( t('Dislikes:'), $txt);
|
||||||
|
|
||||||
|
|
||||||
if($txt = prepare_text($a->profile['contact'])) $profile['contact'] = array( t('Contact information and Social Networks:'), $txt);
|
if($txt = prepare_text($a->profile['contact'])) $profile['contact'] = array( t('Contact information and Social Networks:'), $txt);
|
||||||
|
|
||||||
// Support tags in the other channels field (probably want to restrict it to channels only?)
|
if($txt = prepare_text($a->profile['channels'])) $profile['channels'] = array( t('My other channels:'), $txt);
|
||||||
$txt = $a->profile['channels'];
|
|
||||||
$matches = get_tags($txt);
|
|
||||||
$access_tag = '';
|
|
||||||
$str_tags = '';
|
|
||||||
foreach($matches as $m) {
|
|
||||||
$success = handle_tag($a, $txt, $access_tag, $str_tags, $a->profile_uid, $m); // Use uid of the profile maker
|
|
||||||
}
|
|
||||||
|
|
||||||
if($txt = prepare_text($txt)) {
|
|
||||||
$profile['channels'] = array( t('My other channels:'), $txt);
|
|
||||||
}
|
|
||||||
|
|
||||||
if($txt = prepare_text($a->profile['music'])) $profile['music'] = array( t('Musical interests:'), $txt);
|
if($txt = prepare_text($a->profile['music'])) $profile['music'] = array( t('Musical interests:'), $txt);
|
||||||
|
|
||||||
|
@ -2351,7 +2351,7 @@ function handle_tag($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag) {
|
|||||||
return array('replaced' => $replaced, 'termtype' => $termtype, 'term' => $newname, 'url' => $url, 'contact' => $r[0]);
|
return array('replaced' => $replaced, 'termtype' => $termtype, 'term' => $newname, 'url' => $url, 'contact' => $r[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function linkify_tags($a, &$body, $uid, $profile_uid) {
|
function linkify_tags($a, &$body, $uid) {
|
||||||
$str_tags = '';
|
$str_tags = '';
|
||||||
$tagged = array();
|
$tagged = array();
|
||||||
$result = array();
|
$result = array();
|
||||||
|
@ -288,6 +288,8 @@ function admin_page_site_post(&$a){
|
|||||||
del_config('system','admininfo');
|
del_config('system','admininfo');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
require_once('include/text.php');
|
||||||
|
linkify_tags($a, $admininfo, local_user());
|
||||||
set_config('system','admininfo', $admininfo);
|
set_config('system','admininfo', $admininfo);
|
||||||
}
|
}
|
||||||
set_config('system','language', $language);
|
set_config('system','language', $language);
|
||||||
|
@ -75,6 +75,10 @@ function events_post(&$a) {
|
|||||||
$location = escape_tags(trim($_POST['location']));
|
$location = escape_tags(trim($_POST['location']));
|
||||||
$type = 'event';
|
$type = 'event';
|
||||||
|
|
||||||
|
require_once('include/text.php');
|
||||||
|
linkify_tags($a, $desc, local_user());
|
||||||
|
linkify_tags($a, $location, local_user());
|
||||||
|
|
||||||
$action = ($event_hash == '') ? 'new' : "event/" . $event_hash;
|
$action = ($event_hash == '') ? 'new' : "event/" . $event_hash;
|
||||||
$onerror_url = $a->get_baseurl() . "/events/" . $action . "?summary=$summary&description=$desc&location=$location&start=$start_text&finish=$finish_text&adjust=$adjust&nofinish=$nofinish";
|
$onerror_url = $a->get_baseurl() . "/events/" . $action . "?summary=$summary&description=$desc&location=$location&start=$start_text&finish=$finish_text&adjust=$adjust&nofinish=$nofinish";
|
||||||
if(strcmp($finish,$start) < 0 && !$nofinish) {
|
if(strcmp($finish,$start) < 0 && !$nofinish) {
|
||||||
|
@ -576,7 +576,7 @@ function item_post(&$a) {
|
|||||||
|
|
||||||
|
|
||||||
// Look for tags and linkify them
|
// Look for tags and linkify them
|
||||||
$results = linkify_tags($a, $body, $uid, $profile_uid);
|
$results = linkify_tags($a, $body, ($uid) ? $uid : $profile_uid);
|
||||||
|
|
||||||
// Set permissions based on tag replacements
|
// Set permissions based on tag replacements
|
||||||
set_linkified_perms($results, $str_contact_allow, $str_group_allow, $profile_uid, $parent_item);
|
set_linkified_perms($results, $str_contact_allow, $str_group_allow, $profile_uid, $parent_item);
|
||||||
|
@ -83,6 +83,9 @@ function mail_post(&$a) {
|
|||||||
// $body = fix_mce_lf($body);
|
// $body = fix_mce_lf($body);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
require_once('include/text.php');
|
||||||
|
linkify_tags($a, $body, local_user());
|
||||||
|
|
||||||
if(! $recipient) {
|
if(! $recipient) {
|
||||||
notice('No recipient found.');
|
notice('No recipient found.');
|
||||||
$a->argc = 2;
|
$a->argc = 2;
|
||||||
|
@ -354,7 +354,7 @@ function photos_post(&$a) {
|
|||||||
require_once('include/text.php');
|
require_once('include/text.php');
|
||||||
$profile_uid = $a->profile['profile_uid'];
|
$profile_uid = $a->profile['profile_uid'];
|
||||||
|
|
||||||
$results = linkify_tags($a, $rawtags, local_user(), $profile_uid);
|
$results = linkify_tags($a, $rawtags, (local_user()) ? local_user() : $profile_uid);
|
||||||
|
|
||||||
$success = $results['success'];
|
$success = $results['success'];
|
||||||
$post_tags = array();
|
$post_tags = array();
|
||||||
|
@ -298,6 +298,23 @@ function profiles_post(&$a) {
|
|||||||
|
|
||||||
$hide_friends = ((intval($_POST['hide_friends'])) ? 1: 0);
|
$hide_friends = ((intval($_POST['hide_friends'])) ? 1: 0);
|
||||||
|
|
||||||
|
require_once('include/text.php');
|
||||||
|
linkify_tags($a, $likes, local_user());
|
||||||
|
linkify_tags($a, $dislikes, local_user());
|
||||||
|
linkify_tags($a, $about, local_user());
|
||||||
|
linkify_tags($a, $interest, local_user());
|
||||||
|
linkify_tags($a, $interest, local_user());
|
||||||
|
linkify_tags($a, $contact, local_user());
|
||||||
|
linkify_tags($a, $channels, local_user());
|
||||||
|
linkify_tags($a, $music, local_user());
|
||||||
|
linkify_tags($a, $book, local_user());
|
||||||
|
linkify_tags($a, $tv, local_user());
|
||||||
|
linkify_tags($a, $film, local_user());
|
||||||
|
linkify_tags($a, $romance, local_user());
|
||||||
|
linkify_tags($a, $work, local_user());
|
||||||
|
linkify_tags($a, $education, local_user());
|
||||||
|
|
||||||
|
|
||||||
$with = ((x($_POST,'with')) ? escape_tags(trim($_POST['with'])) : '');
|
$with = ((x($_POST,'with')) ? escape_tags(trim($_POST['with'])) : '');
|
||||||
|
|
||||||
if(! strlen($howlong))
|
if(! strlen($howlong))
|
||||||
|
@ -126,7 +126,8 @@ function siteinfo_content(&$a) {
|
|||||||
else
|
else
|
||||||
$plugins_text = t('No installed plugins/addons/apps');
|
$plugins_text = t('No installed plugins/addons/apps');
|
||||||
|
|
||||||
$admininfo = bbcode(get_config('system','admininfo'));
|
$txt = get_config('system','admininfo');
|
||||||
|
$admininfo = bbcode($txt);
|
||||||
|
|
||||||
if(file_exists('doc/site_donate.html'))
|
if(file_exists('doc/site_donate.html'))
|
||||||
$donate .= file_get_contents('doc/site_donate.html');
|
$donate .= file_get_contents('doc/site_donate.html');
|
||||||
|
Reference in New Issue
Block a user