Geeklog Bugtracker
Geeklog

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000684 [Geeklog] Bugs tweak always 2008-07-07 00:13 2008-12-14 07:55
Reporter mst3kroqs View Status public  
Assigned To THEMike
Priority normal Resolution fixed  
Status resolved   Product Version 1.6.0
Summary 0000684: block-box blocklist - what side am I on?
Description For blocks that are not using unordered lists, we have in the past provided the capability to style the right blocks differently than the left blocks. Chameleon leverages this capability to allow the user to specify a different CSS for the right blocks.

The only trouble is - the scheme used to implement the blocks-that-are-ul's does not invoke templates that are 'right' or 'left' aware. I guess this would be the ambidextrous approach. :^)

I guess the fix would be to create the following:

blockheader-list-left.thtml
blockheader-list-right.thtml
blockfooter-list-left.thtml
blockfooter-list-right.thtml

.. and then use the template appropriate for the side specified by 'onleft' in gl_blocks for the current block, as we are with the other blocks.

It's too bad - this is really going to affect the themes that want to try to put the right and left blocks both on the right side, eg. blog-style, as the blocks are probably going to want to be styled differently.

Thoughts?
Additional Information
Tags No tags attached.
Target Next Release
Attached Files

- Relationships

-  Notes
User avatar (0000216)
mst3kroqs (reporter)
2008-07-07 01:32

Here's a hack that works, but would probably not be in the elegant category, .

1) Make left and right versions of blockheader-list.thtml, which contain your right/left formatting classes:

blockheader-list-left.thtml:

<div class="block-box blocklist">
    <span class="block-helpicon-left">
        {block_help}
    </span>
    <h2 class="block-title-left">{block_title}</h2>
    


    blockheader-list-right.thtml:

    <div class="block-box blocklist">
        <span class="block-helpicon-right">
            {block_help}
        </span>
        <h2 class="block-title-right">{block_title}</h2>
        


      2) In professional's functions.php, instead of the hard equates, insert the following:

      $_BLOCK_TEMPLATE['admin_block'] = "blockheader-list-" . which_side($_BLOCK_TEMPLATE['admin_block']) . ".thtml,blockfooter-list.thtml";
      $_BLOCK_TEMPLATE['section_block'] = "blockheader-list-" . which_side($_BLOCK_TEMPLATE['section_block']) . ".thtml,blockfooter-list.thtml";
      $_BLOCK_TEMPLATE['user_block'] = "blockheader-list-" . which_side($_BLOCK_TEMPLATE['user_block']) . ".thtml,blockfooter-list.thtml";

      function which_side($block) {
          $retval = ($block == 'blockheader-left.thtml,blockfooter-left.thtml') ? 'left' : 'right';
          return $retval;
      }

      (Thanks to Mark Evans for pointing out we had already done the necessary DB queries to know which side the blocks were on).

      So - by adding two template files, this provides 'downward compatibility' with the 1.5.0 core code.
User avatar (0000276)
THEMike (developer)
2008-08-17 12:17

Resolved, now auto-checks for blocktemplate-left.thtml and blocktemplate-right.thtml given blocktemplate.thtml. Or anything else. So foo.thtml is checked for foo-left.thtml and foo-right.thtml for left and right respectively.

- Issue History
Date Modified Username Field Change
2008-07-07 00:13 mst3kroqs New Issue
2008-07-07 01:32 mst3kroqs Note Added: 0000216
2008-08-16 12:11 THEMike Target => Next Release
2008-08-16 12:11 THEMike Assigned To => THEMike
2008-08-16 12:11 THEMike Severity minor => tweak
2008-08-16 12:11 THEMike Status new => acknowledged
2008-08-16 12:11 THEMike Projection none => minor fix
2008-08-16 12:11 THEMike ETA none => < 1 week
2008-08-17 12:17 THEMike Note Added: 0000276
2008-08-17 12:17 THEMike Status acknowledged => resolved
2008-08-17 12:17 THEMike Resolution open => fixed
2008-08-17 12:17 THEMike Fixed in Version => CVS
2008-12-14 07:55 dhaun Fixed in Version CVS => 1.5.1


Copyright © 2000 - 2009 Mantis Group
Hosted by pair.com
Powered by Mantis Bugtracker