Page 1 of 1

Flytte moduler på forsiden?

Posted: Tue May 27, 2008 9:26 pm
by Webtytte
Hej,

Jeg bruger en template kaldet Waldmeister. Den har to positioner "user1" and "user2" placeret under "main content" på forsiden. Jeg vil gerne flytte dem oven over "main content", men har problemer med at se hvilken html kode der skal ændres. Jeg har vedhæftet html filen for templaten i håb om at der er nogle, klogere end mig, der kan hjælpe mig.

Her er templatens html fil:

Code: Select all

<?php
defined( '_VALID_MOS' ) or die( 'Restricted access' );
// needed to seperate the ISO number from the language file constant _ISO
$iso = explode( '=', _ISO );
// xml prolog
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';
?>
<!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">
<head>
<?php mosShowHead(); ?>
<?php
if ( $my->id ) {
	initEditor();
}
$collspan_offset = ( mosCountModules( 'right', 'left' ) + mosCountModules( 'user2' ) ) ? 2 : 1;
//script to determine which div setup for layout to use based on module configuration
$user1 = 0;
$user2 = 0;
$colspan = 0;
$right = 0;
$left = 0;
$banner = 0;
// banner combos

//user1 combos
if ( mosCountModules( 'user1' ) + mosCountModules( 'user2' ) == 2) {
	$user1 = 2;
	$user2 = 2;
	$colspan = 3;
} elseif ( mosCountModules( 'user1' ) == 1 ) {
	$user1 = 1;
	$colspan = 1;
} elseif ( mosCountModules( 'user2' ) == 1 ) {
	$user2 = 1;
	$colspan = 1;
}
//banner based combos
if ( mosCountModules( 'banner' ) and ( empty( $_REQUEST['task'] ) || $_REQUEST['task'] != 'edit' ) ) {
	$banner = 1;
	
}

