The affinity tool is not a "traditional" widget. But it is nevertheless a widget. It just makes fewer page layout decisions which are hard-coded. If you want to shrink it down and put it on the sidebar in your theme, go for it.
This commit is contained in:
parent
2f46bacded
commit
b4e1e8a4a4
3
boot.php
3
boot.php
@ -1883,7 +1883,8 @@ function construct_page(&$a) {
|
|||||||
$v = str_replace('$nav',$a->page['nav'],$v);
|
$v = str_replace('$nav',$a->page['nav'],$v);
|
||||||
}
|
}
|
||||||
if(strpos($v,'$content') !== false) {
|
if(strpos($v,'$content') !== false) {
|
||||||
$v = str_replace('$content',$a->page['section'],$v);
|
|
||||||
|
$v = str_replace('$content',$a->page['content'],$v);
|
||||||
}
|
}
|
||||||
|
|
||||||
$a->page[substr($k,7)] = $v;
|
$a->page[substr($k,7)] = $v;
|
||||||
|
@ -334,3 +334,29 @@ function widget_tagcloud_wall($arr) {
|
|||||||
return tagblock('search',$a->profile['profile_uid'],$limit,$a->profile['channel_hash'],ITEM_WALL);
|
return tagblock('search',$a->profile['profile_uid'],$limit,$a->profile['channel_hash'],ITEM_WALL);
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function widget_affinity($arr) {
|
||||||
|
|
||||||
|
if(! local_user())
|
||||||
|
return '';
|
||||||
|
|
||||||
|
if(feature_enabled(local_user(),'affinity')) {
|
||||||
|
$tpl = get_markup_template('main_slider.tpl');
|
||||||
|
$x = replace_macros($tpl,array(
|
||||||
|
'$val' => intval($_REQUEST['cmin']) . ';' . intval($_REQUEST['cmax']),
|
||||||
|
'$refresh' => t('Refresh'),
|
||||||
|
'$me' => t('Me'),
|
||||||
|
'$intimate' => t('Best Friends'),
|
||||||
|
'$friends' => t('Friends'),
|
||||||
|
'$coworkers' => t('Co-workers'),
|
||||||
|
'$oldfriends' => t('Former Friends'),
|
||||||
|
'$acquaintances' => t('Acquaintances'),
|
||||||
|
'$world' => t('Everybody')
|
||||||
|
));
|
||||||
|
$arr = array('html' => $x);
|
||||||
|
call_hooks('main_slider',$arr);
|
||||||
|
return $arr['html'];
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
@ -111,33 +111,8 @@ function network_content(&$a, $update = 0, $load = false) {
|
|||||||
|
|
||||||
|
|
||||||
if(! $update) {
|
if(! $update) {
|
||||||
|
|
||||||
if(feature_enabled(local_user(),'affinity')) {
|
|
||||||
$tpl = get_markup_template('main_slider.tpl');
|
|
||||||
$x = replace_macros($tpl,array(
|
|
||||||
'$val' => intval($cmin) . ';' . intval($cmax),
|
|
||||||
'$refresh' => t('Refresh'),
|
|
||||||
'$me' => t('Me'),
|
|
||||||
'$intimate' => t('Best Friends'),
|
|
||||||
'$friends' => t('Friends'),
|
|
||||||
'$coworkers' => t('Co-workers'),
|
|
||||||
'$oldfriends' => t('Former Friends'),
|
|
||||||
'$acquaintances' => t('Acquaintances'),
|
|
||||||
'$world' => t('Everybody')
|
|
||||||
));
|
|
||||||
$arr = array('html' => $x);
|
|
||||||
call_hooks('main_slider',$arr);
|
|
||||||
$o .= $arr['html'];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$o .= network_tabs();
|
$o .= network_tabs();
|
||||||
|
|
||||||
// --- end item filter tabs
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// search terms header
|
// search terms header
|
||||||
if($search)
|
if($search)
|
||||||
$o .= '<h2>' . t('Search Results For:') . ' ' . htmlspecialchars($search) . '</h2>';
|
$o .= '<h2>' . t('Search Results For:') . ' ' . htmlspecialchars($search) . '</h2>';
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
[region=nav]$nav[/region]
|
[region=nav]$nav[/region]
|
||||||
|
|
||||||
[region=aside]
|
[region=aside]
|
||||||
[widget=collections][/widget]
|
[widget=collections][/widget]
|
||||||
[widget=archive][/widget]
|
[widget=archive][/widget]
|
||||||
@ -7,4 +8,8 @@
|
|||||||
[widget=filer][/widget]
|
[widget=filer][/widget]
|
||||||
[widget=notes][/widget]
|
[widget=notes][/widget]
|
||||||
[/region]
|
[/region]
|
||||||
[region=section]$content[/region]
|
|
||||||
|
[region=content]
|
||||||
|
[widget=affinity][/widget]
|
||||||
|
$content
|
||||||
|
[/region]
|
Reference in New Issue
Block a user