}
$user['networking'] = Array();
- $res = XDB::iterator("SELECT n.address, n.pub, m.network_type AS type, m.name, m.filter
+ $res = XDB::iterator("SELECT n.address, n.pub, m.network_type AS type, m.name, m.filter, m.link
FROM profile_networking AS n
INNER JOIN profile_networking_enum AS m ON (n.network_type = m.network_type)
WHERE n.uid = {?}", $uid);
while($network = $res->next())
{
if (has_user_right($network['pub'], $view)) {
+ $network['link'] = str_replace('%s', $network['address'], $network['link']);
$user['networking'][] = $network;
}
}
$table_editor = new PLTableEditor('admin/networking', 'profile_networking_enum', 'network_type');
$table_editor->describe('name', 'intitulé', true);
$table_editor->describe('icon', 'nom de l\'icône', false);
- $table_editor->describe('filter', 'nom du filtre à appliquer', true);
+ $table_editor->describe('filter', 'filtre', true);
+ $table_editor->describe('link', 'lien web', true);
$table_editor->apply($page, $action, $id);
}
function handler_admin_phones_format_display(&$page, $action = 'list', $id = null) {
<img style="width: auto; padding: 0" src="profile/networking/{$network.type}" alt="{$network.name}" title="{$network.name}"/>
{if $network.filter == 'web'}
<a href="{$network.address}">{$network.address}</a>
+ {elseif $network.link != ''}
+ <a href="{$network.link}">{$network.address}</a>
{else}
{$network.address}
{/if}
`name` varchar(30) NOT NULL,
`icon` varchar(50) NOT NULL COMMENT 'icon filename',
`filter` enum('email','web','number','none') NOT NULL DEFAULT 'none' COMMENT 'filter type for addresses',
+ `link` varchar(255) NOT NULL COMMENT 'string used to forge an URL linking to the the profile page',
PRIMARY KEY (`network_type`)
) CHARSET=utf8 COMMENT='types of networking addresses';