//right based combos
if ( mosCountModules( 'right' ) and ( empty( $_REQUEST['task'] ) || $_REQUEST['task'] != 'edit' ) ) {
	$right = 1;
	
}
//left based combos
if ( mosCountModules( 'left' ) and ( empty( $_REQUEST['task'] ) || $_REQUEST['task'] != 'edit' ) ) {
      $left = 1;

}
//top based combos
if ( mosCountModules( 'top' ) and ( empty( $_REQUEST['task'] ) || $_REQUEST['task'] != 'edit' ) ) {
      $top = 1;

}
?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<?php echo "<link rel=\"stylesheet\" href=\"$GLOBALS[mosConfig_live_site]/templates/$GLOBALS[cur_template]/css/template_css.css\" type=\"text/css\"/>" ; ?><?php echo "<link rel=\"shortcut icon\" href=\"$GLOBALS[mosConfig_live_site]/images/favicon.ico\" />" ; ?>
</head>
<body>
<script type="text/javascript" src="http://common.allakhazam.com/shared/akztooltip.js"></script>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td id="header"><div id="header_inner"></div>
      <div id="banner">
        <div id="banner_inner">
          <?php mosLoadModules( "banner", -1 ); ?>
        </div>
      </div></td>
  </tr>
  <tr>
    <td id="top_menu"><div id="top_menu_inner">
        <?php mosLoadModules ( 'user3' ); ?>
      </div></td>
  </tr>
  <tr>
    <td id="content_outer" valign="top"><table  align="center" border="0" cellpadding="0" cellspacing="0" width="100%" class="content_table">
        <tr valign="top">
          <?php
							if ( $left > 0 ) {
		  				?>
          <td><div id="left_outer">
              <div id="left_header"></div>
              <div id="left_inner_float">
                <div id="left_inner">
                  <?php mosLoadModules ( 'left', -2 ); ?>
                </div>
              </div>
              <div id="left_footer"></div>
            </div></td>
          <?php
		  			}
		  			?>
          <td width="100%" id="content"><div>
              <div id="content_top">
                <div id="content_top_corner"></div>
              </div>
              <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="content">
                <tr>
                  <td colspan="<?php echo $colspan; ?>"><div id="pathway">
                      <div id="pathway_text">
                        <?php mosPathWay(); ?>
                      </div>
                    </div>
                    <div id="main_content">
                      <?php mosMainBody(); ?>
                    </div></td>
                </tr>
                <?php
								if ($colspan > 0) {
								?>
                <tr valign="top">
                  <?php
				  					if ( $user1 > 0 ) {
				  						?>
                  <td width="50%"><div id="user1_outer">
                      <div class="user1_inner">
                        <?php mosLoadModules ( 'user1', -2 ); ?>
                      </div>
                    </div></td>
                  <?php
				  					}
				  					if ( $colspan == 3) {
										 ?>
                  <?php
										}
				  					if ( $user2 > 0 ) {
				  						?>
                  <td width="50%"><div id="user2_outer">
                      <div class="user2_inner">
                        <?php mosLoadModules ( 'user2', -2 ); ?>
                      </div>
                    </div></td>
                  <?php
				  					}
										?>
                </tr>
                <tr>
                  <td colspan="<?php echo $colspan; ?>"></td>
                </tr>
                <?php
									}
								?>
              </table>
              <div id="content_foot">
                <div id="content_foot_corner"></div>
              </div>
            </div></td>
          <?php
							if ( $right > 0 ) {
		  				?>
          <td><div id="right_outer">
              <div id="right_header"></div>
              <div id="right_inner_float">
                <div id="right_inner">
                  <?php mosLoadModules ( 'right', -2 ); ?>
                </div>
              </div>
              <div id="right_footer"></div>
            </div></td>
          <?php
		  			}
		  			?>
        </tr>
      </table></td>
  </tr>
  <tr>
    <?php
							if ( $banner > 0 ) {
		  				?>
    <td id="user"></td>
    <?php
		  			}
		  			?>
  </tr>
  <tr>
    <td id="footer"><?php include_once('includes/footer.php'); ?>
      <div id="logo">| Design by <a href="http://www.ah-68.de" target="_blank">ah-68</a> |</div></td>
  </tr>
</table>
<?php mosLoadModules( 'debug', -1 );?>
</body>
</html>
Håber I kan hjælpe mig, på forhånd tak! :)

Venligst
Webtytte

Re: Flytte moduler på forsiden?

Posted: Wed May 28, 2008 7:16 am
by Gadensgaard
Prøv sådan her:

Code: Select all

<?php
defined( '_VALID_MOS' ) or die( 'Restricted access' );
// needed to seperate the ISO number from the language file constant _ISO
$iso = explode( '=', _ISO );
// xml prolog
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';
?>
<!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">
<head>
<?php mosShowHead(); ?>
<?php
if ( $my->id ) {
   initEditor();
}
$collspan_offset = ( mosCountModules( 'right', 'left' ) + mosCountModules( 'user2' ) ) ? 2 : 1;
//script to determine which div setup for layout to use based on module configuration
$user1 = 0;
$user2 = 0;
$colspan = 0;
$right = 0;
$left = 0;
$banner = 0;
// banner combos

//user1 combos
if ( mosCountModules( 'user1' ) + mosCountModules( 'user2' ) == 2) {
   $user1 = 2;
   $user2 = 2;
   $colspan = 3;
} elseif ( mosCountModules( 'user1' ) == 1 ) {
   $user1 = 1;
   $colspan = 1;
} elseif ( mosCountModules( 'user2' ) == 1 ) {
   $user2 = 1;
   $colspan = 1;
}
//banner based combos
if ( mosCountModules( 'banner' ) and ( empty( $_REQUEST['task'] ) || $_REQUEST['task'] != 'edit' ) ) {
   $banner = 1;
   
}

