[CDB] National Flags

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Ideas Centre
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Locked
User avatar
bennybernaer
Registered User
Posts: 109
Joined: Tue Mar 22, 2011 9:53 pm
Contact:

Re: [RC] National Flags

Post by bennybernaer » Sun May 10, 2015 1:19 pm

I would like the flags block down to move to the portal. I added the following changes, but unfortunately does not work. What am I doing wrong and how to get it working properly?

ext\board3\portal\styles\prosilver\template\portal\modules
flags_center.htm

Code: Select all

{$C_BLOCK_H_L}{$TITLE}{$C_BLOCK_H_R}
<div class="panel bg1 portal-no-margin" id="flags">
   <ul class="topiclist bg1">
      <li class="header">
         <dl>
            <dt><div class="list-inner"><!-- IF U_FLAGS --><a href="{U_FLAGS}"><!-- ENDIF -->{L_NATIONAL_FLAGS}<!-- IF U_FLAGS --></a><!-- ENDIF --></div></dt>
         </dl>
      </li>
   </ul>
   <ul class="flags">
   <!-- BEGIN flag -->
      <li class="bg1">
         <a href="{flag.U_FLAG}">{flag.FLAG}</a><br />{flag.L_FLAG_USERS}
      </li>
   <!-- END flag -->
   </ul>
</div>
{$C_BLOCK_F_L}{$C_BLOCK_F_R}

flags.php

Code: Select all

<?php
/**
*
* @package Board3 Portal v2 - National flags
* @copyright (c) Board3 Group ( www.board3.de )
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

namespace board3\portal\modules;

/**
* @package National flags
*/
class portal_flags extends module_base
{
   /**
   * 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_FLAGS';

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

   /**
   * module-language file
   * file must be in "language/{$user->lang}/mods/portal/"
   */
   public $language = 'portal_flags_module';
   
   /**
   * custom acp template
   * file must be in "adm/style/portal/"
   * public $custom_acp_tpl = 'acp_portal_';
   */
   
   /** @var \phpbb\config\config */
   protected $config;

   /** @var \phpbb\template */
   protected $template;

   /** @var string PHP file extension */
   protected $php_ext;

   /** @var string phpBB root path */
   protected $phpbb_root_path;


   /**
   * Construct object
   *
   * @param \phpbb\config\config $config phpBB config
   * @param \phpbb\request\request $request phpBB request
   * @param \phpbb\template $template phpBB template
   * @param \phpbb\user $user phpBB user
   * @param string $phpbb_root_path phpBB root path
   * @param string $phpEx php file extension
   */
   public function __construct($config, $phpEx, $phpbb_root_path)
   {
      $this->config = $config;
      $this->template = $template;
      $this->phpbb_root_path = $phpbb_root_path;
      $this->php_ext = $phpEx;
   }
   /**
   * {@inheritdoc}
   */
   public function get_template_center($module_id)
   {
      $portal_config = obtain_portal_config();

//Begin: National_Flag
if (!empty($config['allow_flags']))
{
   if (!function_exists('top_flags'))
   {
      include($phpbb_root_path . 'ext/rmcgirr83/nationalflags/functions_nationalflags.php.' . $phpEx);
   }
   top_flags();
}
//End: National_Flag
return 'flags_center.html';
}   
public function get_template_acp($module_id)
   {
      return array(
         'title'   => 'PORTAL_FLAGS',
         'vars'   => array(
         'legend1'                            => 'ACP_FLAG_SETTINGS',
         )
      );
   }
   
   /**
   * {@inheritdoc}
   */
    public function install($module_id)
    {
        return true;
    }

   /**
   * {@inheritdoc}
   */

    public function uninstall($module_id)
    {
       return true;
    }
                     
}
portal_flags_module.php

Code: Select all

