Page 1 of 1

Important information for block authors

Posted: 9. March 2009 10:49
by Kevin
For a complete set of instructions on how to edit and create blocks,
please take a look at the Knowledge Base.




From the release of Board3 Portal V.1.0.3 on, we added some kind of "interface" for additional blocks.
This is meant for easier updating the portal in future, so that the edits for the additional blocks don't have to be done every update again.
Therefor we have added a few new files to the portal. We recommend to use this files and to adapt your install instructions to this new structure:
  • PHP
    portal/block/additional_blocks.php
    This file is meant for any kind of include of PHP files. So this should not be added in the portal.php anymore.
    Example for an install instruction:

    open portal/block/additional_blocks.php
    search:

    Code: Select all

    ?>
    add before:

    Code: Select all

    // Wetter START
        include($phpbb_root_path . 'portal/block/wetter.'.$phpEx);
    // Wetter ENDE                        
  • Language
    language/en/mods/additional_blocks.php
    This file is meant for language variables needed for additional blocks

    portal/includes/lang_adm_additional_blocks.php
    This file is meant for needed ACP language files, if you add some kind of ACP management for your block.

    Example for an install instruction:

    open portal/includes/lang_adm_additional_blocks.php
    search:

    Code: Select all

    ?>
    add before:

    Code: Select all

    $user->add_lang('mods/info_acp_portal_boost'); 
  • Templates
    styles/your_template/template/portal/block/additional_blocks_center.html
    as well as additional_blocks_left.html and additional_blocks_right.html

    You can get your template include in one of these files. So this should not be added in the portal_body.html anymore.

    Example for an install instruction:

    open styles/your_template/template/portal/block/additional_blocks_center.html
    search:

    Code: Select all

    <!-- additional_blocks //-->            
    add after:

    Code: Select all

            <!-- IF S_DISPLAY_GALLERY -->
                <!-- INCLUDE portal/block/album_small.html -->
            <!-- ENDIF --> 

Re: Important information for block authors

Posted: 26. July 2009 18:39
by urednik
I have one question.

My site have lot of additional block.
In common, left block area is always the some, middle and right area is reserved for article.

Is there any easy way to switch this block ?
example:
On left there is menu. If somebody click to "history" on the center and right is article "History". (from history block)
Right now, I create for each link: history,php and history.html file.

My idea is that system recognize link, and switch only "include history.php ..

Any idea ?

Re: Important information for block authors

Posted: 3. October 2009 15:29
by yocalif
In the above instructions, you show 3 examples of code that might be entered, but no explanation of what the code will do once entered, or if this is optional. So far I don't see any difference in the Portal ACP module, it all looks the same. I was hoping to see dialog boxes for additional modules.
Example for an install instruction:

open portal/block/additional_blocks.php

Example for an install instruction:

open portal/includes/lang_adm_additional_blocks.php


Example for an install instruction:

open styles/your_template/template/portal/block/additional_blocks_center.html


Is the above examples actually code that needs to be entered as part of 1.0.3 install? Or is this optional?
Can we have some example tutorials of how to do extra blocks, and what the new features are suppose to do?
How about some screen shots?

I'm afraid to upgrade to 1.0.4 since I don't even know if 1.0.3 is working?

Re: Important information for block authors

Posted: 3. October 2009 15:51
by Dr Nick^
this is noted as 1.0.3, so i guess it isnt working for 1.0.4
i saw some changes in how language works with files etc.

i can advice you for your 1.0.2->1.0.3 confersion, try to re-install the portal. works fine for me.
For future changes in language for authors, be patient i guess, they will update this.

Re: Important information for block authors

Posted: 5. May 2013 22:33
by Necromancer
sorry for the historical bump.
i have made a module for board 2.01 which works fine.
but i also have a site still running 1.6
i know support for it was dropped, but is it possible to somehow manually add the block to the 1.6 portal?
uploading the files to their respective folders is obvious, but how to run the install() function that sets the variables used by the module?