1
WarDick
News Module Help
  • 2003/11/18 18:46

  • WarDick

  • Just can't stay away

  • Posts: 890

  • Since: 2003/9/13


Need Help Controlling Display

I want to turn on Forum and Comment Block
No problem it works fine.
But it displays on top of the News Stories I want the News Stories to be on top.

Can anyone point the way?



2
ackbarr
Re: News Module Help

the way actually leads through your chosen theme. Depending on your theme the actual lines may be different, but the concept is the same.

I will use the default theme as an example. If you look in /themes/default/theme.html you'll find code that looks like this:
<!-- Display center blocks if any -->
<{if 
$xoops_showcblock == 1}>

  <
table cellspacing="0">
    <
tr>
      <
td id="centerCcolumn" colspan="2">

        <!-- 
Start center-center blocks loop -->
        <{foreach 
item=block from=$xoops_ccblocks}>
          <{include 
file="default/theme_blockcenter_c.html"}>
        <{/foreach}>
        <!-- 
End center-center blocks loop -->

      </
td>
    </
tr>
    <
tr>
      <
td id="centerLcolumn">

        <!-- 
Start center-left blocks loop -->
        <{foreach 
item=block from=$xoops_clblocks}>
          <{include 
file="default/theme_blockcenter_l.html"}>
        <{/foreach}>
        <!-- 
End center-left blocks loop -->

      </
td><td id="centerRcolumn">

        <!-- 
Start center-right blocks loop -->
        <{foreach 
item=block from=$xoops_crblocks}>
          <{include 
file="default/theme_blockcenter_r.html"}>
        <{/foreach}>
        <!-- 
End center-right blocks loop -->

      </
td>
    </
tr>
  </
table>

<{/if}>
<!-- 
End display center blocks -->


This whole section of code creates the center blocks on a given page. If you look a little further down you'll see:
<div id="content">
  <{
$xoops_contents}>
</
div>


This code displays the current page contents. So if you wanted the page content to display above your blocks, move the second block of code before the "<!-- Display center blocks if any -->".

3
WarDick
Re: News Module Help
  • 2003/11/18 19:29

  • WarDick

  • Just can't stay away

  • Posts: 890

  • Since: 2003/9/13


YES THAT'S IT

Thank You very much!


4
milanov
Re: News Module Help
  • 2003/11/25 22:27

  • milanov

  • Just popping in

  • Posts: 10

  • Since: 2003/11/24


Okay, but this not works for me :)Hers's my code:

Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="content-language" content="<{$xoops_langcode}>" />
<meta name="robots" content="<{$xoops_meta_robots}>" />
<meta name="keywords" content="<{$xoops_meta_keywords}>" />
<meta name="description" content="<{$xoops_meta_description}>" />
<meta name="rating" content="<{$xoops_meta_rating}>" />
<meta name="author" content="<{$xoops_meta_author}>" />
<meta name="copyright" content="<{$xoops_meta_copyright}>" />
<meta name="generator" content="XOOPS" />
<title><{$xoops_sitename}> - <{$xoops_pagetitle}></title>
<link href="<{$xoops_url}>/favicon.ico" rel="SHORTCUT ICON" />
<link rel="stylesheet" type="text/css" media="all" href="<{$xoops_url}>/xoops.css" />
<link rel="stylesheet" type="text/css" media="all" href="<{$xoops_themecss}>" />
<script type="text/javascript">
<!--
<{$xoops_js}>
//-->
</script>
<script language="JavaScript">
<!--

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//-->
</script>
</head>
<body onLoad="MM_preloadImages('<{$xoops_imageurl}>head_r1_c4_f2.gif','<{$xoops_imageurl}>head_r1_c5_f2.gif','<{$xoops_imageurl}>head_r1_c6_f2.gif','<{$xoops_imageurl}>head_r1_c7_f2.gif');">
<table width="760" align="center" cellpadding="0" cellspacing="0" class="frame">
<tr>
<td><img src="http://www.website.org/images/logo.jpg" width="760" height="180" border="0" usemap="#Map" /></td>
</tr>
<tr>
<td bgcolor="#FFFFFF">
<table cellspacing="0" cellpadding="0">
<tr>
<td class="left_block" valign="top">
<!-- Start left blocks loop -->
<{foreach item=block from=$xoops_lblocks}>
<table class="left_block_table" cellpadding="0" cellspacing="0">
<tr>
<td class="left_block_title" align="left" >&nbsp;<{$block.title}></td>
</tr>
<tr>
<td align="left" valign="top" class="left_block_content" ><{$block.content}></td>
</tr>
</table>

<{/foreach}>
<!-- End left blocks loop -->
</td>
<td class="conter_block"valign="top">
<!-- Display center blocks if any -->
<{if $xoops_showcblock == 1}> <br />
<table class="block_table" align="center" cellspacing="0">
<tr>
<td width="100%" colspan="2">

<!-- Start center-center blocks loop -->
<{foreach item=block from=$xoops_ccblocks}>
<table class="cc_block_table" width="99%" align="center" cellpadding="5" cellspacing="1">
<tr>
<td width="148" class="cc_block_title">&nbsp;<{$block.title}></td>
</tr>
<tr>
<td class="cc_block_content"><{$block.content}></td>
</tr>
</table><br />
<{/foreach}>
<!-- End center-center blocks loop -->
</td>
</tr>
<tr>
<td width="50%">

