From 3d99e66961bfc1daacea652583aef4a2c654f083 Mon Sep 17 00:00:00 2001
From: Cameron <cameron@e107coders.org>
Date: Tue, 26 Feb 2013 01:30:13 -0800
Subject: [PATCH] eUrl admin rework

---
 e107_admin/eurl.php                       | 150 ++++++++++++++++++----
 e107_core/url/news/sef_full_url.php       |   1 +
 e107_core/url/news/sef_noid_url.php       |   1 +
 e107_core/url/news/sef_url.php            |   1 +
 e107_core/url/news/url.php                |   5 +-
 e107_core/url/page/sef_noid_url.php       |   1 +
 e107_core/url/page/sef_url.php            |   1 +
 e107_core/url/page/url.php                |   5 +-
 e107_core/url/search/rewrite_url.php      |   1 +
 e107_core/url/search/url.php              |   5 +-
 e107_core/url/system/rewrite_url.php      |   1 +
 e107_core/url/system/url.php              |   1 +
 e107_core/url/user/rewrite_url.php        |   1 +
 e107_core/url/user/url.php                |   7 +-
 e107_languages/English/admin/lan_eurl.php |  53 +++++---
 e107_plugins/gallery/url/rewrite_url.php  |   3 +-
 e107_plugins/gallery/url/url.php          |   3 +-
 e107_plugins/pm/url/url.php               |   7 +-
 18 files changed, 187 insertions(+), 60 deletions(-)

diff --git a/e107_admin/eurl.php b/e107_admin/eurl.php
index d1049cb62..24f145be6 100644
--- a/e107_admin/eurl.php
+++ b/e107_admin/eurl.php
@@ -233,8 +233,17 @@ class eurl_admin_ui extends e_admin_controller_ui
 						<colgroup>
 							<col class='col-label' />
 							<col class='col-control' />
-							<col class='col-control' />
+							
 						</colgroup>
+						<thead>
+						  <tr>
+						      <th>".LAN_TYPE."</th>
+						      <th>".LAN_URL."</th>
+						     
+						  </tr>
+						</thead>
+						
+						
 						<tbody>
 		";
 		
@@ -375,6 +384,46 @@ class eurl_admin_form_ui extends e_admin_form_ui
 	{
 		return $this->getSettings();
 	}
+    
+    
+    
+    public function moreInfo($title,$info)
+    {
+        $tp = e107::getParser();
+       
+        $id = 'eurl_'.$this->name2id($title);
+        
+        $text .= "<a data-toggle='modal' href='#".$id."' data-cache='false' data-target='#".$id."' class='e-tip' title='".LAN_MOREINFO."'>";
+        $text .= $title;  
+        $text .= '</a>';
+        
+        $text .= '
+
+         <div id="'.$id.'" class="modal hide fade" tabindex="-1" role="dialog"  aria-hidden="true">
+                <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+               <h4>'.$tp->toHtml($title,false,'TITLE').'</h4>
+                </div>
+                <div class="modal-body">
+                <p>';
+        
+        $text .= $info;
+       
+                
+        $text .= '</p>
+                </div>
+                <div class="modal-footer">
+                <a href="#" data-dismiss="modal" class="btn btn-primary">Close</a>
+                </div>
+                </div>';           
+        
+        return $text;
+        
+    }
+    
+    
+    
+    
 	
 	public function moduleRows($data)
 	{
@@ -389,16 +438,29 @@ class eurl_admin_form_ui extends e_admin_form_ui
 			";
 		}
 		