//right based combos
if ( mosCountModules( 'right' ) and ( empty( $_REQUEST['task'] ) || $_REQUEST['task'] != 'edit' ) ) {
   $right = 1;
   
}
//left based combos
if ( mosCountModules( 'left' ) and ( empty( $_REQUEST['task'] ) || $_REQUEST['task'] != 'edit' ) ) {
      $left = 1;

}
//top based combos
if ( mosCountModules( 'top' ) and ( empty( $_REQUEST['task'] ) || $_REQUEST['task'] != 'edit' ) ) {
      $top = 1;

}
?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<?php echo "<link rel=\"stylesheet\" href=\"$GLOBALS[mosConfig_live_site]/templates/$GLOBALS[cur_template]/css/template_css.css\" type=\"text/css\"/>" ; ?><?php echo "<link rel=\"shortcut icon\" href=\"$GLOBALS[mosConfig_live_site]/images/favicon.ico\" />" ; ?>
</head>
<body>
<script type="text/javascript" src="http://common.allakhazam.com/shared/akztooltip.js"></script>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td id="header"><div id="header_inner"></div>
      <div id="banner">
        <div id="banner_inner">
          <?php mosLoadModules( "banner", -1 ); ?>
        </div>
      </div></td>
  </tr>
  <tr>
    <td id="top_menu"><div id="top_menu_inner">
        <?php mosLoadModules ( 'user3' ); ?>
      </div></td>
  </tr>
  <tr>
    <td id="content_outer" valign="top"><table  align="center" border="0" cellpadding="0" cellspacing="0" width="100%" class="content_table">
        <tr valign="top">
          <?php
                     if ( $left > 0 ) {
                    ?>
          <td><div id="left_outer">
              <div id="left_header"></div>
              <div id="left_inner_float">
                <div id="left_inner">
                  <?php mosLoadModules ( 'left', -2 ); ?>
                </div>
              </div>
              <div id="left_footer"></div>
            </div></td>
          <?php
                 }
                 ?>
          <td width="100%" id="content"><div>
              <div id="content_top">
                <div id="content_top_corner"></div>
              </div>
				[color=#FF0000]<?php
                	if ( $user1 > 0 ) {
                ?>
                  <td width="50%"><div id="user1_outer">
                      <div class="user1_inner">
                        <?php mosLoadModules ( 'user1', -2 ); ?>
                      </div>
                    </div></td>
                  <?php
                             }
                             if ( $colspan == 3) {
                               ?>
                  <?php
                              }
                             if ( $user2 > 0 ) {
                                ?>
                  <td width="50%"><div id="user2_outer">
                      <div class="user2_inner">
                        <?php mosLoadModules ( 'user2', -2 ); ?>
                      </div>
                    </div></td>
                  <?php
                             }
                              ?>
                </tr>
                <tr>
                  <td colspan="<?php echo $colspan; ?>"></td>
                </tr>
                <?php
                           }
                        ?>[/color]              
              <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="content">
                <tr>
                  <td colspan="<?php echo $colspan; ?>"><div id="pathway">
                      <div id="pathway_text">
                        <?php mosPathWay(); ?>
                      </div>
                    </div>
                    <div id="main_content">
                      <?php mosMainBody(); ?>
                    </div></td>
                </tr>
                <?php
                        if ($colspan > 0) {
                        ?>
                <tr valign="top">

              </table>
              <div id="content_foot">
                <div id="content_foot_corner"></div>
              </div>
            </div></td>
          <?php
                     if ( $right > 0 ) {
                    ?>
          <td><div id="right_outer">
              <div id="right_header"></div>
              <div id="right_inner_float">
                <div id="right_inner">
                  <?php mosLoadModules ( 'right', -2 ); ?>
                </div>
              </div>
              <div id="right_footer"></div>
            </div></td>
          <?php
                 }
                 ?>
        </tr>
      </table></td>
  </tr>
  <tr>
    <?php
                     if ( $banner > 0 ) {
                    ?>
    <td id="user"></td>
    <?php
                 }
                 ?>
  </tr>
  <tr>
    <td id="footer"><?php include_once('includes/footer.php'); ?>
      <div id="logo">| Design by <a href="http://www.ah-68.de" target="_blank">ah-68</a> |</div></td>
  </tr>
</table>
<?php mosLoadModules( 'debug', -1 );?>
</body>
</html>
Jeg flyttede

Code: Select all

<?php
                	if ( $user1 > 0 ) {
                ?>
                  <td width="50%"><div id="user1_outer">
                      <div class="user1_inner">
                        <?php mosLoadModules ( 'user1', -2 ); ?>
                      </div>
                    </div></td>
                  <?php
                             }
                             if ( $colspan == 3) {
                               ?>
                  <?php
                              }
                             if ( $user2 > 0 ) {
                                ?>
                  <td width="50%"><div id="user2_outer">
                      <div class="user2_inner">
                        <?php mosLoadModules ( 'user2', -2 ); ?>
                      </div>
                    </div></td>
                  <?php
                             }
                              ?>
                </tr>
                <tr>
                  <td colspan="<?php echo $colspan; ?>"></td>
                </tr>
                <?php
                           }
                        ?>

