comanchify mod_directory. Two modules remaining. Actually three because message needs to be split.
This commit is contained in:
parent
a084a3fa47
commit
aa312f72bf
@ -7,7 +7,7 @@
|
||||
<li>[u]underlined[/u] - <u>underlined</u><br />
|
||||
<li>[s]strike[/s] - <strike>strike</strike><br />
|
||||
<li>[color=red]red[/color] - <span style="color: red;">red</span><br />
|
||||
<li>[url=https://www.redmatrix.me]Red Matrix[/url] <a href="https://redmatrix.me">Red Matrix</a><br />
|
||||
<li>[url=https://redmatrix.me]Red Matrix[/url] <a href="https://redmatrix.me">Red Matrix</a><br />
|
||||
<li>[img]https://redmatrix.me/images/default_profile_photos/rainbow_man/48.jpg[/img] <img src="https://redmatrix.me/images/default_profile_photos/rainbow_man/48.jpg" alt="Image/photo" /><br />
|
||||
<li>[code]code[/code] <code>code</code><br />
|
||||
<li>[quote]quote[/quote] <blockquote>quote</blockquote><br />
|
||||
|
@ -217,16 +217,19 @@ function tagblock($link,$uid,$count = 0,$authors = '',$flags = 0,$restrict = 0,$
|
||||
}
|
||||
|
||||
function dir_tagblock($link,$r) {
|
||||
$o = '';
|
||||
$tab = 0;
|
||||
$o = '';
|
||||
$tab = 0;
|
||||
|
||||
if($r) {
|
||||
$o = '<div class="dirtagblock widget"><h3>' . t('Keywords') . '</h3><div class="tags" align="center">';
|
||||
foreach($r as $rr) {
|
||||
$o .= '<a href="'.$link .'/' . '?f=&keywords=' . urlencode($rr['term']).'" class="tag'.$rr['normalise'].'" rel="nofollow" >'.$rr['term'].'</a> ' . "\r\n";
|
||||
if(! $r)
|
||||
$r = get_app()->data['directory_keywords'];
|
||||
|
||||
if($r) {
|
||||
$o = '<div class="dirtagblock widget"><h3>' . t('Keywords') . '</h3><div class="tags" align="center">';
|
||||
foreach($r as $rr) {
|
||||
$o .= '<a href="'.$link .'/' . '?f=&keywords=' . urlencode($rr['term']).'" class="tag'.$rr['normalise'].'" rel="nofollow" >'.$rr['term'].'</a> ' . "\r\n";
|
||||
}
|
||||
$o .= '</div></div>';
|
||||
}
|
||||
$o .= '</div></div>';
|
||||
}
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
<?php /** @file */
|
||||
|
||||
require_once('include/dir_fns.php');
|
||||
require_once('include/contact_widgets.php');
|
||||
|
||||
|
||||
function widget_profile($args) {
|
||||
$a = get_app();
|
||||
@ -549,3 +552,19 @@ function widget_vcard($arr) {
|
||||
return vcard_from_xchan('',get_app()->get_observer());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The following directory widgets are only useful on the directory page
|
||||
*/
|
||||
|
||||
function widget_dirsafemode($arr) {
|
||||
return dir_safe_mode();
|
||||
}
|
||||
|
||||
function widget_dirsort($arr) {
|
||||
return dir_sort_links();
|
||||
}
|
||||
|
||||
function widget_dirtags($arr) {
|
||||
return dir_tagblock(z_root() . '/directory',null);
|
||||
}
|
@ -8,7 +8,7 @@ function directory_init(&$a) {
|
||||
$a->set_pager_itemspage(80);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
function directory_aside(&$a) {
|
||||
|
||||
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
|
||||
@ -23,7 +23,7 @@ function directory_aside(&$a) {
|
||||
$a->set_widget('dir_sort_order',dir_sort_links());
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
function directory_content(&$a) {
|
||||
|
||||
@ -210,9 +210,11 @@ function directory_content(&$a) {
|
||||
}
|
||||
|
||||
if($j['keywords']) {
|
||||
$a->set_widget('dirtagblock',dir_tagblock(z_root() . '/directory',$j['keywords']));
|
||||
$a->data['directory_keywords'] = $j['keywords'];
|
||||
|
||||
// $a->set_widget('dirtagblock',dir_tagblock(z_root() . '/directory',$j['keywords']));
|
||||
}
|
||||
$a->set_widget('suggest',widget_suggestions(array()));
|
||||
// $a->set_widget('suggest',widget_suggestions(array()));
|
||||
|
||||
|
||||
// logger('mod_directory: entries: ' . print_r($entries,true), LOGGER_DATA);
|
||||
|
7
view/pdl/mod_directory.pdl
Normal file
7
view/pdl/mod_directory.pdl
Normal file
@ -0,0 +1,7 @@
|
||||
[region=aside]
|
||||
[widget=findpeople][/widget]
|
||||
[widget=dirsafemode][/widget]
|
||||
[widget=dirsort][/widget]
|
||||
[widget=dirtags][/widget]
|
||||
[widget=suggestions][/widget]
|
||||
[/region]
|
Reference in New Issue
Block a user