diff -x .svn -aruN 0.7.13.src/comment.php 0.7.14.src/comment.php
--- 0.7.13.src/comment.php	2008-09-23 14:43:32.000000000 -0500
+++ 0.7.14.src/comment.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,8 +11,8 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/comment.php,v $
-|     $Revision: 1.58 $
-|     $Date: 2008/09/23 19:43:55 $
+|     $Revision: 1.59 $
+|     $Date: 2008/11/04 22:10:32 $
 |     $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
@@ -402,12 +402,15 @@
 	}
 }
 
-if (!strstr(e_QUERY, "poll")) 
+
+//if (!strstr(e_QUERY, "poll")) 
+// If output buffering started, cache the result
+if ($comment_ob_start) 
 {
-  $cache = ob_get_contents();
-  $e107cache->set("comment.php?{$table}.{$field}", $cache);
+	$cache = ob_get_contents();
+	$e107cache->set("comment.php?{$table}.{$field}", $cache);
+	ob_end_flush(); // dump the buffer we started
 }
-if ($comment_ob_start) ob_end_flush(); // dump the buffer we started
 
 
 require_once(FOOTERF);
diff -x .svn -aruN 0.7.13.src/download.php 0.7.14.src/download.php
--- 0.7.13.src/download.php	2008-08-04 15:31:07.000000000 -0500
+++ 0.7.14.src/download.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,8 +11,8 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/download.php,v $
-|     $Revision: 1.96 $ 
-|     $Date: 2008/08/04 20:31:30 $
+|     $Revision: 1.97 $ 
+|     $Date: 2008/10/17 19:19:36 $
 |     $Author: e107steved $
 |
 +----------------------------------------------------------------------------+
@@ -632,18 +632,18 @@
 		return '0';
 	}
 	if ($size < $kb) {
-		return $size." b";
+		return $size." ".CORE_LAN_B;
 	}
 	else if($size < $mb) {
-		return round($size/$kb, 2)." kb";
+		return round($size/$kb, 2)." ".CORE_LAN_KB;
 	}
 	else if($size < $gb) {
-		return round($size/$mb, 2)." mb";
+		return round($size/$mb, 2)." ".CORE_LAN_MB;
 	}
 	else if($size < $tb) {
-		return round($size/$gb, 2)." gb";
+		return round($size/$gb, 2)." ".CORE_LAN_GB;
 	} else {
-		return round($size/$tb, 2)." tb";
+		return round($size/$tb, 2)." ".CORE_LAN_TB;
 	}
 }
 
diff -x .svn -aruN 0.7.13.src/e107_admin/core_image.php 0.7.14.src/e107_admin/core_image.php
--- 0.7.13.src/e107_admin/core_image.php	2008-09-28 20:50:21.000000000 -0500
+++ 0.7.14.src/e107_admin/core_image.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,8 +11,8 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/e107_admin/core_image.php,v $
-|     $Revision: 1.50 $
-|     $Date: 2008/09/29 01:50:44 $
+|     $Revision: 1.51 $
+|     $Date: 2008/11/12 19:11:21 $
 |     $Author: mcfly_e107 $
 +----------------------------------------------------------------------------+
 */
@@ -61,7 +61,7 @@
     'comment.php' => '96f04e71003de6b6a6ea3a0f2ede285d',
     'compact.php' => '20bccea2ef81cc86a86782fa4841e45f',
     'content.php' => 'bf2239404990afed185913002429e682',
-    'core_image.php' => '9137ada2971a098decf91b6244315a64',
+    'core_image.php' => 'ced0021951095d0683ca7481f0c8af19',
     'cpage.php' => '249109943f5bb394b70065596e556ff5',
     'credits.php' => '273cb301d908936a58a8d38b4e92ba5a',
     'db.php' => '74e4d75fbafe9a8493fbba384ae6f97f',
@@ -105,7 +105,7 @@
     'users.php' => 'ffe9886f91987ecbc08546e6bbc9b433',
     'users_extended.php' => '016339d4fdaeaac0d7e8bb7f91c46952',
     'users_extended_predefined.php' => '51128e45b6620f7b6ead6fbd8521b43e',
-    'ver.php' => 'e426c0e7cd0ca83dbbf15dc278604a5c',
+    'ver.php' => '62383561ef675bb29ed26ad5646baf32',
     'wmessage.php' => '17afb0f8ef07cfd675cd92e9f7e606a3',
   ),
   $coredir['docs'] => 
@@ -159,7 +159,7 @@
       'hide.bb' => 'cf30f78c78855565b0bf868a01142fb8',
       'html.bb' => '9938499c3ef8c80a2598b9c3aed7e371',
       'i.bb' => 'ec842cfda8a6f33d53f8232763b56719',
-      'img.bb' => '47f67bd6067a9b5ba0d732068ee6453c',
+      'img.bb' => 'e44e2072fa1001ee30a43f4bf1de8281',
       'index.html' => 'd41d8cd98f00b204e9800998ecf8427e',
       'justify.bb' => '016500f910beb0f820dd58c4915f2489',
       'left.bb' => '990ddba32b14bea648745cc373035bde',
@@ -306,12 +306,12 @@
       'theme_disclaimer.sc' => '606d98f47c1a64b179d9baf6e6930dbc',
       'uploadfile.sc' => '85ea5b2a10cde7c2267a40c359694aed',
       'user_avatar.sc' => '1501550f2414900d47edee2621b2e624',
-      'user_extended.sc' => 'f2567490098c503095af564db3c8e04f',
+      'user_extended.sc' => '96cb880827295452164bd86c24cb0e78',
       'wmessage.sc' => 'c24f80349ceafd36f6cf0d6ec6875fa7',
     ),
-    'def_e107_prefs.php' => '60132274af17ba102249ef9e8be76f69',
+    'def_e107_prefs.php' => 'd929fdd0d20de447334375e28d1a43ab',
     'e107.css' => 'e5cfa4047831f19def7df032ef8bc830',
-    'e107.js' => 'f0dd03e4e44db72d75af81d8a42a7acb',
+    'e107.js' => 'e6e6fd1d50c5aefbe1a4c3ff0e4ced3d',
     'e_ajax.js' => 'b583773e72852158e27af8a9bba7c97f',
     'index.html' => 'd41d8cd98f00b204e9800998ecf8427e',
     'nav_menu.css' => '58ca165986f7428fb05e8b7b82c2ee13',
@@ -321,7 +321,7 @@
     'resetcore.php' => '8329fb938f7ae0058ab9582efc098c4c',
     'sleight_img.gif' => '7616b49c48ca0cd6cbd15e9f747c8886',
     'sleight_js.php' => '038fc3cccae701fab1c6aa35339a0853',
-    'thumb.php' => '1506afd0bc12c8663688f7ca449aa853',
+    'thumb.php' => '42c886056e022a0ac22442881654b015',
   ),
   $coredir['handlers'] => 
   array (
@@ -658,13 +658,13 @@
     'avatar_handler.php' => '54c9f790d9f17e30f52b8011633d486c',
     'bbcode_handler.php' => '53fae188dcfbc9496927fa4389d90ecc',
     'cache_handler.php' => '87bea235aa6d8e55f1268675b237ae43',
-    'comment_class.php' => 'fbfcc149d8af410b26d4e14626b7923d',
+    'comment_class.php' => '4ea051287540777754c6a4b9d719f26b',
     'date_handler.php' => 'dc0f62d02024e515f5db56230882676f',
     'db_debug_class.php' => 'c8536fce0bc77a01d9a97fef8327855b',
     'debug_handler.php' => '9fa1acc69ef4cfc2593345c3866841d3',
     'e107_Compat_handler.php' => 'e76211b3178e4a9724933ecfe85ba8ea',
     'e107_class.php' => 'de0052a652261489b4b9609b3b70af6c',
-    'e_parse_class.php' => '6806f027ba9f8fa86d8bacddee5b90ae',
+    'e_parse_class.php' => '1ae02c395eb30f456ed3bfa38ca4e4a3',
     'emailprint_class.php' => 'c0dbe279de39cf512f5bcb6baa339ebb',
     'emote.php' => 'bbda3eafde2bb54c645194bf72dd47e3',
     'emote_filter.php' => '6348bb4a8adf203fccc2b5ecf4bff378',
@@ -699,13 +699,13 @@
     'preset_class.php' => 'a687add695b164e133e4c6375c5791fc',
     'profanity_filter.php' => 'd41dc2dcd84a33f37f3ea1200fef3814',
     'rate_class.php' => 'be7d6c95e9e702eddf6c93e0de6344e1',
-    'ren_help.php' => 'f9e6af20482a72ab0b9109c14c6e659e',
-    'resize_handler.php' => '49ec3b36dcd96ce97390101099e1ed6b',
+    'ren_help.php' => '3669752caadf96c167ee0674b23d8296',
+    'resize_handler.php' => '1bf429885169500b77d3cdb2673fab04',
     'search_class.php' => 'fe9c65c10349512b91164b8b67e724be',
     'secure_img_handler.php' => '2cf9d9bb7616a5cc9d04d782a7bf8611',
     'secure_img_render.php' => '7364c99eec3f7881b7e4c0a10fc75cdf',
     'session_handler.php' => '54f987aa4f0f2a31c646d9e0f81cd061',
-    'shortcode_handler.php' => '845393c5dd91ffd981b076a80ff31e53',
+    'shortcode_handler.php' => 'eba9ecc1e8a7d69e6914f8874271ff7d',
     'sitelinks_class.php' => 'bb871c65344553d18e4f96a18e2c564e',
     'smtp.php' => '71008c80b0a5e12faef990c0560f8226',
     'theme_handler.php' => '3a9a09ee4c47d1998d94ed0213b55020',
@@ -1171,7 +1171,7 @@
     'logo_template_large.png' => 'cce83a8f84255d2bab00522b73a4e6d4',
     'pcmag.png' => 'abe521ccc3a89a43ff641ab3daf1f37d',
     'splash.jpg' => '7f749391cb6d31dcf9c9145f3d30df4d',
-    'thumb.php' => 'd606e6c43e39f27bcf9f7622e32365eb',
+    'thumb.php' => 'f5b3fd7e9034d12f538ec54fc24c5394',
   ),
   $coredir['languages'] => 
   array (
@@ -1258,7 +1258,7 @@
         'lan_users_extended.php' => '01668b2029e05b10ed6cc14c71757d31',
         'lan_wmessage.php' => '27b96105500cdfa56bc27e391a0c2f3b',
       ),
-      'English.php' => '737802cb8d3c4cbf03327944272bcf1e',
+      'English.php' => 'd2c7712a5d818ec3f987c4d3961d1d1f',
       'lan_banner.php' => '92308af6029553992ebc4a46e97d4e1d',
       'lan_comment.php' => '7f872a8de759d8bba242e0c0214e3811',
       'lan_contact.php' => 'f6ec02eb9a5effc567f8483071105e66',
@@ -1349,7 +1349,7 @@
       array (
         'English.php' => 'bc4d844c9b0b8bb553913eb462542620',
       ),
-      'archive.php' => '4549998368bb79053db9343b9d1e7bc6',
+      'archive.php' => '1009f74ead67c5d568b5def571c7ab8b',
       'blogcalendar_menu.php' => '5b8f10870951812d9702255d129e40e8',
       'calendar.php' => '4c05e65f098d38d7ed84783a479d999e',
       'config.php' => '8bf4ecf1ebf7b0a2628081ebdee358bb',
@@ -1501,9 +1501,9 @@
       array (
         'content_class.php' => '4400a94a9eb69518387405b6ad2682d5',
         'content_convert_class.php' => '2e05d94418f8960eaac431741ce402a1',
-        'content_db_class.php' => '7f4bdd8379cff76434631731968c5d8f',
+        'content_db_class.php' => '5274299167623166e2f573af85f0f614',
         'content_defines.php' => '784711a6c68dc17c7752fb084400229c',
-        'content_form_class.php' => '9893c79f95f8bf116093548faea627c9',
+        'content_form_class.php' => '4b170990cb25cc001ebf69b0ee8b21d0',
         'content_preset.php' => 'b91ea8f88734c800267bcf9761f2ea94',
       ),
       'images' => 
@@ -1624,17 +1624,17 @@
       'admin_content_config.php' => '5eaadc48ca7f9d18cfcbba35937e778e',
       'content.js' => 'd41d8cd98f00b204e9800998ecf8427e',
       'content.php' => '880cecd68d540867ed079d1aa7d848d4',
-      'content_manager.php' => 'd58366e560d9c4950170196e6f71c76a',
+      'content_manager.php' => 'f05358be1e9f851366e6483a5c1fce9f',
       'content_shortcodes.php' => '96a10b5cbb7f7f37d7fbcf147f5b2969',
       'content_sql.php' => '2632a603dd04ed62bbb3f011d3c5de41',
       'content_submit.php' => '15c56c828ea76a15aff7f020c0806d8f',
       'content_update.php' => '3820d50a8de13fe523bc58e949229e67',
       'content_update_check.php' => '83b6aa48eb79b70555f5d2d578baa07d',
-      'e_comment.php' => 'e5a8abcc72deaf2fe9c0a8b5eb4887ea',
+      'e_comment.php' => 'd1f4f87a428c69c499818721d0f48331',
       'e_emailprint.php' => '48572a480656347a64798b024168a7f1',
       'e_frontpage.php' => '4fee2ac77b9c66c1d5b760b95e6ea255',
-      'e_latest.php' => 'cf27d4380af0461aa5cbf5adf36153b5',
-      'e_list.php' => '07f0e1369439b9927ac11d48b6deeb06',
+      'e_latest.php' => 'dad7101dbd2063723e94300723e67c2e',
+      'e_list.php' => '1e789a60e65a1273d9e89330285e90d2',
       'e_meta.php' => 'cbb645eebdedb216511c413fe64991a8',
       'e_notify.php' => '66aca77c03a989a7466472266ff76939',
       'e_rss.php' => '76954b881d598f26ecaebb4422f87696',
@@ -1829,7 +1829,7 @@
       'e_status.php' => 'e707e64a960612d443e16906faaf0e22',
       'forum.php' => '0bd4c27751efefb21188c3b483a822a7',
       'forum_admin.php' => '17d086b87f55405546d2db805ed95598',
-      'forum_class.php' => '4d6d9eabf1659593be329988f58927fc',
+      'forum_class.php' => '8a96c3ca35232aff5bc339c6bf0d2ec4',
       'forum_conf.php' => '6cacab70081de88058215040494143b8',
       'forum_mod.php' => 'edd98521f3e8c94534c72b39bbc131ee',
       'forum_post.php' => '162565c1e4c4d90014a4f600ea73fe1a',
@@ -1927,9 +1927,9 @@
       'link_defines.php' => '1c9c8a4d29cac5f35e2164805bb3eca6',
       'link_menu.php' => '3520965348d79de448646454ddb04565',
       'link_shortcodes.php' => 'e7c72490ab6613732109aa5bbff0a8da',
-      'links.php' => 'c005496fee00534679321e8fb9837b6d',
+      'links.php' => '249b7d6149effe37de24f8e63e7fae4e',
       'links_page_sql.php' => 'ebe16a35037a69b93eaa929782ca66ba',
-      'links_template.php' => 'b578512e4b94cd623ee3cfcf5d0be178',
+      'links_template.php' => '01f0789358ececda57e350844c5257eb',
       'plugin.php' => 'b05df4d36293f4c2e2b949b3006cc712',
     ),
     'linkwords' => 
@@ -1982,7 +1982,7 @@
       ),
       'admin_list_config.php' => 'ca675031ff789bcf4f75e9ce98d86b87',
       'list.php' => '40e2923674835fe1c404219d164e7a92',
-      'list_class.php' => '3a9e726f920139c0b3e628113ab443ea',
+      'list_class.php' => '1c3fc99f62bf6d5e1d48ac8ccec83128',
       'list_new_menu.php' => 'b130b1aeb94b0c494dc77f6c58c7a19c',
       'list_recent_menu.php' => 'a8cffc271ef0637df899195561e07cb4',
       'list_shortcodes.php' => '1c4972d09e83f1945c6652126bba6248',
@@ -2097,7 +2097,7 @@
       'log_update_check.php' => 'f4e7f5fb3767e4c19adae8cb5e41e62c',
       'loginfo.php' => '854e51cd364a5f34bbb98559a1d997a5',
       'plugin.php' => '5809c35fd538c5326ebe6e1876de72c4',
-      'stats.php' => 'a5e903fba25292d4a5e50e0b1dbe5753',
+      'stats.php' => '184029922a97ff943b98de23cc796bb9',
     ),
     'login_menu' => 
     array (
@@ -2285,11 +2285,11 @@
       ),
       'index.html' => 'd41d8cd98f00b204e9800998ecf8427e',
       'plugin.php' => 'c89f4e634476ef16447a5375f39ce495',
-      'pm.php' => '63d47cb5c7d22b9e75b1def66445125c',
+      'pm.php' => '6bcd6f653fcc1a94dc2efe432554ffd3',
       'pm_class.php' => '1e927b58800d229fe53d01c901eb744d',
       'pm_conf.php' => '814f47b30db1aa07075469c0d1bcc4c0',
       'pm_default.php' => '0213fb9bcfe60d37041f44136727649b',
-      'pm_func.php' => '272fe7e8516081d5f645a75b3e349aed',
+      'pm_func.php' => '61f9aea908d41a5d23a791efe67ac0ac',
       'pm_notes.txt' => 'df26332907da1f35c4731d8893aea23e',
       'pm_shortcodes.php' => 'd1724a0b4d71996bf47758db99aed5dd',
       'pm_sql.php' => '4608486c1027c6485dc32674fd536dc5',
@@ -2355,7 +2355,7 @@
       'admin_prefs.php' => '511047205732e1f3a5098052e3a2eb4e',
       'e_meta.php' => 'af7e8b4a56e0d4cbb7a469dea4b86f9c',
       'plugin.php' => '46b1e37c9d18e6872083425afb3115fa',
-      'rss.php' => 'c4ebc7f060ade515a0d30d15df93d452',
+      'rss.php' => 'ab053cb91633c1fc8c5259c77f07a716',
       'rss_menu.php' => '1be0ce84109cbbbcdadf68cc93fb5c20',
       'rss_shortcodes.php' => '5e842cc4bcb5262055b7bf4d9aa57f55',
       'rss_sql.php' => 'efee18037cab9fbf35cdf81f97efc2a3',
@@ -2421,9 +2421,10 @@
     array (
       'languages' => 
       array (
-        'English.php' => 'a4163beed74433ec6657b9cbbba50846',
+        'English.php' => 'cee12f306f38b237a4ee461a1346db5c',
       ),
-      'usertheme_menu.php' => 'ee312586d8f026d46e72704b913ccf85',
+      'config.php' => '7a0be558d405f6776ba86502d452aae9',
+      'usertheme_menu.php' => '82bfb26abe99afca396c1b2861d6d895',
     ),
     'index.html' => 'd41d8cd98f00b204e9800998ecf8427e',
   ),
@@ -2972,10 +2973,10 @@
   'backend.php' => '312552577f67c7965a76bda84b949a64',
   'banner.php' => 'e028fd2fa6fac77863505acb501b6632',
   'class2.php' => 'f0b9fecb1230bca885d545a6572e68fc',
-  'comment.php' => '6985ad615ac7221af65410fb21a98072',
+  'comment.php' => 'd7bf36a5bec9342815f58c47ba847db7',
   'contact.php' => 'be3feefdfb6c086b112ef037989fcbd1',
   'content.php' => '0eaa8d6a20548b6842ade24b9a0bf4ae',
-  'download.php' => '110185761e87d967f9bb1fcf84cfb458',
+  'download.php' => '2eacaeab87a376aeb2641733c0c5b357',
   'e107.htaccess' => 'c5e1ad68b41f947be285926c0f81d914',
   'e107_config.php' => 'd41d8cd98f00b204e9800998ecf8427e',
   'email.php' => '6f5a6b9bd588d7f774f4e1a731efa937',
@@ -2991,14 +2992,14 @@
   'login.php' => '4483bb69d947c6150c22c7a22dc8def9',
   'membersonly.php' => '0903a2ef48312a12ce81b2fa17fe0233',
   'news.php' => '8ced9468ea4fd7b6e9257461e4db2e45',
-  'online.php' => '3006f49d522026442e744a71631db632',
+  'online.php' => '0fe5652d220e4b2d16044b5c79b9c7e9',
   'page.php' => '8a20cbd55e6ab1f627bdcd62af8fa2f0',
   'print.php' => '82e7c7267881349a4ef5e11f3efb6de8',
   'rate.php' => '4730b1d1cf3ace6af2179fb52a521366',
   'request.php' => '3891299e7754fae7fcf92d9ec65d8a3e',
   'robots.txt' => '118aadbc5395ee3d4c6fade187097e5a',
-  'search.php' => '1d24fcf7464762584979aa78cf0d6b7c',
-  'signup.php' => '6a21abd6d10b6ca199429cd7819d8a9d',
+  'search.php' => '69297aaac6cd8e8c44371e2bdd3d7eec',
+  'signup.php' => 'e5bc202660019d91f5c5fd2115bd1983',
   'sitedown.php' => '7a2d95fb0976ce5ab287a403b118acfa',
   'subcontent.php' => '5a534e399228320e38056244e944357d',
   'submitnews.php' => '4615a023d5c16cd745bd03cc4fb980ad',
@@ -3006,7 +3007,7 @@
   'upload.php' => '793d03ad26b98f1675a3331fb390210f',
   'user.php' => '04be88f587ad8a00cbf42eacbef75598',
   'userposts.php' => '973300cda186f7eda50879bd6b161ab7',