Re: Flytte moduler på forsiden?

Posted: Wed May 28, 2008 1:43 pm
by Webtytte
Tak for svaret, men det virker ikke.

Siden viser følgende fejl:
Parse error: parse error, unexpected '}' in /home/content/n/e/c/necedemalice/html/j1/templates/waldmeister/index.php on line 130

Re: Flytte moduler på forsiden?

Posted: Sat May 31, 2008 8:49 pm
by PRoCoN
Prøv med copy and paste af den her kode

Code: Select all

<?php
defined( '_VALID_MOS' ) or die( 'Restricted access' );
// needed to seperate the ISO number from the language file constant _ISO
$iso = explode( '=', _ISO );
// xml prolog
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';
?>
<!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">
<head>
<?php mosShowHead(); ?>
<?php
if ( $my->id ) {
   initEditor();
}
$collspan_offset = ( mosCountModules( 'right', 'left' ) + mosCountModules( 'user2' ) ) ? 2 : 1;
//script to determine which div setup for layout to use based on module configuration
$user1 = 0;
$user2 = 0;
$colspan = 0;
$right = 0;
$left = 0;
$banner = 0;
// banner combos

//user1 combos
if ( mosCountModules( 'user1' ) + mosCountModules( 'user2' ) == 2) {
   $user1 = 2;
   $user2 = 2;
   $colspan = 3;
} elseif ( mosCountModules( 'user1' ) == 1 ) {
   $user1 = 1;
   $colspan = 1;
} elseif ( mosCountModules( 'user2' ) == 1 ) {
   $user2 = 1;
   $colspan = 1;
}
//banner based combos
if ( mosCountModules( 'banner' ) and ( empty( $_REQUEST['task'] ) || $_REQUEST['task'] != 'edit' ) ) {
   $banner = 1;
   
}

