Browse Source

Merge pull request #3 from Sorunome/patch-3

Fix the front-page news the correct way
Nathaniel van Diepen 8 years ago
parent
commit
873a042fd8
2 changed files with 11 additions and 9 deletions
  1. 4 4
      src/source/dp_news.css
  2. 7 5
      src/source/script.php

+ 4 - 4
src/source/dp_news.css

@@ -7,14 +7,15 @@
 	margin: 0.5em 0;
 }
 
-.dp_news img
+.dp_news_head > img 
 {
+	float: left;
 	padding-right: 8px;
 }
 
-.dp_news > .dp_news_icon
+.dp_news_head > p        
 {
-	float:left;
+	display:inline-block;
 }
 
 .dp_news_avatar
@@ -22,4 +23,3 @@
 	width: 45px;
 	height: 45px;
 }
-

+ 7 - 5
src/source/script.php

@@ -30,11 +30,13 @@ function module_news($params)
 		{
 			echo '
 									<div class="dp_news">
-										<img class="dp_news_icon" src="', $settings['images_url'], '/on.png" alt="" />
-										<p>
-											<a href="', $news['href'], '"><strong>', $news['subject'], '</strong></a> ', $txt['by'], ' ', (!empty($modSettings['dp_color_members']) ? $news['color_poster'] : $news['poster']), '<br />
-											<span class="smalltext">', $news['time'], '</span>
-										</p>';
+										<div class="dp_news_head">
+											<img src="', $settings['images_url'], '/on.png" alt="" />
+											<p>
+												<a href="', $news['href'], '"><strong>', $news['subject'], '</strong></a> ', $txt['by'], ' ', (!empty($modSettings['dp_color_members']) ? $news['color_poster'] : $news['poster']), '<br />
+												<span class="smalltext">', $news['time'], '</span>
+											</p>
+										</div>';
 			echo parse_bbc($news['body']);
 
 			if(!$news['is_last']){