I have created a new theme, but when I go into the block page for my theme, it will not allow me to order which sections appear first. Usually there is a plus sign, but for me it does not appear. I cant figure out how to fix that?

Comments

vm’s picture

is $closure variable printed in the bottom of page.tpl.php?
have you compared your page.tpl.php file with one from a core theme like garland to ensure you are printing the variables that need to be printed?

darksniperx’s picture

Everything should be there, I just went over and compared the 2 files, they seem to be fine.
here is the code in case that might help:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>" lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">

<head>
    <title><?php print $head_title; ?></title>
    <?php print $head; ?>
    <?php print $styles; ?>
    <!--[if lte IE 6]><style type="text/css" media="all">@import "<?php print $base_path . path_to_theme() ?>/css/ie6.css";</style><![endif]-->
    <!--[if IE 7]><style type="text/css" media="all">@import "<?php print $base_path . path_to_theme() ?>/css/ie7.css";</style><![endif]-->
    <?php print $scripts; ?>
  </head>
  
<body class="<?php print $body_classes; ?>">

<div id='main_content' style="position:absolute; left: 258px; top: 295px; width: 796px; height: 247px;">
  
  <div id="content">
        <div id="content-inner" class="inner column center">

          <?php if ($content_top): ?>
            <div id="content-top">
              <?php print $content_top; ?>
            </div> <!-- /#content-top -->
          <?php endif; ?>

          <?php if ($breadcrumb || $title || $mission || $messages || $help || $tabs): ?>
            <div id="content-header">

              <?php //print $breadcrumb; ?>

              <?php if ($title): ?>
                <h1 class="title"><?php print $title; ?></h1>
              <?php endif; ?>

              <?php if ($mission): ?>
                <div id="mission"><?php print $mission; ?></div>
              <?php endif; ?>

              <?php print $messages; ?>

              <?php print $help; ?> 

              <?php if ($tabs): ?>
                <div class="tabs"><?php print $tabs; ?></div>
              <?php endif; ?>

            </div> <!-- /#content-header -->
          <?php endif; ?>

          <div id="content-area">
            <?php print $content; ?>

          </div> <!-- /#content-area -->
<script type="text/javascript">
var boxHeight = document.getElementById('content-area').clientHeight;
function getHeight(){
	boxHeight += 90;
return  boxHeight = boxHeight + "px";	
}
if(boxHeight > 200){
$(document).ready(function(){
$.fn.colorbox({inline:true, href:"#content-area",width:"700px", height:getHeight()});
});}
</script> 
<?php print $feed_icons; ?>

          <?php if ($content_bottom): ?>
            <div id="content-bottom">
              <?php print $content_bottom; ?>
            </div><!-- /#content-bottom -->
          <?php endif; ?>
</div>
</div></div>

<div id='admin_menu' style="position:absolute; left: 6px; top: 298px; width: 228px; height: 496px;">
<?php if ($admin_menu): ?><?php print $admin_menu; ?><?php endif; ?>
</div>

<div class="menu" id='navigation_menu_1' style="position:absolute; left: 564px; top: 631px; width: 121px; height: 139px; text-align:left; vertical-align:text-top"> 
<?php if ($navigation_menu_1): ?><?php print $navigation_menu_1; ?><?php endif; ?>
<?php // if (!empty($primary_links)){ print theme('links', $primary_links, array('id' => 'primary', 'class' => 'links main-menu')); } ?>
</div>

<div class="menu" id='navigation_menu_2' style="position:absolute; left: 692px; top: 631px; width: 116px; height: 139px;">
<?php if ($navigation_menu_2): ?><?php print $navigation_menu_2; ?><?php endif; ?>
<?php //if (!empty($secondary_links)){ print theme('links', $secondary_links, array('id' => 'secondary', 'class' => 'links sub-menu')); } ?>
</div>

<div class="menu" id='navigation_menu_3' style="position:absolute; left: 817px; top: 631px; width: 116px; height: 139px;">
<?php if ($navigation_menu_3): ?><?php print $navigation_menu_3; ?><?php endif; ?>
</div>

<div class="menu" id='navigation_menu_4' style="position:absolute; left: 942px; top: 631px; width: 116px; height: 139px;">
<?php if ($navigation_menu_4): ?><?php print $navigation_menu_4; ?><?php endif; ?>
</div>