<!-- Start center-left blocks loop -->
<{foreach item=block from=$xoops_clblocks}>
<table class="cl_block_table" align="center" cellpadding="5" cellspacing="1">
<tr>
<td class="conter_block_title">&nbsp;<{$block.title}></td>
</tr>
<tr>
<td class="conter_block_content"><{$block.content}></td>
</tr>
</table>
<br />
<{/foreach}>
<!-- End center-left blocks loop -->

</td><td width="50%">

<!-- Start center-right blocks loop -->
<{foreach item=block from=$xoops_crblocks}>
<table class="cr_block_table" align="center" cellpadding="5" cellspacing="1">
<tr>
<td class="conter_block_title">&nbsp;<{$block.title}></td>
</tr>
<tr>
<td class="conter_block_content"><{$block.content}></td>
</tr>
</table>
<br />
<{/foreach}>
<!-- End center-right blocks loop -->

</td>
</tr>
</table>

<{/if}>
<!-- End display center blocks -->
<br /><br />
<table class="content_table" align="center" >
<tr><td class="conter_content"><{$xoops_contents}></td></tr></table>
</td>

<{if $xoops_showrblock == 1}>
<td valign="top" class="right_block">
<!-- Start right blocks loop -->
<{foreach item=block from=$xoops_rblocks}>
<table class="right_block_table" cellspacing="0" cellpadding="2">
<tr>
<td class="right_block_title">&nbsp;<{$block.title}></td>
</tr>
<tr>
<td class="right_block_content"><{$block.content}></td>
</tr>
</table>
<br />
<{/foreach}>
<!-- End right blocks loop -->
<{/if}> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="footer">©2003-2004 website.org. Всички права запазени. <br />
site engine XOOPS 2.0.5 TP mod </td>
</tr>
</table>
<map name="Map" id="Map">
<area shape="rect" coords="668,43,751,64" href="http://www.website.org/modules/ipboard/" target="_top" />
<area shape="circle" coords="710,30,24" href="http://www.website.org/modules/ipboard/" target="_top" />
<area shape="circle" coords="619,30,24" href="#" />
<area shape="rect" coords="577,43,660,64" href="#" />
<area shape="circle" coords="528,30,24" href="#" />
<area shape="rect" coords="486,43,569,64" href="#" />
<area shape="circle" coords="440,30,24" href="http://www.website.org/" target="_top" />
<area shape="rect" coords="398,43,481,64" href="http://www.website.org/" target="_top" />
</map>
</body>
</html>


I created two blocks, and the default module for the start page is "news", but news are at the bottom :)
So, how to chenge the code in my case, please explain

5
ackbarr
Re: News Module Help

The code for your theme is similar to the one presented above. Move this code:
<!-- Display center blocks if any -->
<{if 
$xoops_showcblock == 1}> <br />
<
table class="block_table" align="center" cellspacing="0">
<
tr>
<
td width="100%" colspan="2">

<!-- 
Start center-center blocks loop -->
<{foreach 
item=block from=$xoops_ccblocks}>
<
table class="cc_block_table" width="99%" align="center" cellpadding="5" cellspacing="1">
<
tr>
<
td width="148" class="cc_block_title">&nbsp;<{$block.title}></td>
</
tr>
<
tr>
<
td class="cc_block_content"><{$block.content}></td>
</
tr>
</
table><br />
<{/foreach}>
<!-- 
End center-center blocks loop -->
</
td>
</
tr>
<
tr>
<
td width="50%">

<!-- 
Start center-left blocks loop -->
<{foreach 
item=block from=$xoops_clblocks}>
<
table class="cl_block_table" align="center" cellpadding="5" cellspacing="1">
<
tr>
<
td class="conter_block_title">&nbsp;<{$block.title}></td>
</
tr>
<
tr>
<
td class="conter_block_content"><{$block.content}></td>
</
tr>
</
table>
<
br />
<{/foreach}>
<!-- 
End center-left blocks loop -->

</
td><td width="50%">

<!-- 
Start center-right blocks loop -->
<{foreach 
item=block from=$xoops_crblocks}>
<
table class="cr_block_table" align="center" cellpadding="5" cellspacing="1">
<
tr>
<
td class="conter_block_title">&nbsp;<{$block.title}></td>
</
tr>
<
tr>
<
td class="conter_block_content"><{$block.content}></td>
</
tr>
</
table>
<
br />
<{/foreach}>
<!-- 
End center-right blocks loop -->

</
td>
</
tr>
</
table>

<{/if}>
<!-- 
End display center blocks -->

Below the code for your page contents:
<table class="content_table" align="center" >
<
tr><td class="conter_content"><{$xoops_contents}></td></tr></table>

6
milanov
Re: News Module Help
  • 2003/12/8 1:04

  • milanov

  • Just popping in

  • Posts: 10

  • Since: 2003/11/24


Now it's good :)
10x a lot!!!

Login

Who's Online

247 user(s) are online (186 user(s) are browsing Support Forums)


Members: 0


Guests: 247


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits