For the complete documentation index, see llms.txt. This page is also available as Markdown.

Add Sample Buttons

In this example we say:

  • the name of the module is mymodule

1) Adapt xoops_version.php

add definition of vars (if not existing)

  $moduleDirName      = basename(__DIR__);
  $moduleDirNameUpper = mb_strtoupper($moduleDirName);

and add following preference

  /**
   * Make Sample button visible?
   */
  $modversion['config'][] = [
      'name'        => 'displaySampleButton',
      'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON',
      'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC',
      'formtype'    => 'yesno',
      'valuetype'   => 'int',
      'default'     => 1,
  ];

2) Language files

add the defines to your language file common.php

add to your language file admin.php and modinfo.php following line

3) copying following folders and files into your module

  • test/*

  • class/Common/*

  • class/Utility.php

  • include/config.php

replace all namespace calls

wgexample

by

mymodule

3) Adapt admin/index.php

add following code to your admin/index.php

Last updated