forward_services.module in Service links 6.2
Same filename and directory in other branches
Extends Service Links with Forward module support.
@author Fabio Mucciante (TheCrow)
File
services/forward_services.moduleView source
<?php
/**
* @file
* Extends Service Links with Forward module support.
*
* @author Fabio Mucciante (TheCrow)
*/
/**
* Implementation of hook_service_links().
*/
function forward_services_service_links() {
$links = array();
$links['forward'] = array(
'name' => 'Forward',
'link' => variable_get('clean_url', 0) == 1 ? '<front-page>forward?path=<encoded-query>' : '<front-page>forward&path=<encoded-query>',
'description' => t('Send to a friend'),
'preset' => 'forward_url_fix',
);
return $links;
}
function forward_url_fix(&$service, &$settings, $node = NULL) {
if (isset($node->nid)) {
$service['link'] = str_replace('<encoded-query>', 'node/<node-id>', $service['link']);
}
}
Functions
Name | Description |
---|---|
forward_services_service_links | Implementation of hook_service_links(). |
forward_url_fix |