<div id='logo' style="position:absolute; left: 335px; top: 631px; width: 208px; height: 139px;"> 

<div id="header">

      <div id="logo-title">
	
        <?php if (!empty($logo)): ?>
          <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
            <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>"/>
          </a>
        <?php endif; ?>

        <div id="name-and-slogan">
          <?php if (!empty($site_name)): ?>
            <h1 id="site-name">
              <a href="<?php print $front_page ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
            </h1>
          <?php endif; ?>
          <?php if (!empty($site_slogan)): ?>
            <div id="site-slogan"><?php print $site_slogan; ?></div>
          <?php endif; ?>
        </div> <!-- /name-and-slogan -->

      </div> <!-- /logo-title -->

      <?php if ($header): ?>
        <div id="header-region">
          <?php print $header; ?>
        </div>
      <?php endif; ?>

      <?php print $search_box; ?>

    </div> <!-- /header -->
</div>

<?php print $closure; ?>
</body>
</html>
vm’s picture

yep seems fine to me.

any js errors being thrown? have you checked in a different browser? used firebug?

darksniperx’s picture

I figured out what is the cause, but don't know how to fix it :(

I am using colorbox to show some articles as inline pop ups that don't fit the content area, and I am loading jquery 1.4.2. When i take off jquery 1.4.2 or use a different theme the plus sign appears and i can move blocks, when i load query 1.4.2, the plus sign go off, and I cant move the blocks.

Any suggestions!!!

vm’s picture

To update jquery in drupal you should be using the jquery update.module which provides you with the highest compatible version. Whether or not jquery 1.4.2 is compatible with current .js in drupal I've no idea. I'd suspect not, since there is no jquery 1.4.2 bein shipped with drupal or in jquery_update.module. jquery_update.module moves query to 1.3.2 which is the latest version that I believe works with Drupal 6.x

http://drupal.org/project/jquery_update

darksniperx’s picture

I did install that modulate, but it did notvdo any changes in jquery provided.

here is the link to site where I am trying to implement the change: http://sereidefence.com/amserei.com/drupal_test/node/2

// $Id: jquery.js,v 1.12.2.3 2008/06/25 09:38:39 goba Exp $ 

/*
 * jQuery 1.2.6 - New Wave Javascript
 *
 * Copyright (c) 2008 John Resig (jquery.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.

and if I disable the jquery 1.4.2 my colorbox doesn't work.

Maybe I should try something else and not colorbox, but everything is based on jquery.

vm’s picture

I use the colorbox.module with jquery_update.module 2.x which provide jquery 1.3.2

both of which work perfectly well. Why your's does not I can't say without more debugging information on your part.

note, that in Drupal 6.x the 1.3.2 version of jquery provided by the jquery_update.module does not live in the misc folder as the 1.2.6 version does. Instead it lives in the jquery update module folder without replacing the jquery.js that ships with core.

I'd highly suggest setting up a test site, and working through jquery update docs and project page to better understand how jquery in drupal is being dealt with.

darksniperx’s picture

Since your have drupal and jquery 1.3.2 and colorbox working together, I though i should add jquery 1.3.2 instead of 1.4.2, and it seems that it worked :)

Although i just noticed that colorbox does not work on IE, that another thing I am going to try to figure out!

darksniperx’s picture

seems to be the issue on my laptop atm, will test it further!

vm’s picture

how are you implementing colorbox?

it's helpful if you're more verbose with how you are trying to accomplish the task.

darksniperx’s picture

I have a layout with fixed content are in width and height, and if the content is bigger than the are it is suppose to go in, it is being opened by an inline popup. For that I have made a simple script using colorbox.

the code is allso in page.tpl.php which is shown above.

<script type="text/javascript">
var boxHeight = document.getElementById('content-area').clientHeight;
function getHeight(){
boxHeight += 90;
return  boxHeight = boxHeight + "px";
}
if(boxHeight > 200){
$(document).ready(function(){
$.fn.colorbox({inline:true, href:"#content-area",width:"700px", height:getHeight()});
});}
</script>
vm’s picture

I've only used the colorbox.module not a script snippet so I can't help there sorry.

If interested see: http://drupal.org/project/colorbox

darksniperx’s picture

I will try to optimize my script and see if that helps.