wall tags
This commit is contained in:
parent
1780ba5e7d
commit
f28103d595
@ -216,6 +216,26 @@ function tagblock($link,$uid,$count = 0,$authors = '',$flags = 0,$restrict = 0,$
|
|||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function wtagblock($uid,$count = 0,$authors = '',$flags = 0,$restrict = 0,$type = TERM_HASHTAG) {
|
||||||
|
$o = '';
|
||||||
|
$tab = 0;
|
||||||
|
$r = tagadelic($uid,$count,$authors,$flags,$restrict,$type);
|
||||||
|
|
||||||
|
if($r) {
|
||||||
|
$c = q("select channel_address from channel where channel_id = %d limit 1",
|
||||||
|
intval($uid)
|
||||||
|
);
|
||||||
|
|
||||||
|
$o = '<div class="tagblock widget"><h3>' . t('Tags') . '</h3><div class="tags" align="center">';
|
||||||
|
foreach($r as $rr) {
|
||||||
|
$o .= '<span class="tag' . $rr[2] . '">#</span><a href="channel/' . $c[0]['channel_address'] . '?f=&tag=' . urlencode($rr[0]).'" class="tag'.$rr[2].'">'.$rr[0].'</a> ' . "\r\n";
|
||||||
|
}
|
||||||
|
$o .= '</div></div>';
|
||||||
|
}
|
||||||
|
return $o;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function catblock($uid,$count = 0,$authors = '',$flags = 0,$restrict = 0,$type = TERM_CATEGORY) {
|
function catblock($uid,$count = 0,$authors = '',$flags = 0,$restrict = 0,$type = TERM_CATEGORY) {
|
||||||
$o = '';
|
$o = '';
|
||||||
$tab = 0;
|
$tab = 0;
|
||||||
|
@ -236,9 +236,13 @@ function widget_savedsearch($arr) {
|
|||||||
$hasq = ((strpos($srchurl,'?') !== false) ? true : false);
|
$hasq = ((strpos($srchurl,'?') !== false) ? true : false);
|
||||||
|
|
||||||
$srchurl = rtrim(preg_replace('/search\=[^\&].*?(\&|$)/is','',$srchurl),'&');
|
$srchurl = rtrim(preg_replace('/search\=[^\&].*?(\&|$)/is','',$srchurl),'&');
|
||||||
|
$srchurl = rtrim(preg_replace('/submit\=[^\&].*?(\&|$)/is','',$srchurl),'&');
|
||||||
$srchurl = str_replace(array('?f=','&f='),array('',''),$srchurl);
|
$srchurl = str_replace(array('?f=','&f='),array('',''),$srchurl);
|
||||||
|
|
||||||
|
|
||||||
$hasq = ((strpos($srchurl,'?') !== false) ? true : false);
|
$hasq = ((strpos($srchurl,'?') !== false) ? true : false);
|
||||||
|
|
||||||
|
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
$r = q("select `tid`,`term` from `term` WHERE `uid` = %d and `type` = %d ",
|
$r = q("select `tid`,`term` from `term` WHERE `uid` = %d and `type` = %d ",
|
||||||
@ -387,7 +391,7 @@ function widget_tagcloud_wall($arr) {
|
|||||||
|
|
||||||
$limit = ((array_key_exists('limit', $arr)) ? intval($arr['limit']) : 50);
|
$limit = ((array_key_exists('limit', $arr)) ? intval($arr['limit']) : 50);
|
||||||
if(feature_enabled($a->profile['profile_uid'], 'tagadelic'))
|
if(feature_enabled($a->profile['profile_uid'], 'tagadelic'))
|
||||||
return tagblock('search', $a->profile['profile_uid'], $limit, $a->profile['channel_hash'], ITEM_WALL);
|
return wtagblock($a->profile['profile_uid'], $limit, $a->profile['channel_hash'], ITEM_WALL);
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,7 @@ function channel_content(&$a, $update = 0, $load = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : '');
|
$category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : '');
|
||||||
|
$hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : '');
|
||||||
|
|
||||||
$groups = array();
|
$groups = array();
|
||||||
|
|
||||||
@ -174,6 +175,9 @@ function channel_content(&$a, $update = 0, $load = false) {
|
|||||||
if(x($category)) {
|
if(x($category)) {
|
||||||
$sql_extra .= protect_sprintf(term_query('item', $category, TERM_CATEGORY));
|
$sql_extra .= protect_sprintf(term_query('item', $category, TERM_CATEGORY));
|
||||||
}
|
}
|
||||||
|
if(x($hashtags)) {
|
||||||
|
$sql_extra .= protect_sprintf(term_query('item', $hashtags, TERM_HASHTAG));
|
||||||
|
}
|
||||||
|
|
||||||
if($datequery) {
|
if($datequery) {
|
||||||
$sql_extra2 .= protect_sprintf(sprintf(" AND item.created <= '%s' ", dbesc(datetime_convert(date_default_timezone_get(),'',$datequery))));
|
$sql_extra2 .= protect_sprintf(sprintf(" AND item.created <= '%s' ", dbesc(datetime_convert(date_default_timezone_get(),'',$datequery))));
|
||||||
@ -281,6 +285,7 @@ function channel_content(&$a, $update = 0, $load = false) {
|
|||||||
'$list' => ((x($_REQUEST,'list')) ? intval($_REQUEST['list']) : 0),
|
'$list' => ((x($_REQUEST,'list')) ? intval($_REQUEST['list']) : 0),
|
||||||
'$file' => '',
|
'$file' => '',
|
||||||
'$cats' => (($category) ? $category : ''),
|
'$cats' => (($category) ? $category : ''),
|
||||||
|
'$tags' => (($hashtags) ? $hashtags : ''),
|
||||||
'$mid' => $mid,
|
'$mid' => $mid,
|
||||||
'$dend' => $datequery,
|
'$dend' => $datequery,
|
||||||
'$dbegin' => $datequery2
|
'$dbegin' => $datequery2
|
||||||
|
@ -133,6 +133,7 @@ function display_content(&$a, $update = 0, $load = false) {
|
|||||||
'$order' => '',
|
'$order' => '',
|
||||||
'$file' => '',
|
'$file' => '',
|
||||||
'$cats' => '',
|
'$cats' => '',
|
||||||
|
'$tags' => '',
|
||||||
'$dend' => '',
|
'$dend' => '',
|
||||||
'$dbegin' => '',
|
'$dbegin' => '',
|
||||||
'$mid' => $item_hash
|
'$mid' => $item_hash
|
||||||
|
@ -141,6 +141,7 @@ function home_content(&$a, $update = 0, $load = false) {
|
|||||||
'$order' => 'comment',
|
'$order' => 'comment',
|
||||||
'$file' => '',
|
'$file' => '',
|
||||||
'$cats' => '',
|
'$cats' => '',
|
||||||
|
'$tags' => '',
|
||||||
'$dend' => '',
|
'$dend' => '',
|
||||||
'$mid' => '',
|
'$mid' => '',
|
||||||
'$dbegin' => ''
|
'$dbegin' => ''
|
||||||
|
@ -34,6 +34,21 @@ function network_content(&$a, $update = 0, $load = false) {
|
|||||||
|
|
||||||
$channel = $a->get_channel();
|
$channel = $a->get_channel();
|
||||||
|
|
||||||
|
|
||||||
|
$datequery = $datequery2 = '';
|
||||||
|
|
||||||
|
$group = 0;
|
||||||
|
|
||||||
|
$nouveau = false;
|
||||||
|
|
||||||
|
$datequery = ((x($_GET,'dend') && is_a_date_arg($_GET['dend'])) ? notags($_GET['dend']) : '');
|
||||||
|
$datequery2 = ((x($_GET,'dbegin') && is_a_date_arg($_GET['dbegin'])) ? notags($_GET['dbegin']) : '');
|
||||||
|
$nouveau = ((x($_GET,'new')) ? intval($_GET['new']) : 0);
|
||||||
|
$gid = ((x($_GET,'gid')) ? intval($_GET['gid']) : 0);
|
||||||
|
$category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : '');
|
||||||
|
$hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : '');
|
||||||
|
|
||||||
|
|
||||||
$search = (($_GET['search']) ? $_GET['search'] : '');
|
$search = (($_GET['search']) ? $_GET['search'] : '');
|
||||||
if($search) {
|
if($search) {
|
||||||
if(strpos($search,'@') === 0) {
|
if(strpos($search,'@') === 0) {
|
||||||
@ -47,23 +62,11 @@ function network_content(&$a, $update = 0, $load = false) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif(strpos($search,'#') === 0) {
|
elseif(strpos($search,'#') === 0) {
|
||||||
$search = $_GET['search'] = substr($search,1);
|
$hashtags = substr($search,1);
|
||||||
|
$search = $_GET['search'] = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$datequery = $datequery2 = '';
|
|
||||||
|
|
||||||
$group = 0;
|
|
||||||
|
|
||||||
$nouveau = false;
|
|
||||||
|
|
||||||
$datequery = ((x($_GET,'dend') && is_a_date_arg($_GET['dend'])) ? notags($_GET['dend']) : '');
|
|
||||||
$datequery2 = ((x($_GET,'dbegin') && is_a_date_arg($_GET['dbegin'])) ? notags($_GET['dbegin']) : '');
|
|
||||||
$nouveau = ((x($_GET,'new')) ? intval($_GET['new']) : 0);
|
|
||||||
$gid = ((x($_GET,'gid')) ? intval($_GET['gid']) : 0);
|
|
||||||
|
|
||||||
|
|
||||||
if($datequery)
|
if($datequery)
|
||||||
$_GET['order'] = 'post';
|
$_GET['order'] = 'post';
|
||||||
|
|
||||||
@ -199,6 +202,12 @@ function network_content(&$a, $update = 0, $load = false) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(x($category)) {
|
||||||
|
$sql_extra .= protect_sprintf(term_query('item', $category, TERM_CATEGORY));
|
||||||
|
}
|
||||||
|
if(x($hashtags)) {
|
||||||
|
$sql_extra .= protect_sprintf(term_query('item', $hashtags, TERM_HASHTAG));
|
||||||
|
}
|
||||||
|
|
||||||
if(! $update) {
|
if(! $update) {
|
||||||
// The special div is needed for liveUpdate to kick in for this page.
|
// The special div is needed for liveUpdate to kick in for this page.
|
||||||
@ -238,7 +247,8 @@ function network_content(&$a, $update = 0, $load = false) {
|
|||||||
'$search' => (($search) ? $search : ''),
|
'$search' => (($search) ? $search : ''),
|
||||||
'$order' => $order,
|
'$order' => $order,
|
||||||
'$file' => $file,
|
'$file' => $file,
|
||||||
'$cats' => '',
|
'$cats' => $category,
|
||||||
|
'$tags' => $hashtags,
|
||||||
'$dend' => $datequery,
|
'$dend' => $datequery,
|
||||||
'$mid' => '',
|
'$mid' => '',
|
||||||
'$dbegin' => $datequery2
|
'$dbegin' => $datequery2
|
||||||
|
@ -107,6 +107,7 @@ function search_content(&$a,$update = 0, $load = false) {
|
|||||||
'$order' => '',
|
'$order' => '',
|
||||||
'$file' => '',
|
'$file' => '',
|
||||||
'$cats' => '',
|
'$cats' => '',
|
||||||
|
'$tags' => '',
|
||||||
'$mid' => '',
|
'$mid' => '',
|
||||||
'$dend' => '',
|
'$dend' => '',
|
||||||
'$dbegin' => ''
|
'$dbegin' => ''
|
||||||
|
@ -1 +1 @@
|
|||||||
2014-12-14.889
|
2014-12-15.890
|
||||||
|
@ -903,7 +903,7 @@ function updateConvItems(mode,data) {
|
|||||||
function preview_post() {
|
function preview_post() {
|
||||||
$("#jot-preview").val("1");
|
$("#jot-preview").val("1");
|
||||||
$("#jot-preview-content").show();
|
$("#jot-preview-content").show();
|
||||||
tinyMCE.triggerSave();
|
// tinyMCE.triggerSave();
|
||||||
$.post(
|
$.post(
|
||||||
"item",
|
"item",
|
||||||
$("#profile-jot-form").serialize(),
|
$("#profile-jot-form").serialize(),
|
||||||
@ -1020,6 +1020,8 @@ function fcFileBrowser (field_name, url, type, win) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setupFieldRichtext(){
|
function setupFieldRichtext(){
|
||||||
|
return;
|
||||||
|
/*
|
||||||
tinyMCE.init({
|
tinyMCE.init({
|
||||||
theme : "advanced",
|
theme : "advanced",
|
||||||
mode : "specific_textareas",
|
mode : "specific_textareas",
|
||||||
@ -1043,6 +1045,7 @@ function setupFieldRichtext(){
|
|||||||
theme_advanced_path : false,
|
theme_advanced_path : false,
|
||||||
file_browser_callback : "fcFileBrowser",
|
file_browser_callback : "fcFileBrowser",
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
var bParam_order = "{{$order}}";
|
var bParam_order = "{{$order}}";
|
||||||
var bParam_file = "{{$file}}";
|
var bParam_file = "{{$file}}";
|
||||||
var bParam_cats = "{{$cats}}";
|
var bParam_cats = "{{$cats}}";
|
||||||
|
var bParam_tags = "{{$tags}}";
|
||||||
var bParam_dend = "{{$dend}}";
|
var bParam_dend = "{{$dend}}";
|
||||||
var bParam_dbegin = "{{$dbegin}}";
|
var bParam_dbegin = "{{$dbegin}}";
|
||||||
var bParam_mid = "{{$mid}}";
|
var bParam_mid = "{{$mid}}";
|
||||||
@ -46,6 +47,7 @@
|
|||||||
if(bParam_order != "") bCmd = bCmd + "&order=" + bParam_order;
|
if(bParam_order != "") bCmd = bCmd + "&order=" + bParam_order;
|
||||||
if(bParam_file != "") bCmd = bCmd + "&file=" + bParam_file;
|
if(bParam_file != "") bCmd = bCmd + "&file=" + bParam_file;
|
||||||
if(bParam_cats != "") bCmd = bCmd + "&cat=" + bParam_cats;
|
if(bParam_cats != "") bCmd = bCmd + "&cat=" + bParam_cats;
|
||||||
|
if(bParam_tags != "") bCmd = bCmd + "&tag=" + bParam_tags;
|
||||||
if(bParam_dend != "") bCmd = bCmd + "&dend=" + bParam_dend;
|
if(bParam_dend != "") bCmd = bCmd + "&dend=" + bParam_dend;
|
||||||
if(bParam_dbegin != "") bCmd = bCmd + "&dbegin=" + bParam_dbegin;
|
if(bParam_dbegin != "") bCmd = bCmd + "&dbegin=" + bParam_dbegin;
|
||||||
if(bParam_mid != "") bCmd = bCmd + "&mid=" + bParam_mid;
|
if(bParam_mid != "") bCmd = bCmd + "&mid=" + bParam_mid;
|
||||||
|
Reference in New Issue
Block a user