Important information for block authors

Du hast eine Erweiterung oder Integration eines anderen Mods geschrieben?
Hier kannst du Andere daran teilhaben lassen.
Post Reply
User avatar

Topic author
Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Important information for block authors

Post 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 --> 
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!
User avatar

urednik
Active Member
Posts: 33
Joined: 25. April 2008 17:44

Re: Important information for block authors

Post 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 ?

yocalif
Active Member
Posts: 19
Joined: 22. September 2009 07:18

Re: Important information for block authors

Post 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?

Dr Nick^
Valued Contributor
Posts: 81
Joined: 11. August 2009 13:56
Contact:

Re: Important information for block authors

Post 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.
[Rel] (WoW) Application form + ACP sup. (v3.1) => http://board3.de/viewtopic.php?f=21&t=2663
[Rel] Ventrilo Block + ACP sup.(v1.1) => http://board3.de/viewtopic.php?f=21&t=2665

Necromancer
Active Member
Posts: 2
Joined: 27. March 2013 18:57

Re: Important information for block authors

Post 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?
Post Reply

Return to “Modifications - In Development”