+        $PLUGINS_DIRECTORY = e107::getFolder("PLUGINS");
+        $srch = array("{SITEURL}","{e_PLUGIN_ABS}");
+        $repl = array(SITEURL,SITEURL.$PLUGINS_DIRECTORY);
+        
 		foreach ($data as $obj) 
 		{
 			$admin = $obj->config->admin();
 			$section = vartrue($admin['labels'], array());
-			$text .= "
-				<tr>
-					<td>".vartrue($section['name'], eHelper::labelize($obj->module))."</td>
-					<td>
-			";
-			
+            $rowspan = count($obj->locations)+1;
+            $module = $obj->module;
+           
+          /*
+			$info .= "
+                <tr>
+                    <td rowspan='$rowspan'><a class='e-tip' style='display:block' title='".LAN_EURL_LOCATION.$path."'>
+                    ".vartrue($section['name'], eHelper::labelize($obj->module))."
+                    </a></td>
+               </tr>
+            ";
+          */
+            $opt = "";   
+			$info = "<table class='table table-striped'>";
+            
 			foreach ($obj->locations as $index => $location) 
 			{
 				$objSub = $obj->defaultLocation != $location ? eDispatcher::getConfigObject($obj->module, $location) : false; 
@@ -410,36 +472,68 @@ class eurl_admin_form_ui extends e_admin_form_ui
 				elseif($obj->defaultLocation != $location) $section = array();
 				
 				$id = 'eurl-'.str_replace('_', '-', $obj->module).'-'.$index;
-				$module = $obj->module;
+				
 				$checked = varset($obj->current[$module]) == $location ? ' checked="checked"' : '';
 				
 				$path = eDispatcher::getConfigPath($module, $location, false);
-				if(!is_readable($path)) $path = str_replace('/url.php', '/', $tp->replaceConstants(eDispatcher::getConfigPath($module, $location, true), true)).' <em>('.LAN_EURL_LOCATION_NONE.')</em>';
-				else $path = $tp->replaceConstants(eDispatcher::getConfigPath($module, $location, true), true);
-				
+				if(!is_readable($path))
+				{
+				    $path = str_replace('/url.php', '/', $tp->replaceConstants(eDispatcher::getConfigPath($module, $location, true), true)).' <em>('.LAN_EURL_LOCATION_NONE.')</em>';
+                    $diz = LAN_EURL_DEFAULT;
+                }
+				else
+				{
+				    $path = $tp->replaceConstants(eDispatcher::getConfigPath($module, $location, true), true);
+                    $diz  = (basename($path) != 'url.php' ) ? LAN_EURL_FRIENDLY : LAN_EURL_DEFAULT;
+				}
+				    
+
 				$label = vartrue($section['label'], $index == 0 ? LAN_EURL_DEFAULT : eHelper::labelize(ltrim(strstr($location, '/'), '/')));
 				$cssClass = $checked ? 'e-showme' : 'e-hideme';
 				$cssClass = 'e-hideme'; // always hidden for now, some interface changes could come after pre-alpha
-				// XXX use e_form
-				$text .= "
-				
-					<a href='#{$id}-info' class='e-expandit' title='".LAN_EURL_INFOALT."'><img src='".e_IMAGE_ABS."admin_images/info_16.png' class='icon' alt='' /></a>
-					<input type='radio' class='radio' id='{$id}' name='eurl_config[$module]' value='{$location}'{$checked} /><label for='{$id}'>".$label."</label>
-					<div class='{$cssClass}' id='{$id}-info'>
-						<div class='indent'>
-							<strong>".LAN_EURL_LOCATION."</strong> ".$path."
-							<p>".vartrue($section['description'], LAN_EURL_PROFILE_INFO)."</p>
-						</div>
-					</div>
-					<div class='spacer'><!-- --></div>
-				";
-			}
-			$text .= "
+
+				 $exampleUrl = array();
+                foreach($section['examples'] as $ex)
+                {
+                    $exampleUrl[] = str_replace($srch,$repl,$ex);    
+                    
+                }
+                
+                 if(strpos($path,'noid')!==false)
+                {
+               //     $exampleUrl .= "  &nbsp; &Dagger;";    //XXX Add footer - denotes more CPU required. ?
+                }
+                
+                $selected = varset($obj->current[$module]) == $location ? "selected='selected'" : '';
+                $opt .= "<option value='{$location}' {$selected} >".$diz.": ".$exampleUrl[0]."</option>";
+               
+				$info .= "<tr><td>".$label."
+					
 					</td>
-				</tr>
-			";
+					<td><strong>".LAN_EURL_LOCATION."</strong> ".$path."
+                    <p>".vartrue($section['description'], LAN_EURL_PROFILE_INFO)."</p><small>".implode("<br />", $exampleUrl)."</small></td></tr>
+					
+				";
+
+			}
+			$info .= "</table>";
+			
+            $title = vartrue($section['name'], eHelper::labelize($obj->module));
+             $text .= "
+                <tr>
+                    <td>".$this->moreInfo($title, $info)."</td>
+                    <td><select name='eurl_config[$module]' class='span6 tbox'>".$opt."</select></td>
+               </tr>";
 		}
 