<?php
/**
*
* [Dutch] translated by Dutch Translators (https://github.com/dutch-translators)
* @package Board3 Portal v2.1 - national flags
* @copyright (c) 2013 Board3 Group ( www.board3.de )
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
/**
* 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_FLAGS'  => 'National flags',
));

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: [RC] National Flags

Post by RMcGirr83 » Sun May 10, 2015 1:43 pm

Ask the author of Board 3 portal.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
supanet
Registered User
Posts: 234
Joined: Sat Dec 15, 2012 4:20 pm
Location: UK
Contact:

Re: [RC] National Flags

Post by supanet » Sun May 10, 2015 6:17 pm

Would it be possible to have an option not to display the flags on index page?

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: [RC] National Flags

Post by RMcGirr83 » Mon May 11, 2015 12:50 am

Delete the html file from the extensions styles folder....otherwise known as index_body_forumlist_body_after
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
bennybernaer
Registered User
Posts: 109
Joined: Tue Mar 22, 2011 9:53 pm
Contact:

Re: [RC] National Flags

Post by bennybernaer » Mon May 11, 2015 11:03 am

I am directed to this topic: https://github.com/board3/Board3-Portal ... rtal-2.1.x but unfortunately I do not understand much. Could you possibly with an extension option may reprints, so you can block display on the portal page? * removed *
Last edited by marian0810 on Sat May 16, 2015 5:43 pm, edited 1 time in total.
Reason: solicitation removed as per https://www.phpbb.com/rules/#spam

User avatar
spaceace
Registered User
Posts: 1857
Joined: Wed Jan 30, 2008 8:50 pm
Contact:

Re: [RC] National Flags

Post by spaceace » Tue May 12, 2015 2:15 am

i just installed this on my site and for some reason... it just works. i'm not sure what's going on.

great work :D

User avatar
supanet
Registered User
Posts: 234
Joined: Sat Dec 15, 2012 4:20 pm
Location: UK
Contact:

Re: [RC] National Flags

Post by supanet » Tue May 12, 2015 6:18 pm

RMcGirr83 wrote:Delete the html file from the extensions styles folder....otherwise known as index_body_forumlist_body_after
Thanks for the reply. :D

User avatar
spaceace
Registered User
Posts: 1857
Joined: Wed Jan 30, 2008 8:50 pm
Contact:

Re: [RC] National Flags

Post by spaceace » Wed May 13, 2015 11:42 pm

just messing around with this extension...

fresh install of phpBB 3.1.4
PHP 5.5
Google Chrome, FireFox, and IE

animated gif images do work. all i did was change the file names in the migration(all of them :shock: ), installed the extension, and they worked fine :D

R00f
Registered User
Posts: 26
Joined: Thu Mar 12, 2015 11:46 am

Re: [RC] National Flags

Post by R00f » Thu May 14, 2015 11:09 am

Note: Admin can't choise flag. shows "Forbidden"

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: [RC] National Flags

Post by RMcGirr83 » Thu May 14, 2015 12:42 pm

No idea what that means.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
supanet
Registered User
Posts: 234
Joined: Sat Dec 15, 2012 4:20 pm
Location: UK
Contact:

Re: [RC] National Flags

Post by supanet » Sat May 16, 2015 8:53 am

Can anyone give me an idea on how to get this to fully work with my custom theme TDUDrivetime
Everything seems to work except it dose not show the option to pick your flag in the UCP, but if I switch to Prosilver select a flag then switch back to Subway (my custom theme) the rest of the extension works and the flags show up as they should.
Like I say its just the UCP part that doesn't show so no one can pick a flag. :(

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: [RC] National Flags

Post by RMcGirr83 » Sat May 16, 2015 10:58 pm

It is because that theme (ah good old themeforest garbage) is missing the template events to the ucp_profile_profile_info.html file. Seeing as you paid for it, ask the author of that style to update it.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
supanet
Registered User
Posts: 234
Joined: Sat Dec 15, 2012 4:20 pm
Location: UK
Contact:

Re: [RC] National Flags

Post by supanet » Sun May 17, 2015 9:50 am

Had a feeling that was what was causing the problem just wanted it confirmed. ;)
Thanks for your reply I will ask him to update the theme. :D

wmdcf
Registered User
Posts: 26
Joined: Sun Jan 11, 2015 2:37 am

Re: [RC] National Flags

Post by wmdcf » Sun May 17, 2015 2:34 pm

Hi All, Please help me to fix this error.
This happens when I click on the flag image as it shown in below image.
https://drive.google.com/open?id=0B2ar4 ... authuser=0
Thanks in advance.

stratege1401
Registered User
Posts: 69
Joined: Sun Jan 25, 2015 6:31 pm

Re: [RC] National Flags

Post by stratege1401 » Mon May 18, 2015 12:01 am

FR translation HERE
French World of Tank and Other games Forums
http://www.forum.fasx.org/phpbb/index.php

Locked

Return to “Extensions in Development”