-  'usersettings.php' => '4b6a3607cd92e9a8aca2726be1d0b1de',
+  'usersettings.php' => 'ced16b8baf8a31197784ded5b64ef921',
 );
 
 $deprecated_image = array (
@@ -5706,11 +5707,10 @@
   'CHANGES.txt' => '20499ea696da01da57ff542cb8cc90ce',
   'Copy of class2.php' => '4bc75d69d5486bb439f681467ccb9256',
   'Copy of forum_post.php' => '0063a6cdd546d5f90374bbb3ae342a2a',
-  'README.txt' => 'b7c272abfd2426ac41a9e0851da77e7a',
+  'README.txt' => 'd216796a56db209345a467cf03d3f3c2',
   'ReadMe_English_iso-8859-1.txt' => 'a15c32416143ecdebb10fab747a9065a',
   'chat.php' => 'f99ca9a68e350852ff12b6f201ff46e4',
   'e107_6171_readme.txt' => '7f411eaafccc974f91447c8efd9992d4',
-  'e107_v0.7.12_full.tar.gz' => '65db4826265763e2a4e719b369d9aefc',
   'forum_post.php' => 'b4537a7296252a0d8c010824b698259b',
   'install.php' => 'e5ab961c3e9aaeefd8bcc11b9e2ae6bc',
   'oldpolls.php' => '2758e56550195c508819c6062b950bc3',
diff -x .svn -aruN 0.7.13.src/e107_admin/ver.php 0.7.14.src/e107_admin/ver.php
--- 0.7.13.src/e107_admin/ver.php	2008-09-28 20:49:06.000000000 -0500
+++ 0.7.14.src/e107_admin/ver.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,14 +11,14 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/e107_admin/ver.php,v $
-|     $Revision: 1.25 $
-|     $Date: 2008/09/29 01:49:29 $
+|     $Revision: 1.26 $
+|     $Date: 2008/11/12 19:11:04 $
 |     $Author: mcfly_e107 $
 +----------------------------------------------------------------------------+
 */
 
 if (!defined('e107_INIT')) { exit; }
 
-$e107info['e107_version'] = "0.7.13";
+$e107info['e107_version'] = "0.7.14";
 
 ?>
\ No newline at end of file
diff -x .svn -aruN 0.7.13.src/e107_files/bbcode/img.bb 0.7.14.src/e107_files/bbcode/img.bb
--- 0.7.13.src/e107_files/bbcode/img.bb	2008-03-12 17:14:43.000000000 -0500
+++ 0.7.14.src/e107_files/bbcode/img.bb	2008-11-17 14:36:31.000000000 -0600
@@ -58,18 +58,18 @@
         }
         else
         {
-            return ($pref['image_post_disabled_method'] ? "[ image disabled ]" : "Image: $code_text");
+            return ($pref['image_post_disabled_method'] ? CORE_LAN17 : CORE_LAN18.$code_text);
         }
     }
     else
     {
         if ($pref['image_post_disabled_method'])
 		{
-            return '[ image disabled ]';
+            return CORE_LAN17;
         }
 		else
 		{
-            return "Image: $code_text";
+            return CORE_LAN18.$code_text;
         }
     }
 }
diff -x .svn -aruN 0.7.13.src/e107_files/def_e107_prefs.php 0.7.14.src/e107_files/def_e107_prefs.php
--- 0.7.13.src/e107_files/def_e107_prefs.php	2008-03-17 15:47:30.000000000 -0500
+++ 0.7.14.src/e107_files/def_e107_prefs.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,8 +11,8 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/e107_files/def_e107_prefs.php,v $
-|     $Revision: 1.65 $
-|     $Date: 2008/03/17 20:47:53 $
+|     $Revision: 1.67 $
+|     $Date: 2008/10/31 21:10:39 $
 |     $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
@@ -41,17 +41,33 @@
   'adminstyle' => 'classis',
   'sitedisclaimer' => LAN_PREF_3,
   'newsposts' => '10',
+
   'flood_protect' => '1',
   'flood_timeout' => '5',
   'flood_time' => '30',
   'flood_hits' => '100',
   'anon_post' => '0',
+
   'user_reg' => '1',
-  'use_coppa' => '1',
   'membersonly_enabled' => '0',
+
+  'use_coppa' => '1',
+  'signcode' => '0',
+  'user_reg_veri' => '1',
+  'user_reg_secureveri' => '1',
   'signup_pass_len' => '',
   'signup_maxip' => '3',
   'signup_disallow_text' => '',
+  'disable_emailcheck' => 0,
+  'signup_text' => '',
+  'signup_text_after' => '',
+  'signup_option_realname' => '1',
+  'signup_option_signature' => '1',
+  'signup_option_image' => '1',
+  'signup_option_timezone' => '1',
+  'signup_option_class' => '1',
+  'signup_remote_emailcheck' => 0,
+
   'displayname_class' => 255,
   'displayname_maxlength' => 15,
   'loginname_maxlength' => 30,
@@ -66,12 +82,8 @@
   'sitelanguage' => $pref_language,
   'maintainance_flag' => '0',
   'time_offset' => '0',
-  'log_lvcount' => '10',
   'meta_tag' => '',
-  'user_reg_veri' => '1',
   'email_notify' => '0',
-  'user_tracking' => 'cookie',
-  'cookie_name' => 'e107cookie',
   'resize_method' => 'gd2',
   'im_path' => '/usr/X11R6/bin/',
   'im_quality' => '80',
@@ -99,17 +111,10 @@
   array (
     'all' => 'news.php',
   ),
-  'signup_text' => '',
   'admin_alerts_ok' => '1',
   'link_replace' => '0',
   'link_text' => '',
-  'signcode' => '0',
   'logcode' => '0',
-  'signup_option_realname' => '1',
-  'signup_option_signature' => '1',
-  'signup_option_image' => '1',
-  'signup_option_timezone' => '1',
-  'signup_option_class' => '1',
   'newsposts_archive' => '0',
   'newsposts_archive_title' => '',
   'news_cats' => '',
@@ -139,7 +144,6 @@
   'post_html' => '254',
   'redirectsiteurl' => '0',
   'admin_alerts_uniquemenu' => '0',
-  'signup_text_after' => '',
   'null' => '',
   'links_new_window' => '1',
   'main_wordwrap' => '',
@@ -147,7 +151,6 @@
   'php_bbcode' => '255',
   'ssl_enabled' => '0',
   'fpwcode' => '0',
-  'user_reg_secureveri' => '1',
   'disallowMultiLogin' => '0',
   'profanity_words' => '',
   'adminpwordchange' => '0',
@@ -159,7 +162,9 @@
   'download_email' => '0',
   'comments_disabled' => '0',
   'memberlist_access' => '253',
-  'check_updates' => '0'
+  'check_updates' => '0',
+  'user_tracking' => 'cookie',
+  'cookie_name' => 'e107cookie'
 );
 
 ?>
\ No newline at end of file
diff -x .svn -aruN 0.7.13.src/e107_files/e107.js 0.7.14.src/e107_files/e107.js
--- 0.7.13.src/e107_files/e107.js	2008-06-24 03:00:09.000000000 -0500
+++ 0.7.14.src/e107_files/e107.js	2008-11-17 14:36:31.000000000 -0600
@@ -5,9 +5,9 @@
 |	e107 website system - Javascript File.
 |
 |	$Source: /cvsroot/e107/e107_0.7/e107_files/e107.js,v $
-|	$Revision: 1.28 $
-|	$Date: 2008/06/24 08:00:32 $
-|	$Author: secretr $
+|	$Revision: 1.29 $
+|	$Date: 2008/10/30 21:00:23 $
+|	$Author: e107steved $
 +----------------------------------------------------------------------------+
 */
 
@@ -130,7 +130,7 @@
 			myheight=400;
 		}
 
-		pwindow = window.open(url,'Name', 'top=100,left=100,resizable=yes,width='+mywidth+',height='+myheight+',scrollbars=yes,menubar=yes')
+		pwindow = window.open(url,'Name', 'top=100,left=100,resizable=yes,width='+mywidth+',height='+myheight+',scrollbars=yes,menubar=yes');
 	}
 	pwindow.focus();
 }
@@ -282,7 +282,7 @@
 		selEnd = selLength;
 	}
 	var sel1 = (eField.value).substring(0,selStart);
-	var sel2 = (eField.value).substring(selStart, selEnd)
+	var sel2 = (eField.value).substring(selStart, selEnd);
 	var sel3 = (eField.value).substring(selEnd, selLength);
 
 	var newStart = selStart + tagOpen.length + sel2.length + tagClose.length;
@@ -296,11 +296,11 @@
 
 }
 
