/[drupal]/contributions/themes/flexible/block.tpl.php
ViewVC logotype

Contents of /contributions/themes/flexible/block.tpl.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download) (as text)
Tue Oct 21 17:11:45 2008 UTC (13 months, 1 week ago) by stevelockwood
Branch: MAIN
CVS Tags: DRUPAL-6--1-6, HEAD
Changes since 1.3: +1 -0 lines
File MIME type: text/x-php
DRUPAL-6--1-6:
--------------
Bug in additional stylesheets fixed
Body classes include a reference to the node so you can define node-specific css
Bug in content links (incorrect html) fixed
"No promoted content" setting added so you can have a default front page but without the default Drupal welcome message
Block ID should now display properly - if that option is selected
1 <?php
2 /*
3 Redefinition of block content
4 Needed so that a navigation link can be inserted into the navigation block (block=user, delta = 1)
5 */
6
7 // get the block id
8 $block_id = 'block<br />module: '.$block->module .'<br />delta:'. $block->delta;
9 // show the block id
10 if (theme_get_setting('block_id')) {
11 $show_block_id = '<span style="background-color: blue; color: white;">'.$block_id.'</span>';
12 } else {
13 $show_block_id = '';
14 }
15 // get the rules
16 $block_id = $block->module .'-'. $block->delta;
17 $block_rules = "\n".theme_get_setting('block_rules');
18 // is there a rule?
19 $pos = strpos($block_rules, $block_id);
20 if ($pos) {
21 $pos += strlen($block_id);
22 $block_rules = substr($block_rules, $pos + 1);
23 $rule = explode("\r", $block_rules);
24 $rule = $rule[0];
25 $boxstart = '<div class="b0"><div class="b1"><div class="b2"><div class="b3"><div class="b4"><div class="b5"><div class="b6"><div class="b7"><div class="b8"><div class="b9">';
26 $boxend = '</div></div></div></div></div></div></div></div></div></div>';
27
28 } else {
29 $rule = '';
30 }
31
32 ?>
33 <!-- START <?php print $block->module .'-'. $block->delta; ?> -->
34 <div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="block <?php print $block_classes.' '.$rule; ?>">
35 <?php print $boxstart; print $show_block_id; ?>
36 <div class="block-inner">
37 <?php if ($block->subject): ?>
38 <h2 class="title"><?php print $block->subject; ?></h2>
39 <?php endif; ?>
40 <?php // navigation link on block user-1
41 if ($block->module == 'user' && $block->delta == '1'): ?>
42 <a id="navigation-link" />
43 <a class="top-link" href="#top"><?php print ('Skip to top of page'); ?></a>
44 <?php endif; ?>
45 <?php // search link on block search-0
46 if ($block->module == 'search' && $block->delta == '0'): ?>
47 <a id="search-link" />
48 <a class="top-link" href="#top"><?php print ('Skip to top of page'); ?></a>
49 <?php endif; ?>
50 <div class="content"><?php print $block->content; ?></div>
51 </div>
52 <?php print $boxend; ?>
53 </div><!-- END <?php print $block->module .'-'. $block->delta; ?> -->

  ViewVC Help
Powered by ViewVC 1.1.2