Signatures are now pulled from Enano. default tip
authorDan
Sat, 11 Apr 2009 16:47:10 -0400
changeset 10 98d80b672f3c
parent 9 a932ce8c4827
Signatures are now pulled from Enano.
punbb/include/parser.php
punbb/viewtopic.php
--- a/punbb/include/parser.php	Sun Jun 15 01:42:31 2008 -0400
+++ b/punbb/include/parser.php	Sat Apr 11 16:47:10 2009 -0400
@@ -448,8 +448,6 @@
 	if ($pun_config['o_censoring'] == '1')
 		$text = censor_words($text);
 
-	$text = htmlspecialchars($text);
-
 	if ($pun_config['o_make_links'] == '1')
 		$text = do_clickable($text);
 
@@ -466,11 +464,7 @@
 			$text = preg_replace('#\[img\]((ht|f)tps?://)([^\s<"]*?)\[/img\]#e', 'handle_img_tag(\'$1$3\', true)', $text);
 		}
 	}
-
-	// Deal with newlines, tabs and multiple spaces
-	$pattern = array("\n", "\t", '  ', '  ');
-	$replace = array('<br />', '&nbsp; &nbsp; ', '&nbsp; ', ' &nbsp;');
-	$text = str_replace($pattern, $replace, $text);
-
-	return $text;
+  
+  // Enano-specific!
+  return RenderMan::render($text);
 }
--- a/punbb/viewtopic.php	Sun Jun 15 01:42:31 2008 -0400
+++ b/punbb/viewtopic.php	Sat Apr 11 16:47:10 2009 -0400
@@ -276,25 +276,32 @@
 
 // Retrieve the posts (and their respective poster/online status)
 $query = array(
-	'SELECT'	=> 'u.email, u.title, u.url, u.location, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online',
-	'FROM'		=> 'posts AS p',
+	'SELECT'	=> 'u.email, u.title, u.url, u.location, eu.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online',
+	'FROM'		=> table_prefix . 'pun_posts AS p',
 	'JOINS'		=> array(
 		array(
-			'INNER JOIN'	=> 'users AS u',
+			'INNER JOIN'	=> table_prefix . 'pun_users AS u',
 			'ON'			=> 'u.id=p.poster_id'
 		),
+    array(
+			'INNER JOIN'	=> table_prefix . 'users AS eu',
+			'ON'			=> 'u.id=eu.user_id'
+		),
 		array(
-			'INNER JOIN'	=> 'groups AS g',
+			'INNER JOIN'	=> table_prefix . 'pun_groups AS g',
 			'ON'			=> 'g.g_id=u.group_id'
 		),
 		array(
-			'LEFT JOIN'		=> 'online AS o',
+			'LEFT JOIN'		=> table_prefix . 'pun_online AS o',
 			'ON'			=> '(o.user_id=u.id AND o.user_id!=1 AND o.idle=0)'
 		),
 	),
 	'WHERE'		=> 'p.topic_id='.$id,
 	'ORDER BY'	=> 'p.id',
-	'LIMIT'		=> $pun_page['start_from'].','.$pun_user['disp_posts']
+	'LIMIT'		=> $pun_page['start_from'].','.$pun_user['disp_posts'],
+  'PARAMS' => array(
+    'NO_PREFIX' => true
+  )
 );
 
 ($hook = get_hook('vt_qr_get_posts')) ? eval($hook) : null;