[Fusionforge-commits] r14778 - in trunk/src: common/forum www/forum www/stats www/survey/admin

Alain Peyrat aljeux at fusionforge.org
Wed Nov 9 21:02:24 CET 2011


Author: aljeux
Date: 2011-11-09 21:02:24 +0100 (Wed, 09 Nov 2011)
New Revision: 14778

Modified:
   trunk/src/common/forum/ForumHTML.class.php
   trunk/src/www/forum/forum.php
   trunk/src/www/stats/site_stats_utils.php
   trunk/src/www/survey/admin/show_results_aggregate.php
Log:
clean HTML code mostly

Modified: trunk/src/common/forum/ForumHTML.class.php
===================================================================
--- trunk/src/common/forum/ForumHTML.class.php	2011-11-09 20:02:18 UTC (rev 14777)
+++ trunk/src/common/forum/ForumHTML.class.php	2011-11-09 20:02:24 UTC (rev 14778)
@@ -200,7 +200,7 @@
 		$ret_val = $am->PrintHelperFunctions();
 		html_feedback_top(_('This is the content of the pending message'));
 		$ret_val .= '
-		<table border="0">
+		<table>
 			<tr>
 				<td class="tablecontent" style="white-space: nowrap;">'._('By:').
 		$msg->getPosterRealName().
@@ -211,7 +211,7 @@
 					<br />
 					'.
 		html_image('ic/msg.png') .
-		$bold_begin. $msg->getSubject() . $bold_end .'  '.
+		$bold_begin. $msg->getSubject() . $bold_end .
 		'<br />'. date(_('Y-m-d H:i'),$msg->getPostDate()) .'
 				</td>
 			</tr>
@@ -249,9 +249,9 @@
 		$fa = new ForumAdmin($msgforum->Group->getID());
 		$url = util_make_uri('/forum/message.php?msg_id='. $msg->getID() .'&group_id='.$group_id);
 		$ret_val =
-		'<table border="0" width="100%" cellspacing="0">
+		'<table class="fullwidth">
 			<tr>
-				<td class="tablecontent" style="white-space: nowrap;" valign="top">';
+				<td class="tablecontent top" style="white-space: nowrap;">';
 
 		$params = array('user_id' => $msg->getPosterID(), 'size' => 's', 'content' => '');
 		plugin_hook_by_reference("user_logo", $params);
@@ -433,7 +433,7 @@
 					If it this is the message being displayed, don't show a link to it
 				*/
 				if ($current_message != $msg_arr[$msg_id][$i]->getID()) {
-					$ah_begin='<a href="'.util_make_url ('/forum/message.php?msg_id='. $msg_arr[$msg_id][$i]->getID() .'&group_id='.$group_id).'">';
+					$ah_begin='<a href="'.util_make_uri('/forum/message.php?msg_id='. $msg_arr[$msg_id][$i]->getID() .'&group_id='.$group_id).'">';
 					$ah_end='</a>';
 				} else {
 					$ah_begin='';
@@ -617,11 +617,11 @@
 
 } elseif ($rl->hasPermission('forum', $this->Forum->getID(), 'post')) {
 	echo '<span class="error">';
-	printf(_('You could post if you were <a href="%1$s">logged in</a>.'), util_make_url ('/account/login.php?return_to='.urlencode(getStringFromServer('REQUEST_URI'))));
+			printf(_('You could post if you were <a href="%1$s">logged in</a>.'), util_make_uri('/account/login.php?return_to='.urlencode(getStringFromServer('REQUEST_URI'))));
 	echo '</span>';
 } elseif (!session_loggedin()) {
 	echo '<span class="error">';
-	printf(_('Please <a href="%1$s">log in</a>'), util_make_url('/account/login.php?return_to='.urlencode(getStringFromServer('REQUEST_URI'))));
+			printf(_('Please <a href="%1$s">log in</a>'), util_make_uri('/account/login.php?return_to='.urlencode(getStringFromServer('REQUEST_URI'))));
 	echo '</span><br/></p>';
 } else {
 	//do nothing

Modified: trunk/src/www/forum/forum.php
===================================================================
--- trunk/src/www/forum/forum.php	2011-11-09 20:02:18 UTC (rev 14777)
+++ trunk/src/www/forum/forum.php	2011-11-09 20:02:24 UTC (rev 14778)
@@ -189,7 +189,7 @@
 	//now show the popup boxes in a form
 	$ret_val = '
 	<form action="'. getStringFromServer('PHP_SELF') .'" method="get">
-	<table border="0" width="33%">
+	<table>
 		<tr><td>
 	<input type="hidden" name="set" value="custom" />
 	<input type="hidden" name="forum_id" value="'.$forum_id.'" />
@@ -198,7 +198,8 @@
 			'</td><td><input type="submit" name="submit" value="'.
 			_('Change View').'" />
 		</td></tr>
-	</table></form>';
+	</table>
+	</form>';
 
 	$am = new AttachManager();
 	$ret_val .= $am->PrintHelperFunctions();
@@ -207,7 +208,7 @@
 		$msg_arr =& $fmf->nestArray($fmf->getNested());
 
 		if ($fmf->isError()) {
-			echo '<div class="error">'.$fmf->getErrorMessage().'</div>';
+			echo '<p class="error">'.$fmf->getErrorMessage().'</p>';
 	        forum_footer(array());
             exit;
 		}
@@ -242,7 +243,7 @@
 
 		$msg_arr =& $fmf->nestArray($fmf->getThreaded());
 		if ($fmf->isError()) {
-			echo '<div class="error">'.$fmf->getErrorMessage().'</div>';
+			echo '<p class="error">'.$fmf->getErrorMessage().'</p>';
 	        forum_footer(array());
             exit;
 		}
@@ -299,7 +300,7 @@
 
 		$msg_arr =& $fmf->getFlat($thread_id);
 		if ($fmf->isError()) {
-			echo '<div class="error">'.$fmf->getErrorMessage().'</div>';
+			echo '<p class="error">'.$fmf->getErrorMessage().'</p>';
 	        forum_footer(array());
             exit;
 		}
@@ -344,7 +345,7 @@
 				$ret_val .= '
 					<tr '. $GLOBALS['HTML']->boxGetAltRowStyle($i) .'><td><a href="'.util_make_uri('/forum/forum.php?thread_id='.
 															$row['thread_id'].'&forum_id='.$forum_id.'&group_id='.$group_id).'">'.
