Functions | |
links_normalize_url ($url) | |
links_remove_empty_get_parms ($url) | |
links_sort_get_parms ($url) | |
links_sort_query_string ($query) | |
links_remove_session_id ($url) | |
links_check_trailing_slash ($url) | |
links_cleanup_parms ($url) | |
links_suggest_link_title ($link_spec, $default="") | |
links_parse_url ($url, $accept_bare=TRUE, $accept_relative=TRUE, $accept_absolute=TRUE) | |
links_find_links ($text) | |
links_hash_url ($url) | |
links_get_link_where_sql ($link_spec, $tablename="{links}") | |
links_get_link ($link_spec) | |
links_put_link ($url, $title='') | |
links_get_link_node_query_sql ($link_spec, $order="weight,link_title", $orphans=TRUE, $module='links') | |
links_delete_links_for_node ($node, $module='links_links') | |
links_save_links_for_node (&$node, $module='links_links', $global=FALSE) | |
links_load_links_for_node ($nid, $module='links', $lid=0, $firstonly=FALSE) | |
links_goto_bynode ($nid, $lid=0, $module='') | |
links_goto ($link_spec, $module='') | |
links_goto_link ($link, $module='') | |
links_get_goto_target ($link_spec=0) | |
links_l ($text='', $url='', $attribs=NULL) | |
links_get_list ($module, &$node, $page=FALSE, $teaser=FALSE) | |
links_prefs_is_user_specific ($name, $permission= '') | |
links_prefs_get ($name, $default='', $permission='') | |
links_stats_for_link ($link_spec) | |
links_stats_popular ($limit=10, $order="total_clicks", $min_nodes=1, $min_clicks=0) | |
Variables | |
$url = $link['url'] |
links.inc Utility functions for the links modules
Author: Scott Courtney (Drupal user "syscrusher") scott@4th.com
NOTE: This file is co-dependent with links.module.
|
Returns the correct link target ("_blank" or "") depending on global settings and, if enabled, user preference settings. The target may depend on whether the link is internal or external. If that is the case, and the optional link_spec parameter is not supplied, an external link will be assumed. |
|
Given a link ID or the URL or its MD5 hash, redirects to that location and tallies one click in the links_node table. If $module is not specified, the redirection will still work as long as the link spec is valid, but the outbound click won't be tallied in the database. $module is needed for tallying because it is legal for the same node to refer to the same link from multiple module contexts. Returns TRUE if a redirect was actually sent to the browser, FALSE if not. |
|
Given a node ID and an optional link ID, goes to either the specified link ID (with click credit to the appropriate {links_node} record) or to the first [or only] link for the specified node, again with appropriate click credit. It is valid for $nid to be zero, if $lid is nonzero. In that case, the function will redirect to the URL specified by the link, but will not tally the link for a particular node. Unlike other instances of $module, here we default to an empty string to fetch any link regardless of context. Callers can override that behavior, and indeed almost always will want to do so. Returns TRUE if a redirect was actually sent to the browser, FALSE if not. |
|
Given a link record array, redirects to the URL contained in the array. Returns TRUE if a redirect was actually sent to the browser, FALSE if not. |
|
Returns an HTML link tag with the target set appropriately based on the options at the system and possibly at the user account level. |
|
|