-function help(help,tagid){
+function help(helpstr,tagid){
 	if(tagid){
-		document.getElementById(tagid).value = help;
+		document.getElementById(tagid).value = helpstr;
 	} else if(document.getElementById('dataform')) {
-		document.getElementById('dataform').helpb.value = help;
+		document.getElementById('dataform').helpb.value = helpstr;
 	}
 }
 function externalLinks() {
diff -x .svn -aruN 0.7.13.src/e107_files/shortcode/user_extended.sc 0.7.14.src/e107_files/shortcode/user_extended.sc
--- 0.7.13.src/e107_files/shortcode/user_extended.sc	2008-09-02 14:31:23.000000000 -0500
+++ 0.7.14.src/e107_files/shortcode/user_extended.sc	2008-11-17 14:36:31.000000000 -0600
@@ -38,7 +38,7 @@
 {
   $ret_cause = 0;
   if (!check_class($ueStruct["user_".$parms[0]]['user_extended_struct_applicable'], $udata['user_class'])) $ret_cause = 1;
-  if (!check_class($ueStruct["user_".$parms[0]]['user_extended_struct_read'])) $ret_cause = 2;
+  if (!check_class($ueStruct["user_".$parms[0]]['user_extended_struct_read'], $udata['user_class'])) $ret_cause = 2;
   if (($ueStruct["user_".$parms[0]]['user_extended_struct_read'] == e_UC_READONLY && (!ADMIN && $udata['user_id'] != USERID))) $ret_cause = 3;
   if ((!ADMIN && substr($ueStruct["user_".$parms[0]]['user_extended_struct_parms'], -1) == 1 
 	&& strpos($udata['user_hidden_fields'], "^user_".$parms[0]."^") !== FALSE && $uid != USERID)) $ret_cause = 4;
diff -x .svn -aruN 0.7.13.src/e107_files/thumb.php 0.7.14.src/e107_files/thumb.php
--- 0.7.13.src/e107_files/thumb.php	2005-08-22 22:53:42.000000000 -0500
+++ 0.7.14.src/e107_files/thumb.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,35 +11,58 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/e107_files/thumb.php,v $
-|     $Revision: 1.2 $
-|     $Date: 2005/08/23 03:54:04 $
-|     $Author: sweetas $
+|     $Revision: 1.3 $
+|     $Date: 2008/10/03 20:28:30 $
+|     $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
 /*
+		!!!!***** Deprecated location for this file - use the one in e107_images *****!!!
+*/
+/*
  Usage: simply replace your <img src='filename.jpg'
  with
- <img src='".e_IMAGE."thumb.php?filename.jpg+size"' />
+ <img src='".e_IMAGE_ABS."thumb.php?filename.jpg+size"' />
  or
- <img src='".e_IMAGE."thumb.php?<full path to file>/filename.jpg+size"' />
- eg <img src='".e_IMAGE."thumb.php?home/images/myfilename.jpg+100)"' />
+ <img src='".e_IMAGE_ABS."thumb.php?<full path to file>/filename.jpg+size"' />
+ eg <img src='".e_IMAGE_ABS."thumb.php?home/images/myfilename.jpg+100)"' />
+ By default a small image is upsized. To render the image unchanged, append '+noscale', thus:
+ eg <img src='".e_IMAGE_ABS."thumb.php?home/images/myfilename.jpg+100+noscale)"' />
 
 */
 
+
 require_once("../class2.php");
 require_once(e_HANDLER."resize_handler.php");
 
-    if (e_QUERY){
-        $tmp = explode("+",rawurldecode(e_QUERY));
-        if(strpos($tmp[0], "/") === 0 || strpos($tmp[0], ":") >= 1){
-            $source = $tmp[0];
-        }else{
-            $source = "../".str_replace("../","",$tmp[0]);
-        }
+if (e_QUERY)
+{
+	$tmp = explode('+',rawurldecode(e_QUERY));
+	if(strpos($tmp[0], '/') === 0 || strpos($tmp[0], ":") >= 1)
+	{
+		$source = $tmp[0];	// Full path to image specified
+	}
+	else
+	{
+		$source = "../".str_replace('../','',$tmp[0]);
+	}
+	if (!$source)
+	{
+		echo "No image name.<br />";
+		exit;
+	} 
+	$newsize = intval($tmp[1]);
+	
+	if (($newsize < 5) || ($newsize > 4000))	// Pretty generous limits
+	{
+		echo "Bad image size: {$newsize}<br />";
+		exit;
+	} 
+	$opts = varset($tmp[2],'upsize');
+	if(!resize_image($source, 'stdout', $newsize, $opts))
+	{
+		echo "Couldn't find: {$source}<br />";
+	} 
+} 
 
-        $newsize = $tmp[1];
-        if(!resize_image($source, "stdout", $newsize)){
-            echo "Couldn't find: ".$source;
-        }
-    }
 ?>
\ No newline at end of file
diff -x .svn -aruN 0.7.13.src/e107_handlers/comment_class.php 0.7.14.src/e107_handlers/comment_class.php
--- 0.7.13.src/e107_handlers/comment_class.php	2008-07-31 14:26:12.000000000 -0500
+++ 0.7.14.src/e107_handlers/comment_class.php	2008-11-17 14:36:31.000000000 -0600
@@ -12,8 +12,8 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/e107_handlers/comment_class.php,v $
-|     $Revision: 1.75 $
-|     $Date: 2008/07/31 19:26:35 $
+|     $Revision: 1.78 $
+|     $Date: 2008/10/22 21:31:02 $
 |     $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
@@ -32,7 +32,7 @@
 class comment {
 
 	/**
-	 * Enter description here...
+	 * Display the comment editing form
 	 *
 	 * @param unknown_type $action
 	 * @param unknown_type $table
@@ -47,7 +47,8 @@
 	{
 		//rating	: boolean, to show rating system in comment
 		global $pref, $sql, $tp;
-		if(isset($pref['comments_disabled']) && $pref['comments_disabled'] == TRUE){
+		if(isset($pref['comments_disabled']) && $pref['comments_disabled'] == TRUE)
+		{
         	return;
 		}
 
@@ -65,7 +66,8 @@
 
 			if ($pref['nested_comments'])
 			{
-				$text .= "<tr>\n<td style='width:20%'>".COMLAN_324."</td>\n<td style='width:80%'>\n<input class='tbox comment subject' type='text' name='subject' size='61' value='".$tp -> toForm($subject)."' maxlength='100' />\n</td>\n</tr>";
+				$text .= "<tr>\n<td style='width:20%'>".COMLAN_324."</td>\n<td style='width:80%'>\n
+				<input class='tbox comment subject' type='text' name='subject' size='61' value='".$tp -> toForm($subject)."' maxlength='100' />\n</td>\n</tr>";
 				$text2 = "";
 			}
 			else
@@ -78,7 +80,7 @@
 				$eaction = 'edit';
 				$id = $_GET['comment_id'];
 			}
-			else if (strstr(e_QUERY, "edit"))
+		  elseif (strstr(e_QUERY, "edit"))
 			{
 				$eaction = "edit";
 				$tmp = explode(".", e_QUERY);
@@ -103,18 +105,18 @@
 				list($prid, $pname) = explode(".", $ecom['comment_author']);
 
 				if($prid != USERID || !USER)
-				{
+			{  // Editing not allowed
 					echo "<div style='text-align: center;'>".COMLAN_329."</div>";
 					require_once(FOOTERF);
 					exit;
 				}
 
 				$caption = COMLAN_318;
-				$comval = $tp -> toFORM($ecom['comment_comment']);
+			$comval = $tp -> toForm($ecom['comment_comment']);
 				$comval = preg_replace("#\[ ".COMLAN_319.".*\]#si", "", $comval);
 			}
 			else
-			{
+		  {  // New comment - blank form
 				$caption = COMLAN_9;
 				$comval = "";
 			}
@@ -128,16 +130,17 @@
 				if(!is_object($rater)){ $rater = new rater; }
 				$rate = $rater -> composerating($table, $itemid, $enter=TRUE, USERID, TRUE);
 				$rate = "<tr><td style='width:20%; vertical-align:top;'>".COMLAN_327.":</td>\n<td style='width:80%;'>".$rate."</td></tr>\n";
-			}
-			//end rating area
+		  }  //end rating area
 
 			if (ANON == TRUE && USER == FALSE)
-			{
-				$text .= "<tr>\n<td style='width:20%; vertical-align:top;'>".COMLAN_16."</td>\n<td style='width:80%'>\n<input class='tbox comment author' type='text' name='author_name' size='61' value='$author_name' maxlength='100' />\n</td>\n</tr>";
+		  {	// Box for author name (anonymous comments - if allowed)
+			$text .= "<tr>\n<td style='width:20%; vertical-align:top;'>".COMLAN_16."</td>\n<td style='width:80%'>\n<input class='tbox comment author' type='text' name='author_name' size='61' value='{$author_name}' maxlength='100' />\n</td>\n</tr>";
 			}
 			$text .= $rate."<tr> \n
 			<td style='width:20%; vertical-align:top;'>".COMLAN_8.":</td>\n<td id='commentform' style='width:80%;'>\n<textarea class='tbox comment' id='comment' name='comment' cols='62' rows='7' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'>$comval</textarea>\n<br />
-			".display_help('helpb',"comment")."</td></tr>\n<tr style='vertical-align:top'> \n<td style='width:20%'>".$text2."</td>\n<td id='commentformbutton' style='width:80%;'>\n". (isset($action) && $action == "reply" ? "<input type='hidden' name='pid' value='$id' />" : '').(isset($eaction) && $eaction == "edit" ? "<input type='hidden' name='editpid' value='$id' />" : "").(isset($content_type) && $content_type ? "<input type='hidden' name='content_type' value='$content_type' />" : ''). "<input class='button' type='submit' name='".$action."submit' value='".(isset($eaction) && $eaction == "edit" ? COMLAN_320 : COMLAN_9)."' />\n</td>\n</tr>\n</table>\n</form></div>";
+			".display_help('helpb',"comment")."</td></tr>\n<tr style='vertical-align:top'> \n<td style='width:20%'>".$text2."</td>\n
+			<td id='commentformbutton' style='width:80%;'>\n
+			". (isset($action) && $action == "reply" ? "<input type='hidden' name='pid' value='{$id}' />" : '').(isset($eaction) && $eaction == "edit" ? "<input type='hidden' name='editpid' value='{$id}' />" : "").(isset($content_type) && $content_type ? "<input type='hidden' name='content_type' value='{$content_type}' />" : ''). "<input class='button' type='submit' name='".$action."submit' value='".(isset($eaction) && $eaction == "edit" ? COMLAN_320 : COMLAN_9)."' />\n</td>\n</tr>\n</table>\n</form></div>";
 
 			if($tablerender)
 			{
@@ -154,7 +157,7 @@
 			}
 		}
 		else
-		{
+		{  // Comment entry not allowed - point to signup link
 			echo "<br /><div style='text-align:center'><b>".COMLAN_6." <a href='".e_SIGNUP."'>".COMLAN_321."</a> ".COMLAN_322."</b></div>";
 		}
 	}
@@ -171,13 +174,15 @@
 	 * @param unknown_type $addrating
 	 * @return unknown
 	 */
-	function render_comment($row, $table, $action, $id, $width, $subject, $addrating=FALSE) {
+	function render_comment($row, $table, $action, $id, $width, $subject, $addrating=FALSE) 
+	{
 		//addrating	: boolean, to show rating system in rendered comment
 		global $sql, $sc_style, $comment_shortcodes, $COMMENTSTYLE, $rater, $gen;
 		global $pref, $comrow, $tp, $NEWIMAGE, $USERNAME, $RATING, $datestamp;
 		global $thisaction, $thistable, $thisid;
 
-		if(isset($pref['comments_disabled']) && $pref['comments_disabled'] == TRUE){
+		if(isset($pref['comments_disabled']) && $pref['comments_disabled'] == TRUE)
+		{
         	return;
 		}
 
@@ -210,7 +215,8 @@
 		$delete		= "[<a href='".e_ADMIN_ABS."comment.php?delete-".$comrow['comment_id']."-$url-".$comrow['comment_item_id']."'>".COMLAN_3."</a>] ";
 		$userinfo	= "[<a href='".e_ADMIN_ABS."userinfo.php?".$comrow['comment_ip']."'>".COMLAN_4."</a>]";
 
-		if (!$COMMENTSTYLE) {
+		if (!$COMMENTSTYLE) 
+		{
 			global $THEMES_DIRECTORY;
 			$COMMENTSTYLE = "";
 			if (file_exists(THEME."comment_template.php")) {
@@ -219,10 +225,12 @@
 				require_once(e_BASE.$THEMES_DIRECTORY."templates/comment_template.php");
 			}
 		}
-		if ($pref['nested_comments']) {
+		if ($pref['nested_comments']) 
+		{
 			$width2 = 100 - $width;
 			$total_width = (isset($pref['standards_mode']) && $pref['standards_mode'] ? "98%" : "95%");
-			if($width){
+			if($width)
+			{
 				$renderstyle = "
 				<table style='width:".$total_width."' border='0'>
 				<tr>
@@ -307,11 +315,13 @@
 	 * @param unknown_type $subject
 	 * @param unknown_type $rateindex
 	 */
-	function enter_comment($author_name, $comment, $table, $id, $pid, $subject, $rateindex=FALSE) {
+	function enter_comment($author_name, $comment, $table, $id, $pid, $subject, $rateindex=FALSE) 
+	{
 		//rateindex	: the posted value from the rateselect box (without the urljump) (see function rateselect())
 		global $sql, $sql2, $tp, $e107cache, $e_event, $e107, $pref, $rater;
 
-		if(isset($pref['comments_disabled']) && $pref['comments_disabled'] == TRUE){
+		if(isset($pref['comments_disabled']) && $pref['comments_disabled'] == TRUE)
+		{
         	return;
 		}
 
@@ -320,7 +330,7 @@
 			$eaction = 'edit';
 			$editpid = $_GET['comment_id'];
 		}
-		else if (strstr(e_QUERY, "edit"))
+		elseif (strstr(e_QUERY, "edit"))
 		{
 			$eaction = "edit";
 			$tmp = explode(".", e_QUERY);
@@ -369,7 +379,7 @@
 					if($editpid)
 					{
 						$comment .= "\n[ ".COMLAN_319." [time=short]".time()."[/time] ]";
-						$sql -> db_Update("comments", "comment_comment='$comment' WHERE comment_id='".intval($editpid)."' ");
+				$sql -> db_Update("comments", "comment_comment='{$comment}' WHERE comment_id='".intval($editpid)."' ");
 						$e107cache->clear("comment");
 						return;
 					}
@@ -380,7 +390,8 @@
 					}
 					else
 					{
-						if (USER == TRUE) {
+				if (USER == TRUE) 
+				{
 							$sql -> db_Update("user", "user_comments=user_comments+1, user_lastpost='".time()."' WHERE user_id='".USERID."' ");
 						}
 						$edata_li = array("comment_type" => $type, "comment_subject" => $subject, "comment_item_id" => $id, "comment_nick" => $nick, "comment_time" => $_t, "comment_comment" => $comment);
@@ -448,7 +459,7 @@
 	{
 		global $sql, $tp;
 		$type = $this -> getCommentType($table);
-		$count_comments = $sql -> db_Count("comments", "(*)", "WHERE comment_item_id='".intval($id)."' AND comment_type='".$tp -> toDB($type, true)."' ORDER BY comment_item_id");
+		$count_comments = $sql -> db_Count("comments", "(*)", "WHERE comment_item_id='".intval($id)."' AND comment_type='".$tp -> toDB($type, true)."' ");
 		return $count_comments;
 	}
 
@@ -456,23 +467,26 @@
 	/**
 	 * Enter description here...
 	 *
-	 * @param unknown_type $table
-	 * @param unknown_type $action
-	 * @param unknown_type $id
-	 * @param unknown_type $width
+	 * @param unknown_type $table - the source table for the associated item
+	 * @param unknown_type $action - usually 'comment' or 'reply'
+	 * @param unknown_type $id - ID of item associated with comments (e.g. news ID)
+	 * @param unknown_type $width - appears to not be used
 	 * @param unknown_type $subject
 	 * @param unknown_type $rate
 	 */
-	function compose_comment($table, $action, $id, $width, $subject, $rate=FALSE, $return=FALSE, $tablerender=TRUE){
+	function compose_comment($table, $action, $id, $width, $subject, $rate=FALSE, $return=FALSE, $tablerender=TRUE)
+	{
 		//compose comment	: single call function will render the existing comments and show the form_comment
 		//rate				: boolean, to show/hide rating system in comment, default FALSE
 		global $pref, $sql, $ns, $e107cache, $tp, $totcc;
 
-		if(isset($pref['comments_disabled']) && $pref['comments_disabled'] == TRUE){
+		if(isset($pref['comments_disabled']) && $pref['comments_disabled'] == TRUE)
+		{
         	return;
 		}
 
-		$count_comments = $this -> count_comments($table, $id, $pid=FALSE);
+//		Query no longer used
+//		$count_comments = $this -> count_comments($table, $id, $pid=FALSE);
 
 		$type = $this -> getCommentType($table);
 
@@ -551,6 +565,9 @@
 		return (!$return) ? "" : $ret;
 	}
 
+
+
+
 	function recalc_user_comments($id)
 	{
 	  global $sql;
@@ -575,6 +592,7 @@
 	  }
 	}
 	
+	
 	function get_author_list($id, $comment_type)
 	{
 		global $sql;
@@ -595,6 +613,8 @@
 		return $authors;
 	}
 
+
+
 	function delete_comments($table, $id)
 	{
 		global $sql, $tp;
@@ -617,10 +637,11 @@
 	//6) from file: render the returned data
 
 	//get all e_comment.php files and collect the variables
-	function get_e_comment(){
-
+	function get_e_comment()
+	{
 		$data = getcachedvars('e_comment');
-		if($data!==FALSE){
+	  if($data!==FALSE)
+	  {
 			return $data;
 		}
 
@@ -628,7 +649,6 @@
 		$fl = new e_file;
 
 		$omit = array('^\.$','^\.\.$','^\/$','^CVS$','thumbs\.db','.*\._$','.bak$');
-//		$files = $fl->get_files(e_PLUGIN, $fmask = 'e_comment.php', $omit, $recurse_level = 1, $current_level = 0);
 		$files = $fl->get_files(e_PLUGIN, 'e_comment.php', $omit, 1, 0);
 
 		foreach($files as $file){
@@ -673,7 +693,8 @@
 	* @param array $cdreta : current data set
 	*/
 
-	function getCommentData($amount='', $from='', $qry='', $cdvalid=FALSE, $cdreta=FALSE){
+	function getCommentData($amount='', $from='', $qry='', $cdvalid=FALSE, $cdreta=FALSE)
+	{
 		global $pref, $menu_pref, $sql, $sql2, $tp;
 
 		$from1 = ($from ? $from : '0');
@@ -715,7 +736,7 @@
 				$comment_author_name = substr($row['comment_author'] , (strpos($row['comment_author'] , ".")+1));
 				$ret['comment_author_id'] = $comment_author_id;
 				$ret['comment_author_name'] = $comment_author_name;
-				$ret['comment_author'] = (USERID ? "<a href='".e_BASE."user.php?id.".$comment_author_id."'>".$comment_author_name."</a>" : $comment_author_name);
+				$ret['comment_author'] = (USERID ? "<a href='".e_HTTP."user.php?id.".$comment_author_id."'>".$comment_author_name."</a>" : $comment_author_name);
 
 				//comment text
 				$comment = strip_tags(preg_replace("/\[.*\]/", "", $row['comment_comment'])); // remove bbcode
@@ -733,9 +754,9 @@
 
 						$ret['comment_type']				= COMLAN_TYPE_1;
 						$ret['comment_title']				= $tp -> toHTML($row2['news_title'], TRUE,'emotes_off, no_make_clickable');
-						$ret['comment_url']					= e_BASE."comment.php?comment.news.".$row['comment_item_id'];
+						$ret['comment_url']					= e_HTTP."comment.php?comment.news.".$row['comment_item_id'];
 						$ret['comment_category_heading']	= COMLAN_TYPE_1;
-						$ret['comment_category_url']		= e_BASE."news.php";
+						$ret['comment_category_url']		= e_HTTP."news.php";
 					}
 					break;
 					
@@ -750,9 +771,9 @@
 
 						$ret['comment_type']				= COMLAN_TYPE_2;
 						$ret['comment_title']				= $tp -> toHTML($row2['download_name'], TRUE,'emotes_off, no_make_clickable');
-						$ret['comment_url']					= e_BASE."download.php?view.".$row['comment_item_id'];
+						$ret['comment_url']					= e_HTTP."download.php?view.".$row['comment_item_id'];
 						$ret['comment_category_heading']	= $row2['download_category_name'];
-						$ret['comment_category_url']		= e_BASE."download.php?list.".$row2['download_category_id'];
+						$ret['comment_category_url']		= e_HTTP."download.php?list.".$row2['download_category_id'];
 					}
 					break;
 						// '3' was FAQ
@@ -763,7 +784,8 @@
 
 						$ret['comment_type']				= COMLAN_TYPE_4;
 						$ret['comment_title']				= $tp -> toHTML($row2['poll_title'], TRUE,'emotes_off, no_make_clickable');
-						$ret['comment_url']					= e_BASE."comment.php?comment.poll.".$row['comment_item_id'];
+						$ret['comment_url']					= e_HTTP."comment.php?comment.poll.".$row['comment_item_id'];
+						$ret['comment_category_url']		= e_PLUGIN_ABS.'poll/poll.php';
 					}
 					break;
 					
@@ -776,14 +798,14 @@
 					{
 						$ret['comment_type']				= COMLAN_TYPE_8;
 						$ret['comment_title']				= $comment_author_name;
-						$ret['comment_url']					= e_BASE."user.php?id.".$row['comment_item_id'];
+						$ret['comment_url']					= e_HTTP."user.php?id.".$row['comment_item_id'];
 					}
 					break;
 
 				  case 'page' :		//	Custom Page
 					$ret['comment_type']				= COMLAN_TYPE_PAGE;
 					$ret['comment_title']				= $ret['comment_subject'] ? $ret['comment_subject'] : $ret['comment_comment'];
-					$ret['comment_url']					= e_BASE."page.php?".$row['comment_item_id'];
+					$ret['comment_url']					= e_HTTP."page.php?".$row['comment_item_id'];
 					break;
 
 				  default :
@@ -794,7 +816,6 @@
 						//new method must use the 'qry' variable
 					  if(isset($var) && $var['qry']!='')
 					  {
-//						if ($installed = $sql2 -> db_Select("plugin", "*", "plugin_path = '".$var['plugin_path']."' AND plugin_installflag = '1' "))
 						if ($installed = isset($pref['plug_installed'][$var['plugin_path']]))
 						{
 							$qryp = str_replace("{NID}", $row['comment_item_id'], $var['qry']);
@@ -805,20 +826,21 @@
 								$ret['comment_title']				= $tp -> toHTML($row2[$var['db_title']], TRUE,'emotes_off, no_make_clickable');
 								$ret['comment_url']					= str_replace("{NID}", $row['comment_item_id'], $var['reply_location']);
 								$ret['comment_category_heading']	= $var['plugin_name'];
-								$ret['comment_category_url']		= $var['plugin_name'];
+								$ret['comment_category_url']		= e_PLUGIN_ABS.$var['plugin_name'].'/'.$var['plugin_name'].'.php';
 							}
 						}
 					//old method
 					  }
 					  else
 					  {
-						if($sql2 -> db_Select($var['db_table'], $var['db_title'], $var['db_id']." = '".$row['comment_item_id']."' ")){
+						if($sql2 -> db_Select($var['db_table'], $var['db_title'], $var['db_id']." = '".$row['comment_item_id']."' "))
+						{
 							$row2 = $sql2 -> db_Fetch();
 							$ret['comment_type']				= $var['plugin_name'];
 							$ret['comment_title']				= $tp -> toHTML($row2[$var['db_title']], TRUE,'emotes_off, no_make_clickable');
 							$ret['comment_url']					= str_replace("{NID}", $row['comment_item_id'], $var['reply_location']);
 							$ret['comment_category_heading']	= $var['plugin_name'];
-							$ret['comment_category_url']		= $var['plugin_name'];
+							$ret['comment_category_url']		= e_PLUGIN_ABS.$var['plugin_name'].'/'.$var['plugin_name'].'.php';
 						}
 					  }
 					}
diff -x .svn -aruN 0.7.13.src/e107_handlers/e_parse_class.php 0.7.14.src/e107_handlers/e_parse_class.php
--- 0.7.13.src/e107_handlers/e_parse_class.php	2008-09-04 14:49:55.000000000 -0500
+++ 0.7.14.src/e107_handlers/e_parse_class.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,8 +11,8 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/e107_handlers/e_parse_class.php,v $
-|     $Revision: 1.212 $
-|     $Date: 2008/09/04 19:50:18 $
+|     $Revision: 1.216 $
+|     $Date: 2008/11/06 20:59:36 $
 |     $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
@@ -664,8 +664,10 @@
             if ($pref['link_replace'] && !$opts['no_replace'])
 			{
               $_ext = ($pref['links_new_window'] ? " rel=\"external\"" : "");
-              $text = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<,]*)#is", "\\1<a href=\"\\2\" {$_ext}>".$pref['link_text']."</a>", $text);
-			  $text = preg_replace("#(^|[\n \]])((www|ftp)\.[\w+-]+?\.[\w+\-.]*(?(?=/)(/.+?(?=\s|,\s))|(?=\W)))#is", "\\1<a href=\"http://\\2\" {$_ext}>".$pref['link_text']."</a>", $text);
+// 			  $text = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<,]*)#is", "\\1<a href=\"\\2\" {$_ext}>".$pref['link_text']."</a>", $text);
+              $text = preg_replace("#(^|[\s])([\w]+?://(?:[\w-%]+?)(?:\.[\w-%]+?)+.*?)(?=$|[\s()[\]]|\.\s|\.$|,\s|,$)#is", "\\1<a href=\"\\2\" {$_ext}>".$pref['link_text']."</a>", $text);
+//			  $text = preg_replace("#(^|[\n \]])((www|ftp)\.[\w+-]+?\.[\w+\-.]*(?(?=/)(/.+?(?=\s|,\s))|(?=\W)))#is", "\\1<a href=\"http://\\2\" {$_ext}>".$pref['link_text']."</a>", $text);
+			  $text = preg_replace("#(^|[\s])((?:www|ftp)(?:\.[\w-%]+?){2}.*?)(?=$|[\s()[\]]|\.\s|\.$|,\s|,$)#is", "\\1<a href=\"http://\\2\" {$_ext}>".$pref['link_text']."</a>", $text);
               if(CHARSET != "utf-8" && CHARSET != "UTF-8")
 			  {
                 $email_text = ($pref['email_text']) ? $this->replaceConstants($pref['email_text']) : "\\1\\2&copy;\\3";
@@ -678,8 +680,10 @@
             }
 			else
 			{
-              $text = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<,]*)#is", "\\1<a href=\"\\2\" rel=\"external\">\\2</a>", $text);
-			  $text = preg_replace("#(^|[\n \]])((www|ftp)\.[\w+-]+?\.[\w+\-.]*(?(?=/)(/.+?(?=\s|,\s))|(?=\W)))#is", "\\1<a href=\"http://\\2\" rel=\"external\">\\2</a>", $text);
+//            $text = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<,]*)#is", "\\1<a href=\"\\2\" rel=\"external\">\\2</a>", $text);
+              $text = preg_replace("#(^|[\s])([\w]+?://(?:[\w-%]+?)(?:\.[\w-%]+?)+.*?)(?=$|[\s()[\]]|\.\s|\.$|,\s|,$)#is", "\\1<a href=\"\\2\" rel=\"external\">\\2</a>", $text);
+//			  $text = preg_replace("#(^|[\n \]])((www|ftp)\.[\w+-]+?\.[\w+\-.]*(?(?=/)(/.+?(?=\s|,\s))|(?=\W)))#is", "\\1<a href=\"http://\\2\" rel=\"external\">\\2</a>", $text);
+			  $text = preg_replace("#(^|[\s])((?:www|ftp)(?:\.[\w-%]+?){2}.*?)(?=$|[\s()[\]]|\.\s|\.$|,\s|,$)#is", "\\1<a href=\"http://\\2\" rel=\"external\">\\2</a>", $text);
               $text = preg_replace("#([\n ])([a-z0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a rel='external' href='javascript:window.location=\"mai\"+\"lto:\"+\"\\2\"+\"@\"+\"\\3\";self.close();' onmouseover='window.status=\"mai\"+\"lto:\"+\"\\2\"+\"@\"+\"\\3\"; return true;' onmouseout='window.status=\"\";return true;'>".LAN_EMAIL_SUBS."</a>", $text);
             }
         }
diff -x .svn -aruN 0.7.13.src/e107_handlers/ren_help.php 0.7.14.src/e107_handlers/ren_help.php
--- 0.7.13.src/e107_handlers/ren_help.php	2008-09-18 14:12:13.000000000 -0500
+++ 0.7.14.src/e107_handlers/ren_help.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,8 +11,8 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/e107_handlers/ren_help.php,v $
-|     $Revision: 1.65 $
-|     $Date: 2008/09/18 19:12:36 $
+|     $Revision: 1.66 $
+|     $Date: 2008/11/08 17:24:37 $
 |     $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
@@ -56,11 +56,14 @@
 	}
 
     // Load the Plugin bbcode AFTER the templates, so they can modify or replace.
-	foreach($pref['e_bb_list'] as $val)
+	if  (!empty($pref['e_bb_list']))
 	{
-    	if(is_readable(e_PLUGIN.$val."/e_bb.php"))
+		foreach($pref['e_bb_list'] as $val)
 		{
-        	require(e_PLUGIN.$val."/e_bb.php");
+			if(is_readable(e_PLUGIN.$val."/e_bb.php"))
+			{
+				require(e_PLUGIN.$val."/e_bb.php");
+			}
 		}
 	}
 
diff -x .svn -aruN 0.7.13.src/e107_handlers/resize_handler.php 0.7.14.src/e107_handlers/resize_handler.php
--- 0.7.13.src/e107_handlers/resize_handler.php	2007-12-20 14:50:49.000000000 -0600
+++ 0.7.14.src/e107_handlers/resize_handler.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,11 +11,10 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/e107_handlers/resize_handler.php,v $
-|     $Revision: 1.11 $
-|     $Date: 2007/12/20 20:51:12 $
+|     $Revision: 1.12 $
+|     $Date: 2008/10/03 20:28:30 $
 |     $Author: e107steved $
 |
-| Mod to give correct return code if source image already smaller than max size
 |
 +----------------------------------------------------------------------------+
 */
@@ -25,11 +24,14 @@
 {
 // $destination_file - 'stdout' sends direct to browser. Otherwise treated as file name	
 //						- if its a file, given '644' permissions
-// $type - "upload"
-//		 - numeric - sets new width of image
-//		 - anything else - default preference for image width used, or failing that, 120 pixels
-//			'avatar' is used
-// $model - if "copy", creates a new file from $destination_file with the prefix 'thumb_'. 
+// $type	- numeric - sets new width of image
+//			- "upload" - uses preference 'im_width', or 400px if not defined
+//		 	- anything else - default preference for image width  & heightused, or failing that, 120 px x 100 px
+//				'avatar' may be used to invoke the default (see usersettings.php)
+// $model	- "copy" -  creates a new file for the destination, by prefixing $destination_file with 'thumb_'. Return error for small images.
+//			- 'upsize' - small images are enlarged
+//			- 'noscale' - small images are transferred at their original size
+//			- 'nocopy' - used in content manager plugin
 //					Otherwise overwrites any existing $destination_file
 
 // Returns:  TRUE - essentially, if $destination_file (or a file with a modified name) is valid:
@@ -39,7 +41,7 @@
 //			 FALSE - essentially, if there is not a valid output file available - usually, that resizing failed, or some other error.
 
 	global $pref;
-	 
+
 	$new_height = 0;
 	$mode = ($pref['resize_method'] ? $pref['resize_method'] : "gd2");
 	if ($type == "upload") 
@@ -55,9 +57,11 @@
 	  $new_size = varset($pref['im_width'], 120);
 	  $new_height = varset($pref['im_height'], 100);
 	}
-	 
+
+
 	$im_quality = varset($pref['im_quality'], 99);
-	 
+
+
 	$image_stats = getimagesize($source_file);
 	if ($image_stats == null) 
 	{
@@ -82,7 +86,39 @@
 	{  // Nothing to do if image width already smaller than the maximum
 	  // If we were basically ensuring an existing file was within limits, return TRUE
 	  // If we had to create a new file, return FALSE since it wasn't done.
-	  return (($source_file == $destination_file) && ($model != 'copy'));
+		switch ($model)
+		{
+			case 'copy' :		// Not sure what to do here!
+				return FALSE;	// This is what it used to do
+				break;
+			case 'upsize' :		// Scale source up to required size
+				break;			// Just fall through to do that.
+			case 'noscale' :	// No scaling of small images- just want destination to be the same as source
+				if ($destination_file == 'stdout')
+				{
+					$fileExt = strtolower(substr(strrchr($source_file, "."), 1));
+					$mimeTypes = array(
+						'jpg' 	=> 'jpeg',
+						'gif' 	=> 'gif',
+						'png'	=> 'png',
+						'jpeg'	=> 'jpeg',
+						'pjpeg' => 'jpeg',
+						'bmp'	=> 'bmp'
+						);
+					if (!isset($mimeTypes[$fileExt])) {	return FALSE;  }		// only allow image files  }
+					header("Content-type: image/".$mimeTypes[$fileExt]);
+					if (@readfile($source_file) === FALSE) { return FALSE; }
+				}
+				else
+				{
+					return copy($source_file,$destination_file);
+				}
+				return TRUE;
+				break;
+			default :
+				return ($source_file == $destination_file);
+		}
+//	  return (($source_file == $destination_file) && ($model != 'copy'));
 	}
 	
 	$ratio = ($imagewidth / $new_size);
@@ -95,30 +131,30 @@
 		 
 	}
 
+	if (($destination_file != 'stdout') && ($model == 'copy'))
+	{
+		$destination_file = dirname($destination_file).'/thumb_'.basename($destination_file);
+	}
+	$returnError = 0;		// Return value from some of the commands
 	switch ($mode)
 	{
 	  case "ImageMagick" :
 	    if ($destination_file == "stdout") 
-		{		/* if destination is stdout, output directly to the browser */
+		{		// if destination is stdout, output directly to the browser 
 //		  $destination_file = "jpg:-";
 		  header("Content-type: image/jpeg");
 		  // Use double quotes instead of single to keep Bill happy
-		  passthru ($pref['im_path']."convert -quality ".$im_quality." -antialias -geometry ".$new_size."x".$new_imageheight." ".escapeshellarg($source_file)." \"jpg:-\"");
+		  passthru ($pref['im_path']."convert -quality ".$im_quality." -antialias -geometry ".$new_size."x".$new_imageheight." ".escapeshellarg($source_file)." \"jpg:-\"", $returnError);
 		} 
 		else 
-		{		/* otherwise output to file */
-		  if ($model == "copy") 
-		  {
-			$name = substr($destination_file, (strrpos($destination_file, "/")+1));
-			$name2 = "thumb_".$name;
-			$destination_file = str_replace($name, $name2, $destination_file);
-		  }
+		{		// otherwise output to file 
 		  // Use double quotes instead of single to keep Bill happy
-//		  exec ($pref['im_path']."convert -quality ".$im_quality." -antialias -geometry ".$new_size."x".$new_imageheight." ".escapeshellarg($source_file)." '".$destination_file."'");
-		  exec ($pref['im_path']."convert -quality ".$im_quality." -antialias -geometry ".$new_size."x".$new_imageheight." ".escapeshellarg($source_file)." \"".$destination_file."\"");
+		  exec ($pref['im_path']."convert -quality ".$im_quality." -antialias -geometry ".$new_size."x".$new_imageheight." ".escapeshellarg($source_file)." \"".$destination_file."\"", $dummy, $returnError);
 		}
+		if ($returnError) echo "ImageMagick resize/output error: {$returnError}<br />";
 		break;
-	  case "gd1" :
+	  case 'gd1' :
+	  case 'gd2' :
 		switch ($image_stats[2])
 		{
 		  case IMAGETYPE_PNG : // 3 - PNG
@@ -138,71 +174,43 @@
 		{
 		  return FALSE;
 		}
-		$dst_img = imagecreate($new_size, $new_imageheight);		// Create blank image of correct size as target
 		// Only next line is different between gd1 and gd2
-		imagecopyresized($dst_img, $src_img, 0, 0, 0, 0, $new_size, $new_imageheight, $imagewidth, $imageheight);
-		if ($model == "copy") 
-		{
-		  $name = substr($destination_file, (strrpos($destination_file, "/")+1));
-		  $name2 = "thumb_".$name;
-		  $destination_file = str_replace($name, $name2, $destination_file);
-		}
-		 
-		if ($destination_file == "stdout") 
-		{
-		  header("Content-type: image/jpeg");
-		  imagejpeg($dst_img, '', $im_quality);
-		} 
-		else 
-		{
-		  imagejpeg($dst_img, $destination_file, $im_quality);
-		  imagedestroy($src_img);
-		  imagedestroy($dst_img);
-		}
-		break;
-	  case "gd2" :
-		switch ($image_stats[2])
+		if ($mode == 'gd1')
 		{
-		  case IMAGETYPE_PNG : // 3 - PNG
-			$src_img = @imagecreatefrompng($source_file);
-			break;
-		  case IMAGETYPE_GIF : // 1 - GIF
-		    if (!function_exists('imagecreatefromgif')) return FALSE;		// Some versions of GD library don't support GIF
-			$src_img = @imagecreatefromgif($source_file);
-			break;
-		  case IMAGETYPE_JPEG :	// 2 - Jpeg
-		    $src_img = @imagecreatefromjpeg($source_file);
-			break;
-		  default :
-			return FALSE; // Unsupported image type
+			$dst_img = imagecreate($new_size, $new_imageheight);		// Create blank image of correct size as target
+			if (!imagecopyresized($dst_img, $src_img, 0, 0, 0, 0, $new_size, $new_imageheight, $imagewidth, $imageheight))  { $returnError = -4; }
 		}
-		if (!$src_img) 
+		else
 		{
-		  return FALSE;
+			$dst_img = imagecreatetruecolor($new_size, $new_imageheight);
+			if (!imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $new_size, $new_imageheight, $imagewidth, $imageheight)) { $returnError = -5; }
 		}
-		 
-		$dst_img = imagecreatetruecolor($new_size, $new_imageheight);
-		// Only next line is different between gd1 and gd2
-		imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $new_size, $new_imageheight, $imagewidth, $imageheight);
-		if ($model == "copy") 
+		if ($returnError)
 		{
-		  $name = substr($destination_file, (strrpos($destination_file, "/")+1));
-		  $name2 = "thumb_".$name;
-		  $destination_file = str_replace($name, $name2, $destination_file);
+			echo "Resizing error: {$returnError}<br />";
+			return FALSE;
 		}
-		
+ 
 		if ($destination_file == "stdout") 
 		{
 		  header("Content-type: image/jpeg");
-		  imagejpeg($dst_img, '', $im_quality);
+		  if (!imagejpeg($dst_img, '', $im_quality)) $returnError = -1;
 		} 
 		else 
 		{
-		  imagejpeg($dst_img, $destination_file, $im_quality);
-		  imagedestroy($src_img);
-		  imagedestroy($dst_img);
+			if (!imagejpeg($dst_img, $destination_file, $im_quality)) { $returnError = -1; }
 		}
+		if (!imagedestroy($src_img)) { $returnError = -2; }
+		if (!imagedestroy($dst_img)) { $returnError = -3; }
+		if ($returnError)
+		{
+			echo "Resizing error: {$returnError}<br />";
+			return FALSE;
+		}  
 		break;
+		default :
+			echo "Invalid resize function: {$mode}<br />";
+			return FALSE;
 	}   // End switch($mode)
 
 	if ($destination_file == "stdout") return TRUE;		// Can't do anything more if file sent to stdout - assume success
@@ -221,6 +229,6 @@
 	else 
 	{
 	  return TRUE;
-	}
+	} 
 }
 ?>
\ No newline at end of file
diff -x .svn -aruN 0.7.13.src/e107_handlers/shortcode_handler.php 0.7.14.src/e107_handlers/shortcode_handler.php
--- 0.7.13.src/e107_handlers/shortcode_handler.php	2008-03-02 15:07:57.000000000 -0600
+++ 0.7.14.src/e107_handlers/shortcode_handler.php	2008-11-17 14:36:31.000000000 -0600
@@ -12,21 +12,24 @@
 | GNU General Public License (http://gnu.org).
 |
 | $Source: /cvsroot/e107/e107_0.7/e107_handlers/shortcode_handler.php,v $
-| $Revision: 1.45 $
-| $Date: 2008/03/02 21:08:20 $
+| $Revision: 1.46 $
+| $Date: 2008/10/29 20:30:30 $
 | $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
 
 if (!defined('e107_INIT')) { exit; }
 
-if (!isset($tp) || !is_object($tp -> e_sc)) {
+if (!isset($tp) || !is_object($tp -> e_sc)) 
+{
 	$tp->e_sc = new e_shortcode;
 }
 
-class e_shortcode {
+
+class e_shortcode 
+{
 	var $scList;					// The actual code - added by parsing files or when plugin codes encountered. Array key is the shortcode name.
-	var $parseSCFiles;				// True if shortcode file has been parsed
+	var $parseSCFiles;				// True if individual shortcode files are to be used
 	var $addedCodes;				// Apparently not used
 	var $registered_codes;			// Shortcodes added by plugins
 
@@ -34,6 +37,7 @@
 	{
 		global $pref, $register_sc;
 
+		$this->parseSCFiles = TRUE;			// Default probably never used, but make sure its defined.
 		if(varset($pref['shortcode_list'],'') != '')
 		{
         	foreach($pref['shortcode_list'] as $path=>$namearray)
@@ -57,7 +61,10 @@
 		}
 	}
 
-	function parseCodes($text, $useSCFiles = TRUE, $extraCodes = '') {
+	function parseCodes($text, $useSCFiles = TRUE, $extraCodes = '') 
+	{
+		$saveParseSCFiles = $this->parseSCFiles;		// In case of nested call
+
 		$this->parseSCFiles = $useSCFiles;
 		$ret = '';
 		if (is_array($extraCodes)) {
@@ -73,6 +80,7 @@
 				$ret .= $line;
 			}
 		}
+		$this->parseSCFiles = $saveParseSCFiles;		// Restore previous value
 		return $ret;
 	}
 
diff -x .svn -aruN 0.7.13.src/e107_images/thumb.php 0.7.14.src/e107_images/thumb.php
--- 0.7.13.src/e107_images/thumb.php	2005-08-23 04:36:08.000000000 -0500
+++ 0.7.14.src/e107_images/thumb.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,53 +11,55 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/e107_images/thumb.php,v $
-|     $Revision: 1.3 $
-|     $Date: 2005/08/23 09:36:30 $
-|     $Author: sweetas $
+|     $Revision: 1.4 $
+|     $Date: 2008/10/03 20:28:30 $
+|     $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
 /*
  Usage: simply replace your <img src='filename.jpg'
  with
- <img src='".e_IMAGE."thumb.php?filename.jpg+size"' />
+ <img src='".e_IMAGE_ABS."thumb.php?filename.jpg+size"' />
  or
- <img src='".e_IMAGE."thumb.php?<full path to file>/filename.jpg+size"' />
- eg <img src='".e_IMAGE."thumb.php?home/images/myfilename.jpg+100)"' />
+ <img src='".e_IMAGE_ABS."thumb.php?<full path to file>/filename.jpg+size"' />
+ eg <img src='".e_IMAGE_ABS."thumb.php?home/images/myfilename.jpg+100)"' />
+ By default a small image is upsized. To render the image unchanged, append '+noscale', thus:
+ eg <img src='".e_IMAGE_ABS."thumb.php?home/images/myfilename.jpg+100+noscale)"' />
 
 */
 
+
 require_once("../class2.php");
 require_once(e_HANDLER."resize_handler.php");
 
-// var 3.
-// 1= newspost images/preview
-// 2= 
-
-	if (e_QUERY){
-		$tmp = explode("+",rawurldecode(e_QUERY));
-		if(strpos($tmp[0], "/") === 0 || strpos($tmp[0], ":") >= 1){
-			$source = $tmp[0];
-		}else{
-			$source = "../".str_replace("../","",$tmp[0]);
-		}
-
-
-
-
-		$newsize = $tmp[1];
-		if(!file_exists(e_IMAGE."newspost_images/preview/preview_".basename($source))){
-
-		  	if(!resize_image($source, e_IMAGE."newspost_images/preview/preview_".basename($source), $newsize)){
-		  		echo "Couldn't find: ".$source;
-		  	}
-		}
-
-
-		header("Content-type: image/jpg");
-		$imagedata = file_get_contents(e_IMAGE."newspost_images/preview/preview_".basename($source));
-		echo $imagedata;
+if (e_QUERY)
+{
+	$tmp = explode('+',rawurldecode(e_QUERY));
+	if(strpos($tmp[0], '/') === 0 || strpos($tmp[0], ":") >= 1)
+	{
+		$source = $tmp[0];	// Full path to image specified
+	}
+	else
+	{
+		$source = "../".str_replace('../','',$tmp[0]);
+	}
+	if (!$source)
+	{
+		echo "No image name.<br />";
 		exit;
+	} 
+	$newsize = intval($tmp[1]);
+	
+	if (($newsize < 5) || ($newsize > 4000))	// Pretty generous limits
+	{
+		echo "Bad image size: {$newsize}<br />";
+		exit;
+	} 
+	$opts = varset($tmp[2],'upsize');
+	if(!resize_image($source, 'stdout', $newsize, $opts))
+	{
+		echo "Couldn't find: {$source}<br />";
+	} 
+} 
 
-
-	}
 ?>
\ No newline at end of file
diff -x .svn -aruN 0.7.13.src/e107_languages/English/English.php 0.7.14.src/e107_languages/English/English.php
--- 0.7.13.src/e107_languages/English/English.php	2007-08-13 14:56:07.000000000 -0500
+++ 0.7.14.src/e107_languages/English/English.php	2008-11-17 14:36:31.000000000 -0600
@@ -4,8 +4,8 @@
 |     e107 website system - Language File.
 |
 |     $Source: /cvsroot/e107/e107_0.7/e107_languages/English/English.php,v $
-|     $Revision: 1.11 $
-|     $Date: 2007/08/13 19:56:30 $
+|     $Revision: 1.13 $
+|     $Date: 2008/10/19 11:33:43 $
 |     $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
@@ -39,11 +39,15 @@
 define("CORE_LAN15", "DB queries: ");
 define("CORE_LAN16", "Memory Usage: ");
 
-define("CORE_LAN_B", "b");
-define("CORE_LAN_KB", "kb");
-define("CORE_LAN_MB", "Mb");
-define("CORE_LAN_GB", "Gb");
-define("CORE_LAN_TB", "Tb");
+// img.bb
+define('CORE_LAN17', '[ image disabled ]');
+define('CORE_LAN18', 'Image: ');
+
+define("CORE_LAN_B", "B");
+define("CORE_LAN_KB", "kB");
+define("CORE_LAN_MB", "MB");
+define("CORE_LAN_GB", "GB");
+define("CORE_LAN_TB", "TB");
 
 
 define("LAN_WARNING", "Warning!");
diff -x .svn -aruN 0.7.13.src/e107_plugins/blogcalendar_menu/archive.php 0.7.14.src/e107_plugins/blogcalendar_menu/archive.php
--- 0.7.13.src/e107_plugins/blogcalendar_menu/archive.php	2007-12-03 14:37:50.000000000 -0600
+++ 0.7.14.src/e107_plugins/blogcalendar_menu/archive.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,8 +11,8 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/e107_plugins/blogcalendar_menu/archive.php,v $
-|     $Revision: 1.6 $
-|     $Date: 2007/12/03 20:38:13 $
+|     $Revision: 1.7 $
+|     $Date: 2008/10/21 19:03:20 $
 |     $Author: e107steved $
 +----------------------------------------------------------------------------+
 | Based on code by: Thomas Bouve (crahan@gmx.net)
@@ -21,12 +21,7 @@
 require_once("../../class2.php");
 require_once(e_HANDLER."userclass_class.php");
 	
-$lan_file = e_PLUGIN."blogcalendar_menu/languages/".e_LANGUAGE.".php";
-if (file_exists($lan_file)) {
-	require_once($lan_file);
-} else {
-	require_once(e_PLUGIN."blogcalendar_menu/languages/English.php");
-};
+include_lan(e_PLUGIN."blogcalendar_menu/languages/".e_LANGUAGE.".php");
 require_once("calendar.php");
 require_once("functions.php");
 require_once(HEADERF);
@@ -34,7 +29,7 @@
 // ---------------------
 // initialize some cruft
 // ---------------------
-$sql = new db;
+$bcSql = new db;
 $prefix = e_PLUGIN."blogcalendar_menu";
 $marray = array(BLOGCAL_M1, BLOGCAL_M2, BLOGCAL_M3, BLOGCAL_M4,
 	BLOGCAL_M5, BLOGCAL_M6, BLOGCAL_M7, BLOGCAL_M8,
@@ -66,8 +61,8 @@
 // --------------------------------
 // look for the first and last year
 // --------------------------------
-$sql->db_Select_gen("SELECT news_id, news_datestamp from #news ORDER BY news_datestamp LIMIT 0,1");
-$first_post = $sql->db_Fetch();
+$bcSql->db_Select_gen("SELECT news_id, news_datestamp from #news ORDER BY news_datestamp LIMIT 0,1");
+$first_post = $bcSql->db_Fetch();
 $start_year = date("Y", $first_post['news_datestamp']);
 $end_year = $cur_year;
 	
@@ -76,31 +71,37 @@
 // build the yearselector
 // ----------------------
 $year_selector = "<div class='forumheader' style='text-align: center; margin-bottom: 2px;'>";
-$year_selector .= "".BLOGCAL_ARCHIV1.": <select name='activate' onChange='urljump(this.options[selectedIndex].value)' class='tbox'>";
+$year_selector .= "".BLOGCAL_ARCHIV1.": <select name='activate' onchange='urljump(this.options[selectedIndex].value)' class='tbox'>\n";
 
-for($i = $start_year; $i <= $end_year; $i++) {
+for($i = $start_year; $i <= $end_year; $i++) 
+{
 	$start = mktime(0, 0, 0, 1, 1, intval($req_year));
 	$end = mktime(23, 59, 59, 12, 31, intval($req_year));
 	// create the option entry
 	$year_link = $prefix."/archive.php?year.".$i;
 	$year_selector .= "<option value='".$year_link."'";
-	if ($i == $req_year) {
-		$year_selector .= " selected";
-	}
-	if ($sql->db_Select("news", "news_id, news_datestamp, news_class", "news_datestamp > $start AND news_datestamp < $end")) {
-		while ($news = $sql->db_Fetch()) {
-			if (check_class($news['news_class'])) {
-				list($xmonth, $xday) = explode(" ", date("n j", $news['news_datestamp']));
-				if (!$day_links[$xmonth][$xday]) {
-					$day_links[$xmonth][$xday] = e_BASE."news.php?day.".formatdate($req_year, $xmonth, $xday);
+	if ($i == $req_year) 
+	{
+		$year_selector .= " selected='selected'";
+		if ($bcSql->db_Select("news", "news_id, news_datestamp, news_class", "news_datestamp > {$start} AND news_datestamp < {$end}")) 
+		{
+			while ($news = $bcSql->db_Fetch()) 
+			{
+				if (check_class($news['news_class'])) 
+				{
+					list($xmonth, $xday) = explode(" ", date("n j", $news['news_datestamp']));
+					if (!$day_links[$xmonth][$xday]) 
+					{
+						$day_links[$xmonth][$xday] = e_BASE."news.php?day.".formatdate($req_year, $xmonth, $xday);
+					}
 				}
 			}
 		}
 	}
-	$year_selector .= ">".$i."</option>";
+	$year_selector .= ">".$i."</option>\n";
 }
 	
-$year_selector .= "</select>";
+$year_selector .= "</select>\n</div>";
 	
 	
 // --------------------------
@@ -108,9 +109,11 @@
 // --------------------------
 $newline = 0;
 $archive = "<div style='text-align:center'><table border='0' cellspacing='7'><tr>";
-$archive .= "<td colspan='$months_per_row'><div>$year_selector</div></td></tr><tr>";
-for($i = 1; $i <= 12; $i++) {
-	if (++$newline == $months_per_row+1) {
+$archive .= "<td colspan='{$months_per_row}'>{$year_selector}</td></tr><tr>";
+for($i = 1; $i <= 12; $i++) 
+{
+	if (++$newline == $months_per_row+1) 
+	{
 		$archive .= "</tr><tr>";
 		$newline = 1;
 	}
@@ -118,16 +121,22 @@
 	$archive .= "<div class='fcaption' style='text-align:center; margin-bottom:2px;'>";
 	 
 	// href the current month regardless of newsposts or any month with news
-	if (($req_year == $cur_year && $i == $cur_month) || $day_links[$i]) {
+	if (($req_year == $cur_year && $i == $cur_month) || $day_links[$i]) 
+	{
 		$archive .= "<a class='forumlink' href='".e_BASE."news.php?month.".formatDate($req_year, $i)."'>".$marray[$i-1]."</a>";
-	} else {
+	} 
+	else 
+	{
 		$archive .= $marray[$i-1];
 	}
 	 
 	$archive .= "</div>";
-	if (($req_year == $cur_year) && ($i == $cur_month)) {
+	if (($req_year == $cur_year) && ($i == $cur_month)) 
+	{
 		$req_day = $cur_day;
-	} else {
+	} 
+	else 
+	{
 		$req_day = "";
 	}
 	$archive .= "<div>".calendar($req_day, $i, $req_year, $day_links[$i], $pref['blogcal_ws'])."</div></td>\n";
diff -x .svn -aruN 0.7.13.src/e107_plugins/content/content_manager.php 0.7.14.src/e107_plugins/content/content_manager.php
--- 0.7.13.src/e107_plugins/content/content_manager.php	2008-06-27 16:21:56.000000000 -0500
+++ 0.7.14.src/e107_plugins/content/content_manager.php	2008-11-17 14:36:31.000000000 -0600
@@ -12,8 +12,8 @@
 |        GNU General Public License (http://gnu.org).
 |
 |		$Source: /cvsroot/e107/e107_0.7/e107_plugins/content/content_manager.php,v $
-|		$Revision: 1.25 $
-|		$Date: 2008/06/27 21:22:19 $
+|		$Revision: 1.26 $
+|		$Date: 2008/10/07 19:22:17 $
 |		$Author: e107steved $
 +---------------------------------------------------------------+
 */
@@ -46,19 +46,25 @@
 
 $deltest = array_flip($_POST);
 
-if(e_QUERY){
+if(e_QUERY)
+{
 	$qs = explode(".", e_QUERY);
 }
 
+
+if (!USER)
+{	// non-user can never manage content
+	header("location:".$plugindir."content.php"); 
+	exit;
+}
+
+
 // define e_pagetitle
 $aa -> setPageTitle();
 
-//if(preg_match("#(.*?)_delete_(\d+)#",$deltest[$tp->toJS("delete")],$matches)){
-//	$delete = $matches[1];
-//	$del_id = $matches[2];
-//}
 
-if(isset($_POST['delete'])){
+if(isset($_POST['delete']))
+{
 	$tmp = array_pop(array_flip($_POST['delete']));
 	list($delete, $del_id) = explode("_", $tmp);
 }
@@ -67,83 +73,110 @@
 $e_wysiwyg	= "content_text";
 
 //include js
-function headerjs(){
+function headerjs()
+{
 	echo "<script type='text/javascript' src='".e_FILE."popup.js'></script>\n";
 }
 // ##### DB ---------------------------------------------------------------------------------------
 
+
+
 require_once(HEADERF);
 
-if(isset($_POST['create_content'])){
-	if($_POST['content_text'] && $_POST['content_heading'] && $_POST['parent'] != "none"){
+if(isset($_POST['create_content']))
+{
+	if($_POST['content_text'] && $_POST['content_heading'] && $_POST['parent'] != "none")
+	{
 		$adb -> dbContent("create", "contentmanager");
-	}else{
+	}
+	else
+	{
 		$message = CONTENT_ADMIN_ITEM_LAN_0;
 	}
 }
 
-if(isset($_POST['update_content'])){
-	if($_POST['content_text'] && $_POST['content_heading'] && $_POST['parent'] != "none"){
+
+if(isset($_POST['update_content']))
+{
+	if($_POST['content_text'] && $_POST['content_heading'] && $_POST['parent'] != "none")
+	{
 		$adb -> dbContent("update", "contentmanager");
-	}else{
+	}
+	else
+	{
 		$message = CONTENT_ADMIN_ITEM_LAN_0;
 	}
 }
 
-if($delete == 'content' && is_numeric($del_id)){
-	if($sql -> db_Delete($plugintable, "content_id='$del_id' ")){
+if($delete == 'content' && is_numeric($del_id))
+{
+	if($sql -> db_Delete($plugintable, "content_id='{$del_id}' "))
+	{
 		$message = CONTENT_ADMIN_ITEM_LAN_3;
 		$e107cache->clear("content");
 	}
 }
 
-if(isset($message)){
+if(isset($message))
+{
 	$ns -> tablerender("", "<div style='text-align:center'><b>".$message."</b></div>");
 }
 
-if(!e_QUERY){
-	if(USER){
-		$aform -> show_contentmanager("edit", USERID, USERNAME);
-		require_once(FOOTERF);
-		exit;
-	}else{
-		header("location:".$plugindir."content.php"); exit;
-	}
-}else{
+if(!e_QUERY)
+{
+	$aform -> show_contentmanager("edit", USERID, USERNAME);
+	require_once(FOOTERF);
+	exit;
+}
+
 
-	if($qs[0] == "c"){
+	if($qs[0] == "c")
+	{
 		$message = CONTENT_ADMIN_ITEM_LAN_1."<br /><br />".CONTENT_ADMIN_ITEM_LAN_55;
 		$ns -> tablerender("", "<div style='text-align:center'><b>".$message."</b></div>");
 		require_once(FOOTERF);
 		exit;
 
-	}elseif($qs[0] == "u"){
+	}
+	elseif($qs[0] == "u")
+	{
 		$message = CONTENT_ADMIN_ITEM_LAN_2."<br /><br />".CONTENT_ADMIN_ITEM_LAN_55;
 		$ns -> tablerender("", "<div style='text-align:center'><b>".$message."</b></div>");
 		require_once(FOOTERF);
 		exit;
 
 	//show list of items in this category
-	}elseif($qs[0] == "content" && is_numeric($qs[1])){
+	}
+	elseif($qs[0] == "content" && is_numeric($qs[1]))
+	{
 		$aform -> show_manage_content("contentmanager", USERID, USERNAME);
 
 	//create new item
-	}elseif($qs[0] == "content" && $qs[1] == "create" && is_numeric($qs[2])){
+	}
+	elseif($qs[0] == "content" && $qs[1] == "create" && is_numeric($qs[2]))
+	{
 		$aform -> show_create_content("contentmanager", USERID, USERNAME);
 
 	//edit item
-	}elseif($qs[0] == "content" && $qs[1] == "edit" && is_numeric($qs[2])){
+	}
+	elseif($qs[0] == "content" && $qs[1] == "edit" && is_numeric($qs[2]))
+	{
 		$aform -> show_create_content("contentmanager", USERID, USERNAME);
 
 	//manage submitted
-	}elseif($qs[0] == "content" && $qs[1] == "submitted" && is_numeric($qs[2])){
+	}
+	elseif($qs[0] == "content" && $qs[1] == "submitted" && is_numeric($qs[2]))
+	{
 		//$aform -> show_submitted("contentmanager", USERID, USERNAME, $qs[2]);
 		$aform -> show_submitted($qs[2]);
 
 		//post submitted content item
-	}elseif($qs[0] == "content" && $qs[1] == "sa" && is_numeric($qs[2]) ){
+	}
+	elseif($qs[0] == "content" && $qs[1] == "sa" && is_numeric($qs[2]) )
+	{
 		$newqs = array_reverse($qs);
-		if($newqs[0] == "cu"){										//item; submit post / update redirect
+		if($newqs[0] == "cu")
+		{										//item; submit post / update redirect
 			$mainparent = $aa -> getMainParent($qs[2]);
 			$message = CONTENT_ADMIN_ITEM_LAN_117."<br /><br />";
 			$message .= CONTENT_ADMIN_ITEM_LAN_88." <a href='".e_SELF."?content.create.".$mainparent."'>".CONTENT_ADMIN_ITEM_LAN_90."</a><br />";
@@ -156,10 +189,12 @@
 		}
 		$aform -> show_create_content("sa", USERID, USERNAME);
 
-	}else{
+	}
+	else
+	{
 		header("location:".e_SELF); exit;
 	}
-}
+
 
 
 require_once(FOOTERF);
diff -x .svn -aruN 0.7.13.src/e107_plugins/content/e_comment.php 0.7.14.src/e107_plugins/content/e_comment.php
--- 0.7.13.src/e107_plugins/content/e_comment.php	2006-06-22 14:13:18.000000000 -0500
+++ 0.7.14.src/e107_plugins/content/e_comment.php	2008-11-17 14:36:31.000000000 -0600
@@ -15,7 +15,7 @@
 $e_comment['plugin_path'] = "content"; //The path of your plugin.
 $e_comment['plugin_name'] = "content"; //A name for your plugin. It will be used in links to comments, in list_new/new.php.
 //This is set to the location you'd like the user to return to after replying to a comment.
-$e_comment['reply_location'] = e_PLUGIN."content/content.php?content.{NID}"; 
+$e_comment['reply_location'] = e_PLUGIN_ABS."content/content.php?content.{NID}"; 
 $e_comment['db_title'] = "content_heading"; //This is the name of the field in your plugin's db table that corresponds to it's name or title.
 $e_comment['db_id'] = "content_id"; // This is the name of the field in your plugin's db table that correspond to it's unique id number.
 
diff -x .svn -aruN 0.7.13.src/e107_plugins/content/e_latest.php 0.7.14.src/e107_plugins/content/e_latest.php
--- 0.7.13.src/e107_plugins/content/e_latest.php	2008-07-23 15:32:45.000000000 -0500
+++ 0.7.14.src/e107_plugins/content/e_latest.php	2008-11-17 14:36:31.000000000 -0600
@@ -6,11 +6,14 @@
 $reported_content = $sql -> db_Count($plugintable, '(*)', "WHERE content_refer='sa' ");
 $text .= "
 <div style='padding-bottom: 2px;'>
-<img src='".e_PLUGIN."content/images/content_16.png' style='width: 16px; height: 16px; vertical-align: bottom' alt='' />
+<img src='".e_PLUGIN_ABS."content/images/content_16.png' style='width: 16px; height: 16px; vertical-align: bottom' alt='' />
 ";
-if($reported_content) {
-	$text .= " <a href='".e_PLUGIN."content/admin_content_config.php?submitted'>".CONTENT_LATEST_LAN_1." $reported_content</a>";
-} else {
+if($reported_content) 
+{
+	$text .= " <a href='".e_PLUGIN_ABS."content/admin_content_config.php?submitted'>".CONTENT_LATEST_LAN_1." $reported_content</a>";
+} 
+else 
+{
 	$text .= CONTENT_LATEST_LAN_1." ".$reported_content;
 }
 $text .= "</div>";
diff -x .svn -aruN 0.7.13.src/e107_plugins/content/e_list.php 0.7.14.src/e107_plugins/content/e_list.php
--- 0.7.13.src/e107_plugins/content/e_list.php	2006-05-31 16:29:36.000000000 -0500
+++ 0.7.14.src/e107_plugins/content/e_list.php	2008-11-17 14:36:31.000000000 -0600
@@ -38,7 +38,7 @@
 
 			//get path variables
 			$content_recent_pref = $aa -> getContentPref($mainparent);
-			$content_recent_pref["content_icon_path"] = ($content_recent_pref["content_icon_path"] ? $content_recent_pref["content_icon_path"] : "{e_PLUGIN}content/images/icon/" );
+			$content_recent_pref["content_icon_path"] = ($content_recent_pref["content_icon_path"] ? $content_recent_pref["content_icon_path"] : "{e_PLUGIN_ABS}content/images/icon/" );
 			$content_icon_path = $tp -> replaceConstants($content_recent_pref["content_icon_path"]);
 
 			//prepare query string
@@ -66,23 +66,23 @@
 
 					while($rowi = $sqli -> db_Fetch()){
 						$rowheading = $this -> parse_heading($rowi['content_heading'], $mode);
-						$HEADING = "<a href='".e_PLUGIN."content/content.php?content.".$rowi['content_id']."' title='".$rowi['content_heading']."'>".$rowheading."</a>";
+						$HEADING = "<a href='".e_PLUGIN_ABS."content/content.php?content.".$rowi['content_id']."' title='".$rowi['content_heading']."'>".$rowheading."</a>";
 						//category
 						if($arr[4]){
 							$crumb = "";
 							if(array_key_exists($rowi['content_parent'], $array)){
 								$newarr = $array[$rowi['content_parent']];
 								$newarr = array_reverse($newarr);
-								$CATEGORY = "<a href='".e_PLUGIN."content/content.php?cat.".$newarr[1]."'>".$newarr[0]."</a>";
+								$CATEGORY = "<a href='".e_PLUGIN_ABS."content/content.php?cat.".$newarr[1]."'>".$newarr[0]."</a>";
 							}
 						}
 
 						$DATE = ($arr[5] ? $this -> getListDate($rowi['content_datestamp'], $mode) : "");
 						//$ICON = $this -> getBullet($arr[6], $mode);
 
-						$image_link_append = "<a href='".e_PLUGIN."content/content.php?content.".$rowi['content_id']."'>";
+						$image_link_append = "<a href='".e_PLUGIN_ABS."content/content.php?content.".$rowi['content_id']."'>";
 						if($rowi['content_icon'] && file_exists(e_PLUGIN."content/images/icon/".$rowi['content_icon'])){
-							$ICON = $image_link_append."<img src='".e_PLUGIN."content/images/icon/".$rowi['content_icon']."' style='width:50px; border:1px solid #000;' alt='' /></a>";
+							$ICON = $image_link_append."<img src='".e_PLUGIN_ABS."content/images/icon/".$rowi['content_icon']."' style='width:50px; border:1px solid #000;' alt='' /></a>";
 						}else{
 							$ICON = "";
 						}
@@ -91,7 +91,7 @@
 						if($arr[3]){
 							$authordetails = $aa -> getAuthor($rowi['content_author']);
 							if(USER && is_numeric($authordetails[0]) && $authordetails[0] != "0"){
-								$AUTHOR = "<a href='".e_BASE."user.php?id.".$authordetails[0]."' >".$authordetails[1]."</a>";
+								$AUTHOR = "<a href='".e_HTTP."user.php?id.".$authordetails[0]."' >".$authordetails[1]."</a>";
 							}else{
 								$AUTHOR = $authordetails[1];
 							}
diff -x .svn -aruN 0.7.13.src/e107_plugins/content/handlers/content_db_class.php 0.7.14.src/e107_plugins/content/handlers/content_db_class.php
--- 0.7.13.src/e107_plugins/content/handlers/content_db_class.php	2007-01-14 08:24:18.000000000 -0600
+++ 0.7.14.src/e107_plugins/content/handlers/content_db_class.php	2008-11-17 14:36:31.000000000 -0600
@@ -12,9 +12,9 @@
 |        GNU General Public License (http://gnu.org).
 |
 |		$Source: /cvsroot/e107/e107_0.7/e107_plugins/content/handlers/content_db_class.php,v $
-|		$Revision: 1.56 $
-|		$Date: 2007/01/14 14:24:41 $
-|		$Author: lisa_ $
+|		$Revision: 1.59 $
+|		$Date: 2008/11/10 20:12:39 $
+|		$Author: e107steved $
 +---------------------------------------------------------------+
 */
 
@@ -27,9 +27,10 @@
 if (!defined('ADMIN_WIDTH')) { define("ADMIN_WIDTH", "width:98%;"); }
 
 //icon, file, image upload
-if(isset($_POST['uploadfile'])){
-	
-	if($_POST['uploadtype']){
+if(isset($_POST['uploadfile']))
+{
+	if($_POST['uploadtype'])
+	{
 		$pref['upload_storagetype'] = "1";
 		require_once(e_HANDLER."upload_handler.php");
 		$mainparent		= $aa -> getMainParent(intval($_POST['parent1']));
@@ -45,7 +46,8 @@
 	}
 
 	//icon
-	if($_POST['uploadtype'] == "1"){
+	if($_POST['uploadtype'] == "1")
+	{
 		$pref['upload_storagetype'] = "1";
 		$pathtmp		= $_POST['tmppathicon'];
 		$uploaded		= file_upload($pathtmp);
@@ -63,7 +65,9 @@
 		$message = ($new ? CONTENT_ADMIN_ITEM_LAN_106 : CONTENT_ADMIN_ITEM_LAN_107);
 
 	//file
-	}elseif($_POST['uploadtype'] == "2"){
+	}
+	elseif($_POST['uploadtype'] == "2")
+	{
 		$pref['upload_storagetype'] = "1";
 		$pathtmp		= $_POST['tmppathfile'];
 		$uploaded		= file_upload($pathtmp);
@@ -78,7 +82,9 @@
 		$message = ($new ? CONTENT_ADMIN_ITEM_LAN_108 : CONTENT_ADMIN_ITEM_LAN_109);
 
 	//image
-	}elseif($_POST['uploadtype'] == "3"){
+	}
+	elseif($_POST['uploadtype'] == "3")
+	{
 		$pref['upload_storagetype'] = "1";
 		$pathtmp		= $_POST['tmppathimage'];
 		$uploaded		= file_upload($pathtmp);
@@ -99,89 +105,118 @@
 	}
 }
 
-class contentdb{
-
-		//function dbContentUpdate($mode, $type){
-		function dbContent($mode, $type){
-			//$mode		: create or update
-			//$type		: none(=admin), submit, contentmanager
-			global $pref, $qs, $sql, $ns, $rs, $aa, $tp, $plugintable, $e107cache, $eArrayStorage, $e_event;
-
-			$_POST['content_heading']		= $tp -> toDB(trim($_POST['content_heading']));
-			$_POST['content_subheading']	= $tp -> toDB($_POST['content_subheading']);
-			$_POST['content_summary']		= $tp -> toDB($_POST['content_summary']);
-
-			if(e_WYSIWYG){
-				$_POST['content_text']		= $tp->createConstants($_POST['content_text']); // convert e107_images/ to {e_IMAGE} etc.
-			}
-			//the problem with tiny_mce is it's storing e_HTTP with an image path, while it should only use the {e_xxx} variables
-			//this small check resolves this, and stores the paths correctly
-			if(strstr($_POST['content_text'],e_HTTP."{e_")){
-				$_POST['content_text'] = str_replace(e_HTTP."{e_", "{e_", $_POST['content_text']);
-			}
+class contentdb
+{
+	// Method to update content in DB
+	function dbContent($mode, $type)
+	{
+		//$mode		: create or update
+		//$type		: none(=admin), submit, contentmanager
+		global $pref, $qs, $sql, $ns, $rs, $aa, $tp, $plugintable, $e107cache, $eArrayStorage, $e_event;
+
+		$_POST['content_heading']		= $tp -> toDB(trim($_POST['content_heading']));
+		$_POST['content_subheading']	= $tp -> toDB($_POST['content_subheading']);
+		$_POST['content_summary']		= $tp -> toDB($_POST['content_summary']);
+
+		if(e_WYSIWYG)
+		{
+			$_POST['content_text']		= $tp->createConstants($_POST['content_text']); // convert e107_images/ to {e_IMAGE} etc.
+		}
+		//the problem with tiny_mce is it's storing e_HTTP with an image path, while it should only use the {e_xxx} variables
+		//this small check resolves this, and stores the paths correctly
+		if(strstr($_POST['content_text'],e_HTTP."{e_"))
+		{
+			$_POST['content_text'] = str_replace(e_HTTP."{e_", "{e_", $_POST['content_text']);
+		}
 			
-			$_POST['content_text']			= $tp -> toDB($_POST['content_text']);
-			$_POST['content_class']			= ($_POST['content_class'] ? intval($_POST['content_class']) : "0");
-			$_POST['content_meta']			= $tp -> toDB($_POST['content_meta']);
-			//content create
-			if( isset($qs[0]) && $qs[0]=='content' && isset($qs[1]) && ($qs[1]=='create' || $qs[1]=='submit') && isset($qs[2]) && is_numeric($qs[2]) ){
-				$parent = intval($_POST['parent1']);
-
+		$_POST['content_text']			= $tp -> toDB($_POST['content_text']);
+		$_POST['content_class']			= ($_POST['content_class'] ? intval($_POST['content_class']) : "0");
+		$_POST['content_meta']			= $tp -> toDB($_POST['content_meta']);
+
+		//content create
+		if( isset($qs[0]) && $qs[0]=='content' && isset($qs[1]) && ($qs[1]=='create' || $qs[1]=='submit') && isset($qs[2]) && is_numeric($qs[2]) )
+		{
+			$parent = intval($_POST['parent1']);
 			//content edit
-			}elseif( isset($qs[0]) && $qs[0]=='content' && isset($qs[1]) && ($qs[1]=='edit' || $qs[1]=='sa') && isset($qs[2]) && is_numeric($qs[2]) ){
-				if( isset($_POST['parent1']) && strpos($_POST['parent1'], ".") ){
-					$tmp = explode(".", $_POST['parent1']);
-					$parent = $tmp[1];
-				}else{
-					$parent = $_POST['parent1'];
-				}
+		}
+		elseif ( isset($qs[0]) && $qs[0]=='content' && isset($qs[1]) && ($qs[1]=='edit' || $qs[1]=='sa') && isset($qs[2]) && is_numeric($qs[2]) )
+		{
+			if( isset($_POST['parent1']) && strpos($_POST['parent1'], ".") )
+			{
+				$tmp = explode(".", $_POST['parent1']);
+				$parent = $tmp[1];
+			}
+			elseif(isset($_POST['preview_parent1']) && $_POST['preview_parent1'])
+			{
+				$parent = $_POST['preview_parent1'];
+			}
+			else
+			{
+				$parent = $_POST['parent1'];
 			}
-			$_POST['parent'] = $parent;
+		}
+		$_POST['parent'] = $parent;
 
-			if(USER){
-				if($_POST['content_author_id']){
-					if(!($_POST['content_author_id'] == USERID && $_POST['content_author_name'] == USERNAME && $_POST['content_author_email'] == USEREMAIL) ){
-						
-						$author = $_POST['content_author_id'];
+		if(USER)
+		{
+			if($_POST['content_author_id'])
+			{
+				if(!($_POST['content_author_id'] == USERID && $_POST['content_author_name'] == USERNAME && $_POST['content_author_email'] == USEREMAIL) )
+				{
+					$author = $_POST['content_author_id'];
 						
-						if($_POST['content_author_name'] != CONTENT_ADMIN_ITEM_LAN_14){
-							$author .= "^".$_POST['content_author_name'];
-						}
-						if($_POST['content_author_email'] != CONTENT_ADMIN_ITEM_LAN_15){
-							$author .= "^".$_POST['content_author_email'];
-						}
-						
-					}else{
-						$author = $_POST['content_author_id'];
+					if ($_POST['content_author_name'] != CONTENT_ADMIN_ITEM_LAN_14)
+					{
+						$author .= "^".$_POST['content_author_name'];
 					}
-				}else{
-					$author = $_POST['content_author_name'];
-					if($_POST['content_author_email'] != "" && $_POST['content_author_email'] != CONTENT_ADMIN_ITEM_LAN_15){
+					if ($_POST['content_author_email'] != CONTENT_ADMIN_ITEM_LAN_15)
+					{
 						$author .= "^".$_POST['content_author_email'];
 					}
 				}
-			}else{
+				else
+				{
+					$author = $_POST['content_author_id'];
+				}
+			}
+			else
+			{
 				$author = $_POST['content_author_name'];
-				if($_POST['content_author_email'] != "" && $_POST['content_author_email'] != CONTENT_ADMIN_ITEM_LAN_15){
+				if($_POST['content_author_email'] != "" && $_POST['content_author_email'] != CONTENT_ADMIN_ITEM_LAN_15)
+				{
 					$author .= "^".$_POST['content_author_email'];
 				}
 			}
+		}
+		else
+		{	// Non-user posting content
+			if ($type != 'submit')
+			{	// Naughty!
+				header("location:".$plugindir."content.php"); 	// but be kind
+				exit;
+			}
+			$author = $_POST['content_author_name'];
+			if($_POST['content_author_email'] != "" && $_POST['content_author_email'] != CONTENT_ADMIN_ITEM_LAN_15)
+			{
+				$author .= "^".$_POST['content_author_email'];
+			}
+		}
 
-			$mainparent						= $aa -> getMainParent(intval($_POST['parent']));
-			$content_pref					= $aa -> getContentPref($mainparent);
+		$mainparent						= $aa -> getMainParent(intval($_POST['parent']));
+		$content_pref					= $aa -> getContentPref($mainparent);
 			
-			$content_pref["content_icon_path_tmp"] = ($content_pref["content_icon_path_tmp"] ? $content_pref["content_icon_path_tmp"] : $content_pref["content_icon_path"]."tmp/");
-			$content_pref["content_file_path_tmp"] = ($content_pref["content_file_path_tmp"] ? $content_pref["content_file_path_tmp"] : $content_pref["content_file_path"]."tmp/");
-			$content_pref["content_image_path_tmp"] = ($content_pref["content_image_path_tmp"] ? $content_pref["content_image_path_tmp"] : $content_pref["content_image_path"]."tmp/");
+		$content_pref["content_icon_path_tmp"] = ($content_pref["content_icon_path_tmp"] ? $content_pref["content_icon_path_tmp"] : $content_pref["content_icon_path"]."tmp/");
+		$content_pref["content_file_path_tmp"] = ($content_pref["content_file_path_tmp"] ? $content_pref["content_file_path_tmp"] : $content_pref["content_file_path"]."tmp/");
+		$content_pref["content_image_path_tmp"] = ($content_pref["content_image_path_tmp"] ? $content_pref["content_image_path_tmp"] : $content_pref["content_image_path"]."tmp/");
 			
-			$content_cat_icon_path_large	= $tp -> replaceConstants($content_pref["content_cat_icon_path_large"]);
-			$content_cat_icon_path_small	= $tp -> replaceConstants($content_pref["content_cat_icon_path_small"]);
-			$content_icon_path				= $tp -> replaceConstants($content_pref["content_icon_path"]);
-			$content_image_path				= $tp -> replaceConstants($content_pref["content_image_path"]);
-			$content_file_path				= $tp -> replaceConstants($content_pref["content_file_path"]);
-			$content_tmppath_icon			= $tp -> replaceConstants($content_pref["content_icon_path_tmp"]);
-			$content_tmppath_file			= $tp -> replaceConstants($content_pref["content_file_path_tmp"]);
-			$content_tmppath_image			= $tp -> replaceConstants($content_pref["content_image_path_tmp"]);
+		$content_cat_icon_path_large	= $tp -> replaceConstants($content_pref["content_cat_icon_path_large"]);
+		$content_cat_icon_path_small	= $tp -> replaceConstants($content_pref["content_cat_icon_path_small"]);
+		$content_icon_path				= $tp -> replaceConstants($content_pref["content_icon_path"]);
+		$content_image_path				= $tp -> replaceConstants($content_pref["content_image_path"]);
+		$content_file_path				= $tp -> replaceConstants($content_pref["content_file_path"]);
+		$content_tmppath_icon			= $tp -> replaceConstants($content_pref["content_icon_path_tmp"]);
+		$content_tmppath_file			= $tp -> replaceConstants($content_pref["content_file_path_tmp"]);
+		$content_tmppath_image			= $tp -> replaceConstants($content_pref["content_image_path_tmp"]);
 
 			//move icon to correct folder
 			if($_POST['content_icon']){
@@ -279,7 +314,9 @@
 			//content_refer : only added in sql if posting submitted item
 			//$refer = (isset($_POST['content_refer']) && $_POST['content_refer']=='sa' ? ", content_refer='' " : "");
 
-			if($mode == "create"){
+			
+		if($mode == "create")
+		{
 				if($type == "submit"){
 					$refer = ($content_pref["content_submit_directpost"] ? "" : "sa");
 				}else{
@@ -304,23 +341,33 @@
 						js_location(e_SELF."?d");
 					}							
 				}
-			}
+		}
 
-			if($mode == "update"){
-				if($type == "submit"){
-					if(isset($_POST['content_refer']) && $_POST['content_refer']=='sa'){
-						$refer = ", content_refer='' ";
-					}else{
-						$refer = "";
-					}
-				}else{
-					if(isset($_POST['content_refer']) && $_POST['content_refer']=='sa'){
-						$refer = ", content_refer='' ";
-					}else{
-						$refer = "";
-					}
+		if($mode == "update")
+		{
+			if($type == "submit")
+			{
+				if(isset($_POST['content_refer']) && $_POST['content_refer']=='sa')
+				{
+					$refer = ", content_refer='' ";
+				}
+				else
+				{
+					$refer = "";
 				}
-				$sql -> db_Update($plugintable, "content_heading = '".$_POST['content_heading']."', content_subheading = '".$_POST['content_subheading']."', content_summary = '".$_POST['content_summary']."', content_text = '".$_POST['content_text']."', content_author = '".$tp->toDB($author)."', content_icon = '".$icon."', content_file = '".$totalattach."', content_image = '".$totalimages."', content_parent = '".$_POST['parent']."', content_comment = '".intval($_POST['content_comment'])."', content_rate = '".intval($_POST['content_rate'])."', content_pe = '".intval($_POST['content_pe'])."' ".$refer.", content_datestamp = '".$starttime."', content_enddate = '".$endtime."', content_class = '".$_POST['content_class']."', content_pref = '".$contentprefvalue."', content_score='".intval($_POST['content_score'])."', content_meta='".$_POST['content_meta']."', content_layout='".$_POST['content_layout']."' WHERE content_id = '".intval($_POST['content_id'])."' ");
+			}
+			else
+			{
+				if(isset($_POST['content_refer']) && $_POST['content_refer']=='sa')
+				{
+					$refer = ", content_refer='' ";
+				}
+				else
+				{
+					$refer = "";
+				}
+			}
+			$sql -> db_Update($plugintable, "content_heading = '".$_POST['content_heading']."', content_subheading = '".$_POST['content_subheading']."', content_summary = '".$_POST['content_summary']."', content_text = '".$_POST['content_text']."', content_author = '".$tp->toDB($author)."', content_icon = '".$icon."', content_file = '".$totalattach."', content_image = '".$totalimages."', content_parent = '".$_POST['parent']."', content_comment = '".intval($_POST['content_comment'])."', content_rate = '".intval($_POST['content_rate'])."', content_pe = '".intval($_POST['content_pe'])."' ".$refer.", content_datestamp = '".$starttime."', content_enddate = '".$endtime."', content_class = '".$_POST['content_class']."', content_pref = '".$contentprefvalue."', content_score='".intval($_POST['content_score'])."', content_meta='".$_POST['content_meta']."', content_layout='".$_POST['content_layout']."' WHERE content_id = '".intval($_POST['content_id'])."' ");
 
 				$e107cache->clear("$plugintable");
 				$e107cache->clear("comment.$plugintable.{$_POST['content_id']}");
diff -x .svn -aruN 0.7.13.src/e107_plugins/content/handlers/content_form_class.php 0.7.14.src/e107_plugins/content/handlers/content_form_class.php
--- 0.7.13.src/e107_plugins/content/handlers/content_form_class.php	2008-07-25 16:02:44.000000000 -0500
+++ 0.7.14.src/e107_plugins/content/handlers/content_form_class.php	2008-11-17 14:36:31.000000000 -0600
@@ -12,8 +12,8 @@
 |        GNU General Public License (http://gnu.org).
 |
 |		$Source: /cvsroot/e107/e107_0.7/e107_plugins/content/handlers/content_form_class.php,v $
-|		$Revision: 1.129 $
-|		$Date: 2008/07/25 21:03:07 $
+|		$Revision: 1.132 $
+|		$Date: 2008/10/15 19:09:32 $
 |		$Author: e107steved $
 +---------------------------------------------------------------+
 */
@@ -54,9 +54,11 @@
 //$TOPIC_ROW_SPACER = "<tr><td $stylespacer colspan='2'></td></tr>";
 $TOPIC_ROW_SPACER = "";
 
-class contentform{
+class contentform
+{
 
-		function ContentItemPreview(){
+	function ContentItemPreview()
+	{
 				global $ns, $sql, $aa, $qs, $tp, $mainparent, $months;
 
 				$TRPRE = "<tr>";
@@ -219,40 +221,46 @@
 				$ns -> tablerender($caption, $preview);
 		}
 
-		function show_create_content($mode, $userid="", $username=""){
-						global $qs, $sql, $ns, $rs, $aa, $fl, $tp, $plugintable, $plugindir, $pref, $eArrayStorage;
-						global $message, $stylespacer, $TOPIC_ROW_SPACER, $TOPIC_ROW, $TOPIC_ROW_NOEXPAND;
-
-						$months = array(CONTENT_ADMIN_DATE_LAN_0, CONTENT_ADMIN_DATE_LAN_1, CONTENT_ADMIN_DATE_LAN_2, CONTENT_ADMIN_DATE_LAN_3, CONTENT_ADMIN_DATE_LAN_4, CONTENT_ADMIN_DATE_LAN_5, CONTENT_ADMIN_DATE_LAN_6, CONTENT_ADMIN_DATE_LAN_7, CONTENT_ADMIN_DATE_LAN_8, CONTENT_ADMIN_DATE_LAN_9, CONTENT_ADMIN_DATE_LAN_10, CONTENT_ADMIN_DATE_LAN_11);
-
-						//if create, first show category select (as preferences need to be loaded from the selected category)
-						if( $qs[1] == "create" && !isset($qs[2]) ){
-							$text = "
+
+
+
+	function show_create_content($mode, $userid="", $username="")
+	{
+		global $qs, $sql, $ns, $rs, $aa, $fl, $tp, $plugintable, $plugindir, $pref, $eArrayStorage;
+		global $message, $stylespacer, $TOPIC_ROW_SPACER, $TOPIC_ROW, $TOPIC_ROW_NOEXPAND;
+
+		$months = array(CONTENT_ADMIN_DATE_LAN_0, CONTENT_ADMIN_DATE_LAN_1, CONTENT_ADMIN_DATE_LAN_2, CONTENT_ADMIN_DATE_LAN_3, CONTENT_ADMIN_DATE_LAN_4, CONTENT_ADMIN_DATE_LAN_5, CONTENT_ADMIN_DATE_LAN_6, CONTENT_ADMIN_DATE_LAN_7, CONTENT_ADMIN_DATE_LAN_8, CONTENT_ADMIN_DATE_LAN_9, CONTENT_ADMIN_DATE_LAN_10, CONTENT_ADMIN_DATE_LAN_11);
+
+		//if create, first show category select (as preferences need to be loaded from the selected category)
+		if( $qs[1] == "create" && !isset($qs[2]) )
+		{
+			$text = "
 							<div style='text-align:center;'>
 							".$rs -> form_open("post", e_SELF."?".e_QUERY."", "dataform", "", "enctype='multipart/form-data'")."
 							<table style='".ADMIN_WIDTH."' class='fborder'>
 							<tr><td class='fcaption' colspan='2'>".CONTENT_ADMIN_MAIN_LAN_2."</td></tr>";
 
-							$TOPIC_TOPIC = CONTENT_ADMIN_CAT_LAN_27;
-							$TOPIC_FIELD = $aa -> ShowOption('',"managecontent");
-							$text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW_NOEXPAND);
-							$text .= "</table></form></div>";
-							$caption = CONTENT_ADMIN_MAIN_LAN_2;
-							$ns->tablerender($caption, $text);
-							return;
-						}
+			$TOPIC_TOPIC = CONTENT_ADMIN_CAT_LAN_27;
+			$TOPIC_FIELD = $aa -> ShowOption('',"managecontent");
+			$text .= preg_replace("/\{(.*?)\}/e", '$\1', $TOPIC_ROW_NOEXPAND);
+			$text .= "</table></form></div>";
+			$caption = CONTENT_ADMIN_MAIN_LAN_2;
+			$ns->tablerender($caption, $text);
+			return;
+		}
 
-						if($mode == 'submit' || $mode=='contentmanager' || ($mode=='sa' && e_PAGE=='content_manager.php') ){
-							$border = "border:1px solid #5d6e75;";
-							$padding = "padding:6px;";
-							$tableprop = "border-collapse: collapse; border-spacing:0px;";
-							$TOPIC_ROW_NOEXPAND = "
+		if($mode == 'submit' || $mode=='contentmanager' || ($mode=='sa' && e_PAGE=='content_manager.php') )
+		{
+			$border = "border:1px solid #5d6e75;";
+			$padding = "padding:6px;";
+			$tableprop = "border-collapse: collapse; border-spacing:0px;";
+			$TOPIC_ROW_NOEXPAND = "
 							<tr>
 								<td class='forumheader3' style='".$padding." ".$border." width:30%; vertical-align:top;'>{TOPIC_TOPIC}</td>
 								<td class='forumheader3' style='".$padding." ".$border."'>{TOPIC_FIELD}</td>
 							</tr>";
 
-							$TOPIC_ROW = "
+			$TOPIC_ROW = "
 							<tr>
 								<td class='forumheader3' style='".$padding." ".$border." width:30%; vertical-align:top;'>{TOPIC_TOPIC}</td>
 								<td class='forumheader3' style='".$padding." ".$border." vertical-align:top;'>
@@ -264,103 +272,131 @@
 								</td>
 							</tr>";
 
-							$TOPIC_TITLE_ROW = "<tr><td colspan='2' class='fcaption'>{TOPIC_CAPTION}</td></tr>";
-							$TOPIC_ROW_SPACER = "<tr><td style='height:20px;' colspan='2'></td></tr>";
-						}else{
-							$tableprop = "";
-							$TOPIC_ROW_SPACER = "";
-						}
+			$TOPIC_TITLE_ROW = "<tr><td colspan='2' class='fcaption'>{TOPIC_CAPTION}</td></tr>";
+			$TOPIC_ROW_SPACER = "<tr><td style='height:20px;' colspan='2'></td></tr>";
+		}
+		else
+		{
+			$tableprop = "";
+			$TOPIC_ROW_SPACER = "";
+		}
 
-						if($mode == "submit"){
-							$mainparent					= $aa -> getMainParent( intval($qs[2]) );
-							$array						= $aa -> getCategoryTree("", $mainparent, FALSE);
-						}else{
-							$array						= $aa -> getCategoryTree("", "", FALSE);
-							$mainparent					= $aa -> getMainParent( (isset($qs[3]) && is_numeric($qs[3]) ? $qs[3] : intval($qs[2])) );
-						}
+		if($mode == "submit")
+		{
+			$mainparent					= $aa -> getMainParent( intval($qs[2]) );
+			$array						= $aa -> getCategoryTree("", $mainparent, FALSE);
+		}
+		else
+		{
+			$array						= $aa -> getCategoryTree("", "", FALSE);
+			$mainparent					= $aa -> getMainParent( (isset($qs[3]) && is_numeric($qs[3]) ? $qs[3] : intval($qs[2])) );
+		}
 						
-						$content_pref					= $aa -> getContentPref($mainparent);
+		$content_pref					= $aa -> getContentPref($mainparent);
 						
-						$content_pref["content_icon_path_tmp"] = ($content_pref["content_icon_path_tmp"] ? $content_pref["content_icon_path_tmp"] : $content_pref["content_icon_path"]."tmp/");
-						$content_pref["content_file_path_tmp"] = ($content_pref["content_file_path_tmp"] ? $content_pref["content_file_path_tmp"] : $content_pref["content_file_path"]."tmp/");
-						$content_pref["content_image_path_tmp"] = ($content_pref["content_image_path_tmp"] ? $content_pref["content_image_path_tmp"] : $content_pref["content_image_path"]."tmp/");
-						$content_cat_icon_path_large	= $tp -> replaceConstants($content_pref["content_cat_icon_path_large"]);
-						$content_cat_icon_path_small	= $tp -> replaceConstants($content_pref["content_cat_icon_path_small"]);
-						$content_icon_path				= $tp -> replaceConstants($content_pref["content_icon_path"]);
-						$content_image_path				= $tp -> replaceConstants($content_pref["content_image_path"]);
-						$content_file_path				= $tp -> replaceConstants($content_pref["content_file_path"]);
-						$content_tmppath_icon			= $tp -> replaceConstants($content_pref["content_icon_path_tmp"]);
-						$content_tmppath_file			= $tp -> replaceConstants($content_pref["content_file_path_tmp"]);
-						$content_tmppath_image			= $tp -> replaceConstants($content_pref["content_image_path_tmp"]);
-
-						if(!is_object($sql)){ $sql = new db; }
-						$sql2 = new db;
-						
-						//check submit permissions
-						if($mode == 'submit'){
-							//check if current item exists (item is a (sub)category)
-							if($sql -> db_Select($plugintable, "content_id, content_heading, content_parent, content_pref", " content_id='".intval($qs[2])."' ")){
-								//check submit perms from main parent
-								if($content_pref["content_submit"] && check_class($content_pref["content_submit_class"])){
-								}else{
-									header("location:".$plugindir."content_submit.php"); exit;
-								}
-							}else{
-								header("location:".$plugindir."content_submit.php"); exit;
-							}
-						}
+		$content_pref["content_icon_path_tmp"] = ($content_pref["content_icon_path_tmp"] ? $content_pref["content_icon_path_tmp"] : $content_pref["content_icon_path"]."tmp/");
+		$content_pref["content_file_path_tmp"] = ($content_pref["content_file_path_tmp"] ? $content_pref["content_file_path_tmp"] : $content_pref["content_file_path"]."tmp/");
+		$content_pref["content_image_path_tmp"] = ($content_pref["content_image_path_tmp"] ? $content_pref["content_image_path_tmp"] : $content_pref["content_image_path"]."tmp/");
+		$content_cat_icon_path_large	= $tp -> replaceConstants($content_pref["content_cat_icon_path_large"]);
+		$content_cat_icon_path_small	= $tp -> replaceConstants($content_pref["content_cat_icon_path_small"]);
+		$content_icon_path				= $tp -> replaceConstants($content_pref["content_icon_path"]);
+		$content_image_path				= $tp -> replaceConstants($content_pref["content_image_path"]);
+		$content_file_path				= $tp -> replaceConstants($content_pref["content_file_path"]);
+		$content_tmppath_icon			= $tp -> replaceConstants($content_pref["content_icon_path_tmp"]);
+		$content_tmppath_file			= $tp -> replaceConstants($content_pref["content_file_path_tmp"]);
+		$content_tmppath_image			= $tp -> replaceConstants($content_pref["content_image_path_tmp"]);
+
+		if(!is_object($sql)){ $sql = new db; }
+		$sql2 = new db;				// $sql2 not declared as global
+
+		//check submit permissions
+		if($mode == 'submit')
+		{
+			//check if current item exists (item is a (sub)category)
+			if($sql -> db_Select($plugintable, "content_id, content_heading, content_parent, content_pref", " content_id='".intval($qs[2])."' "))
+			{
+				//check submit perms from main parent
+				if($content_pref["content_submit"] && check_class($content_pref["content_submit_class"]))
+				{
+				}
+				else
+				{
+					header("location:".$plugindir."content_submit.php"); exit;
+				}
+			}
+			else
+			{
+				header("location:".$plugindir."content_submit.php"); exit;
+			}
+		}
 						
 						//check manager permissions
-						if($mode == "contentmanager"){
-							//get current item
-							if($sql -> db_Select($plugintable, "content_id, content_heading, content_parent, content_pref", " content_id='".intval($qs[2])."' ")){
-								$rowpcm = $sql -> db_Fetch();
-								
-								//if edit item (query holds item id)
-								if( isset($qs[1]) && $qs[1] == "edit" && is_numeric($qs[2]) ){
-									//get parent
-									$sql2 -> db_Select($plugintable, "content_id, content_heading, content_parent, content_pref", " content_id='".$rowpcm['content_parent']."' ");
-									$rowpcm2 = $sql2 -> db_Fetch();
-									$pcmcheckpref = $rowpcm2['content_pref'];
-									$p = $rowpcm['content_parent'];
-								//create item (query holds category id)
-								}else{
-									$pcmcheckpref = $rowpcm['content_pref'];
-									$p = $qs[2];
-								}
-
-								$pcm_pref = $eArrayStorage->ReadArray($pcmcheckpref);
-
-								//user is allowed to work here
-								if( (isset($pcm_pref["content_manager_personal"]) && check_class($pcm_pref["content_manager_personal"])) || (isset($pcm_pref["content_manager_category"]) && check_class($pcm_pref["content_manager_category"])) ){
-									if($qs[1] == "edit"){
-										//if personal manager, assign author query
-										if( isset($pcm_pref["content_manager_personal"]) && check_class($pcm_pref["content_manager_personal"]) ){
-											if(isset($userid) && isset($username) ){
-												$userid = intval($userid);
-												$l = strlen($userid)+1;
-												$userquery = " AND (content_author = '".$userid."' || LEFT(content_author, ".$l.") = '".$userid."^' OR SUBSTRING_INDEX(content_author, '^', 1) = '".$userid."' || content_author REGEXP '\\\^".$username."' ) ";
-											}else{
-												$userquery = "";
-											}
-										}
-										//if category manager, no author query is needed
-										if( isset($pcm_pref["content_manager_category"]) && check_class($pcm_pref["content_manager_category"]) ){
-											$userquery = "";
-										}
-									}
-								//user is not allowed to work here
-								}else{
-									header("location:".$plugindir."content_manager.php"); exit;
-								}
-							}
-
-						}else{
+		if($mode == "contentmanager")
+		{
+			//get current item
+			if($sql -> db_Select($plugintable, "content_id, content_heading, content_parent, content_pref", " content_id='".intval($qs[2])."' "))
+			{
+				$rowpcm = $sql -> db_Fetch();
+
+				//if edit item (query holds item id)
+				if( isset($qs[1]) && $qs[1] == "edit" && is_numeric($qs[2]) )
+				{
+					//get parent
+					$sql2 -> db_Select($plugintable, "content_id, content_heading, content_parent, content_pref", " content_id='".$rowpcm['content_parent']."' ");
+					$rowpcm2 = $sql2 -> db_Fetch();
+					$pcmcheckpref = $rowpcm2['content_pref'];
+					$p = $rowpcm['content_parent'];
+					//create item (query holds category id)
+				}
+				else
+				{
+					$pcmcheckpref = $rowpcm['content_pref'];
+					$p = $qs[2];
+				}
+
+				$pcm_pref = $eArrayStorage->ReadArray($pcmcheckpref);
+
+				//user is allowed to work here
+				if( (isset($pcm_pref["content_manager_personal"]) && check_class($pcm_pref["content_manager_personal"])) || (isset($pcm_pref["content_manager_category"]) && check_class($pcm_pref["content_manager_category"])) )
+				{
+					if($qs[1] == "edit")
+					{
+						//if personal manager, assign author query
+						if( isset($pcm_pref["content_manager_personal"]) && check_class($pcm_pref["content_manager_personal"]) )
+						{
+							if(isset($userid) && isset($username) )
+							{
+								$userid = intval($userid);
+								$l = strlen($userid)+1;
+								$userquery = " AND (content_author = '".$userid."' || LEFT(content_author, ".$l.") = '".$userid."^' OR SUBSTRING_INDEX(content_author, '^', 1) = '".$userid."' || content_author REGEXP '\\\^".$username."' ) ";
+							}
+							else
+							{
+								$userquery = "";
+							}
+						}
+						//if category manager, no author query is needed
+						if( isset($pcm_pref["content_manager_category"]) && check_class($pcm_pref["content_manager_category"]) )
+						{
 							$userquery = "";
 						}
+					}
+					//user is not allowed to work here
+				}
+				else
+				{
+					header("location:".$plugindir."content_manager.php"); exit;
+				}
+			}
+		}
+		else
+		{
+			$userquery = "";
+		}
 
-						//get preferences for submit page
-						if($mode == "submit"){
+		//get preferences for submit page
+		if($mode == "submit")
+		{
 							$checksubheading	= (isset($content_pref["content_submit_subheading"]) ? $content_pref["content_submit_subheading"] : "");
 							$checksummary		= (isset($content_pref["content_submit_summary"]) ? $content_pref["content_submit_summary"] : "");
 							$checkstartdate		= (isset($content_pref["content_submit_startdate"]) ? $content_pref["content_submit_startdate"] : "");
@@ -382,8 +418,9 @@
 							$checkpreset		= (isset($content_pref["content_submit_presettags"]) ? $content_pref["content_submit_presettags"] : "");
 						
 						//get preferences for admin area; posted submitted item.
-						}elseif($mode == "sa"){
-
+		}
+		elseif($mode == "sa")
+		{
 							//show all preferences from the submit options. if submit pref is not set, check if create prefs are set and use those
 							$checksubheading = (isset($content_pref["content_submit_subheading"]) ? $content_pref["content_submit_subheading"] : (isset($content_pref["content_admin_subheading"]) ? $content_pref["content_admin_subheading"] : ""));
 
@@ -423,9 +460,10 @@
 
 							$checkpreset = (isset($content_pref["content_submit_presettags"]) ? $content_pref["content_submit_presettags"] : (isset($content_pref["content_admin_presettags"]) ? $content_pref["content_admin_presettags"] : ""));
 
-						//normal admin content create preferences
-						}else{
-
+		//normal admin content create preferences
+		}
+		else
+		{
 							$checksubheading	= (isset($content_pref["content_admin_subheading"]) ? $content_pref["content_admin_subheading"] : "");
 							$checksummary		= (isset($content_pref["content_admin_summary"]) ? $content_pref["content_admin_summary"] : "");
 							$checkstartdate		= (isset($content_pref["content_admin_startdate"]) ? $content_pref["content_admin_startdate"] : "");
@@ -445,40 +483,49 @@
 							$checkcustomnumber	= (isset($content_pref["content_admin_custom_number"]) ? $content_pref["content_admin_custom_number"] : "");
 							$checklayout		= (isset($content_pref["content_admin_layout"]) ? $content_pref["content_admin_layout"] : "");
 							$checkpreset		= (isset($content_pref["content_admin_presettags"]) ? $content_pref["content_admin_presettags"] : "");
-						}
-						if($mode == "contentmanager"){ // used in contentmanager
-							$authordetails = $aa -> getAuthor(USERID);
-						}
-						if( !isset($authordetails) ){
-							$authordetails = $aa -> getAuthor(USERID);
-						}
-
-						if( ($qs[1] == "edit" || $qs[1] == "sa") && is_numeric($qs[2]) && !isset($_POST['preview_content']) && !isset($message)){
-							if(!$sql -> db_Select($plugintable, "*", "content_id='".intval($qs[2])."' ".$userquery." ")){
-								if($mode == "contentmanager"){
-									header("location:".$plugindir."content_manager.php"); exit;
-								}else{
-									header("location:".e_SELF."?content"); exit;
-								}
-							}else{
-								$row = $sql -> db_Fetch();
-
-								$row['content_heading']		= $tp -> toForm($row['content_heading']);
-								$row['content_subheading']	= $tp -> toForm($row['content_subheading']);
-								$row['content_summary']		= $tp -> toForm($row['content_summary']);
-								$row['content_text']		= $tp -> toForm($row['content_text']);
-								$row['content_meta']		= $tp -> toForm($row['content_meta']);
-								$authordetails				= $aa -> getAuthor($row['content_author']);
-							}
-						}
+		}
+		if($mode == "contentmanager")
+		{ // used in contentmanager
+			$authordetails = $aa -> getAuthor(USERID);
+		}
+		if( !isset($authordetails) )
+		{
+			$authordetails = $aa -> getAuthor(USERID);
+		}
 
-						if(isset($_POST['preview_content'])){
-							$this -> ContentItemPreview();
-						}
+		if( ($qs[1] == "edit" || $qs[1] == "sa") && is_numeric($qs[2]) && !isset($_POST['preview_content']) && !isset($message))
+		{
+			if(!$sql -> db_Select($plugintable, "*", "content_id='".intval($qs[2])."' ".$userquery." "))
+			{
+				if($mode == "contentmanager")
+				{
+					header("location:".$plugindir."content_manager.php"); exit;
+				}
+				else
+				{
+					header("location:".e_SELF."?content"); exit;
+				}
+			}
+			else
+			{
+				$row = $sql -> db_Fetch();
+				$row['content_heading']		= $tp -> toForm($row['content_heading']);
+				$row['content_subheading']	= $tp -> toForm($row['content_subheading']);
+				$row['content_summary']		= $tp -> toForm($row['content_summary']);
+				$row['content_text']		= $tp -> toForm($row['content_text']);
+				$row['content_meta']		= $tp -> toForm($row['content_meta']);
+				$authordetails				= $aa -> getAuthor($row['content_author']);
+			}
+		}
 
-						//re-prepare the posted fields for the form (after preview)
-						if( isset($_POST['preview_content']) || isset($message) ){
+		if (isset($_POST['preview_content']))
+		{
+			$this -> ContentItemPreview();
+		}
 
+		//re-prepare the posted fields for the form (after preview)
+		if ( isset($_POST['preview_content']) || isset($message) )
+		{
 								$row['content_parent']				= $_POST['parent1'];
 								$row['content_heading']				= $tp -> post_toForm($_POST['content_heading']);
 								$row['content_subheading']			= $tp -> post_toForm($_POST['content_subheading']);
@@ -523,11 +570,11 @@
 									$k = $tp -> post_toForm($k);
 									$custom['content_custom_presettags'][$k] = $tp -> post_toForm($v);
 								}
-						}
+		}
 
-						$content_author_id		= (isset($authordetails[0]) && $authordetails[0] != "" ? $authordetails[0] : USERID);
-						$content_author_name	= (isset($authordetails[1]) && $authordetails[1] != "" ? $authordetails[1] : USERNAME);
-						$content_author_email	= (isset($authordetails[2]) ? $authordetails[2] : USEREMAIL);
+		$content_author_id		= (isset($authordetails[0]) && $authordetails[0] != "" ? $authordetails[0] : USERID);
+		$content_author_name	= (isset($authordetails[1]) && $authordetails[1] != "" ? $authordetails[1] : USERNAME);
+		$content_author_email	= (isset($authordetails[2]) ? $authordetails[2] : USEREMAIL);
 
 						$formurl = e_SELF."?".e_QUERY;
 						$text = "
@@ -536,16 +583,27 @@
 						<table style='".$tableprop." ".ADMIN_WIDTH."' class='fborder'>";
 
 						$hidden = "";
-						if($mode == "contentmanager"){
-							if($qs[1] == "edit"){
+						if($mode == "contentmanager")
+						{
+							if($qs[1] == "edit")
+							{
 								$hidden .= $rs -> form_hidden("parent1", $row['content_parent']);
-							}else{
+								$hidden .= $rs -> form_hidden("preview_parent1", varset($_POST['preview_parent1'],$row['content_parent']));
+//								echo "CM Edit mode parent1 post: {$_POST['parent1']},{$_POST['preview_parent1']},{$row['content_parent']}<br />";
+							}
+							else
+							{
 								$hidden .= $rs -> form_hidden("parent1", intval($qs[2]));
 							}
-						}else{
-							if($mode == "submit"){
+						}
+						else
+						{
+							if($mode == "submit")
+							{
 								$parent = "submit";
-							}else{
+							}
+							else
+							{
 								$parent = (isset($qs[3]) && is_numeric($qs[3]) ? $qs[3] : (isset($row['content_parent']) ? $row['content_parent'] : "") );
 							}
 							//category parent
diff -x .svn -aruN 0.7.13.src/e107_plugins/forum/forum_class.php 0.7.14.src/e107_plugins/forum/forum_class.php
--- 0.7.13.src/e107_plugins/forum/forum_class.php	2007-11-11 17:45:10.000000000 -0600
+++ 0.7.14.src/e107_plugins/forum/forum_class.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,9 +11,9 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/e107_plugins/forum/forum_class.php,v $
-|     $Revision: 1.71 $
-|     $Date: 2007/11/11 23:45:33 $
-|     $Author: mcfly_e107 $
+|     $Revision: 1.72 $
+|     $Date: 2008/10/03 19:27:49 $
+|     $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
 if (!defined('e107_INIT')) { exit; }
@@ -696,7 +696,7 @@
 		$forum_sub = intval($forum_sub);
 		$ip = $e107->getip();
 		//Check for duplicate post
-		if ($sql->db_Count('forum_t', '(*)', "WHERE thread_thread=".$thread_thread." and thread_datestamp > ".($post_time - 180)))
+		if ($sql->db_Count('forum_t', '(*)', "WHERE thread_thread='".$thread_thread."' and thread_datestamp > ".($post_time - 180)))
 		{
 			return -1;
 		}
diff -x .svn -aruN 0.7.13.src/e107_plugins/links_page/links.php 0.7.14.src/e107_plugins/links_page/links.php
--- 0.7.13.src/e107_plugins/links_page/links.php	2008-09-25 15:01:18.000000000 -0500
+++ 0.7.14.src/e107_plugins/links_page/links.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,8 +11,8 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/e107_plugins/links_page/links.php,v $
-|     $Revision: 1.48 $
-|     $Date: 2008/09/25 20:01:41 $
+|     $Revision: 1.49 $
+|     $Date: 2008/10/07 19:25:47 $
 |     $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
@@ -533,8 +533,9 @@
 				$text .= $link_table_start.$link_table_string.$link_table_end;
 
 			}
-			$nav = $tp->parseTemplate("{NAVIGATOR}", FALSE, $link_shortcodes);
-			$ns->tablerender($link_table_caption, $nav.$text);
+//			$nav = $tp->parseTemplate("{NAVIGATOR}", FALSE, $link_shortcodes);		Navigator now positioned in template
+//			$ns->tablerender($link_table_caption, $nav.$text);
+			$ns->tablerender($link_table_caption, $text);
 		}
 	}
 	return;
diff -x .svn -aruN 0.7.13.src/e107_plugins/links_page/links_template.php 0.7.14.src/e107_plugins/links_page/links_template.php
--- 0.7.13.src/e107_plugins/links_page/links_template.php	2006-08-24 09:50:05.000000000 -0500
+++ 0.7.14.src/e107_plugins/links_page/links_template.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,9 +11,9 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/e107_plugins/links_page/links_template.php,v $
-|     $Revision: 1.24 $
-|     $Date: 2006/08/24 14:50:28 $
-|     $Author: e107coders $
+|     $Revision: 1.25 $
+|     $Date: 2008/10/07 19:25:47 $
+|     $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
 
@@ -150,9 +150,10 @@
 $sc_style['LINK_CAT_DESC']['pre'] = "<br /><span class='smalltext'><i>";
 $sc_style['LINK_CAT_DESC']['post'] = "</i></span>";
 
-$LINK_TABLE_CAPTION = LCLAN_ITEM_24."{NAVIGATOR}" ;
+//$LINK_TABLE_CAPTION = LCLAN_ITEM_24."{NAVIGATOR}" ;
+$LINK_TABLE_CAPTION = LCLAN_ITEM_24;
 
-$LINK_TABLE_START = "
+$LINK_TABLE_START = "{NAVIGATOR}
 	<div style='text-align:center'>
 	<table class='fborder' style='".USER_WIDTH.";margin-bottom:20px;'>
 	<tr>
diff -x .svn -aruN 0.7.13.src/e107_plugins/list_new/list_class.php 0.7.14.src/e107_plugins/list_new/list_class.php
--- 0.7.13.src/e107_plugins/list_new/list_class.php	2007-09-16 12:26:40.000000000 -0500
+++ 0.7.14.src/e107_plugins/list_new/list_class.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,8 +11,8 @@
 |       GNU General Public License (http://gnu.org).
 |
 |		$Source: /cvsroot/e107/e107_0.7/e107_plugins/list_new/list_class.php,v $
-|		$Revision: 1.17 $
-|		$Date: 2007/09/16 17:27:03 $
+|		$Revision: 1.18 $
+|		$Date: 2008/10/21 19:10:43 $
 |		$Author: e107steved $
 +---------------------------------------------------------------+
 */
@@ -312,7 +312,8 @@
 		global $LIST_DISPLAYSTYLE, $LIST_CAPTION, $LIST_STYLE_CAPTION, $LIST_STYLE_BODY;
 		global $LIST_PAGE_NEW, $LIST_PAGE_RECENT, $LIST_MENU_NEW, $LIST_MENU_RECENT, $LIST_PAGE_NEW_START, $LIST_PAGE_RECENT_START, $LIST_MENU_NEW_START, $LIST_MENU_RECENT_START, $LIST_PAGE_NEW_END, $LIST_PAGE_RECENT_END, $LIST_MENU_NEW_END, $LIST_MENU_RECENT_END;
 
-		$menu_installed = $sql -> db_Select("menus", "menu_id", "(menu_name = 'list_new_menu' || menu_name = 'list_recent_menu') AND menu_location != '0' AND menu_class REGEXP '".e_CLASS_REGEXP."' ");
+//		Following query no longer used
+//		$menu_installed = $sql -> db_Select("menus", "menu_id", "(menu_name = 'list_new_menu' || menu_name = 'list_recent_menu') AND menu_location != '0' AND menu_class REGEXP '".e_CLASS_REGEXP."' ");
 		$LIST_DATA = "";
 		$LIST_CAPTION = "";
 
@@ -409,8 +410,8 @@
 			}
 		}
 
-		if($LIST_DATA != ""){
-
+		if($LIST_DATA != "")
+		{
 			//open sections if content exists ? yes if true, else use individual setting of section
 			$LIST_DISPLAYSTYLE = ($list_pref[$mode."_openifrecords"] ? "" : $LIST_DISPLAYSTYLE);
 
@@ -439,16 +440,21 @@
 				}
 			}
 			$text = $start.$menutext.$end;
-		}else{
+		}
+		else
+		{
 			$text = "";
 		}
 		return $text;
 	}
 
-	function getlvisit(){
+
+	function getlvisit()
+	{
 		global $qs, $list_pref;
 
-		if(isset($qs[0]) && $qs[0] == "new"){
+		if(isset($qs[0]) && $qs[0] == "new")
+		{
 			if(isset($list_pref['new_page_timelapse']) && $list_pref['new_page_timelapse']){
 				if(isset($list_pref['new_page_timelapse_days']) && is_numeric($list_pref['new_page_timelapse_days']) && $list_pref['new_page_timelapse_days']){
 					$days = $list_pref['new_page_timelapse_days'];
diff -x .svn -aruN 0.7.13.src/e107_plugins/log/stats.php 0.7.14.src/e107_plugins/log/stats.php
--- 0.7.13.src/e107_plugins/log/stats.php	2008-04-25 14:24:19.000000000 -0500
+++ 0.7.14.src/e107_plugins/log/stats.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,8 +11,8 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/e107_plugins/log/stats.php,v $
-|     $Revision: 1.41 $
-|     $Date: 2008/04/25 19:24:42 $
+|     $Revision: 1.42 $
+|     $Date: 2008/10/07 19:08:54 $
 |     $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
@@ -25,7 +25,7 @@
 	$bar = (file_exists(THEME."images/bar.png") ? THEME."images/bar.png" : e_IMAGE."generic/bar.png");
 	return "<style type='text/css'>
 <!--
-.b { background-image: url(".$bar."); border: 1px solid #999; height: 10px; font: 0px }
+.b { background-image: url(".$bar."); border: 1px solid #999; height: 10px; font-size: 0px }
 -->
 </style>";
 }
diff -x .svn -aruN 0.7.13.src/e107_plugins/pm/pm_func.php 0.7.14.src/e107_plugins/pm/pm_func.php
--- 0.7.13.src/e107_plugins/pm/pm_func.php	2007-08-08 14:34:29.000000000 -0500
+++ 0.7.14.src/e107_plugins/pm/pm_func.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,8 +11,8 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/e107_plugins/pm/pm_func.php,v $
-|     $Revision: 1.4 $
-|     $Date: 2007/08/08 19:34:52 $
+|     $Revision: 1.6 $
+|     $Date: 2008/10/21 19:06:12 $
 |     $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
@@ -26,7 +26,9 @@
 	{
 		unset($pm_info['inbox']);
 		unset($pm_info['outbox']);
+		return;
 	}
+
 	if('inbox' == $which)
 	{
 		$qry = "SELECT count(pm.pm_id) AS total, SUM(pm.pm_size)/1024 size, SUM(pm.pm_read = 0) as unread FROM #private_msg as pm WHERE pm.pm_to = ".USERID." AND pm.pm_read_del = 0";
@@ -35,13 +37,14 @@
 	{
 		$qry = "SELECT count(pm.pm_from) AS total, SUM(pm.pm_size)/1024 size, SUM(pm.pm_read = 0) as unread FROM #private_msg as pm WHERE pm.pm_from = ".USERID." AND pm.pm_sent_del = 0";
 	}
+
 	if(!isset($pm_info[$which]['total']))
 	{
 		$sql->db_Select_gen($qry);
 		$pm_info[$which] = $sql->db_Fetch();
-		if($which == 'inbox' && $pm_prefs['animate'] == 1 || $pm_prefs['popup'] == 1)
+		if ($which == 'inbox' && ($pm_prefs['animate'] == 1 || $pm_prefs['popup'] == 1))
 		{
-			if($new = $sql->db_Count("private_msg", "(*)", "WHERE pm_sent > '.USERLV.' AND pm_read = 0 AND pm_to = '".USERID."' AND pm_read_del != 1"))
+			if($new = $sql->db_Count("private_msg", "(*)", "WHERE pm_sent > '".USERLV."' AND pm_read = 0 AND pm_to = '".USERID."' AND pm_read_del != 1"))
 			{
 				$pm_info['inbox']['new'] = $new;
 			}
@@ -51,6 +54,7 @@
 			}
 		}
 	}
+
 	if(!isset($pm_info[$which]['limit']))
 	{
 		if(varset($pref['pm_limits'],0) > 0)
diff -x .svn -aruN 0.7.13.src/e107_plugins/pm/pm.php 0.7.14.src/e107_plugins/pm/pm.php
--- 0.7.13.src/e107_plugins/pm/pm.php	2008-02-02 16:28:53.000000000 -0600
+++ 0.7.14.src/e107_plugins/pm/pm.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,9 +11,9 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/e107_plugins/pm/pm.php,v $
-|     $Revision: 1.27 $
-|     $Date: 2008/02/02 22:29:16 $
-|     $Author: mcfly_e107 $
+|     $Revision: 1.28 $
+|     $Date: 2008/11/08 17:11:39 $
+|     $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
 
@@ -113,12 +113,14 @@
 {
 	$message = $pm->block_add($pm_proc_id);
 	$action = 'inbox';
+	$pm_proc_id = 0;
 }
 
 if('unblock' == $action)
 {
 	$message = $pm->block_del($pm_proc_id);
 	$action = 'inbox';
+	$pm_proc_id = 0;
 }
 
 if("get" == $action)
diff -x .svn -aruN 0.7.13.src/e107_plugins/rss_menu/rss.php 0.7.14.src/e107_plugins/rss_menu/rss.php
--- 0.7.13.src/e107_plugins/rss_menu/rss.php	2008-09-23 15:03:13.000000000 -0500
+++ 0.7.14.src/e107_plugins/rss_menu/rss.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,8 +11,8 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/e107_plugins/rss_menu/rss.php,v $
-|     $Revision: 1.61 $
-|     $Date: 2008/09/23 20:03:36 $
+|     $Revision: 1.64 $
+|     $Date: 2008/11/02 22:28:03 $
 |     $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
@@ -54,14 +54,21 @@
 }
 
 //query handler
-list($content_type, $rss_type, $topic_id) = explode(".", e_QUERY);
+if (e_QUERY)
+{
+	$tmp = explode(".", e_QUERY);
+	$content_type = $tp->toDB($tmp[0]);
+	$rss_type = intval(varset($tmp[1],0));
+	$topic_id = $tp->toDB($tmp[2],'');
+}
 
 //list available rss feeds
-if (intval($rss_type) == false) {
+if (!$rss_type) 
+{
 	require_once(HEADERF);
  	require_once(e_PLUGIN."rss_menu/rss_template.php");
 
-	if(!$sql->db_Select("rss", "*", "rss_class='0' AND rss_limit>0 AND rss_topicid NOT REGEXP ('\\\*') ORDER BY rss_name"))
+	if(!$sql->db_Select("rss", "*", "`rss_class`='0' AND `rss_limit`>0 AND `rss_topicid` NOT REGEXP ('\\\*') ORDER BY `rss_name`"))
 	{
 		$ns->tablerender(LAN_ERROR, RSS_LAN_ERROR_4);
 	}
@@ -88,14 +95,17 @@
 //-------------------------------------
 
 //convert certain old urls so we can check the db entries ---------------------
-if($topic_id){
-	//rss.php?1.2.14 (news, rss-2, cat=14)
-	if(is_numeric($content_type) && isset($conversion[$content_type]) ){
+if($topic_id)
+{	//rss.php?1.2.14 (news, rss-2, cat=14)
+	if(is_numeric($content_type) && isset($conversion[$content_type]) )
+	{
 		$content_type = $conversion[$content_type];
 	}
-}else{
-	//rss.php?1.2 (news, rss-2) --> check = news (check conversion table)
-	if(is_numeric($content_type) && isset($conversion[$content_type]) ){
+}
+else
+{	//rss.php?1.2 (news, rss-2) --> check = news (check conversion table)
+	if(is_numeric($content_type) && isset($conversion[$content_type]) )
+	{
 		$content_type = $conversion[$content_type];
 	}
 }
@@ -112,10 +122,14 @@
 		$ns->tablerender("", RSS_LAN_ERROR_1);
 		require_once(FOOTERF);
 		exit;
-	}else{
+	}
+	else
+	{
 		$row = $sql->db_Fetch();
 	}
-}else{
+}
+else
+{
 	$row = $sql->db_Fetch();
 }
 
@@ -169,7 +183,7 @@
 		}
 
 		switch ($content_type) {
-			case news:
+			case 'news' :
 			case 1:
 				if($topic_id && is_numeric($topic_id)){
 					$topic = " AND news_category = ".intval($topic_id);
@@ -191,7 +205,8 @@
 				foreach($tmp as $value) {
 					$this -> rssItems[$loop]['title'] = $value['news_title'];
 					$this -> rssItems[$loop]['link'] = "http://".$_SERVER['HTTP_HOST'].e_HTTP."news.php?item.".$value['news_id'].".".$value['news_category'];
-                    if($value['news_summary']){
+                    if($value['news_summary'])
+                    {
                         	$this -> rssItems[$loop]['description'] = $value['news_summary'];
 					}else{
 						$this -> rssItems[$loop]['description'] = $value['news_body'];
@@ -220,7 +235,7 @@
 				$path='';
 				$this -> contentType = "content";
 				break;
-			case comments:
+			case 'comments' :
 			case 5:
 				$path='';
 				$this -> rssQuery = "SELECT * FROM `#comments` WHERE `comment_blocked` = 0 ORDER BY `comment_datestamp` DESC LIMIT 0,".$this -> limit;
@@ -228,14 +243,23 @@
 				$tmp = $sql->db_getList();
 				$this -> rssItems = array();
 				$loop=0;
-				foreach($tmp as $value) {
+				foreach($tmp as $value) 
+				{
 					$this -> rssItems[$loop]['title'] = $value['comment_subject'];
+					$this -> rssItems[$loop]['pubdate'] = $value['comment_datestamp'];
 
-					switch ($value['comment_type']) {
-						case 0:
+					switch ($value['comment_type']) 
+					{
+						case 0 :
+						case 'news' :
 							$this -> rssItems[$loop]['link'] = "http://".$_SERVER['HTTP_HOST'].e_HTTP."comment.php?comment.news.".$value['comment_item_id'];
 							break;
+						case 2 :
+						case 'download' :
+							$this -> rssItems[$loop]['link'] = "http://".$_SERVER['HTTP_HOST'].e_HTTP."comment.php?comment.download.".$value['comment_item_id'];
+							break;
 						case 4:
+						case 'poll' :
 							$this -> rssItems[$loop]['link'] = "http://".$_SERVER['HTTP_HOST'].e_HTTP."comment.php?comment.poll.".$value['comment_item_id'];
 							break;
 					}
diff -x .svn -aruN 0.7.13.src/e107_plugins/usertheme_menu/config.php 0.7.14.src/e107_plugins/usertheme_menu/config.php
--- 0.7.13.src/e107_plugins/usertheme_menu/config.php	1969-12-31 18:00:00.000000000 -0600
+++ 0.7.14.src/e107_plugins/usertheme_menu/config.php	2008-11-17 14:36:31.000000000 -0600
@@ -0,0 +1,115 @@
+<?php
+/*
++ ----------------------------------------------------------------------------+
+|     e107 website system
+|
+|     Steve Dunstan 2001-2002
+|     http://e107.org
+|     jalist@e107.org
+|
+|     Released under the terms and conditions of the
+|     GNU General Public License (http://gnu.org).
+|
+|     $Source: /cvsroot/e107/e107_0.7/e107_plugins/usertheme_menu/config.php,v $
+|     $Revision: 1.1 $
+|     $Date: 2008/10/02 21:10:34 $
+|     $Author: e107steved $
++----------------------------------------------------------------------------+
+*/
+$eplug_admin = TRUE;
+require_once("../../class2.php");
+@include_lan(e_PLUGIN."usertheme_menu/languages/".e_LANGUAGE.".php");
+require_once(e_HANDLER.'userclass_class.php');
+
+
+if (!getperms("2")) 		// Same permissions as menu configuration
+{
+	header("location:".e_BASE."index.php");
+	exit ;
+}
+
+require_once(e_ADMIN."auth.php");
+	
+// Get the list of available themes
+$handle = opendir(e_THEME);
+while ($file = readdir($handle)) 
+{
+	if ($file != "." && $file != ".." && $file != "templates" && $file != "" && $file != "CVS") 
+	{
+		if (is_readable(e_THEME.$file."/theme.php") && is_readable(e_THEME.$file."/style.css")) 
+		{
+			$themeOptions[] = $file;
+			$themeCount[$file] = 0;
+		}
+	}
+}
+closedir($handle);
+
+
+if (isset($_POST['update_theme'])) 
+{
+	$tmp = array();
+	foreach($_POST as $key => $value) 
+	{
+		if (substr($key,0,6) == 'theme_')
+		{
+			$tmp[] = $value;
+		}
+	}
+	$newThemes = implode(',',$tmp);
+	$themeeditclass = intval($_POST['themeeditclass']);
+	if (($newThemes != $pref['allowed_themes']) || ($themeeditclass != $pref['allow_theme_select']))
+	{
+		$pref['allowed_themes'] = $newThemes;
+		$pref['allow_theme_select'] = $themeeditclass;
+		save_prefs();
+	}
+}
+
+if (isset($pref['allowed_themes']))
+{
+	$allThemes = FALSE;
+	$themeList = explode(',',$pref['allowed_themes']);
+}
+
+$themeeditclass = varset($pref['allow_theme_select'],e_UC_NOBODY);
+
+$text = "
+	<form method='post' action='".e_SELF."' name='menu_conf_form'>
+	<table style='".ADMIN_WIDTH."' class='fborder' >
+	<colgroup>
+	<col style='width: 50%' />
+	<col style='width: 50%' />
+	</colgroup>
+	<tr>
+	<td colspan='2' class='forumheader2'>".LAN_UMENU_THEME_4."</td>
+	</tr>";
+
+	foreach ($themeOptions as $th)
+	{
+		$ch = (in_array($th, $themeList) ? " checked='checked'" : '');
+		$text .= "
+			<tr>
+			<td class='forumheader3'>{$th}</td>
+			<td class='forumheader3'><input class='tbox' type='checkbox' name='theme_{$th}' value='{$th}' {$ch} /></td>
+			</tr>";
+	}
+	$text .= "
+			<tr>
+			<td class='forumheader3'>".LAN_UMENU_THEME_7."</td>
+			<td class='forumheader3'>".r_userclass("themeeditclass", $themeeditclass, "off", "main,admin,classes,matchclass,nobody")."</td>
+			</tr>";
+
+
+$text .= "
+	<tr>
+	<td colspan='2' class='forumheader' style='text-align:center'><input class='button' type='submit' name='update_theme' value='".LAN_UMENU_THEME_5."' /></td>
+	</tr>
+	</table>
+	</form>
+	</div>";
+$ns->tablerender(LAN_UMENU_THEME_6, $text);
+	
+require_once(e_ADMIN."footer.php");
+
+?>
\ No newline at end of file
diff -x .svn -aruN 0.7.13.src/e107_plugins/usertheme_menu/languages/English.php 0.7.14.src/e107_plugins/usertheme_menu/languages/English.php
--- 0.7.13.src/e107_plugins/usertheme_menu/languages/English.php	2005-01-27 13:52:57.000000000 -0600
+++ 0.7.14.src/e107_plugins/usertheme_menu/languages/English.php	2008-11-17 14:36:31.000000000 -0600
@@ -1,6 +1,11 @@
 <?php
-	
-define("LAN_350", "Set Theme");
-define("LAN_351", "Select Theme");
+
+define('LAN_UMENU_THEME_1', 'Set Theme');
+define('LAN_UMENU_THEME_2', 'Select Theme');
+define('LAN_UMENU_THEME_3', 'users:');
+define('LAN_UMENU_THEME_4', 'Enable those themes which users may select');
+define('LAN_UMENU_THEME_5', 'Update');
+define('LAN_UMENU_THEME_6', 'Themes available to users');
+define('LAN_UMENU_THEME_7', 'Class which can select themes');
 	
 ?>
\ No newline at end of file
diff -x .svn -aruN 0.7.13.src/e107_plugins/usertheme_menu/usertheme_menu.php 0.7.14.src/e107_plugins/usertheme_menu/usertheme_menu.php
--- 0.7.13.src/e107_plugins/usertheme_menu/usertheme_menu.php	2005-12-14 13:28:30.000000000 -0600
+++ 0.7.14.src/e107_plugins/usertheme_menu/usertheme_menu.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,59 +11,73 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/e107_plugins/usertheme_menu/usertheme_menu.php,v $
-|     $Revision: 1.8 $
-|     $Date: 2005/12/14 19:28:52 $
-|     $Author: sweetas $
+|     $Revision: 1.9 $
+|     $Date: 2008/10/02 21:10:34 $
+|     $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
 
 if (!defined('e107_INIT')) { exit; }
 
-if (USER == TRUE) {
-	 
+if ((USER == TRUE) && check_class(varset($pref['allow_theme_select'],FALSE)))
+{
+	$allThemes = TRUE;
+	if (isset($pref['allowed_themes']))
+	{
+		$allThemes = FALSE;
+		$themeList = explode(',',$pref['allowed_themes']);
+	}
 	$handle = opendir(e_THEME);
-	while ($file = readdir($handle)) {
-		if ($file != "." && $file != ".." && $file != "templates" && $file != "" && $file != "CVS") {
-			if (is_readable(e_THEME.$file."/theme.php") && is_readable(e_THEME.$file."/style.css")) {
+	while ($file = readdir($handle)) 
+	{
+		if ($file != "." && $file != ".." && $file != "templates" && $file != "" && $file != "CVS") 
+		{
+			if (is_readable(e_THEME.$file."/theme.php") && is_readable(e_THEME.$file."/style.css") && ($allThemes || in_Array($file, $themeList))) 
+			{
 				$themelist[] = $file;
 				$themecount[$file] = 0;
 			}
 		}
 	}
 	closedir($handle);
-	 
-	 
-	$defaulttheme = $pref['sitetheme'];
-	$count = 0;
-	 
-	$totalct = $sql->db_Select("user", "user_prefs", "user_prefs REGEXP('sitetheme') ");
-	 
-	while ($row = $sql->db_Fetch()) {
-		$up = unserialize($row['user_prefs']);
-		if (isset($themecount[$up['sitetheme']])) { $themecount[$up['sitetheme']]++; }
-	}
-	 
-	$defaultusers = $sql->db_Count("user") - $totalct;
-	$themecount[$defaulttheme] += $defaultusers;
-	 
-	$text = "<form method='post' action='".e_SELF."'>
-		<div style='text-align:center'>
-		<select name='sitetheme' class='tbox' style='width: 95%;'>";
-	$counter = 0;
-	 
-	while (isset($themelist[$counter]) && $themelist[$counter]) {
-		$text .= "<option value='".$themelist[$counter]."' ";
-		if (($themelist[$counter] == USERTHEME) || (USERTHEME == FALSE && $themelist[$counter] == $defaulttheme)) {
-			$text .= "selected='selected'";
+
+	if (count($themelist))
+	{
+		$defaulttheme = $pref['sitetheme'];
+		$count = 0;
+
+		$totalct = $sql->db_Select("user", "user_prefs", "user_prefs REGEXP('sitetheme') ");
+ 
+		while ($row = $sql->db_Fetch()) 
+		{
+			$up = unserialize($row['user_prefs']);
+			if (isset($themecount[$up['sitetheme']])) { $themecount[$up['sitetheme']]++; }
+		}
+ 
+		$defaultusers = $sql->db_Count("user") - $totalct;
+		$themecount[$defaulttheme] += $defaultusers;
+	 
+		$text = "<form method='post' action='".e_SELF."'>
+			<div style='text-align:center'>
+			<select name='sitetheme' class='tbox' style='width: 95%;'>";
+		$counter = 0;
+
+		while (isset($themelist[$counter]) && $themelist[$counter]) 
+		{
+			$text .= "<option value='".$themelist[$counter]."' ";
+			if (($themelist[$counter] == USERTHEME) || (USERTHEME == FALSE && $themelist[$counter] == $defaulttheme)) 
+			{
+				$text .= "selected='selected'";
+			}
+			$text .= ">".($themelist[$counter] == $defaulttheme ? "[ ".$themelist[$counter]." ]" : $themelist[$counter]).' ('.LAN_UMENU_THEME_3.' '.$themecount[$themelist[$counter]].")</option>\n";
+			$counter++;
 		}
-		$text .= ">".($themelist[$counter] == $defaulttheme ? "[ ".$themelist[$counter]." ]" : $themelist[$counter])." (users: ".$themecount[$themelist[$counter]].")</option>\n";
-		$counter++;
+		$text .= "</select>
+			<br /><br />
+			<input class='button' type='submit' name='settheme' value='".LAN_UMENU_THEME_1."' />
+			</div></form>";
+
+		$ns->tablerender(LAN_UMENU_THEME_2, $text, 'usertheme');
 	}
-	$text .= "</select>
-		<br /><br />
-		<input class='button' type='submit' name='settheme' value='".LAN_350."' />
-		</div></form>";
-	 
-	$ns->tablerender(LAN_351, $text, 'usertheme');
 }
 ?>
\ No newline at end of file
diff -x .svn -aruN 0.7.13.src/online.php 0.7.14.src/online.php
--- 0.7.13.src/online.php	2008-08-01 14:23:15.000000000 -0500
+++ 0.7.14.src/online.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,8 +11,8 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/online.php,v $
-|     $Revision: 1.17 $
-|     $Date: 2008/08/01 19:23:38 $
+|     $Revision: 1.18 $
+|     $Date: 2008/11/02 18:30:58 $
 |     $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
@@ -180,7 +180,8 @@
 			$class_check = FALSE;
 		}
 	}
-	if (strstr($online_location, "forum")) {
+	if (isset($pref['plug_installed']['forum'])) && strstr($online_location, "forum")) 
+	{
 		$tmp = explode(".", substr(strrchr($online_location, "php."), 2));
 		if (strstr($online_location, "_viewtopic")) {
 			if ($tmp[2]) {
@@ -220,20 +221,25 @@
 			$online_location = e_PLUGIN."forum/forum_viewtopic.php?$tmp[0].$tmp[1]";
 		}
 	}
-	if (strstr($online_location, "admin")) {
+	if (strstr($online_location, "admin")) 
+	{
 		$class_check = FALSE;
 		$online_location_page = ADMINAREA;
 	}
 
 	$ONLINE_TABLE_ICON = (varsettrue($pref['plug_installed']['pm']) && $oid != USERID ? $tp->parseTemplate("{SENDPM={$oid}}", 'sendpm.sc') : "<img src='".e_PLUGIN."online_extended_menu/images/user.png' alt='' style='vertical-align:middle' />");
 	 
-	$ONLINE_TABLE_USERNAME = "<a href='".e_BASE."user.php?id.$oid'>$oname</a>";
-	$ONLINE_TABLE_LOCATION = ($class_check ? "<a href='$online_location'>$online_location_page</a>" : $online_location_page);
+	$ONLINE_TABLE_USERNAME = "<a href='".e_BASE."user.php?id.{$oid}'>{$oname}</a>";
+	$ONLINE_TABLE_LOCATION = ($class_check ? "<a href='{$online_location}'>{$online_location_page}</a>" : $online_location_page);
 	 
-	if (!$ONLINE_TABLE) {
-		if (file_exists(THEME."online_template.php")) {
+	if (!$ONLINE_TABLE) 
+	{
+		if (file_exists(THEME."online_template.php")) 
+		{
 			require_once(THEME."online_template.php");
-		} else {
+		} 
+		else 
+		{
 			require_once(e_BASE.$THEMES_DIRECTORY."templates/online_template.php");
 		}
 	}
@@ -242,7 +248,9 @@
 	
 $ONLINE_TABLE_MEMBERS_ONLINE = ONLINE_EL1.GUESTS_ONLINE;
 $ONLINE_TABLE_GUESTS_ONLINE = ONLINE_EL2.MEMBERS_ONLINE;
-if ((MEMBERS_ONLINE + GUESTS_ONLINE) > ($menu_pref['most_members_online'] + $menu_pref['most_guests_online'])) {
+// The check for (count($menu_pref) > 3) is to try and prevent DB updates if the host does something nasty to earlier queries - can end up with $menu_pref empty
+if (((MEMBERS_ONLINE + GUESTS_ONLINE) > ($menu_pref['most_members_online'] + $menu_pref['most_guests_online'])) && (count($menu_pref) > 3))
+{
 	global $sysprefs;
 	$menu_pref['most_members_online'] = MEMBERS_ONLINE;
 	$menu_pref['most_guests_online'] = GUESTS_ONLINE;
@@ -250,7 +258,8 @@
 	$sysprefs->setArray('menu_pref');
 }
 	
-if (!isset($gen) || !is_object($gen)) {
+if (!isset($gen) || !is_object($gen)) 
+{
 	$gen = new convert;
 }
 	
diff -x .svn -aruN 0.7.13.src/search.php 0.7.14.src/search.php
--- 0.7.13.src/search.php	2008-03-27 16:14:07.000000000 -0500
+++ 0.7.14.src/search.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,8 +11,8 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/search.php,v $
-|     $Revision: 1.61 $
-|     $Date: 2008/03/27 21:14:30 $
+|     $Revision: 1.62 $
+|     $Date: 2008/10/14 20:53:07 $
 |     $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
@@ -459,8 +459,11 @@
 $ns -> tablerender(PAGE_NAME." ".SITENAME, $text);
 
 // parse search
-if ($perform_search) {
-	foreach ($search_info as $key => $a) {
+if ($perform_search) 
+{
+	$_GET['q'] = rawurlencode($_GET['q']);
+	foreach ($search_info as $key => $a) 
+	{
 		if (isset($searchtype[$key]) || isset($searchtype['all'])) {
 			unset($text);
 			if (file_exists($search_info[$key]['sfile'])) {
@@ -468,7 +471,6 @@
 				$search_chars = $search_info[$key]['chars'];
 				$search_res = $search_info[$key]['results'];
 				@require_once($search_info[$key]['sfile']);
-				$_GET['q'] = rawurlencode($_GET['q']);
 				$parms = $results.",".$search_res.",".$_GET['r'].",".e_SELF."?q=".$_GET['q']."&t=".$key."&r=[FROM]";
 				$core_parms = array('r' => '', 'q' => '', 't' => '', 's' => '');
 				foreach ($_GET as $pparm_key => $pparm_value) {
diff -x .svn -aruN 0.7.13.src/signup.php 0.7.14.src/signup.php
--- 0.7.13.src/signup.php	2008-09-23 14:55:13.000000000 -0500
+++ 0.7.14.src/signup.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,8 +11,8 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/signup.php,v $
-|     $Revision: 1.118 $
-|     $Date: 2008/09/23 19:55:36 $
+|     $Revision: 1.121 $
+|     $Date: 2008/11/11 22:36:31 $
 |     $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
@@ -428,8 +428,8 @@
 		}
 	}
 
-	// Check if form maxlength has been bypassed
-	if ( strlen($_POST['name']) > 30 || strlen($_POST['loginname']) > 100)
+	// Check if form maxlength has been bypassed (need to allow 100 chars for both here - can have display name and login name the same, and want an error message)
+	if ( strlen($_POST['name']) > 100 || strlen($_POST['loginname']) > 100)
 	{
 	  exit;
 	}
@@ -489,7 +489,7 @@
 		$error = TRUE;
 		$email = "";
 		$email_confirm = "";
-	  $email_address_OK = FALSE;
+		$email_address_OK = FALSE;
 	}
 	
 	// Always validate an email address if entered. If its blank, that's OK if checking disabled
@@ -557,65 +557,67 @@
 	  $error = TRUE;
 	  $email_address_OK = FALSE;
 	}
-
-	// Check Email against banlist.
-	$wc = make_email_query($_POST['email']);
-	if ($wc) $wc = ' OR '.$wc;
-	
-	if (($wc === FALSE) || ($do_email_validate && $sql->db_Select("banlist", "*", "banlist_ip='".$_POST['email']."'".$wc)))
+	else
 	{
-	  $email_address_OK = FALSE;
-	  $brow = $sql -> db_Fetch();
-	  $error = TRUE;
-	  if($brow['banlist_reason'])
-	  {
-		$repl = array("\n","\r","<br />");
-		$error_message = str_replace($repl,"\\n",$tp->toHTML($brow['banlist_reason'],"","nobreak, defs"))."\\n";
-		$email = "";
-	  }
-	  else
-	  {
-		exit;
-	  }
+		// Check Email against banlist.
+		$wc = make_email_query($_POST['email']);
+		if ($wc) $wc = ' OR '.$wc;
+
+		if (($wc === FALSE) || ($do_email_validate && $sql->db_Select("banlist", "*", "banlist_ip='".$_POST['email']."'".$wc)))
+		{
+			$email_address_OK = FALSE;
+			$brow = $sql -> db_Fetch();
+			$error = TRUE;
+			if($brow['banlist_reason'])
+			{
+				$repl = array("\n","\r","<br />");
+				$error_message = str_replace($repl,"\\n",$tp->toHTML($brow['banlist_reason'],"","nobreak, defs"))."\\n";
+				$email = "";
+			}
+			else
+			{
+				exit;
+			}
+		}
 	}
 
 	// Check email address on remote server (if enabled) - but only if previous checks passed.
 	if ($do_email_validate && $email_address_OK && varsettrue($pref['signup_remote_emailcheck']) && $error != TRUE)
 	{
-	  require_once(e_HANDLER."mail_validation_class.php");
-	  list($adminuser,$adminhost) = split ("@", SITEADMINEMAIL);
-	  $validator = new email_validation_class;
-	  $validator->localuser= $adminuser;
-	  $validator->localhost= $adminhost;
-	  $validator->timeout=3;
+		require_once(e_HANDLER."mail_validation_class.php");
+		list($adminuser,$adminhost) = split ("@", SITEADMINEMAIL);
+		$validator = new email_validation_class;
+		$validator->localuser= $adminuser;
+		$validator->localhost= $adminhost;
+		$validator->timeout=3;
 		//	$validator->debug=1;
 		//	$validator->html_debug=1;
-	  if($validator->ValidateEmailBox(trim($_POST['email'])) != 1)
-	  {
-		$email_address_OK = FALSE;
-		$error_message .= LAN_106."\\n";
-		$error = TRUE;
-		$email = "";
-		$email_confirm = "";
-	  }
+		if($validator->ValidateEmailBox(trim($_POST['email'])) != 1)
+		{
+			$email_address_OK = FALSE;
+			$error_message .= LAN_106."\\n";
+			$error = TRUE;
+			$email = "";
+			$email_confirm = "";
+		}
 	}
 
 	// Check for Duplicate Email address - but only if previous checks passed.
 	if ($do_email_validate && $email_address_OK && $sql->db_Select("user", "user_email, user_ban, user_sess", "user_email='".$_POST['email']."' "))
 	{
-      $chk = $sql -> db_Fetch();
-	  if($chk['user_ban']== 2 && $chk['user_sess'])
-	  {  // duplicate because unactivated
-		$error = TRUE;
-        header("Location: ".e_BASE."signup.php?resend");
-		exit;
-	  }
-	  else
-	  {
-	  $email_address_OK = FALSE;
-		$error_message .= LAN_408."\\n";
-		$error = TRUE;
-	  }
+		$chk = $sql -> db_Fetch();
+		if($chk['user_ban']== 2 && $chk['user_sess'])
+		{  // duplicate because unactivated
+			$error = TRUE;
+			header("Location: ".e_BASE."signup.php?resend");
+			exit;
+		}
+		else
+		{
+			$email_address_OK = FALSE;
+			$error_message .= LAN_408."\\n";
+			$error = TRUE;
+		}
 	}
 
 	// Extended Field validation
@@ -756,7 +758,7 @@
 					$text = LAN_405;
 				}
 			}
-			if(isset($error_message))
+			if($error_message)
 			{
 				$text = "<br /><b>".$error_message."</b><br />";	// Just display the error message
 			}
diff -x .svn -aruN 0.7.13.src/usersettings.php 0.7.14.src/usersettings.php
--- 0.7.13.src/usersettings.php	2008-06-10 14:29:40.000000000 -0500
+++ 0.7.14.src/usersettings.php	2008-11-17 14:36:31.000000000 -0600
@@ -11,8 +11,8 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvsroot/e107/e107_0.7/usersettings.php,v $
-|     $Revision: 1.102 $
-|     $Date: 2008/06/10 19:30:03 $
+|     $Revision: 1.103 $
+|     $Date: 2008/10/19 21:17:58 $
 |     $Author: e107steved $
 +----------------------------------------------------------------------------+
 */
@@ -373,21 +373,24 @@
 		$ue_fields = "";
 		foreach($_POST['ue'] as $key => $val)
 		{
-			$err = $ue->user_extended_validate_entry($val,$extList[$key]);
-	  		if($err === TRUE && !$_uid)
-			{  // General error - usually empty field; could be unacceptable value, or regex fail and no error message defined
-         	  $error .= LAN_SIGNUP_6.($tp->toHtml($extList[$key]['user_extended_struct_text'],FALSE,"defs"))." ".LAN_SIGNUP_7."\\n";
-			}
-			elseif ($err)
-			{	// Specific error message returned - usually regex fail
-			  $error .= $err."\\n";
-			  $err = TRUE;
-			}
-			if(!$err)
-			{
-			  $val = $tp->toDB($val);
-			  $ue_fields .= ($ue_fields) ? ", " : "";
-			  $ue_fields .= $key."='".$val."'";
+			if (isset($extList[$key]))
+			{	// Only allow valid keys
+				$err = $ue->user_extended_validate_entry($val,$extList[$key]);
+				if($err === TRUE && !$_uid)
+				{  // General error - usually empty field; could be unacceptable value, or regex fail and no error message defined
+					$error .= LAN_SIGNUP_6.($tp->toHtml($extList[$key]['user_extended_struct_text'],FALSE,"defs"))." ".LAN_SIGNUP_7."\\n";
+				}
+				elseif ($err)
+				{	// Specific error message returned - usually regex fail
+					$error .= $err."\\n";
+					$err = TRUE;
+				}
+				if(!$err)
+				{
+					$val = $tp->toDB($val);
+					$ue_fields .= ($ue_fields) ? ", " : "";
+					$ue_fields .= $key."='".$val."'";
+				}
 			}
 		}
     }