-					html_image('ic/cfolder15.png') . '    ';
+					html_image('ic/cfolder15.png') . ' ';
 				/*
 						See if this message is new or not
 						If so, highlite it in bold
@@ -375,17 +376,17 @@
 		This code puts the nice next/prev.
 	*/
 	if (($offset != 0) or ($avail_rows > $max_rows)) {
-		$ret_val .= '<table width="100%" border="0">
-			<tr class="tablecontent"><td width="50%">';
+		$ret_val .= '<table class="fullwidth">
+			<tr class="tablecontent"><td class="halfwidth">';
 		if ($offset != 0) {
 			$ret_val .= '<span class="prev">
 			<a href="javascript:history.back()"><strong>' .
 				html_image('t2.png',"15","15") ._('Newer Messages').'</strong></a></span>';
 		} else {
-			$ret_val .= ' ';
+			$ret_val .= ' ';
 		}
 
-		$ret_val .= '</td><td> </td><td align="right" width="50%">';
+		$ret_val .= '</td><td></td><td class="halfwidth align-right">';
 
 		if ($avail_rows > $max_rows) {
 			$ret_val .= '<span class="next">
@@ -394,23 +395,12 @@
 			<strong> '._('Older Messages') .
 				html_image('t.png',"15","15") . '</strong></a></span>';
 		} else {
-			$ret_val .= ' ';
+			$ret_val .= ' ';
 		}
 		$ret_val .= '</td></tr></table>';
 	}
 
 	echo $ret_val;
-/*
-	echo '<p> <p>';
-
-	if (!$thread_id) {
-		//
-		//	Viewing an entire message forum in a given format
-		//
-		echo '<center><h3>'._('Start New Thread').'</h3></center>';
-		$fh->showPostForm();
-	}
-*/
 	forum_footer(array());
 
 } else {

Modified: trunk/src/www/stats/site_stats_utils.php
===================================================================
--- trunk/src/www/stats/site_stats_utils.php	2011-11-09 20:02:18 UTC (rev 14777)
+++ trunk/src/www/stats/site_stats_utils.php	2011-11-09 20:02:24 UTC (rev 14778)
@@ -143,7 +143,7 @@
 	global $allowed_orderby_vals ;
 
 	print '<form action="projects.php" method="get">' . "\n";
-	print '<table width="100%" cellpadding="0" cellspacing="0" class="tableheading">' . "\n";
+	print '<table class="tableheading fullwidth">' . "\n";
 
 	print '<tr><td><strong>'._('Projects in trove category:').'</strong></td><td>';
 	stats_generate_trove_pulldown( $trovecat );
@@ -172,7 +172,7 @@
 	print html_build_select_box_from_arrays ( $allowed_orderby_vals, $allowed_orderby_vals, "orderby", $orderby, false );
 	print '</td></tr>';
 
-	print '<tr><td colspan="2" style="text-align:center"> <input type="submit" value="'._('Generate Report').'" /> </td></tr>';
+	print '<tr><td colspan="2" class="align-center"> <input type="submit" value="'._('Generate Report').'" /> </td></tr>';
 
 	print '</table>' . "\n";
 	print '</form>' . "\n";

Modified: trunk/src/www/survey/admin/show_results_aggregate.php
===================================================================
--- trunk/src/www/survey/admin/show_results_aggregate.php	2011-11-09 20:02:18 UTC (rev 14777)
+++ trunk/src/www/survey/admin/show_results_aggregate.php	2011-11-09 20:02:24 UTC (rev 14778)
@@ -81,11 +81,11 @@
 			Don't show question number if it's just a comment
 		*/
 
-		echo "\n<tr><td valign=\"top\"> </td>\n<td>";
+		echo "\n<tr><td class=\"top\"> </td>\n<td>";
 
 	} else {
 
-		echo "\n<tr><td valign=\"top\"><strong>";
+		echo "\n<tr><td class=\"top\"><strong>";
 
 		/*
 			If it's a 1-5 question box and first in series, move Quest




More information about the Fusionforge-commits mailing list