Can't get this to work.
jackspiv - November 29, 2008 - 09:09
| Project: | Drop Shadows |
| Version: | 5.x-0.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Finally got the install to work.
Two things:
1) if you cut/paste the recommended php into block.tpl.php before loading the module it will break the site.
2) recommended code seems to have a second mistake in it. Last function should be drop_box_finish() rather than drop_box_end().
That would be consistent with the code in drop_box.module
I cant say it is correct because the module does not create any result for me that i can see.
I did check the output html (from the page source) and the drop_box.css is being loaded. and I have the image files in the same directory as the block.tpl.php of my current theme.
Is that the correct directory?
Other ideas, workarounds?

#1
I'll definitely fix up the recommended code soon.
You have the correct directory for the files, but it may be that the drop_box.css is being incorrectly generated. Could you delete this file, reload a page, and see if that makes a difference?
If that fails, could you post the drop_box.css file here, so I can see what the problem is?
#2
Hi. Thanks for responding so quickly.
Hope I can help. Unfortunately I'm a total newbie and my coding is beyond "very limited".
I found one problem in the drop_box.css file. It was not generating correct paths to my box.png and box-borders.png files.
my situation may be more complicated than you are dealing with at this stage.
My paths (absolute)
drupal 5.12 is installed at root for web access (in my system public_html)
css file: public_html/sites/example.com.abcd/files/css/drop_box.css
theme and block.tpl.php file: public_html/sites/example.com.abcd/themes/zen/block.tpl.php
module file: public_html/sites/example.com.abcd/modules/drop_box/drop_box.module
however, I have (because of multisite structure) symlinks in public_html point to the subdirectory /abcd/
so the paths resolve to:
example.com/abcd/files/
example.com/abcd/themes/
example.com/abcd/modules/
in my case, the css links for the photos were in
http:/www.example.com/abcd/abcd/themes/zen/box.png
I changed these to relative formatting as you can see in the drop_box.css below:
#drop-box-a-box { display:block; position:relative; margin:0.5em 0; }#drop-box-b-box { display: block; position:relative; background:url(../../themes/zen/box.png) no-repeat 100% 0; margin:0px 0px 0px 18px; height:40px; }
#drop-box-h-box { display: block; position:relative; float:left; height:40px; width:18px; position:relative; left:-18px; background:url(../../themes/zen/box.png) no-repeat 0 0; margin: 0px; }
#drop-box-f-box { display: block; position:relative; background:url(../../themes/zen/box.png) no-repeat 100% 100%; margin:0px 0px 0px 18px; height:17px; }
#drop-box-g-box { display: block; position:relative; float:left; height:17px; width:18px; position:relative; left:-18px; background:url(../../themes/zen/box.png) no-repeat 0 100%; margin: 0px; }
#drop-box-c-box { display: block; position:relative; padding:0 0 0 14px; background:url(../../themes/zen/box-borders.png) repeat-y 0 0; margin: 0px; }
#drop-box-d-box { display: block; position:relative; padding:0 14px 0 0; background:url(../../themes/zen/box-borders.png) repeat-y 100% 0; margin: 0px; }
#drop-box-e-box { display: block; position:relative; background:#0; border:1px solid #0; border-width:1px 0; padding:0 2px; margin: 0px; }
#drop-box-title-box { display: block; background:transparent; float: left; margin: 0px; margin-left: -18px; }
#ie-fix-box { margin-top: 0px; margin-bottom: 0px; padding: 0px; }
I verified (using firebug) that, using this css, the box.png and box-borders.png were actually found. they were not found with the original css because it doubled up (/abcd/abcd/ ) on my original directory.
FWIW, the block.tpl.php file reads (Including the corrected drop_box code):
<?php
drop_box_start('box', array('color' => 0x000));
?>
<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="block <?php print $block_classes; ?>"><div class="block-inner">
<?php if ($block->subject): ?>
<h2 class="title"><?php print $block->subject; ?></h2>
<?php endif; ?>
<div class="content">
<?php print $block->content; ?>
</div>
<?php print $edit_links; ?>
</div></div> <!-- /block-inner, /block -->
<?php
drop_box_finish('box', array('color' => 0x000));
?>
I can't see anywhere that the IDs you reference/style in the css file refer to any ID declarations for elements in the page html.
Thats about all I know.
#3
The problem is in the block.tpl.php.
The drop_box_start and drop_box_finish provide the generated HTML.
therefore you want your block.tpl.php to become
<?php
print drop_box_start('box', array('color' => 0x000));
?>
<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="block <?php print $block_classes; ?>"><div class="block-inner">
<?php if ($block->subject): ?>
<h2 class="title"><?php print $block->subject; ?></h2>
<?php endif; ?>
<div class="content">
<?php print $block->content; ?>
</div>
<?php print $edit_links; ?>
</div></div> <!-- /block-inner, /block -->
<?php
print drop_box_finish('box', array('color' => 0x000));
?>
where I have simply added the "print" command to output the HTML.
And thanks for helping me with the recommended code. I'll attempt to fix that shortly. I'm not sure what I can do about the multisite setup, so I'm not sure what I can do there.
#4
Forgot to set it to fixed.
#5
Thats great, thanks.
I'll try it out soon.
I had missed that ... was thinking that all those functions did was generate the css file. (which was probably true ... as is)
--project followup subject--
Automatically closed -- issue fixed for two weeks with no activity.
#6
Automatically closed -- issue fixed for two weeks with no activity.