Help splitting a block into 2 blocks

  • lilstorm
  • Graduate
  • Graduate
  • User avatar
  • Posts: 162
  • Loc: New York

Post 3+ Months Ago

I could really use some help. I have a update/news area on my website. Which I just post on my forums and it copies it to my front page under the updates area.

Right now all my posts show up in one big block. I want each individual post to show up in its own box.

Here is my site now you can see what I mean under the center section for updates.:
http://www.shadowsmoon.com/

Here is how I would like it to look:
http://img102.imageshack.us/img102/8748 ... te1ar7.jpg


Here is the mess of code I currently have:
PHP Code: [ Select ]
<!-- NEWS -->
 
<?php for ($i = 0; $i < count($news); $i++) { ?>
 
<table width="100%" cellpadding="0" cellspacing="1" border="0" class="forumline3">
 
  <tr>
 
    <th class="thTop" height="28"><?php echo $news[$i]['topic_title']; ?><?php if ($news[$i]['topic_trimmed']) { echo '...'; } ?></th>
 
  </tr>
 
  <tr>
 
    <td class="rowss" align="left" width="100%">
 
      <span class="gensmallg">
 
<?php echo $lang['Author']; ?>:
 
<a href="<?php echo append_sid($phpbb_root_path . 'profile.php?mode=viewprofile&amp;u=' . $news[$i]['user_id']); ?>">
 
<?php echo $news[$i]['username']; ?></a> ::
 
<?php echo $lang['Posted']; ?>:
 
<?php echo create_date($board_config['default_dateformat'], $news[$i]['post_time'], $board_config['board_timezone']); ?>
 
      </span>
 
      <span class="gen">
 
<br /><br />
 
 
 
<?php echo $news[$i]['post_text']; ?><?php if ($news[$i]['trimmed']) { echo '...'; } ?>
 
      </span><br />
 
<img src="images/borders.jpg" border="0" width="550"><br />
 
      <span class="gensmall">
 
<div align="right"><font color="#333333" face="Verdana" size="1">(<?php echo $news[$i]['topic_replies']; ?>)
 
<a href="<?php echo append_sid($phpbb_root_path . 'ftopic.html' . $news[$i]['topic_id']); ?>">
 
<?php echo $lang['Replies']; ?></a></font></div>
 
      </span>
 
    </td>
 
  </tr>
 
</table>
 
<br />
 
<?php } ?>
 
<!-- NEWS -->
 
 
 
<!-- SPAN PAGES -->
 
<div align="right">
 
<span class="gensmall"><b><?php echo phpbb_span_pages($CFG['posts_span_pages_numrows'], $CFG['posts_limit'], $CFG['posts_span_pages_offset'], false); ?></b></span>
 
</div>
 
<!-- SPAN PAGES -->
 
 
  1. <!-- NEWS -->
  2.  
  3. <?php for ($i = 0; $i < count($news); $i++) { ?>
  4.  
  5. <table width="100%" cellpadding="0" cellspacing="1" border="0" class="forumline3">
  6.  
  7.   <tr>
  8.  
  9.     <th class="thTop" height="28"><?php echo $news[$i]['topic_title']; ?><?php if ($news[$i]['topic_trimmed']) { echo '...'; } ?></th>
  10.  
  11.   </tr>
  12.  
  13.   <tr>
  14.  
  15.     <td class="rowss" align="left" width="100%">
  16.  
  17.       <span class="gensmallg">
  18.  
  19. <?php echo $lang['Author']; ?>:
  20.  
  21. <a href="<?php echo append_sid($phpbb_root_path . 'profile.php?mode=viewprofile&amp;u=' . $news[$i]['user_id']); ?>">
  22.  
  23. <?php echo $news[$i]['username']; ?></a> ::
  24.  
  25. <?php echo $lang['Posted']; ?>:
  26.  
  27. <?php echo create_date($board_config['default_dateformat'], $news[$i]['post_time'], $board_config['board_timezone']); ?>
  28.  
  29.       </span>
  30.  
  31.       <span class="gen">
  32.  
  33. <br /><br />
  34.  
  35.  
  36.  
  37. <?php echo $news[$i]['post_text']; ?><?php if ($news[$i]['trimmed']) { echo '...'; } ?>
  38.  
  39.       </span><br />
  40.  
  41. <img src="images/borders.jpg" border="0" width="550"><br />
  42.  
  43.       <span class="gensmall">
  44.  
  45. <div align="right"><font color="#333333" face="Verdana" size="1">(<?php echo $news[$i]['topic_replies']; ?>)
  46.  
  47. <a href="<?php echo append_sid($phpbb_root_path . 'ftopic.html' . $news[$i]['topic_id']); ?>">
  48.  
  49. <?php echo $lang['Replies']; ?></a></font></div>
  50.  
  51.       </span>
  52.  
  53.     </td>
  54.  
  55.   </tr>
  56.  
  57. </table>
  58.  
  59. <br />
  60.  
  61. <?php } ?>
  62.  
  63. <!-- NEWS -->
  64.  
  65.  
  66.  
  67. <!-- SPAN PAGES -->
  68.  
  69. <div align="right">
  70.  
  71. <span class="gensmall"><b><?php echo phpbb_span_pages($CFG['posts_span_pages_numrows'], $CFG['posts_limit'], $CFG['posts_span_pages_offset'], false); ?></b></span>
  72.  
  73. </div>
  74.  
  75. <!-- SPAN PAGES -->
  76.  
  77.  


