New Module v2.0 to include BBDKP blocks
Posted: 13. October 2012 00:10
I just swtiched over to Board 3 portal thinking that implementing blocks from BBDKP portal would be easy. As BBDKP portal used version 1 block types.
But seeing 2 changed over the need to modify portal.php by creating modules for blocks I am very very stuck.
I asked BBDKP for help, but they don't understand how the new version 2 works.
This is my post I posted at BBDKP:
But seeing 2 changed over the need to modify portal.php by creating modules for blocks I am very very stuck.
I asked BBDKP for help, but they don't understand how the new version 2 works.
This is my post I posted at BBDKP:
I would love some help on this and I really hope someone can. I didn't think it would be this complicated.My results so far using the Board3 v2.0 instructions are that I can get it to call the block kindaof, but I do not know how to include the php in the module. The whole idea in version 2 is that you don't edit portal.php you put your php into modules for the blocks.
/knowledge/kb_show.php?id=54
This is my module - which calls on the block.
And this is my block codeCode: Select all
<?php /** * * @package Board3 Portal v2 - Upcoming * @copyright (c) Board3 Group ( www.board3.de ) * @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ /** * @ignore */ if (!defined('IN_PHPBB')) { exit; } /** * @package Upcoming */ class portal_upcoming_module { /** * Allowed columns: Just sum up your options (Exp: left + right = 10) * top 1 * left 2 * center 4 * right 8 * bottom 16 */ public $columns = 8; /** * Default modulename */ public $name = 'PORTAL_UPCOMING'; /** * Default module-image: * file must be in "{T_THEME_PATH}/images/portal/" */ public $image_src = 'icon_subscribe.gif'; /** * module-language file * file must be in "language/{$user->lang}/mods/portal/" */ public $language = 'portal_upcoming_module'; /** * custom acp template * file must be in "adm/style/portal/" */ public $custom_acp_tpl = ''; /** * hide module name in ACP configuration page */ public $hide_name = false; public function get_template_side($module_id) { global $config, $template; $template->assign_vars(array( 'EXAMPLE' => $config['board3_configname2_' . $module_id], )); return 'upcoming_events_side.html'; } public function get_template_acp($module_id) { return array( 'title' => 'Upcoming Raids', 'vars' => array(), ); } /** * API functions */ public function install($module_id) { return true; } public function uninstall($module_id) { return true; } }
As you can see under my facbook block - I have managed to do that so far.Code: Select all
{$LR_BLOCK_H_L}{$LR_BLOCK_H_R} <!-- serverstatusblock --> <div class="panel"> <div class="inner"> <span class="corners-top"><span></span></span> <!-- INCLUDE planner/raidplan/planner_upcoming.html --> </div> </div> <!-- end serverstatus --> {$LR_BLOCK_F_L}{$LR_BLOCK_F_R}
http://senilityguild.com
But as I understand it the BBDKP portal.php has all the includes. This is where I am stuck - and I do not know what to include in the above code and where. I assume I include it somewhere here"
Code: Select all
public function get_template_side($module_id) { global $config, $template; $template->assign_vars(array( 'EXAMPLE' => $config['board3_configname2_' . $module_id], )); return 'upcoming_events_side.html'; }
But the how is beyond my level of PHP.
I know this is the raidplanner code in bbdkp portal.php
I know I am almost there. I just need a lil help from brainer peopleCode: Select all
if (isset($config['bbdkp_raidplanner'])) { if ($config['rp_show_portal'] == 1) { $user->add_lang(array('mods/raidplanner')); if (!class_exists('rpblocks', false)) { //display the blocks include($phpbb_root_path . 'includes/bbdkp/raidplanner/rpblocks.' . $phpEx); } $blocks = new rpblocks(); $blocks->display(); } }