Drupal complete path with base
Drupal complete path with base, returns http://www.yoursite.com/node/[nid]
<?php
global $base_root;
$base_root . request_uri();
?>
Drupal complete path with base, returns http://www.yoursite.com/node/[nid]
<?php
global $base_root;
$base_root . request_uri();
?>
/**
* Implementation of hook_token_list().
*/
function gmapnode_token_list(
$type = 'all') {
if($type == 'taxonomy' || $type == 'all') {
$tokens['taxonomy']['catpath-raw-not-self'] = t('As [cat-raw], but including its supercategories separated by /. NOT INCLUDING ITSELF! WARNING - raw user input.');
return $tokens;
}
elseif($type == 'node') {
$tokens['node']['termfirst-leaf-catpath-raw'] = t('Unfiltered path of the first leaf term.
If you have access to your own module you can add a hook_cron function with the following code. On each cron it will execute the bulk generation for nodes
<?php
function feed_control_cron(){
//If you want to change the number of nodes to change
variable_set('pathauto_max_bulk_update', 1000);
//include the .inc files of pathauto
_pathauto_include();
//Executes the generation of URL aliases for nodes
node_pathauto_bulkupdate();
}
?>
Other solutions: http://drupal.org/node/236304
This is a way, not very nice though, to hook pathauto. It is called when someone view or save the settings of URL alias at admin/build/path/pathauto. The module_invoke_all() is called in the function pathauto_admin_settings(), so this function has to be named "..._pathauto". This is not a ready to use script, even if I have used it on a production site.
Convert Drupal node path, "node/123.." to path alias and store it in an array. Useful when you have conditions based on path alias in your module or template files.
<?php
//Get path alias from arg() function and back to array
$path = implode('/',arg());
$path_alias = drupal_get_path_alias($path);
$arg = explode('/', $path_alias);
$show_path = array("knowledgebase", "knowledge", "search", "convert", "extract", "password");
if (in_array($arg[0], $show_path)) {
//Do something...
}
?>
In the settings of pathauto (admin/build/path/pathauto), mark "Transliterate prior to creating alias".
In the folder of Pathauto ther is a file named i18n-ascii.example.txt. Rename it to i18n-ascii.txt and open it and add the translation of the swedish letters. You can download it from here if you want to.