Can anyone help me?

Thanks :)
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8399
  • Loc: USA

Post 3+ Months Ago

Check if the following would work...

The CSS...
Code: [ Select ]
<style type="language/css">
.newsbox {
border: 1 solid;
border-color: #CECECE;
background-color: #777777;
}
  1. <style type="language/css">
  2. .newsbox {
  3. border: 1 solid;
  4. border-color: #CECECE;
  5. background-color: #777777;
  6. }

...and the php...
Code: [ Select ]
<body>
<!-- NEWS -->
<?php for ($i = 0; $i < count($news); $i++) { ?>
<table width="100%" cellpadding="0" cellspacing="1" border="0" class="forumline3">
 <tr>
  <th class="thTop" height="28"><?php echo $news[$i]['topic_title']; ?><?php if ($news[$i]['topic_trimmed']) { echo '...'; } ?></th>
 </tr>
 <tr>
  <td class="rowss" align="left" width="100%">
   <div class="newsbox">
   <span class="gensmallg">
<?php echo $lang['Author']; ?>:
<a href="<?php echo append_sid($phpbb_root_path . 'profile.php?mode=viewprofile&amp;u=' . $news[$i]['user_id']); ?>">
<?php echo $news[$i]['username']; ?></a> ::
<?php echo $lang['Posted']; ?>:
<?php echo create_date($board_config['default_dateformat'], $news[$i]['post_time'], $board_config['board_timezone']); ?>
   </span>
   </div>
   <span class="gen">
<br /><br />

<?php echo $news[$i]['post_text']; ?><?php if ($news[$i]['trimmed']) { echo '...'; } ?>
   </span><br />
<img src="images/borders.jpg" border="0" width="550"><br />
   <span class="gensmall">
<div align="right"><font color="#333333" face="Verdana" size="1">(<?php echo $news[$i]['topic_replies']; ?>)
<a href="<?php echo append_sid($phpbb_root_path . 'ftopic.html' . $news[$i]['topic_id']); ?>">
<?php echo $lang['Replies']; ?></a></font></div>
   </span>
  </td>
 </tr>
</table>
<br />
<?php } ?>
<!-- NEWS -->

<!-- SPAN PAGES -->
<div align="right">
<span class="gensmall"><b><?php echo phpbb_span_pages($CFG['posts_span_pages_numrows'], $CFG['posts_limit'], $CFG['posts_span_pages_offset'], false); ?></b></span>
</div>
<!-- SPAN PAGES -->
  1. <body>
  2. <!-- NEWS -->
  3. <?php for ($i = 0; $i < count($news); $i++) { ?>
  4. <table width="100%" cellpadding="0" cellspacing="1" border="0" class="forumline3">
  5.  <tr>
  6.   <th class="thTop" height="28"><?php echo $news[$i]['topic_title']; ?><?php if ($news[$i]['topic_trimmed']) { echo '...'; } ?></th>
  7.  </tr>
  8.  <tr>
  9.   <td class="rowss" align="left" width="100%">
  10.    <div class="newsbox">
  11.    <span class="gensmallg">
  12. <?php echo $lang['Author']; ?>:
  13. <a href="<?php echo append_sid($phpbb_root_path . 'profile.php?mode=viewprofile&amp;u=' . $news[$i]['user_id']); ?>">
  14. <?php echo $news[$i]['username']; ?></a> ::
  15. <?php echo $lang['Posted']; ?>:
  16. <?php echo create_date($board_config['default_dateformat'], $news[$i]['post_time'], $board_config['board_timezone']); ?>
  17.    </span>
  18.    </div>
  19.    <span class="gen">
  20. <br /><br />
  21. <?php echo $news[$i]['post_text']; ?><?php if ($news[$i]['trimmed']) { echo '...'; } ?>
  22.    </span><br />
  23. <img src="images/borders.jpg" border="0" width="550"><br />
  24.    <span class="gensmall">
  25. <div align="right"><font color="#333333" face="Verdana" size="1">(<?php echo $news[$i]['topic_replies']; ?>)
  26. <a href="<?php echo append_sid($phpbb_root_path . 'ftopic.html' . $news[$i]['topic_id']); ?>">
  27. <?php echo $lang['Replies']; ?></a></font></div>
  28.    </span>
  29.   </td>
  30.  </tr>
  31. </table>
  32. <br />
  33. <?php } ?>
  34. <!-- NEWS -->
  35. <!-- SPAN PAGES -->
  36. <div align="right">
  37. <span class="gensmall"><b><?php echo phpbb_span_pages($CFG['posts_span_pages_numrows'], $CFG['posts_limit'], $CFG['posts_span_pages_offset'], false); ?></b></span>
  38. </div>
  39. <!-- SPAN PAGES -->

... the PHP hasn't being changed... ...
  • lilstorm
  • Graduate
  • Graduate
  • User avatar
  • Posts: 162
  • Loc: New York

Post 3+ Months Ago

lol oh silly me :) That seems like such a duh now that you said it :)


Thank you so much :)
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8399
  • Loc: USA

Post 3+ Months Ago

:) that happens.

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 43 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.