Warning: The author of this contribution does not provide support for it anymore.

Breizh Ajax Checks

board3 portal blok for breizh shout box 1.5.0 - Breizh Ajax Checks

board3 portal blok for breizh shout box 1.5.0

by Theriddler1 » Wed Jun 13, 2012 3:20 pm

Hi great mod and working great, i've made a block for board 3 portal 2.0.0b1

create a new file called 'portal_breizhshout.php' and placed it in /portal/modules/

Code: Select all

<?php
/**
*
* @package Board3 Portal v2 - breizhshout Block
* @copyright (c) Board3 Group ( www.board3.de )
* @Author Theriddler (Phpbbservice.nl)
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
   exit;
}

/**
* @package Modulname
*/
class portal_breizhshout_module
{
   /**
   * Allowed columns: Just sum up your options (Exp: left + right = 10)
   * top      1
   * left      2
   * center   4
   * right      8
   * bottom   16
   */
   public $columns = 21;

   /**
   * Default modulename
   */
   public $name = 'PORTAL_BREIZHSHOUTBOX';

   /**
   * Default module-image:
   * file must be in "{T_THEME_PATH}/images/portal/"
   */
   public $image_src = '';

   /**
   * module-language file
   * file must be in "language/{$user->lang}/mods/portal/"
   */
   public $language = 'portal_breizhshout_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 = true;

   public function get_template_center($module_id)
   {
      global $config, $template, $phpbb_root_path, $phpEx, $auth, $user, $cache, $db;

      // Start Breizh Shoutbox
if (isset($config['shout_version']))
{
        if ($config['shout_enable'])
        {
            shout_display();
        }
}
// End Breizh Shoutbox --
      
      return 'breizh_center.html';
   }

   public function get_template_acp($module_id)
   {
      return array(
         'title'   => 'PORTAL_BREIZHSHOUTBOX',
         'vars'   => array(),
      );
   }

   /**
   * API functions
   */
   public function install($module_id)
   {
      return true;
   }

   public function uninstall($module_id)
   {
      global $db;

      return true;
   }
}


create a new language file called 'portal_breizhshout_module.php'
and placed it in: /language/en/mods/portal/

Code: Select all

<?php
/**
*
* @package Board3 Portal v2 - breizhshout Block
* @copyright (c) Board3 Group ( www.board3.de )
* @Author Theriddler (Phpbbservice.nl)
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
   exit;
}

if (empty($lang) || !is_array($lang))
{
   $lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
$lang = array_merge($lang, array(
   'PORTAL_BREIZHSHOUTBOX'      => 'Breizh shoutbox',
));


create a new html template file for the portal blok called 'breizh_center.html' and placed that into /style/prosilver/template/portal/modules/

Code: Select all

<!-- IF S_DISPLAY_SHOUTBOX and POS_SHOUT_PORTAL_TOP and PORTAL_SHOUT -->
                        <!-- INCLUDE shout_body.html -->
                        <!-- ENDIF -->
<br style="clear:both" />


Finish

best regards.
Theriddler - Former Moderator @ phpBB.nl | phpBBservice.nl Team-member
Image My Extensions | buy me a beer Image
User avatar
Theriddler1
Registered User
Posts: 449
Joined: Sat Aug 27, 2011 11:00 pm
Location: NL
Name: Theriddler❶
Contact:

Re: board3 portal blok for breizh shout box 1.5.0

by HCH » Sat Dec 01, 2012 11:05 pm

Thanks a lot for that piece of code. Works like a charm for me :)
Link to our Forum: http://www.eWriters.eu/forum
HCH
Registered User
Posts: 9
Joined: Tue Nov 27, 2012 10:55 am
Location: Germany
Name: Hendryk
Contact:

Re: board3 portal blok for breizh shout box 1.5.0

by mh254 » Wed Jan 29, 2014 1:01 pm

I've integrated this modul into the portal of my forum and it's working. But there is one problem. I've installed this mod: Autorefresh for portal.

As soon as the portal is refreshed the modul for the shoutbox is gone. It's not really gone but only a small border is visible. If i refresh the portal with F5 the modul is visible until the page get's refreshed by the above linked mod.

Is it possible to set a minimun heigth for the shoutbox modul?

Edit:
This only happens with Chrome or Firefox. With IE it's working fine.
mh254
Registered User
Posts: 25
Joined: Tue Jan 21, 2014 5:56 pm
Contact: