| 1 |
<?php |
<?php |
| 2 |
// $Id: urlify.module,v 1.4.2.2 2007/09/29 06:23:39 canen Exp $ |
// $Id: urlify.module,v 1.4.2.3 2007/09/29 06:57:45 canen Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 13 |
function urlify_help($section) { |
function urlify_help($section) { |
| 14 |
switch ($section) { |
switch ($section) { |
| 15 |
case 'admin/help#urlify': |
case 'admin/help#urlify': |
| 16 |
$output .= '<p>'. t('The URLify module is used to create automatic path aliases. It uses the title of current node and is generated as the title is being typed. It requires the path module and the node to have a title field.') . '</p>'; |
$output .= '<p>'. t('The URLify module is used to create automatic path aliases. It uses the title of the current node and is generated as the title is being typed. It requires the path module and the node to have a title field.') . '</p>'; |
| 17 |
$output .= '<p>'. t('By default URLify has a set of words that is ignored when creating the alias. This and the maximum amount of characters (50 by default) to use in the alias can be changed at <a href="@admin-settings-urlify">Administer » Site configuration » URLify</a>. You can change permissions <a href="@user-access">here</a>.', array('@admin-settings-urlify' => url('admin/settings/urlify'), '@user-access' => url('admin/user/access'))) .'</p>'; |
$output .= '<p>'. t('By default URLify has a set of words that is ignored when creating the alias. This and the maximum amount of characters (50 by default) to use in the alias can be changed at <a href="@admin-settings-urlify">Administer » Site configuration » URLify</a>. You can change permissions <a href="@user-access">here</a>.', array('@admin-settings-urlify' => url('admin/settings/urlify'), '@user-access' => url('admin/user/access'))) .'</p>'; |
| 18 |
|
$output .= '<p>'. t('The URLify module now has support for language maps. Language maps work by replacing characters in other languages with similar ones in English. The replacement is done in the generated path alias only. For example, a node with title "Это простое испытание название" will create a path alias of "eto-prostoe-ispytanie-nazvanie". Original text in Russian '); |
| 19 |
$output .= '<p>'. t('URLify does not check for duplicates when generating the alias at the moment.') . '</p>'; |
$output .= '<p>'. t('URLify does not check for duplicates when generating the alias at the moment.') . '</p>'; |
| 20 |
return $output; |
return $output; |
| 21 |
} |
} |
| 59 |
"with" |
"with" |
| 60 |
); |
); |
| 61 |
|
|
| 62 |
|
// This may not be needed anymore since the values are now passed directly to Javascript |
| 63 |
$remove_list = preg_replace("/(\w+)/e","\"'$1'\"", variable_get('urlify_strings_to_ignore', implode(',', $default_remove_list))); |
$remove_list = preg_replace("/(\w+)/e","\"'$1'\"", variable_get('urlify_strings_to_ignore', implode(',', $default_remove_list))); |
| 64 |
|
|
| 65 |
drupal_add_js(array('urlify' => array('remove_list' => $remove_list)), 'setting'); |
drupal_add_js(array('urlify' => array('remove_list' => $remove_list)), 'setting'); |