Modul in der Auswahlliste als leerer Balken dargestellt

Aktuelle Version: 2.0.2
Veröffentlicht: 27.10.2013
Forum rules
Vor dem erstellen neuer Supportanfragen bitte zuerst in die board3 Portal FAQ schauen und die Suche benutzen!
Viele Fragen sind bereits schon gestellt und beantwortet worden.
Bitte auch unsere Forumsregeln lesen und beachten!
Locked

Topic author
ziemanng
Active Member
Posts: 3
Joined: 28. January 2014 10:56
phpBB.de User: ziemanng

Modul in der Auswahlliste als leerer Balken dargestellt

Post by ziemanng »

Deine Portal Version: 1.0.0RC3
Typ Deines phpBB Forums: Standard phpBB3
MODs installiert: Ja
Dein Wissensstand: Einsteiger

MySQL Version: Modul in der Auswahlliste als leerer Balken dargestellt

Was hast Du gemacht, bevor das Problem aufgetreten ist?
Modul erstellt

Was hast Du bereits versucht um das Problem zu lösen?
suche Forum

Fehlerbeschreibung und Nachricht
Hallo,
ich habe ein Modul im Board erstellt.
Das Modul habe ich eingebunden und funktioniert.

---Soweit alles prima ---
Aber in der Auswahlliste (Modul hinzufügen) ist kein Name für das neue Modul vorhanden, nur ein leeres Feld.
Was habe ich vergessen, falsch gemacht ? :?: :?:

mfg
Günter
User avatar

Kirk
Dev
Posts: 1939
Joined: 27. July 2010 18:02
phpBB.de User: Kirk
Contact:

Re: Modul in der Auswahlliste als leerer Balken dargestellt

Post by Kirk »

Hallo
Stell doch mal deine Daten hier zu Verfügung, ohne zu wissen was du gemacht hast ist es schwierig dir zu helfen.
Lies dir doch mal diesen Artikel durch: Bearbeiten einer Modul Datei
Gruß Udo

Topic author
ziemanng
Active Member
Posts: 3
Joined: 28. January 2014 10:56
phpBB.de User: ziemanng

Re: Modul in der Auswahlliste als leerer Balken dargestellt

Post by ziemanng »

Hallo,
den Artikel habe natürlich schon gelesen. Er dient mir als Anleitung.

Hier der Code der Modulseite.

Code: Select all

<?php
/**
*
* @package Board3 Portal v2 - gz
* @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 gz
*/
class portal_gz
{
	/**
	* Allowed columns: Just sum up your options (Exp: left + right = 10)
	* top		1
	* left		2
	* center	4
	* right		8
	* bottom	16
	*/
	public $columns = 10;

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

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

	/**
	* 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 'gz_side.html';
	}

	public function get_template_acp($module_id)
	{
		return array(
			'title'	=> 'ACP_CONFIG_gz',
			'vars'	=> array(
				'legend1'								=> 'ACP_GZ_CONFIGLEGEND',
				'board3_gz_' . $module_id	=> array('lang' => 'gz',		'validate' => 'string',	'type' => 'text:10:200',	'explain' => false),
				'board3_gz_' . $module_id	=> array('lang' => 'gz',	'validate' => 'int',	'type' => 'text:3:3',		'explain' => true),
			),
		);
	}

	/**
	* API functions
	*/
	public function install($module_id)
	{
		set_config('board3_gz_' . $module_id, 'GZ Hello World!');
		set_config('board3_gz_' . $module_id, 1337);
		return true;
	}

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

		$del_config = array(
			'board3_gz_' . $module_id,
			'board3_gz_' . $module_id,
		);
		$sql = 'DELETE FROM ' . CONFIG_TABLE . '
			WHERE ' . $db->sql_in_set('gz', $del_config);
		return $db->sql_query($sql);
	}
}
User avatar

Kirk
Dev
Posts: 1939
Joined: 27. July 2010 18:02
phpBB.de User: Kirk
Contact:

Re: Modul in der Auswahlliste als leerer Balken dargestellt

Post by Kirk »

Einen Language und template Ordner hast aber schon angelegt?
Probiere dieses mal:

Code: Select all

<?php
/**
*
* @package Board3 Portal v2 - gz
* @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 gz
*/
class portal_gz
{
   /**
   * Allowed columns: Just sum up your options (Exp: left + right = 10)
   * top      1
   * left      2
   * center   4
   * right      8
   * bottom   16
   */
   public $columns = 10;

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

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

   /**
   * hide module name in ACP configuration page
   */
   public $hide_name = false;


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

      $template->assign_vars(array(
         'EXAMPLE'         => $config['board3_configname2_' . $module_id],
      ));

      return 'gz_side.html';
   }

   public function get_template_acp($module_id)
   {
      return array(
         'title'   => 'ACP_CONFIG_gz',
         'vars'   => array(
            'legend1'                        => 'ACP_GZ_CONFIGLEGEND',
            'board3_gz_' . $module_id   => array('lang' => 'gz',      'validate' => 'string',   'type' => 'text:10:200',   'explain' => false),
            'board3_gz_' . $module_id   => array('lang' => 'gz',   'validate' => 'int',   'type' => 'text:3:3',      'explain' => true),
         ),
      );
   }

   /**
   * API functions
   */
   public function install($module_id)
   {
      set_config('board3_gz_' . $module_id, 'GZ Hello World!');
      set_config('board3_gz_' . $module_id, 1337);
      return true;
   }

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

      $del_config = array(
         'board3_gz_' . $module_id,
         'board3_gz_' . $module_id,
      );
      $sql = 'DELETE FROM ' . CONFIG_TABLE . '
         WHERE ' . $db->sql_in_set('gz', $del_config);
      return $db->sql_query($sql);
   }
}
Gruß Udo
Locked

Return to “Board3 Portal 2.0.x - Deutscher Support”