+		
+		
+		
+		
+		
+		
+		
+		
 		/*
 		For Miro - intuitive interface example. All configs are contained within one e_url.php file. 
 		Root namespacing automatically calculated based on selection. 
diff --git a/e107_core/url/news/sef_full_url.php b/e107_core/url/news/sef_full_url.php
index 42c637bcf..a0ac2b8e8 100644
--- a/e107_core/url/news/sef_full_url.php
+++ b/e107_core/url/news/sef_full_url.php
@@ -60,6 +60,7 @@ class core_news_sef_full_url extends eUrlConfig
 				'name' => LAN_EURL_CORE_NEWS, // Module name
 				'label' => LAN_EURL_NEWS_REWRITEF_LABEL, // Current profile name
 				'description' => LAN_EURL_NEWS_REWRITEF_DESCR, //
+				'examples'  => array("{SITEURL}news/news-category/news-title","{SITEURL}news/category/new-category")
 			),
 			
 			'form' => array(), // Under construction - additional configuration options
diff --git a/e107_core/url/news/sef_noid_url.php b/e107_core/url/news/sef_noid_url.php
index 82a6a5765..2c4922012 100644
--- a/e107_core/url/news/sef_noid_url.php
+++ b/e107_core/url/news/sef_noid_url.php
@@ -244,6 +244,7 @@ class core_news_sef_noid_url extends eUrlConfig
 				'name' => LAN_EURL_CORE_NEWS, // Module name
 				'label' => LAN_EURL_NEWS_REWRITE_LABEL, // Current profile name
 				'description' => LAN_EURL_NEWS_REWRITE_DESCR, //
+				'examples'  => array("{SITEURL}news/news-title")
 			),
 			'form' => array(), // Under construction - additional configuration options
 			'callbacks' => array(), // Under construction - could be used for e.g. URL generator functionallity
diff --git a/e107_core/url/news/sef_url.php b/e107_core/url/news/sef_url.php
index ef968f6d8..0e82ee9a7 100644
--- a/e107_core/url/news/sef_url.php
+++ b/e107_core/url/news/sef_url.php
@@ -137,6 +137,7 @@ class core_news_sef_url extends eUrlConfig
 				'name' => LAN_EURL_CORE_NEWS, // Module name
 				'label' => LAN_EURL_NEWS_REWRITEX_LABEL, // Current profile name
 				'description' => LAN_EURL_NEWS_REWRITEX_DESCR, //
+				'examples'  => array('{SITEURL}news/1/news-title')
 			),
 			'form' => array(), // Under construction - additional configuration options
 			'callbacks' => array(), // Under construction - could be used for e.g. URL generator functionallity
diff --git a/e107_core/url/news/url.php b/e107_core/url/news/url.php
index 4eb210775..767a343f4 100644
--- a/e107_core/url/news/url.php
+++ b/e107_core/url/news/url.php
@@ -175,8 +175,9 @@ class core_news_url extends eUrlConfig
 		static $admin = array(
 			'labels' => array(
 				'name' => LAN_EURL_CORE_NEWS, // Module name
-				'label' => LAN_EURL_NEWS_DEFAULT_LABEL, // Current profile name
-				'description' => LAN_EURL_NEWS_DEFAULT_DESCR, //
+				'label' => LAN_EURL_DEFAULT, // Current profile name
+				'description' => LAN_EURL_LEGACY, //
+				'examples'  => array("{SITEURL}news.php?extend.1")
 			),
 			'form' => array(), // Under construction - additional configuration options
 			'callbacks' => array(), // Under construction - could be used for e.g. URL generator functionallity
diff --git a/e107_core/url/page/sef_noid_url.php b/e107_core/url/page/sef_noid_url.php
index fc92c1d30..94149207e 100644
--- a/e107_core/url/page/sef_noid_url.php
+++ b/e107_core/url/page/sef_noid_url.php
@@ -53,6 +53,7 @@ class core_page_sef_noid_url extends eUrlConfig
 				'name' => LAN_EURL_CORE_PAGE, // Module name
 				'label' => LAN_EURL_PAGE_SEFNOID_LABEL, // Current profile name
 				'description' => LAN_EURL_PAGE_SEFNOID_DESCR, //
+				'examples'  => array("{SITEURL}page/page-title")
 			),
 			'form' => array(), // Under construction - additional configuration options
 			'callbacks' => array(), // Under construction - could be used for e.g. URL generator functionallity
diff --git a/e107_core/url/page/sef_url.php b/e107_core/url/page/sef_url.php
index 1f06d46be..f6d8d7019 100644
--- a/e107_core/url/page/sef_url.php
+++ b/e107_core/url/page/sef_url.php
@@ -52,6 +52,7 @@ class core_page_sef_url extends eUrlConfig
 				'name' => LAN_EURL_CORE_PAGE, // Module name
 				'label' => LAN_EURL_PAGE_SEF_LABEL, // Current profile name
 				'description' => LAN_EURL_PAGE_SEF_DESCR, //
+				'examples'  => array("{SITEURL}page/1/page-name")
 			),
 			'form' => array(), // Under construction - additional configuration options
 			'callbacks' => array(), // Under construction - could be used for e.g. URL generator functionallity
diff --git a/e107_core/url/page/url.php b/e107_core/url/page/url.php
index c43f8b3bb..6c7be54f7 100644
--- a/e107_core/url/page/url.php
+++ b/e107_core/url/page/url.php
@@ -62,8 +62,9 @@ class core_page_url extends eUrlConfig
 		static $admin = array(
 			'labels' => array(
 				'name' => LAN_EURL_CORE_PAGE, // Module name
-				'label' => LAN_EURL_PAGE_DEFAULT_LABEL, // Current profile name
-				'description' => LAN_EURL_PAGE_DEFAULT_DESCR, //
+				'label' => LAN_EURL_DEFAULT, // Current profile name
+				'description' => LAN_EURL_LEGACY, //
+				'examples'  => array("{SITEURL}page.php?1","{SITEURL}page.php?id=1")
 			),
 			'form' => array(), // Under construction - additional configuration options
 			'callbacks' => array(), // Under construction - could be used for e.g. URL generator functionallity
diff --git a/e107_core/url/search/rewrite_url.php b/e107_core/url/search/rewrite_url.php
index 8afd9fdf9..3b1fa5354 100644
--- a/e107_core/url/search/rewrite_url.php
+++ b/e107_core/url/search/rewrite_url.php
@@ -39,6 +39,7 @@ class core_search_rewrite_url extends eUrlConfig
 				'name' => LAN_EURL_CORE_SEARCH, // Module name
 				'label' => LAN_EURL_SEARCH_REWRITE_LABEL, // Current profile name
 				'description' => LAN_EURL_SEARCH_REWRITE_DESCR, //
+				'examples'  => array("{SITEURL}search/")
 			),
 			'form' => array(), // Under construction - additional configuration options
 			'callbacks' => array(), // Under construction - could be used for e.g. URL generator functionallity
diff --git a/e107_core/url/search/url.php b/e107_core/url/search/url.php
index 151aded93..d0f3b53ad 100644
--- a/e107_core/url/search/url.php
+++ b/e107_core/url/search/url.php
@@ -53,8 +53,9 @@ class core_search_url extends eUrlConfig
 		static $admin = array(
 			'labels' => array(
 				'name' => LAN_EURL_CORE_SEARCH, // Module name
-				'label' => LAN_EURL_SEARCH_DEFAULT_LABEL, // Current profile name
-				'description' => LAN_EURL_SEARCH_DEFAULT_DESCR, //
+				'label' => LAN_EURL_DEFAULT, // Current profile name
+				'description' => LAN_EURL_LEGACY, //
+				'examples'  => array("{SITEURL}search.php")
 			),
 			'form' => array(), // Under construction - additional configuration options
 			'callbacks' => array(), // Under construction - could be used for e.g. URL generator functionallity
diff --git a/e107_core/url/system/rewrite_url.php b/e107_core/url/system/rewrite_url.php
index cc854eadb..bf4745035 100644
--- a/e107_core/url/system/rewrite_url.php
+++ b/e107_core/url/system/rewrite_url.php
@@ -42,6 +42,7 @@ class core_system_rewrite_url extends eUrlConfig
 				'name' => LAN_EURL_CORE_SYSTEM, // Module name
 				'label' => LAN_EURL_SYSTEM_REWRITE_LABEL, // Current profile name
 				'description' => LAN_EURL_SYSTEM_REWRITE_DESCR, //
+				'examples'  => array("{SITEURL}system/error404")
 			),
 			'form' => array(), // Under construction - additional configuration options
 			'callbacks' => array(), // Under construction - could be used for e.g. URL generator functionallity
diff --git a/e107_core/url/system/url.php b/e107_core/url/system/url.php
index ee2113d6f..3fd719131 100644
--- a/e107_core/url/system/url.php
+++ b/e107_core/url/system/url.php
@@ -33,6 +33,7 @@ class core_system_url extends eUrlConfig
 				'name' => LAN_EURL_CORE_SYSTEM, // Module name
 				'label' => LAN_EURL_SYSTEM_DEFAULT_LABEL, // Current profile name
 				'description' => LAN_EURL_SYSTEM_DEFAULT_DESCR, //
+				'examples'  => array("{SITEURL}?route=system/error/notfound")
 			),
 			'form' => array(), // Under construction - additional configuration options
 			'callbacks' => array(), // Under construction - could be used for e.g. URL generator functionallity
diff --git a/e107_core/url/user/rewrite_url.php b/e107_core/url/user/rewrite_url.php
index deef2a3b0..52aa4b006 100644
--- a/e107_core/url/user/rewrite_url.php
+++ b/e107_core/url/user/rewrite_url.php
@@ -63,6 +63,7 @@ class core_user_rewrite_url extends eUrlConfig
 				'name' => LAN_EURL_CORE_USER, // Module name
 				'label' => LAN_EURL_USER_REWRITE_LABEL, // Current profile name
 				'description' => LAN_EURL_USER_REWRITE_DESCR, //
+				'examples'  => array("{SITEURL}user/UserDisplayName")
 			),
 			'form' => array(), // Under construction - additional configuration options
 			'callbacks' => array(), // Under construction - could be used for e.g. URL generator functionallity
diff --git a/e107_core/url/user/url.php b/e107_core/url/user/url.php
index 85ebcff5b..0700f8053 100644
--- a/e107_core/url/user/url.php
+++ b/e107_core/url/user/url.php
@@ -104,9 +104,10 @@ class core_user_url extends eUrlConfig
 		// static may be used for performance
 		static $admin = array(
 			'labels' => array(
-				'name' => LAN_EURL_CORE_USER, // Module name
-				'label' => LAN_EURL_USER_DEFAULT_LABEL, // Current profile name
-				'description' => LAN_EURL_USER_DEFAULT_DESCR, //
+				'name'          => LAN_EURL_CORE_USER, // Module name
+				'label'         => LAN_EURL_DEFAULT, // Current profile name
+				'description'   => LAN_EURL_LEGACY, //
+				'examples'      => array("{SITEURL}user.php?id.1")
 			),
 			'form' => array(), // Under construction - additional configuration options
 			'callbacks' => array(), // Under construction - could be used for e.g. URL generator functionallity
diff --git a/e107_languages/English/admin/lan_eurl.php b/e107_languages/English/admin/lan_eurl.php
index 463f6a998..241192a08 100644
--- a/e107_languages/English/admin/lan_eurl.php
+++ b/e107_languages/English/admin/lan_eurl.php
@@ -70,49 +70,66 @@ define("LAN_EURL_UC", "Under Construction");
 
 define("LAN_EURL_CORE_MAIN", "Site Root Namespace - alias not in use.");
 
+
+define("LAN_EURL_DEFAULT",    "Default");
+define("LAN_EURL_FRIENDLY",   "Friendly");
+define("LAN_EURL_LEGACY", "Legacy direct URLs.");
+
+define("LAN_EURL_REWRITE_LABEL", "Friendly URLs");
+define("LAN_EURL_REWRITE_DESCR", "Search engine and user friendly URLs.");
+
+
 // News
 define("LAN_EURL_CORE_NEWS", "News");
-define("LAN_EURL_NEWS_DEFAULT_LABEL", "Default");
-define("LAN_EURL_NEWS_DEFAULT_DESCR", "Legacy direct URLs. Examples: <br />http://yoursite.com/news.php<br />http://yoursite.com/news.php?extend.1 <em>(view news item)</em>");
-define("LAN_EURL_NEWS_REWRITE_LABEL", "Friendly URLs without ID (no performance, more friendly)");
-define("LAN_EURL_NEWS_REWRITE_DESCR", "Demonstrates manual link parsing and assembling.<br />Examples: <br />http://yoursite.com/news<br />http://yoursite.com/news/News Title <em>(view news item)</em>");
-define("LAN_EURL_NEWS_REWRITEX_LABEL", "Friendly URLs with ID (performance wise)");
-define("LAN_EURL_NEWS_REWRITEX_DESCR", "Demonstrates automated link parsing and assembling based on predefined route rules.<br />Examples: <br />http://yoursite.com/news<br />http://yoursite.com/news/1/News Title <em>(view news item)</em>");
+//define("LAN_EURL_NEWS_DEFAULT_LABEL", "Default");
+//define("LAN_EURL_NEWS_DEFAULT_DESCR", "Legacy direct URLs.");
+
 define("LAN_EURL_NEWS_REWRITEF_LABEL", "Full Friendly URLs (no performance and most friendly)");
-define("LAN_EURL_NEWS_REWRITEF_DESCR", "Examples: <br />http://yoursite.com/news/News Category/News Title<em>(view news item)</em><br />http://yoursite.com/news/Category/News Category <em>(list news items)</em>");
+define("LAN_EURL_NEWS_REWRITEF_DESCR", "");
+
+define("LAN_EURL_NEWS_REWRITE_LABEL", "Friendly URLs without ID (no performance, more friendly)");
+define("LAN_EURL_NEWS_REWRITE_DESCR", "Demonstrates manual link parsing and assembling.");
+
+define("LAN_EURL_NEWS_REWRITEX_LABEL", "Friendly URLs with ID (performance wise)");
+define("LAN_EURL_NEWS_REWRITEX_DESCR", "Demonstrates automated link parsing and assembling based on predefined route rules.");
+
 
 // Downloads 
 //define("LAN_EURL_CORE_DOWNLOADS", "Downloads");
 
 // Users
 define("LAN_EURL_CORE_USER", "Users");
-define("LAN_EURL_USER_DEFAULT_LABEL", "Default");
-define("LAN_EURL_USER_DEFAULT_DESCR", "Legacy direct URLs. Example: http://yoursite.com/user.php?id.1");
+//define("LAN_EURL_USER_DEFAULT_LABEL", "Default");
+//define("LAN_EURL_USER_DEFAULT_DESCR", "Legacy direct URLs.");
+
 define("LAN_EURL_USER_REWRITE_LABEL", "Friendly URLs");
-define("LAN_EURL_USER_REWRITE_DESCR", "Search engine and user friendly URLs. <br />Example: http://yoursite.com/user/UserDisplayName");
+define("LAN_EURL_USER_REWRITE_DESCR", "Search engine and user friendly URLs.");
 
 // Users
 define("LAN_EURL_CORE_PAGE", "Custom Pages");
-define("LAN_EURL_PAGE_DEFAULT_LABEL", "Default");
-define("LAN_EURL_PAGE_DEFAULT_DESCR", "Legacy direct URLs. Example: http://yoursite.com/page.php?1");
+//define("LAN_EURL_PAGE_DEFAULT_LABEL", "Default");
+//define("LAN_EURL_PAGE_DEFAULT_DESCR", "Legacy direct URLs. ");
+
 define("LAN_EURL_PAGE_SEF_LABEL", "Friendly URLs with ID (performance)");
-define("LAN_EURL_PAGE_SEF_DESCR", "Search engine and user friendly URLs. <br />Example: http://yoursite.com/page/1/Page-Name");
+define("LAN_EURL_PAGE_SEF_DESCR", "Search engine and user friendly URLs.");
+
 define("LAN_EURL_PAGE_SEFNOID_LABEL", "Friendly URLs without ID (no performance, more friendly)");
-define("LAN_EURL_PAGE_SEFNOID_DESCR", "Search engine and user friendly URLs. <br />Example: http://yoursite.com/page/Page-Name");
+define("LAN_EURL_PAGE_SEFNOID_DESCR", "Search engine and user friendly URLs.");
 
 // Search
 define("LAN_EURL_CORE_SEARCH", "Search");
 define("LAN_EURL_SEARCH_DEFAULT_LABEL", "Default Search URL");
-define("LAN_EURL_SEARCH_DEFAULT_DESCR", "Legacy direct URL. Example: http://yoursite.com/search.php");
+define("LAN_EURL_SEARCH_DEFAULT_DESCR", "Legacy direct URL.");
 define("LAN_EURL_SEARCH_REWRITE_LABEL", "Friendly URL");
-define("LAN_EURL_SEARCH_REWRITE_DESCR", "Example: http://yoursite.com/search/");
+define("LAN_EURL_SEARCH_REWRITE_DESCR", "");
 
 // System
 define("LAN_EURL_CORE_SYSTEM", "System");
 define("LAN_EURL_SYSTEM_DEFAULT_LABEL", "Default System URLs");
-define("LAN_EURL_SYSTEM_DEFAULT_DESCR", "URLs for pages like Not Found, Acess denied, etc. Example: http://yoursite.com/?route=system/error/notfound");
+define("LAN_EURL_SYSTEM_DEFAULT_DESCR", "URLs for pages like Not Found, Access denied, etc.");
+
 define("LAN_EURL_SYSTEM_REWRITE_LABEL", "Friendly System URLs");
-define("LAN_EURL_SYSTEM_REWRITE_DESCR", "URLs for pages like Not Found, Acess denied, etc.<br />Example: http://yoursite.com/system/error404");
+define("LAN_EURL_SYSTEM_REWRITE_DESCR", "URLs for pages like Not Found, Access denied, etc.");
 
 // System
 define("LAN_EURL_CORE_INDEX", "Front Page");
diff --git a/e107_plugins/gallery/url/rewrite_url.php b/e107_plugins/gallery/url/rewrite_url.php
index a1d01520f..055c93a36 100644
--- a/e107_plugins/gallery/url/rewrite_url.php
+++ b/e107_plugins/gallery/url/rewrite_url.php
@@ -43,7 +43,8 @@ class plugin_gallery_rewrite_url extends eUrlConfig
 			'labels' => array(
 				'name' => 'Gallery', // Module name
 				'label' => 'Gallery SEF', // Current profile name
-				'description' => 'SEF URLs enabled. Example: http://mysite.com/gallery/My Gallery Title', //
+				'description' => 'SEF URLs enabled.',
+				'examples'      => array('{SITEURL}gallery/my-gallery-title'), //
 			),
 			'form' => array(), // Under construction - additional configuration options
 			'callbacks' => array(), // Under construction - could be used for e.g. URL generator functionallity
diff --git a/e107_plugins/gallery/url/url.php b/e107_plugins/gallery/url/url.php
index c45f3936f..7e123b3ad 100644
--- a/e107_plugins/gallery/url/url.php
+++ b/e107_plugins/gallery/url/url.php
@@ -39,7 +39,8 @@ class plugin_gallery_url extends eUrlConfig
 			'labels' => array(
 				'name' => 'Gallery', // Module name
 				'label' => 'Gallery default', // Current profile name
-				'description' => 'SEF URLs disabled. Example: http://mysite.com/gallery/?cat=gallery_1', //
+				'description' => 'SEF URLs disabled.', //
+				'examples'  => array("{e_PLUGIN_ABS}gallery/?cat=gallery_1")
 			),
 			'form' => array(), // Under construction - additional configuration options
 			'callbacks' => array(), // Under construction - could be used for e.g. URL generator functionallity
diff --git a/e107_plugins/pm/url/url.php b/e107_plugins/pm/url/url.php
index 8256f161f..4f9fc4739 100644
--- a/e107_plugins/pm/url/url.php
+++ b/e107_plugins/pm/url/url.php
@@ -147,9 +147,10 @@ class plugin_pm_url extends eUrlConfig
 		e107::plugLan('pm', 'admin_pm', true);
 		static $admin = array(
 			'labels' => array(
-				'name' => ADLAN_PM, // Module name
-				'label' => ADLAN_PM_URL_DEFAULT_LABEL, // Current profile name
-				'description' => ADLAN_PM_URL_DEFAULT_DESCR, //
+				'name'          => LAN_PLUGIN_PM_NAME, // Module name
+				'label'         => LAN_PLUGIN_PM_URL_DEFAULT_LABEL, // Current profile name
+				'description'   => LAN_PLUGIN_PM_URL_DEFAULT_DESCR, //
+				'examples'      => array("{e_PLUGIN_ABS}pm/pm.php")
 			),
 			'form' => array(), // Under construction - additional configuration options
 			'callbacks' => array(), // Under construction - could be used for e.g. URL generator functionallity