From 84485c50daf204e850c232706bce36abe2846633 Mon Sep 17 00:00:00 2001
From: Cameron <e107inc@gmail.com>
Date: Fri, 26 Jun 2015 10:26:47 -0700
Subject: [PATCH 01/14] Forum: Fixes #1079 - broken 'move' url.

---
 e107_plugins/forum/e_url.php                         |  4 ++++
 e107_plugins/forum/forum_post.php                    | 11 +++++++++--
 e107_plugins/forum/forum_viewforum.php               | 12 ++++++++----
 e107_plugins/forum/forum_viewtopic.php               |  3 ++-
 .../forum/shortcodes/batch/view_shortcodes.php       |  3 +--
 index.php                                            |  7 +++++++
 6 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/e107_plugins/forum/e_url.php b/e107_plugins/forum/e_url.php
index 43280bbaf..1d135e9bd 100644
--- a/e107_plugins/forum/e_url.php
+++ b/e107_plugins/forum/e_url.php
@@ -43,6 +43,10 @@ class forum_url // plugin-folder + '_url'
 			'redirect'		=> '{e_PLUGIN}forum/forum_post.php',
 		);
 
+		$config['move'] = array(
+			'sef'           => 'forum/post/?f=move&amp;id={thread_id}',
+		);
+
 		$config['topic'] = array(
 			'regex'			=> '^forum/(.*)/(\d*)-([\w-]*)/?\??(.*)',
 			'sef'			=> 'forum/{forum_sef}/{thread_id}-{thread_sef}/',
diff --git a/e107_plugins/forum/forum_post.php b/e107_plugins/forum/forum_post.php
index 93febe574..5ffd109df 100644
--- a/e107_plugins/forum/forum_post.php
+++ b/e107_plugins/forum/forum_post.php
@@ -132,10 +132,8 @@ class forum_post_handler
 				break;
 
 			case 'edit':
-			case 'move':
 			case "quote":
 			case "report":
-
 				$postInfo               = $this->forumObj->postGet($this->post, 'post');
 				$forumInfo              = $this->forumObj->forumGet($postInfo['post_forum']);
 				$data                   = array_merge($postInfo ,$forumInfo);
@@ -144,6 +142,15 @@ class forum_post_handler
 				return $data;
 				break;
 
+			case 'move':
+				$thread                 = $this->forumObj->threadGet($this->id, true);
+				$extra                  = $this->forumObj->postGet($this->id,0,1);  // get first post.
+				$data                   = array_merge($thread,$extra[0]);
+				$data['action']         = $this->action;
+				$this->setPageTitle($data);
+				return $data;
+				break;
+
 			default:
 				$url = e107::url('forum','index',null,'full');
 				$this->redirect($url);
diff --git a/e107_plugins/forum/forum_viewforum.php b/e107_plugins/forum/forum_viewforum.php
index 12e822adc..269b14d1b 100644
--- a/e107_plugins/forum/forum_viewforum.php
+++ b/e107_plugins/forum/forum_viewforum.php
@@ -591,12 +591,15 @@ function parse_thread($thread_info)
 		// FIXME _URL_ thread name
 		// e107::getUrl()->create('forum/forum/view', "id={$thread_info['thread_forum_id']}")
 		// USED self instead
+
+		$moveUrl        = e107::url('forum','move', $thread_info);
+
 		$tVars->ADMIN_ICONS = "
 		<form method='post' action='".e_REQUEST_URI."' id='frmMod_{$forumId}_{$threadId}' style='margin:0;'><div>
 		<input type='image' ".IMAGE_admin_delete." name='deleteThread_{$threadId}' value='thread_action' onclick=\"return confirm_({$threadId})\" />
 		".($thread_info['thread_sticky'] == 1 ? "<input type='image' ".IMAGE_admin_unstick." name='unstick_{$threadId}' value='thread_action' /> " : "<input type='image' ".IMAGE_admin_stick." name='stick_{$threadId}' value='thread_action' /> ")."
 		".($thread_info['thread_active'] ? "<input type='image' ".IMAGE_admin_lock." name='lock_{$threadId}' value='thread_action' /> " : "<input type='image' ".IMAGE_admin_unlock." name='unlock_{$threadId}' value='thread_action' /> "). "
-		<a href='".e107::getUrl()->create('forum/thread/move', "id={$threadId}")."'>".IMAGE_admin_move.'</a>
+		<a href='".$moveUrl."'>".IMAGE_admin_move.'</a>
 		</div></form>
 		';
 		
@@ -744,15 +747,16 @@ function fadminoptions($thread_info)
 	$tp = e107::getParser();
 	
 //	$text = "<form method='post' action='".e_REQUEST_URI."' id='frmMod_{$forumId}_{$threadId}' style='margin:0;'>";
-	$text .= '<div class="btn-group"><button class="btn btn-default btn-sm btn-mini dropdown-toggle" data-toggle="dropdown">
+	$text = '<div class="btn-group"><button class="btn btn-default btn-sm btn-mini dropdown-toggle" data-toggle="dropdown">
     <span class="caret"></span>
     </button>
     <ul class="dropdown-menu pull-right">	
    ';
    
 	//FIXME - not fully working. 
-	
-	$moveUrl 		= e107::getUrl()->create('forum/thread/move', "id=".$thread_info['thread_id']);
+
+	$moveUrl        = e107::url('forum','move', $thread_info);
+
 	$lockUnlock 	= ($thread_info['thread_active'] ) ? 'lock' : 'unlock';
 	$stickUnstick 	= ($thread_info['thread_sticky'] == 1) ? 'unstick' : 'stick';
 	$id = intval($thread_info['thread_id']);
diff --git a/e107_plugins/forum/forum_viewtopic.php b/e107_plugins/forum/forum_viewtopic.php
index 43fd8f05e..4e2063a21 100644
--- a/e107_plugins/forum/forum_viewtopic.php
+++ b/e107_plugins/forum/forum_viewtopic.php
@@ -539,7 +539,8 @@ function showmodoptions()
 		";
 	if ($type == 'Thread')
 	{
-		$ret .= "<a href='" . $e107->url->create('forum/thread/move', array('id' => $postInfo['post_id']))."'>" . IMAGE_admin_move2 . "</a>";
+		$moveUrl     = e107::url('forum','move', array('thread_id'=>$postInfo['post_thread']));
+		$ret .= "<a href='" . $moveUrl."'>" . IMAGE_admin_move2 . "</a>";
 	}
 	else
 	{
diff --git a/e107_plugins/forum/shortcodes/batch/view_shortcodes.php b/e107_plugins/forum/shortcodes/batch/view_shortcodes.php
index 679f39bae..b3f5a0847 100644
--- a/e107_plugins/forum/shortcodes/batch/view_shortcodes.php
+++ b/e107_plugins/forum/shortcodes/batch/view_shortcodes.php
@@ -564,8 +564,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
 		
 			if ($type == 'thread')
 			{
-				$url = e107::url('forum','post')."?f=move&amp;id=".$this->postInfo['post_thread']."&amp;post=".$this->postInfo['post_id'];
-				// $url = e107::getUrl()->create('forum/thread/move', array('id' => $this->postInfo['post_id'], 'post'=>$this->postInfo['post_id']));
+				$url     = e107::url('forum','move', array('thread_id'=>$this->postInfo['post_thread']));
 				$text .= "<li class='text-right'><a href='" . $url."'>".LAN_FORUM_2042." ".$tp->toGlyph('move')."</a></a></li>";
 			}
 			else //TODO
diff --git a/index.php b/index.php
index 082e74912..798c51ce2 100644
--- a/index.php
+++ b/index.php
@@ -100,6 +100,13 @@
 			foreach($cfg as $k=>$v)
 			{
 
+				if(empty($v['regex']))
+				{
+				//	e107::getMessage()->addDebug("Skipping empty regex: <b>".$k."</b>");
+					continue;
+				}
+
+
 				if(!empty($v['alias']))
 				{
 					$alias = (!empty($pref['e_url_alias'][e_LAN][$plug][$k])) ? $pref['e_url_alias'][e_LAN][$plug][$k] : $v['alias'];

From 91efe837f3c379b67d5684515889f372b6e01247 Mon Sep 17 00:00:00 2001
From: Cameron <e107inc@gmail.com>
Date: Fri, 26 Jun 2015 10:55:20 -0700
Subject: [PATCH 02/14] Fixes #1081 - Html Validation

---
 e107_plugins/search_menu/search_menu.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/e107_plugins/search_menu/search_menu.php b/e107_plugins/search_menu/search_menu.php
index ebe5fbb21..022be9359 100644
--- a/e107_plugins/search_menu/search_menu.php
+++ b/e107_plugins/search_menu/search_menu.php
@@ -66,7 +66,7 @@ if(deftrue('BOOTSTRAP'))
 	$text = '
 	<form class="form-inline" method="get" action="'.e_HTTP.'search.php">
 	<div class="input-group">
-		<input class="form-control search" type="text" name="q" size="20" maxlength="50" '.$value_text.'>
+		<input class="form-control search" type="text" name="q" size="20" maxlength="50" '.$value_text.' />
 		<input type="hidden" name="r" value="0" />';
 	
 	if (isset($custom_query[4]) && $custom_query[4] != '') 

From 287892557127bec9f2977a2936665743a8344ebc Mon Sep 17 00:00:00 2001
From: mcpeace-maw <mcpeace.manatwork@gmail.com>
Date: Fri, 26 Jun 2015 21:19:55 +0300
Subject: [PATCH 03/14] Update blogcalendar_menu.php

---
 e107_plugins/blogcalendar_menu/blogcalendar_menu.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/e107_plugins/blogcalendar_menu/blogcalendar_menu.php b/e107_plugins/blogcalendar_menu/blogcalendar_menu.php
index 70fbd659a..64ed0cd26 100644
--- a/e107_plugins/blogcalendar_menu/blogcalendar_menu.php
+++ b/e107_plugins/blogcalendar_menu/blogcalendar_menu.php
@@ -166,10 +166,10 @@ if(false === $cached)
 	
 	if(deftrue('BOOTSTRAP')) // v2.x
 	{
-		$month_selector = '<div class="btn-group pull-right"><a class="btn btn-mini btn-default btn-xs " href="#blogCalendar" data-slide="prev">‹</a>  
- 		<a class="btn btn-mini btn-default btn-xs" href="#blogCalendar" data-slide="next">›</a></div>';
+		$month_selector = '<span class="btn-group pull-right"><a class="btn btn-mini btn-default btn-xs " href="#blogCalendar" data-slide="prev">‹</a>  
+ 		<a class="btn btn-mini btn-default btn-xs" href="#blogCalendar" data-slide="next">›</a></span>';
 		 
-		$caption = "<div class='inline-text'>".BLOGCAL_L1." ".$month_selector."</div>";	
+		$caption = "<span class='inline-text'>".BLOGCAL_L1." ".$month_selector."</span>";	
 		
 		$menu = "<div id='blogCalendar' data-interval='false' class='carousel slide blogcalendar-block text-center'>";
 		$menu .= "<div class='blogcalendar-day-selector carousel-inner'>";
@@ -221,4 +221,4 @@ if(false === $cached)
 }
 
 echo $cached;
-?>
\ No newline at end of file
+?>

From 66f68451c27912da943e3ca86d0f6c7b8ac10065 Mon Sep 17 00:00:00 2001
From: mcpeace-maw <mcpeace.manatwork@gmail.com>
Date: Sat, 27 Jun 2015 00:51:46 +0300
Subject: [PATCH 04/14] Update forum_icons_template.php

This is the support for font icons in the forum front end. I try it and works.
---
 .../forum/templates/forum_icons_template.php  | 27 ++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/e107_plugins/forum/templates/forum_icons_template.php b/e107_plugins/forum/templates/forum_icons_template.php
index 240740c6b..d87017f3e 100644
--- a/e107_plugins/forum/templates/forum_icons_template.php
+++ b/e107_plugins/forum/templates/forum_icons_template.php
@@ -12,6 +12,29 @@
 
 if (!defined('e107_INIT')) { exit(); }
 
+$tp = e107::getParser();
+if(deftrue("FONTAWESOME", 4)) {
+
+define('IMAGE_e', 					'e');
+define('IMAGE_new', 				$tp->toGlyph('fa-star', 'size=2x'));
+define('IMAGE_nonew', 				$tp->toGlyph('fa-comment', 'size=2x'));
+define('IMAGE_new_small',  			$tp->toGlyph('fa-star'));
+define('IMAGE_nonew_small',  		$tp->toGlyph('fa-comment-o'));
+define('IMAGE_new_popular',  		$tp->toGlyph('fa-comments', 'size=2x'));
+define('IMAGE_nonew_popular', 		$tp->toGlyph('fa-comments-o', 'size=2x'));
+define('IMAGE_new_popular_small',  	$tp->toGlyph('fa-comments'));
+define('IMAGE_nonew_popular_small', $tp->toGlyph('fa-comments-o'));
+define('IMAGE_sticky',  			$tp->toGlyph('fa-thumb-tack', 'size=2x'));
+define('IMAGE_stickyclosed',  		$tp->toGlyph('fa-lock', 'size=2x'));
+define('IMAGE_sticky_small', 		$tp->toGlyph('fa-thumb-tack'));
+define('IMAGE_stickyclosed_small',  $tp->toGlyph('fa-lock'));
+define('IMAGE_announce',  			$tp->toGlyph('fa-bullhorn', 'size=2x'));
+define('IMAGE_announce_small',  	$tp->toGlyph('fa-bullhorn'));
+define('IMAGE_closed_small',  		$tp->toGlyph('fa-lock'));
+define('IMAGE_closed', 				$tp->toGlyph('fa-lock', 'size=2x'));
+    
+} else {
+
 // Thread info
 define('IMAGE_e', 					'<img src="'.img_path('e.png').'" alt="" title="" />');
 define('IMAGE_new', 				'<img src="'.img_path('new.png').'" alt="'.LAN_FORUM_4001.'" title="'.LAN_FORUM_4001.'" />');
@@ -31,6 +54,8 @@ define('IMAGE_announce_small', 		'<img src="'.img_path('announce_small.png').'"
 define('IMAGE_closed_small', 		'<img src="'.img_path('closed_small.png').'" alt="'.LAN_FORUM_1014.'" title="'.LAN_FORUM_1014.'" />');
 define('IMAGE_closed', 				'<img src="'.img_path('closed.png').'" alt="'.LAN_FORUM_1014.'" title="'.LAN_FORUM_1014.'" />');
 
+}
+
 // User info
 define('IMAGE_website', '<img src="'.img_path('website.png').'" alt="'.LAN_FORUM_2034.'" title="'.LAN_FORUM_2034.'" />');
 define('IMAGE_email', 	'<img src="'.img_path('email.png').'" alt="'.LAN_FORUM_2044.'" title="'.LAN_FORUM_2044.'" />');
@@ -65,4 +90,4 @@ define('IMAGE_rank_moderator_image',	'<img src="'.img_path('moderator.png', '',
 define('IMAGE_rank_main_admin_image',	'<img src="'.img_path('main_admin.png', '', 'rank_main_admin_image').'" alt="" />');
 define('IMAGE_rank_admin_image', 		'<img src="'.img_path('admin.png', '', 'rank_admin_image').'" alt="" />');
 
-?>
\ No newline at end of file
+?>

From 78b904924a1d46def3b8882c7dd42d62f7614b3a Mon Sep 17 00:00:00 2001
From: Cameron <e107inc@gmail.com>
Date: Fri, 26 Jun 2015 18:13:08 -0700
Subject: [PATCH 05/14] Forum: Fixes #1085 - broken icon paths when using SEF
 Urls.

---
 e107_plugins/forum/forum_class.php | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/e107_plugins/forum/forum_class.php b/e107_plugins/forum/forum_class.php
index d3a4159e5..d3fb5759b 100644
--- a/e107_plugins/forum/forum_class.php
+++ b/e107_plugins/forum/forum_class.php
@@ -2116,7 +2116,7 @@ function img_path($filename)
 
 		if(file_exists(THEME.'forum/'.$filename) || is_readable(THEME.'forum/'.e_LANGUAGE.'_'.$filename))
 		{
-			$image = ($ML && is_readable(THEME.'forum/'.e_LANGUAGE.'_'.$filename)) ? THEME.'forum/'.e_LANGUAGE."_".$filename :  THEME.'forum/'.$filename;
+			$image = ($ML && is_readable(THEME.'forum/'.e_LANGUAGE.'_'.$filename)) ? THEME_ABS.'forum/'.e_LANGUAGE."_".$filename :  THEME_ABS.'forum/'.$filename;
 		}
 		else
 		{
@@ -2124,22 +2124,22 @@ function img_path($filename)
 			{
 				if($ML)
 				{
-                	$image = (is_readable(e_PLUGIN.'forum/images/icons/'.e_LANGUAGE.'_'.$filename)) ? e_PLUGIN.'forum/images/icons/'.e_LANGUAGE.'_'.$filename : e_PLUGIN.'forum/images/icons/English_'.$filename;
+                	$image = (is_readable(e_PLUGIN.'forum/images/icons/'.e_LANGUAGE.'_'.$filename)) ? e_PLUGIN_ABS.'forum/images/icons/'.e_LANGUAGE.'_'.$filename : e_PLUGIN_ABS.'forum/images/icons/English_'.$filename;
 				}
 				else
 				{
-                	$image = e_PLUGIN.'forum/images/icons/'.$filename;
+                	$image = e_PLUGIN_ABS.'forum/images/icons/'.$filename;
 				}
 			}
 			else
 			{
 				if($ML)
 				{
-					$image = (is_readable(e_PLUGIN."forum/images/lite/".e_LANGUAGE.'_'.$filename)) ? e_PLUGIN.'forum/images/icons/'.e_LANGUAGE.'_'.$filename : e_PLUGIN.'forum/images/icons/English_'.$filename;
+					$image = (is_readable(e_PLUGIN."forum/images/lite/".e_LANGUAGE.'_'.$filename)) ? e_PLUGIN_ABS.'forum/images/icons/'.e_LANGUAGE.'_'.$filename : e_PLUGIN_ABS.'forum/images/icons/English_'.$filename;
 				}
 				else
                 {
-           			$image = e_PLUGIN.'forum/images/icons/'.$filename;
+           			$image = e_PLUGIN_ABS.'forum/images/icons/'.$filename;
 				}
 
 			}

From f2116a5d24463de29eb7ed30a542a09764c122a8 Mon Sep 17 00:00:00 2001
From: Cameron <e107inc@gmail.com>
Date: Fri, 26 Jun 2015 20:24:53 -0700
Subject: [PATCH 06/14] Some LAN cleanup. Admin Area caption issue (on legacy
 plugins) corrected.

---
 e107_admin/eurl.php                      |  6 +++---
 e107_core/templates/contact_template.php |  2 +-
 e107_handlers/e_parse_class.php          |  8 ++++++++
 e107_languages/English/lan_contact.php   |  2 +-
 e107_languages/English/lan_signup.php    |  6 +++---
 e107_plugins/pm/languages/English.php    |  9 ++-------
 e107_plugins/pm/pm_class.php             |  4 +++-
 e107_plugins/pm/private_msg_menu.php     |  2 +-
 e107_themes/bootstrap/admin_template.php |  7 +++----
 e107_themes/bootstrap/admin_theme.php    | 14 +++++++-------
 10 files changed, 32 insertions(+), 28 deletions(-)

diff --git a/e107_admin/eurl.php b/e107_admin/eurl.php
index 27d2d99f9..12ea535c6 100644
--- a/e107_admin/eurl.php
+++ b/e107_admin/eurl.php
@@ -321,7 +321,7 @@ class eurl_admin_ui extends e_admin_controller_ui
 	
 	public function SettingsPage()
 	{
-		$this->addTitle(LAN_EURL_NAME_SETTINGS);
+		//$this->addTitle(LAN_EURL_NAME_SETTINGS);
 		return $this->getUI()->urlSettings();
 	}
 	
@@ -357,7 +357,7 @@ class eurl_admin_ui extends e_admin_controller_ui
 	
 	public function AliasPage()
 	{
-		$this->addTitle(LAN_EURL_NAME_ALIASES);
+	//	$this->addTitle(LAN_EURL_NAME_ALIASES);
 		
 		$aliases = e107::getPref('url_aliases', array());
 		
@@ -412,7 +412,7 @@ class eurl_admin_ui extends e_admin_controller_ui
 	
 	public function ConfigPage()
 	{
-		$this->addTitle(LAN_EURL_NAME_CONFIG);
+		// $this->addTitle(LAN_EURL_NAME_CONFIG);
 		$active = e107::getPref('url_config');
 
 		$set = array();
diff --git a/e107_core/templates/contact_template.php b/e107_core/templates/contact_template.php
index bd2cb2dde..58d1e18ab 100644
--- a/e107_core/templates/contact_template.php
+++ b/e107_core/templates/contact_template.php
@@ -60,7 +60,7 @@ $CONTACT_TEMPLATE['menu'] =  '
 	// In this case (see contact.php) e107::getScBatch('contact')->wrapper('contact/form')
 	// Only one Option is used - WRAPPER > SC_STYLE
 
-	$CONTACT_WRAPPER['form']['CONTACT_IMAGECODE'] 			= "<tr><td>".LANCONTACT_16."<br />{---}";
+	$CONTACT_WRAPPER['form']['CONTACT_IMAGECODE'] 			= "<tr><td>".LAN_ENTER_CODE."<br />{---}";
 	$CONTACT_WRAPPER['form']['CONTACT_IMAGECODE_INPUT'] 	= "{---}</td></tr>";
 	$CONTACT_WRAPPER['form']['CONTACT_EMAIL_COPY'] 			= "<tr><td>{---}".LANCONTACT_07."</td></tr>";
 	$CONTACT_WRAPPER['form']['CONTACT_PERSON']				= "<tr><td>".LANCONTACT_14."<br />{---}</td></tr>";
diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php
index 5aace55e9..76924100a 100644
--- a/e107_handlers/e_parse_class.php
+++ b/e107_handlers/e_parse_class.php
@@ -2811,6 +2811,7 @@ class e_parser
 	 * @param $lan - string LAN
 	 * @param string | array $vals - either a single value, which will replace '[x]' or an array with key=>value pairs.
 	 * @example $tp->lanVars("My name is [x] and I own a [y]", array('x'=>"John", 'y'=>"Cat"));
+	 * @example $tp->lanVars("My name is [x] and I own a [y]", array("John","Cat"));
 	 * @return string
 	 */
 	function lanVars($lan, $vals, $bold=false)
@@ -2821,8 +2822,15 @@ class e_parser
 		$search = array();
 		$replace = array();
 
+		$defaults = array('x', 'y', 'z');
+
 		foreach($array as $k=>$v)
 		{
+			if(is_numeric($k)) // convert array of numeric to x,y,z
+			{
+				$k = $defaults[$k];
+			}
+
 			$search[] = "[".$k."]";
 			$replace[] = ($bold===true) ? "<strong>".$v."</strong>" : $v;
 		}
diff --git a/e107_languages/English/lan_contact.php b/e107_languages/English/lan_contact.php
index ba2be6e2d..1755bc012 100644
--- a/e107_languages/English/lan_contact.php
+++ b/e107_languages/English/lan_contact.php
@@ -31,4 +31,4 @@ define("LANCONTACT_13", "Please include a subject.");
 
 define("LANCONTACT_14", "Send message to:");
 define("LANCONTACT_15", "Incorrect code entered");
-define("LANCONTACT_16", "Enter Code");
+
diff --git a/e107_languages/English/lan_signup.php b/e107_languages/English/lan_signup.php
index 2f10d475f..52602da6b 100644
--- a/e107_languages/English/lan_signup.php
+++ b/e107_languages/English/lan_signup.php
@@ -23,9 +23,9 @@ define("PAGE_NAME", "Register");
 //define("LAN_106", "That doesn't appear to be a valid email address");
 define("LAN_108", "Registration complete");
 define("LAN_185", "You left required field(s) blank");
-define("LAN_201", "Yes");
-define("LAN_200", "No");
-define("LAN_399", "Continue");
+// define("LAN_201", "Yes");
+// define("LAN_200", "No");
+// define("LAN_399", "Continue");
 define("LAN_407", "Please keep this email for your own information. Your password has been encrypted and cannot be retrieved if you misplace or forget it. You can however request a new password if this happens.\n\nThanks for your registration.\n\nFrom");
 //define("LAN_408", "A user with that email address already exists. Please use the 'forgot password' screen to retrieve your password.");
 
diff --git a/e107_plugins/pm/languages/English.php b/e107_plugins/pm/languages/English.php
index 5dcaf2340..a19a7316e 100755
--- a/e107_plugins/pm/languages/English.php
+++ b/e107_plugins/pm/languages/English.php
@@ -71,12 +71,8 @@ define('LAN_PM_67', 'No users blocked');
 define('LAN_PM_68', 'User Name');
 define('LAN_PM_69', 'Date blocked');
 define('LAN_PM_70', 'Deleting block on user');
-define('LAN_PM_71', '--GOOD-- attachment(s) deleted. --FAIL-- failure(s)');
-define('LAN_PM_72', '');
-define('LAN_PM_73', '');
-define('LAN_PM_74', '');
-define('LAN_PM_75', '');
-define('LAN_PM_76', '');
+define('LAN_PM_71', '[x] attachment(s) deleted. [y] failure(s)');
+
 
 define("LAN_PM_100", "New PM from ");
 define("LAN_PM_101", "You have received a new Private Message from ");
@@ -88,6 +84,5 @@ define("LAN_PM_106", "PM read by ");
 define("LAN_PM_107", "The Private Message you sent to {UNAME} was read on ");
 define("LAN_PM_108", "Message sent on: ");
 define("LAN_PM_109", "New Message(s)");
-define("LAN_PM_110", "ok");
 define("LAN_PM_111", "Read");
 ?>
\ No newline at end of file
diff --git a/e107_plugins/pm/pm_class.php b/e107_plugins/pm/pm_class.php
index 0eb5c788b..8d2c0dc8c 100755
--- a/e107_plugins/pm/pm_class.php
+++ b/e107_plugins/pm/pm_class.php
@@ -316,7 +316,9 @@ class private_message
 				}
 				if ($aCount[0] || $aCount[1])
 				{
-					$ret .= str_replace(array('--GOOD--', '--FAIL--'), $aCount, LAN_PM_71).'<br />';
+
+				//	$ret .= str_replace(array('--GOOD--', '--FAIL--'), $aCount, LAN_PM_71).'<br />';
+					$ret .= e107::getParser()->lanVars(LAN_PM_71, $aCount);
 				}
 				$sql->delete('private_msg', 'pm_id = '.$pmid);
 			}
diff --git a/e107_plugins/pm/private_msg_menu.php b/e107_plugins/pm/private_msg_menu.php
index b59655d15..3dacde3ac 100755
--- a/e107_plugins/pm/private_msg_menu.php
+++ b/e107_plugins/pm/private_msg_menu.php
@@ -54,7 +54,7 @@ if(!function_exists('pm_show_popup'))
 				<td width=100% style='text-align:center'>
 					<b>--- ".LAN_PM." ---</b><br />".$pm_inbox['inbox']['new'].' '.LAN_PM_109."<br />".$pm_inbox['inbox']['unread'].' '.LAN_PM_37."<br /><br />
 					<form>
-						<input class=\'button\' type=\'submit\' onclick=\'self.close();\' value = \'".LAN_PM_110."\' />
+						<input class=\'button\' type=\'submit\' onclick=\'self.close();\' value = \'".LAN_OK."\' />
 					</form>
 				</td>
 			</tr>
diff --git a/e107_themes/bootstrap/admin_template.php b/e107_themes/bootstrap/admin_template.php
index aa664a4de..8c199bff8 100644
--- a/e107_themes/bootstrap/admin_template.php
+++ b/e107_themes/bootstrap/admin_template.php
@@ -199,7 +199,7 @@ $ADMIN_HEADER .= '<div class="container-fluid">
 			{ADMIN_MENU}
 			{ADMIN_MENUMANAGER} 
 			
-		
+
 			{ADMIN_PWORD}
 			{SETSTYLE=site_info}
 
@@ -216,11 +216,10 @@ $ADMIN_HEADER .= '<div class="container-fluid">
 			
 		
 			
-			{SETSTYLE=none}
+			{SETSTYLE=default}
 			
          </div>
         <div class="span10" id="right-panel" >
-        
         ';
 
 
@@ -231,7 +230,7 @@ $ADMIN_FOOTER = '
 
     </div><!--/.fluid-container-->
     <footer class="center mute"> 
-		Copyright &copy; 2008-2013 e107 Inc (e107.org)<br />
+		Copyright &copy; 2008-2015 e107 Inc (e107.org)<br />
       </footer>';
 
 
diff --git a/e107_themes/bootstrap/admin_theme.php b/e107_themes/bootstrap/admin_theme.php
index ce64d2d07..01c30006e 100644
--- a/e107_themes/bootstrap/admin_theme.php
+++ b/e107_themes/bootstrap/admin_theme.php
@@ -54,15 +54,15 @@ $no_core_css = TRUE;
 class bootstrap_admintheme
 {
 
-	function tablestyle($caption, $text, $mode) 
+	function tablestyle($caption, $text, $mode, $data)
 	{
-		global $style;
-		
+		// global $style;
+
+		$style = $data['setStyle'];
+
+	//	echo "Style: ".$style;
 		$class = '';
-		
-	
-		
-		
+
 		if(is_string($mode) && $mode == 'admin_help') $class = ' '.str_replace('_', '-', $mode);
 			
 		if($mode == 'e_help')

From 9f6704ac71e28833859f8cdf280a4546ec8a3422 Mon Sep 17 00:00:00 2001
From: mcpeace-maw <mcpeace.manatwork@gmail.com>
Date: Sat, 27 Jun 2015 09:38:27 +0300
Subject: [PATCH 07/14] Update theme.php

---
 e107_themes/bootstrap3/theme.php | 23 +----------------------
 1 file changed, 1 insertion(+), 22 deletions(-)

diff --git a/e107_themes/bootstrap3/theme.php b/e107_themes/bootstrap3/theme.php
index 4f9728ac0..b716cee75 100644
--- a/e107_themes/bootstrap3/theme.php
+++ b/e107_themes/bootstrap3/theme.php
@@ -853,25 +853,4 @@ $NEWSCAT_ITEM = "\n\n\n\n<!-- News Category Item -->\n\n\n\n
 		</td></tr></table></div>
 ";
 
-$tp = e107::getParser();
-// Used by Forum plugin.
-
-	define('IMAGE_e', 					'e');
-	define('IMAGE_new', 				$tp->toGlyph('fa-star', 'size=2x'));
-	define('IMAGE_nonew', 				$tp->toGlyph('fa-comment', 'size=2x'));
-	define('IMAGE_new_small',  			$tp->toGlyph('fa-star'));
-	define('IMAGE_nonew_small',  		$tp->toGlyph('fa-comment-o'));
-	define('IMAGE_new_popular',  		$tp->toGlyph('fa-comments', 'size=2x'));
-	define('IMAGE_nonew_popular', 		$tp->toGlyph('fa-comments-o', 'size=2x'));
-	define('IMAGE_new_popular_small',  	$tp->toGlyph('fa-comments'));
-	define('IMAGE_nonew_popular_small', $tp->toGlyph('fa-comments-o'));
-	define('IMAGE_sticky',  			$tp->toGlyph('fa-thumb-tack', 'size=2x'));
-	define('IMAGE_stickyclosed',  		$tp->toGlyph('fa-lock', 'size=2x'));
-	define('IMAGE_sticky_small', 		$tp->toGlyph('fa-thumb-tack'));
-	define('IMAGE_stickyclosed_small',  $tp->toGlyph('fa-lock'));
-	define('IMAGE_announce',  			$tp->toGlyph('fa-bullhorn', 'size=2x'));
-	define('IMAGE_announce_small',  	$tp->toGlyph('fa-bullhorn'));
-	define('IMAGE_closed_small',  		$tp->toGlyph('fa-lock'));
-	define('IMAGE_closed', 				$tp->toGlyph('fa-lock', 'size=2x'));
-
-?>
\ No newline at end of file
+?>

From 2fd72d0fd04b3e5e8da9b92b1c3ce10c1075a81e Mon Sep 17 00:00:00 2001
From: mcpeace-maw <mcpeace.manatwork@gmail.com>
Date: Sat, 27 Jun 2015 20:30:17 +0300
Subject: [PATCH 08/14] Update theme.php

OK, added font awesome 4.3. Now the font icons are OK in forum. The theme need some css adjusts too if use old bootstrap. Maybe custom forum template files with old bootstrap classes in the theme folder?
---
 e107_themes/bootstrap/theme.php | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/e107_themes/bootstrap/theme.php b/e107_themes/bootstrap/theme.php
index 8c80de200..992d593d5 100644
--- a/e107_themes/bootstrap/theme.php
+++ b/e107_themes/bootstrap/theme.php
@@ -3,7 +3,8 @@ if ( ! defined('e107_INIT')) { exit(); }
 /*
  * This is a 100% Pure Bootstrap Theme for e107 v2 
  */
-define('BOOTSTRAP',true); 
+define("BOOTSTRAP",true); 
+define("FONTAWESOME", 4); 
 define("VIEWPORT", "width=device-width, initial-scale=1.0");
 define("BODYTAG", '<body data-spy="scroll" data-target=".bs-docs-sidebar" >');
 
@@ -43,7 +44,7 @@ else
 
 e107::css('bootstrap','bootstrap-responsive.min.css');
 e107::css('bootstrap','jquery-ui.custom.css');
-e107::css('url', "//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css");
+e107::css('url', "https://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css");
 
 e107::css('theme', 'js/google-code-prettify/prettify.css');
 e107::js('theme', "js/google-code-prettify/prettify.js");
@@ -537,4 +538,4 @@ $NEWSCAT_ITEM = "\n\n\n\n<!-- News Category Item -->\n\n\n\n
 
 
 
-?>
\ No newline at end of file
+?>

From 20abcdf44953e5271062a029e0c34042e78675ff Mon Sep 17 00:00:00 2001
From: Cameron <e107inc@gmail.com>
Date: Sat, 27 Jun 2015 12:07:41 -0700
Subject: [PATCH 09/14] Forum: Added SEF URLs on subForums.

---
 e107_plugins/forum/e_url.php           | 10 ++++++-
 e107_plugins/forum/forum.php           | 41 +++++++++++++++++++++-----
 e107_plugins/forum/forum_class.php     | 33 ++++++++++++++-------
 e107_plugins/forum/forum_viewforum.php | 16 +++++-----
 e107_plugins/forum/forum_viewtopic.php |  5 ++--
 5 files changed, 76 insertions(+), 29 deletions(-)

diff --git a/e107_plugins/forum/e_url.php b/e107_plugins/forum/e_url.php
index 1d135e9bd..22c65ffe5 100644
--- a/e107_plugins/forum/e_url.php
+++ b/e107_plugins/forum/e_url.php
@@ -43,6 +43,7 @@ class forum_url // plugin-folder + '_url'
 			'redirect'		=> '{e_PLUGIN}forum/forum_post.php',
 		);
 
+		// only create url  - parsed above.
 		$config['move'] = array(
 			'sef'           => 'forum/post/?f=move&amp;id={thread_id}',
 		);
@@ -52,7 +53,14 @@ class forum_url // plugin-folder + '_url'
 			'sef'			=> 'forum/{forum_sef}/{thread_id}-{thread_sef}/',
 			'redirect'		=> '{e_PLUGIN}forum/forum_viewtopic.php?id=$2&$4'
 		);
-
+/*
+		$config['subforum'] = array(
+			'regex'			=> '^forum/(.*)/(.*)$',
+			'sef'			=> 'forum/{parent_sef}/{forum_sef}',
+			'redirect'		=> '{e_PLUGIN}forum/forum_viewforum.php?sef=$2',
+			'legacy'        => '{e_PLUGIN}forum/forum_viewforum.php?id={forum_id}'
+		);
+*/
 
 		$config['forum'] = array(
 			'regex'			=> '^forum/(.*)$',
diff --git a/e107_plugins/forum/forum.php b/e107_plugins/forum/forum.php
index bb42efbde..1193f16ee 100644
--- a/e107_plugins/forum/forum.php
+++ b/e107_plugins/forum/forum.php
@@ -379,7 +379,7 @@ function parse_forum($f, $restricted_string = '')
 	if(is_array($forumList['subs'][$f['forum_id']]))
 	{
 		list($lastpost_datestamp, $lastpost_thread) = explode('.', $f['forum_lastpost_info']);
-		$ret = parse_subs($forumList['subs'][$f['forum_id']], $lastpost_datestamp);
+		$ret = parse_subs($forumList, $f['forum_id'], $lastpost_datestamp);
 		$fVars->FORUMSUBFORUMS = "<br /><div class='smalltext'>".LAN_FORUM_0069.": {$ret['text']}</div>";
 		$fVars->THREADS += $ret['threads'];
 		$fVars->REPLIES += $ret['replies'];
@@ -426,20 +426,31 @@ function parse_forum($f, $restricted_string = '')
 	return $tp->simpleParse($FORUM_MAIN_FORUM, $fVars);
 }
 
-function parse_subs($subList, $lastpost_datestamp)
+
+
+function parse_subs($forumList, $id ='', $lastpost_datestamp)
 {
-	$e107 = e107::getInstance();
+
 	$tp = e107::getParser();
 	$ret = array();
+
+	$subList = $forumList['subs'][$id];
+
 	$ret['text'] = '';
+
 	foreach($subList as $sub)
 	{
 		$ret['text'] .= ($ret['text'] ? ', ' : '');
-		$suburl = $e107->url->create('forum/forum/view', $sub);
-		$ret['text'] .= "<a href='{$suburl}'>".$tp->toHTML($sub['forum_name']).'</a>';
-		$ret['threads'] += $sub['forum_threads'];
-		$ret['replies'] += $sub['forum_replies'];
-		$tmp = explode('.', $sub['forum_lastpost_info']);
+
+		$urlData                = $sub;
+		$urlData['parent_sef']  = $forumList['all'][$sub['forum_sub']]['forum_sef']; //   = array('parent_sef'=>
+		$suburl                 = e107::url('forum','forum', $urlData);
+
+		$ret['text']            .= "<a href='{$suburl}'>".$tp->toHTML($sub['forum_name']).'</a>';
+		$ret['threads']         += $sub['forum_threads'];
+		$ret['replies']         += $sub['forum_replies'];
+		$tmp                    = explode('.', $sub['forum_lastpost_info']);
+
 		if($tmp[0] > $lastpost_datestamp)
 		{
 			$ret['lastpost_info'] = $sub['forum_lastpost_info'];
@@ -449,9 +460,13 @@ function parse_subs($subList, $lastpost_datestamp)
 			$lastpost_datestamp = $tmp[0];
 		}
 	}
+
+
 	return $ret;
 }
 
+
+
 if (e_QUERY == 'track')
 {
 	if($trackedThreadList = $forum->getTrackedThreadList(USERID, 'list'))
@@ -493,6 +508,8 @@ if (e_QUERY == 'track')
 	}
 }
 
+
+
 if (e_QUERY == 'new')
 {
 	$nVars = new e_vars;
@@ -553,6 +570,14 @@ else
 {
 	echo $forum_main_start.$forum_string.$forum_main_end;
 }
+
+
+
+
+
+
+
+
 require_once(FOOTERF);
 
 function forum_rules($action = 'check')
diff --git a/e107_plugins/forum/forum_class.php b/e107_plugins/forum/forum_class.php
index d3fb5759b..e593aca52 100644
--- a/e107_plugins/forum/forum_class.php
+++ b/e107_plugins/forum/forum_class.php
@@ -863,8 +863,9 @@ class e107forum
 			//TODO: Fix query to get only forum and parent info needed, with correct naming
 			$qry = '
 			SELECT t.*, f.*,
-			fp.forum_id as parent_id, fp.forum_name as parent_name,
-			sp.forum_id as forum_sub, sp.forum_name as sub_parent,
+			fp.forum_id AS parent_id, fp.forum_name AS parent_name,
+			sp.forum_id AS forum_sub, sp.forum_name AS sub_parent,
+			sp.forum_sef AS parent_sef,
 			tr.track_userid
 			FROM `#forum_thread` AS t
 			LEFT JOIN `#forum` AS f ON t.thread_forum_id = f.forum_id
@@ -897,7 +898,7 @@ class e107forum
 		}
 		else
 		{
-			e107::getMessage()->addDebug('Query failed ('.__METHOD__.' ): '.$qry);
+			e107::getMessage()->addDebug('Query failed ('.__METHOD__.' ): '.str_replace('#', MPREFIX,$qry));
 		}
 		return false;
 	}
@@ -1379,6 +1380,9 @@ class e107forum
 				{
 					$ret['forums'][$row['forum_parent']][] = $row;
 				}
+
+				$id = $row['forum_id'];
+				$ret['all'][$id] = $row;
 			}
 			return $ret;
 		}
@@ -1544,7 +1548,10 @@ class e107forum
 		$sql = e107::getDb();
 		$forum_id = (int)$forum_id;
 		$qry = "
-		SELECT f.*, fp.forum_class as parent_class, fp.forum_name as parent_name, fp.forum_id as parent_id, fp.forum_postclass as parent_postclass, sp.forum_name AS sub_parent FROM #forum AS f
+		SELECT f.*, fp.forum_class as parent_class, fp.forum_name as parent_name,
+		fp.forum_id as parent_id, fp.forum_postclass as parent_postclass,
+		sp.forum_name AS sub_parent, sp.forum_sef AS parent_sef
+		FROM #forum AS f
 		LEFT JOIN #forum AS fp ON fp.forum_id = f.forum_parent
 		LEFT JOIN #forum AS sp ON f.forum_sub = sp.forum_id AND f.forum_sub > 0
 		WHERE f.forum_id = {$forum_id}
@@ -1845,7 +1852,7 @@ class e107forum
 	 */
 	function set_crumb($forum_href=false, $thread_title='', &$templateVar)
 	{
-		$e107 = e107::getInstance();
+
 		$tp = e107::getParser();
 		$frm = e107::getForm();
 		
@@ -1923,7 +1930,8 @@ class e107forum
 
 		// New v2.x Bootstrap Standardized Breadcrumb.
 
-	//	return print_a($forumInfo);
+	//	print_a($forumInfo);
+		// return;
 
 		$breadcrumb = array();
 		
@@ -1938,11 +1946,16 @@ class e107forum
 	
 		if($forumInfo['forum_sub'])
 		{
-			$breadcrumb[]	= array('text'=> ltrim($forumInfo['sub_parent'], '*')		, 'url'=> e107::getUrl()->create('forum/forum/view', "id={$forumInfo['forum_sub']}"));
+			$breadcrumb[]	= array('text'=> ltrim($forumInfo['sub_parent'], '*')		, 'url'=> e107::url('forum','forum', array('forum_sef'=> $forumInfo['parent_sef'])));
+			$breadcrumb[]	= array('text'=>ltrim($forumInfo['forum_name'], '*')		, 'url'=> (e_PAGE !='forum_viewforum.php') ? e107::url('forum', 'forum', $forumInfo) : null);
+
 		}
-	
-		$breadcrumb[]	= array('text'=>ltrim($forumInfo['forum_name'], '*')		, 'url'=> (e_PAGE !='forum_viewforum.php') ? e107::url('forum', 'forum', $forumInfo) : null);
-		
+		else
+		{
+			$breadcrumb[]	= array('text'=>ltrim($forumInfo['forum_name'], '*')		, 'url'=> (e_PAGE !='forum_viewforum.php') ? e107::url('forum', 'forum', $forumInfo) : null);
+
+		}
+
 		if(vartrue($forumInfo['thread_name']))
 		{
 			$breadcrumb[]	= array('text'=> $forumInfo['thread_name'] , 'url'=>null);
diff --git a/e107_plugins/forum/forum_viewforum.php b/e107_plugins/forum/forum_viewforum.php
index 269b14d1b..4b5b49635 100644
--- a/e107_plugins/forum/forum_viewforum.php
+++ b/e107_plugins/forum/forum_viewforum.php
@@ -389,7 +389,7 @@ else
 }
 
 $fVars->FORUMJUMP = forumjump();
-$fVars->TOPLINK = "<a href='".e_SELF.'?'.e_QUERY."#top' onclick=\"window.scrollTo(0,0);\">".LAN_GOTO.'</a>'; // FIXME - TOPLINK not used anymore?
+$fVars->TOPLINK = "<a href='".e_SELF.'?'.e_QUERY."#top' onclick=\"window.scrollTo(0,0);\">".LAN_GO.'</a>'; // FIXME - TOPLINK not used anymore?
 
 if($container_only)
 {
@@ -428,8 +428,6 @@ function parse_thread($thread_info)
 	global $forum, $FORUM_VIEW_FORUM, $FORUM_VIEW_FORUM_STICKY, $FORUM_VIEW_FORUM_ANNOUNCE, $gen, $menu_pref, $threadsViewed;
 	$tp = e107::getParser();
 	$tVars = new e_vars;
-	$e107 = e107::getInstance();
-	$text = '';
 
 	$threadId = $thread_info['thread_id'];
 	$forumId = $thread_info['thread_forum_id'];
@@ -542,6 +540,7 @@ function parse_thread($thread_info)
 
 
 	// FIXME - pages -> convert to nextprev shortcode
+	/*
 	$pages = ceil(($tVars->REPLIES)/$forum->prefs->get('postspage'));
 	$urlparms = $thread_info;
 	if ($pages > 1)
@@ -583,7 +582,10 @@ function parse_thread($thread_info)
 	{
 		$tVars->PAGES = '';
 	}
-	
+	*/
+
+
+	$tVars->PAGES = fpages($thread_info, $tVars->REPLIES);
 	$tVars->PAGESX = fpages($thread_info, $tVars->REPLIES);
 
 	if (MODERATOR)
@@ -606,9 +608,6 @@ function parse_thread($thread_info)
 		$tVars->ADMINOPTIONS = fadminoptions($thread_info);
 	}
 
-	$text .= "</td>
-		<td style='vertical-align:top; text-align:center; width:20%' class='forumheader3'>".$THREADDATE.'<br />';
-//	$tmp = explode('.', $thread_info['thread_user'], 2);
 
 	if($thread_info['user_name'])
 	{
@@ -667,12 +666,13 @@ function parse_thread($thread_info)
 	return $tp->simpleParse($_TEMPLATE, $tVars);
 }
 
+
 function parse_sub($subInfo)
 {
 	global $FORUM_VIEW_SUB, $gen, $newflag_list;
 	$tp = e107::getParser();
 	$tVars = new e_vars;
-	$e107 = e107::getInstance();
+
 	$forumName = $tp->toHTML($subInfo['forum_name'], true);
 	$tVars->SUB_FORUMTITLE = "<a href='".e107::getUrl()->create('forum/forum/view', $subInfo)."'>{$forumName}</a>";
 	$tVars->SUB_DESCRIPTION = $tp->toHTML($subInfo['forum_description'], false, 'no_hook');
diff --git a/e107_plugins/forum/forum_viewtopic.php b/e107_plugins/forum/forum_viewtopic.php
index 4e2063a21..31f22ebfb 100644
--- a/e107_plugins/forum/forum_viewtopic.php
+++ b/e107_plugins/forum/forum_viewtopic.php
@@ -705,8 +705,9 @@ class e107ForumThread
 		{
 			if(E107_DEBUG_LEVEL > 0)
 			{
-				echo __METHOD__ .' Line: '.__LINE__;
-				exit;
+				e107::getMessage()->addError("Thread not found or query error: ". __METHOD__ .' Line: '.__LINE__ );
+				return;
+			//	exit;
 			}
 
 			$url = e107::url('forum','index','full');

From f03e4ab02b0c56957a5cd52d165751e42320e814 Mon Sep 17 00:00:00 2001
From: mcpeace-maw <mcpeace.manatwork@gmail.com>
Date: Sun, 28 Jun 2015 16:24:05 +0300
Subject: [PATCH 10/14] Update theme_shortcodes.php

Font icons update.
---
 e107_themes/bootstrap/theme_shortcodes.php | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/e107_themes/bootstrap/theme_shortcodes.php b/e107_themes/bootstrap/theme_shortcodes.php
index cd3b34073..f99160413 100644
--- a/e107_themes/bootstrap/theme_shortcodes.php
+++ b/e107_themes/bootstrap/theme_shortcodes.php
@@ -83,17 +83,17 @@ class theme_shortcodes extends e_shortcode
 		<ul class="nav pull-right">
 		<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Logged in as '.USERNAME.' <b class="caret"></b></a>
 		<ul class="dropdown-menu">
-		<li><a href="'.e_HTTP.'usersettings.php"><i class="icon-cog"></i> '.LAN_SETTINGS.'</a></li>
-		<li><a class="dropdown-toggle no-block" role="button" href="'.e_HTTP.'user.php?id.'.USERID.'"><i class="icon-user"></i> '.LAN_LOGINMENU_13.'</a></li>
+		<li><a href="'.e_HTTP.'usersettings.php"><i class="fa fa-cog"></i> '.LAN_SETTINGS.'</a></li>
+		<li><a class="dropdown-toggle no-block" role="button" href="'.e_HTTP.'user.php?id.'.USERID.'"><i class="fa fa-user"></i> '.LAN_LOGINMENU_13.'</a></li>
 		<li class="divider"></li>';
 		
 		if(ADMIN) 
 		{
-			$text .= '<li><a href="'.e_ADMIN_ABS.'"><i class="icon-cogs"></i> '.LAN_LOGINMENU_11.'</a></li>';	
+			$text .= '<li><a href="'.e_ADMIN_ABS.'"><i class="fa fa-cogs"></i> '.LAN_LOGINMENU_11.'</a></li>';	
 		}
 		
 		$text .= '
-		<li><a href="'.e_HTTP.'index.php?logout"><i class="icon-off"></i> '.LAN_LOGOUT.'</a></li>
+		<li><a href="'.e_HTTP.'index.php?logout"><i class="fa fa-sign-out"></i> '.LAN_LOGOUT.'</a></li>
 		</ul>
 		</li>
 		</ul>
@@ -111,4 +111,4 @@ class theme_shortcodes extends e_shortcode
 
 
 
-?>
\ No newline at end of file
+?>

From 5d3802f05fc3eb2047f7331f4e837e09e0ceb646 Mon Sep 17 00:00:00 2001
From: leo <the_guardian2@hotmail.com>
Date: Sun, 28 Jun 2015 16:32:52 +0200
Subject: [PATCH 11/14] hover messages for admin php page (new lan definition
 added)

---
 e107_admin/auth.php                | 4 ++--
 e107_languages/English/English.php | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/e107_admin/auth.php b/e107_admin/auth.php
index 7112d71e9..74c930ab4 100644
--- a/e107_admin/auth.php
+++ b/e107_admin/auth.php
@@ -304,13 +304,13 @@ class auth
 		    <div class='field'>
 		    	<label for='username'>".ADLAN_89."</label> 
 		    	<input class='tbox e-tip' type='text' autofocus required='required' name='authname' placeholder='".ADLAN_89."' id='username' size='30' value='' maxlength='".varset($pref['loginname_maxlength'], 30)."' />
-		    	<div class='field-help'>Please enter your username or email</div>
+		    	<div class='field-help'>".LAN_PROMPT_ADMINNAME."</div>
 		   	</div>			
 		
 		    <div class='field'>
 		    	<label for='userpass'>".ADLAN_90."</label>
 		    	<input class='tbox e-tip' type='password' required='required' name='authpass' placeholder='".ADLAN_90."' id='userpass' size='30' value='' maxlength='30' />
-		    	<div class='field-help'>Password is required</div>
+		    	<div class='field-help'>".LAN_PROMPT_ADMINPWD."</div>
 		    </div>";
 		
 		if ($use_imagecode)
diff --git a/e107_languages/English/English.php b/e107_languages/English/English.php
index 65f6a06c9..ed9bf628b 100644
--- a/e107_languages/English/English.php
+++ b/e107_languages/English/English.php
@@ -88,5 +88,9 @@ define("LAN_DESCRIPTION", "Description");
 define("LAN_FILE", "File");
 define("LAN_COMMENTS", "Comments");
 
+define("LAN_PROMPT_ADMINNAME", "Please enter your username or email"); // admin php hover field admin name
+define("LAN_PROMPT_ADMINPWD", "Password is required"); // admin php hover field admin password
+
+
 
 ?>
\ No newline at end of file

From e0f2233a95308d3230bca7a43e86210e84329070 Mon Sep 17 00:00:00 2001
From: leo <the_guardian2@hotmail.com>
Date: Sun, 28 Jun 2015 22:21:39 +0200
Subject: [PATCH 12/14] new lans in  use (admin php message fields (hover)

---
 e107_admin/auth.php                | 4 ++--
 e107_languages/English/English.php | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/e107_admin/auth.php b/e107_admin/auth.php
index 74c930ab4..aa940e6cc 100644
--- a/e107_admin/auth.php
+++ b/e107_admin/auth.php
@@ -304,13 +304,13 @@ class auth
 		    <div class='field'>
 		    	<label for='username'>".ADLAN_89."</label> 
 		    	<input class='tbox e-tip' type='text' autofocus required='required' name='authname' placeholder='".ADLAN_89."' id='username' size='30' value='' maxlength='".varset($pref['loginname_maxlength'], 30)."' />
-		    	<div class='field-help'>".LAN_PROMPT_ADMINNAME."</div>
+		    	<div class='field-help'>".LAN_ENTER_USRNAME_EMAIL."</div>
 		   	</div>			
 		
 		    <div class='field'>
 		    	<label for='userpass'>".ADLAN_90."</label>
 		    	<input class='tbox e-tip' type='password' required='required' name='authpass' placeholder='".ADLAN_90."' id='userpass' size='30' value='' maxlength='30' />
-		    	<div class='field-help'>".LAN_PROMPT_ADMINPWD."</div>
+		    	<div class='field-help'>".LAN_PWD_REQUIRED."</div>
 		    </div>";
 		
 		if ($use_imagecode)
diff --git a/e107_languages/English/English.php b/e107_languages/English/English.php
index ed9bf628b..06f064a5d 100644
--- a/e107_languages/English/English.php
+++ b/e107_languages/English/English.php
@@ -88,8 +88,8 @@ define("LAN_DESCRIPTION", "Description");
 define("LAN_FILE", "File");
 define("LAN_COMMENTS", "Comments");
 
-define("LAN_PROMPT_ADMINNAME", "Please enter your username or email"); // admin php hover field admin name
-define("LAN_PROMPT_ADMINPWD", "Password is required"); // admin php hover field admin password
+define("LAN_ENTER_USRNAME_EMAIL", "Please enter your username or email"); // admin php hover field admin name
+define("LAN_PWD_REQUIRED", "Password is required"); // admin php hover field admin password
 
 
 

From 872be156687f4f62bfe9bf4ee4c91d85fb3e7643 Mon Sep 17 00:00:00 2001
From: Cameron <e107inc@gmail.com>
Date: Sun, 28 Jun 2015 16:31:02 -0700
Subject: [PATCH 13/14] Prevent filtering of audio and video tags.

---
 e107_handlers/e_parse_class.php | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php
index 76924100a..7b38ac697 100644
--- a/e107_handlers/e_parse_class.php
+++ b/e107_handlers/e_parse_class.php
@@ -2040,7 +2040,7 @@ class e_parse extends e_parser
 	 */
 	public function thumbWidth($width=null)
 	{
-		if($height !== null)
+		if($width !== null)
 		{
 			$this->thumbWidth = intval($width);
 		}
@@ -2685,7 +2685,9 @@ class e_parser
                                     'script'	=> array('type', 'src', 'language'),
                                     'iframe'	=> array('id', 'src', 'frameborder', 'class', 'width', 'height', 'style'),
 	                                'input'     => array('type','name','value','class','style'),
-	                                'form'      => array('action','method','target')
+	                                'form'      => array('action','method','target'),
+	                                'audio'     => array('src','controls', 'autoplay', 'loop', 'muted', 'preload' ),
+	                                'video'     => array('autoplay', 'controls', 'height', 'loop', 'muted', 'poster', 'preload', 'src', 'width')
                                   );
 
     protected $badAttrValues     = array('javascript[\s]*?:','alert\(','vbscript[\s]*?:','data:text\/html', 'mhtml[\s]*?:', 'data:[\s]*?image');
@@ -2696,7 +2698,7 @@ class e_parser
 
     protected $allowedTags        = array('html', 'body','div','a','img','table','tr', 'td', 'th', 'tbody', 'thead', 'colgroup', 'b',
                                         'i', 'pre','code', 'strong', 'u', 'em','ul', 'ol', 'li','img','h1','h2','h3','h4','h5','h6','p',
-                                        'div','pre','section','article', 'blockquote','hgroup','aside','figure','span', 'video', 'br',
+                                        'div','pre','section','article', 'blockquote','hgroup','aside','figure','span', 'audio', 'video', 'br',
                                         'small', 'caption', 'noscript'
                                    );
     protected $scriptTags 		= array('script','applet','iframe','form','input','button'); //allowed when $pref['post_script'] is enabled.

From aa4b56a792030172694093aa06a2c8d395154f5f Mon Sep 17 00:00:00 2001
From: Cameron <e107inc@gmail.com>
Date: Mon, 29 Jun 2015 10:07:04 -0700
Subject: [PATCH 14/14] Fixes #1092 - TinyMce breaking external image URLs with
 params.

---
 e107_plugins/tinymce4/plugins/e107/parser.php | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/e107_plugins/tinymce4/plugins/e107/parser.php b/e107_plugins/tinymce4/plugins/e107/parser.php
index 77b529cbc..bd24f72f5 100644
--- a/e107_plugins/tinymce4/plugins/e107/parser.php
+++ b/e107_plugins/tinymce4/plugins/e107/parser.php
@@ -225,8 +225,11 @@ TEMPL;
 
 			parse_str($qry,$qr);
 
-			$qr['w'] = $img['width'];
-			$qr['h'] = $img['height'];
+			if(substr($url,0,4)!=='http' && empty($qr['w']) && empty($qr['aw']))
+			{
+				$qr['w'] = $img['width'];
+				$qr['h'] = $img['height'];
+			}
 
 			$src = $url."?".urldecode(http_build_query($qr));