flexiblock for drupal 5.1?

stBorchert - March 15, 2006 - 13:14
Project:Flexiblock
Version:HEAD
Component:Code
Category:support request
Priority:normal
Assigned:djnz
Status:won't fix
Description

Hi.
For a project I needed 'flexiblock' to work with drupal 4.7 so I updated the functions.
Furthermore I enhanced it a little :-)
Now it:

  • works as a replacement for the standard 'blocks' module
  • saves flexiblock-informations for each activated theme
  • can manage its available regions (settings/regions)

Maybe there are some errors but I don't hope so.

Do you think it's usefull/usable?

best regards,

Stefan

AttachmentSize
flexiblock.module27.36 KB

#1

stBorchert - March 16, 2006 - 18:27
Version:4.6.x-1.x-dev» HEAD

Hi.
Ups, I've forgotton to update the theme_functions. Ok, now it's done.
You can now get the blocks of let's say region 'menu 1' by calling

<?php
theme
('flexiblock_html', 'menu 1');
?>
.
impatiently waiting for your response ;-)

AttachmentSize
flexiblock_0.module 27.21 KB

#2

djnz - March 23, 2006 - 23:45
Assigned to:Anonymous» djnz

I am testing this and will patch into CVS over the weekend (25/26 March 06). for various reasons I do not have plans to move any of my live Drupal sites to 4.7 so my incentive to do it was low. I am therefore very grateful for your contribution - thanks very much.

#3

kzeng - March 28, 2006 - 05:13

hi, I defined a new region at settings/regions but this region did not show up at the drop down menu of the block setting page. All I can see is the "flexible region" option instead of the region defined by myslef. Is it a bug? Thanks a lot!

#4

stBorchert - March 30, 2006 - 15:44

All I can see is the "flexible region" option instead of the region defined by myslef. Is it a bug?

Don't think so ;-)
Do you have a column "location" (near to "placement")? As in the old version you have to select "flexible region" in "placement" and then the region in column "location" (please look at the screenshot).

hth,

Stefan

AttachmentSize
flexiblock.png 4.34 KB

#5

kzeng - March 30, 2006 - 19:09

Thanks a lot from your help. But I did not have a dropdown under the "location" column. Instead, I only have a checkbox ( I attached a screenshot). It's really weird. I am running Drupal 4.7-beta6. What's your Drupal version? Thanks a lot!

cheers,

Kai

AttachmentSize
snapshot.PNG 8.96 KB

#6

stBorchert - March 30, 2006 - 21:23

I am running Drupal 4.7-beta6. What's your Drupal version?
4.7b4, 4.7b5, 4.7b6

Ok, I see my error: "throttle" and "location" have to be changed. I haven't testes it with throttle activated yet.Try the atteched version.

hth,

Stefan

AttachmentSize
flexiblock_1.module 27.4 KB

#7

stBorchert - March 30, 2006 - 21:26

Oh my god. Hint to myself: never post when you are exhausted :-)
Next try:

I am running Drupal 4.7-beta6. What's your Drupal version?

4.7b4, 4.7b5, 4.7b6

Ok, I see my error: "throttle" and "location" have to be changed. I haven't tested it with throttle activated yet.Try the (previously) attached version.

hth,

Stefan

#8

joehudson - March 31, 2006 - 18:19

flexibly placed blocks is just what I need! However I'm not clear how to use flexiblock for standard php themes (.theme file plus css files.) If I want, for example a 'bottom right' block positioned at the bottom of the right side bar how, roughly speaking, do I do that?

many thanks,
Joe

#9

stBorchert - March 31, 2006 - 19:02

Hi.
Hm, I've never used ".theme" themes.
Lets see, if I can help you with your block:

create your region
  • go to admin/settings/regions
  • create a new region (for example "bottom right" ;-) )
set up your block
  • if you didn't already done it, create your block (menu or whatever)
  • goto to admin/block
  • check "enabled" for your block
  • select "flexible region" in placement column
  • select the new region ("bottom right")
  • save the settings
