portal_announcements_center

Post Reply

Topic author
redbull360
Active Member
Posts: 3
Joined: 19. April 2012 17:55
phpBB.de User: redbull
phpBB.com User: redbull

portal_announcements_center

Post by redbull360 »

i have been looking into adding the announcement into portal
and this works

but i didn't do this return 'announcements_center.html';
as 2 announcements come up..

please could you look at the code and see if ok to use, its working

Code: Select all

<?php
    /**
    *
    * @package Board3 Portal v2 - announcements Center
    * @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 Portal Calendar Alightner Center
    */
    class portal_announcements_center_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_announcements';

       /**
       * 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_announcements_center_module';

       /**
       * custom acp template
       * file must be in "adm/style/portal/"
       */
       public $custom_acp_tpl = '';





       public function get_template_center($module_id)
       {
       global $config, $template, $phpbb_root_path, $phpEx;

       include($phpbb_root_path . 'includes/functions_announcements.' . $phpEx);
	   

       // Generate calendar week view or next events if required ...
get_announcement_data();

       return '';
       }

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

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

        public function uninstall($module_id)
        {
                return true;
        }
}
Post Reply

Return to “Modifications Support”