Hello
maybe you can add new option for Punctuation select.
I needed to be replaced . to _

I added new option and it works

From 1ec534811b603654d3b739f47cd03ccc3fd7cfac Mon Sep 17 00:00:00 2001
From: Alexey Mazheika <mozh.by@gmail.com>
Date: Tue, 25 Oct 2016 12:11:40 +0300
Subject: [PATCH] HACK pathauto module. Added custom separator _

---
 sites/all/modules/pathauto/pathauto.admin.inc | 1 +
 sites/all/modules/pathauto/pathauto.inc       | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/sites/all/modules/pathauto/pathauto.admin.inc b/sites/all/modules/pathauto/pathauto.admin.inc
index b210386..f21af28 100644
--- a/sites/all/modules/pathauto/pathauto.admin.inc
+++ b/sites/all/modules/pathauto/pathauto.admin.inc
@@ -198,6 +198,7 @@ function pathauto_settings_form($form) {
       '#options' => array(
         PATHAUTO_PUNCTUATION_REMOVE => t('Remove'),
         PATHAUTO_PUNCTUATION_REPLACE => t('Replace by separator'),
+	 PATHAUTO_PUNCTUATION_REPLACE_ => t('Replace by _'),
         PATHAUTO_PUNCTUATION_DO_NOTHING => t('No action (do not replace)'),
       ),
     );
diff --git a/sites/all/modules/pathauto/pathauto.inc b/sites/all/modules/pathauto/pathauto.inc
index 9699aa0..ae3c143 100644
--- a/sites/all/modules/pathauto/pathauto.inc
+++ b/sites/all/modules/pathauto/pathauto.inc
@@ -52,6 +52,9 @@ define('PATHAUTO_PUNCTUATION_REPLACE', 1);
  */
 define('PATHAUTO_PUNCTUATION_DO_NOTHING', 2);
 
+
+define('PATHAUTO_PUNCTUATION_REPLACE_', 3);
+
 /**
  * Check to see if there is already an alias pointing to a different item.
  *
@@ -151,6 +154,9 @@ function pathauto_cleanstring($string, array $options = array()) {
         case PATHAUTO_PUNCTUATION_REPLACE:
           $cache['punctuation'][$details['value']] = $cache['separator'];
           break;
+	 case PATHAUTO_PUNCTUATION_REPLACE_:
+          $cache['punctuation'][$details['value']] = '_';
+          break;
         case PATHAUTO_PUNCTUATION_DO_NOTHING:
           // Literally do nothing.
           break;
-- 
2.7.4.1.g5468f9e
Files: 
CommentFileSizeAuthor
example.png23.5 KBmozh92

Comments

mozh92 created an issue.