theme customizing (for example "chameleon")
  • replace the lines 93 to 95
    <?php
    if ($blocks = theme_blocks("right")) {
       
    $output .= "   <td id=\"sidebar-right\">$blocks</td>\n";
    }
    ?>
    with the following code:
    <?php

    $blocks
    = theme_blocks( 'right' );
    $flexi_blocks = theme( 'flexiblock_blocks', 'region_name' );
    foreach(
    $flexi_blocks as flexi_block )
    {
       
    $blocks .= theme_block( (object)$block );
    }
    ?>

  • I haven't tested it but it should work (perhaps).

    hth,

    Stefan

    #10

    stBorchert - March 31, 2006 - 19:05

    Addition:
    You have to add

    <?php
    if ($blocks )
    {
       
    $output .= "  <td id=\"sidebar-right\">$blocks</td>\n";
    }
    ?>

    behind the last line of the replacement.

    hth,

    Stefan

    #11

    joehudson - March 31, 2006 - 20:45

    thanks stefan,

    I've got the idea now. What I wasn't understanding before was that it's totally down to the theme to decide where block regions actually go and the theme has to provide all the enclosing structure, while the flexiblock module provides a neat and very convenient way of specifying blocks to go in those different regions... It's all working nicely now :)

    Joe

    #12

    lunas - April 29, 2006 - 20:33
    Status:needs review» active

    I've tried to install this on 4.7 RC3 and am getting:

    Warning: Invalid argument supplied for foreach() in /yadda/yadda/modules/flexiblock/flexiblock.module on line 390

    Whenever I try to access the admin page to add regions.

    #13

    DrLou - May 5, 2006 - 15:59
    Category:task» bug report

    guys:

    Am still getting this error, with a (May 4?) cvs versio of flexinode:

    Fatal error: Call to undefined function: form_checkbox() in //drupal/modules/flexiblock/flexiblock.module on line 141

    Are the various fixes proposed in this thread applied already in cvs? TIA Lou

    #14

    stBorchert - May 5, 2006 - 20:27

    Are the various fixes proposed in this thread applied already in cvs?

    No. I don't have a cvs-account and djnz doesn't seem to have the time to upload it.
    But for 4.7 you do not need flexiblock anymore because of the new region handling in themes.

    hth,

    Stefan

    #15

    drupalxykon - June 5, 2006 - 22:39

    I didnt get the impression from documentation that 'theme regions' will do everything flexiblock can do.

    Essentially, I want to be able to call a block from any position I want in the theme (could be between nodes, next to primary navigation whatever).

    Is flexiblock going to be ported to 4.7?

    Regards,

    V

    #16

    stBorchert - June 8, 2006 - 21:21

    Is flexiblock going to be ported to 4.7?

    The version on top of this page is already ported to 4.7.

    #17

    txcrew - June 12, 2006 - 18:59

    There is something in this code when I activate the module my admin > modules screen goes blank, then I refresh the page and then everything is back.

    Furthermore, I get the blank screen whenever I activate/deactivate a module while the flexiblock 4.7 module is active.

    I am running the 4.7.2

    Is there something I am missing? Please let me know

    #18

    stBorchert - March 15, 2007 - 14:53
    Status:active» closed

    #19

    Summit - July 7, 2007 - 19:32
    Title:flexiblock made ready for 4.7» flexiblock for drupal 5.1?
    Status:closed» active

    Hi,

    Could somebody please port Flexiblock to drupal 5.1?
    Or is it allready ported?

    Thanks in advance.
    greetings,
    Martijn

    #20

    stBorchert - July 7, 2007 - 23:13
    Category:bug report» support request
    Status:active» won't fix

    Hi.
    Flexiblock development isn't continued since drupal 4.7.x because of the region handling introduced in 4.7.x.
    You don't need it anymore because you can define as many regions as you want in your template or you can use panels.

    hth,

    Stefan

     
     

    Drupal is a registered trademark of Dries Buytaert.