//right based combos
if ( mosCountModules( 'right' ) and ( empty( $_REQUEST['task'] ) || $_REQUEST['task'] != 'edit' ) ) {
   $right = 1;
   
}
//left based combos
if ( mosCountModules( 'left' ) and ( empty( $_REQUEST['task'] ) || $_REQUEST['task'] != 'edit' ) ) {
      $left = 1;

}
//top based combos
if ( mosCountModules( 'top' ) and ( empty( $_REQUEST['task'] ) || $_REQUEST['task'] != 'edit' ) ) {
      $top = 1;

}
?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<?php echo "<link rel=\"stylesheet\" href=\"$GLOBALS[mosConfig_live_site]/templates/$GLOBALS[cur_template]/css/template_css.css\" type=\"text/css\"/>" ; ?><?php echo "<link rel=\"shortcut icon\" href=\"$GLOBALS[mosConfig_live_site]/images/favicon.ico\" />" ; ?>
</head>
<body>
<script type="text/javascript" src="http://common.allakhazam.com/shared/akztooltip.js"></script>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td id="header"><div id="header_inner"></div>
      <div id="banner">
        <div id="banner_inner">
          <?php mosLoadModules( "banner", -1 ); ?>
        </div>
      </div></td>
  </tr>
  <tr>
    <td id="top_menu"><div id="top_menu_inner">
        <?php mosLoadModules ( 'user3' ); ?>
      </div></td>
  </tr>
  <tr>
    <td id="content_outer" valign="top"><table  align="center" border="0" cellpadding="0" cellspacing="0" width="100%" class="content_table">
        <tr valign="top">
          <?php
                     if ( $left > 0 ) {
                    ?>
          <td><div id="left_outer">
              <div id="left_header"></div>
              <div id="left_inner_float">
                <div id="left_inner">
                  <?php mosLoadModules ( 'left', -2 ); ?>
                </div>
              </div>
              <div id="left_footer"></div>
            </div></td>
          <?php
                 }
                 ?>
          <td width="100%" id="content"><div>
              <div id="content_top">
                <div id="content_top_corner"></div>
              </div>
              <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="content">
                 <?php
                        if ($colspan > 0) {
                        ?>
                <tr valign="top">
                  <?php
                             if ( $user1 > 0 ) {
                                ?>
                  <td width="50%"><div id="user1_outer">
                      <div class="user1_inner">
                        <?php mosLoadModules ( 'user1', -2 ); ?>
                      </div>
                    </div></td>
                  <?php
                             }
                             if ( $colspan == 3) {
                               ?>
                  <?php
                              }
                             if ( $user2 > 0 ) {
                                ?>
                  <td width="50%"><div id="user2_outer">
                      <div class="user2_inner">
                        <?php mosLoadModules ( 'user2', -2 ); ?>
                      </div>
                    </div></td>
                  <?php
                             }
                              ?>
                </tr>
                <tr>
                  <td colspan="<?php echo $colspan; ?>"></td>
                </tr>
                <tr>
                  <td colspan="<?php echo $colspan; ?>"><div id="pathway">
                      <div id="pathway_text">
                        <?php mosPathWay(); ?>
                      </div>
                    </div>
                    <div id="main_content">
                      <?php mosMainBody(); ?>
                    </div></td>
                </tr>
               
                <?php
                           }
                        ?>
              </table>
              <div id="content_foot">
                <div id="content_foot_corner"></div>
              </div>
            </div></td>
          <?php
                     if ( $right > 0 ) {
                    ?>
          <td><div id="right_outer">
              <div id="right_header"></div>
              <div id="right_inner_float">
                <div id="right_inner">
                  <?php mosLoadModules ( 'right', -2 ); ?>
                </div>
              </div>
              <div id="right_footer"></div>
            </div></td>
          <?php
                 }
                 ?>
        </tr>
      </table></td>
  </tr>
  <tr>
    <?php
                     if ( $banner > 0 ) {
                    ?>
    <td id="user"></td>
    <?php
                 }
                 ?>
  </tr>
  <tr>
    <td id="footer"><?php include_once('includes/footer.php'); ?>
      <div id="logo">| Design by <a href="http://www.ah-68.de" target="_blank">ah-68</a> |</div></td>
  </tr>
</table>
<?php mosLoadModules( 'debug', -1 );?>
</body>
</html>

Re: Flytte moduler på forsiden?

Posted: Sun Jun 08, 2008 6:45 pm
by Webtytte
Det virkede, tusind tak!!!!! :D

Re: Flytte moduler på forsiden?

Posted: Wed Jun 11, 2008 1:03 pm
by Webtytte
Hmm efter den ændring kan jeg ikke bruge JEvents, kalenderen kan ikke vises overhovedet. Ingen fejl, den viser bare en blank side. :'(

Re: Flytte moduler på forsiden?

Posted: Mon Jun 23, 2008 12:03 pm
by Webtytte
(har lavet en ny post vedr. dette problem)
Mvh
Webtytte