Get plugin-descriptions

In modules/plugins, use this code:

<?php
  // plugin description stuff taken from phpBB2
  if (isset($getmodulename)) {
    $filename = basename(__FILE__);
    $getmodulename = 'Content Editor (Angebote u. Verleihartikel)';
    return;
  }
?>

To load this description, use these lines:

<?php
  echo '<ul type="circle">';
  $d = opendir('.');
  while ($file = readdir($d)) {
    if (is_file($file) && substr($file, 0, 2) == 'a_') {
      $getmodulename = '---';
      include($file);
      echo '<li><a href="' . $file . '">' . $getmodulename . '</a></li>';
    }
  }
  echo '</ul>';
?>

Note: In phpBB2, the modules/plugins filled an array instead of replacing the contents of one single variable.


 
snippets/php/plugin-descriptions.txt · Last modified: 2008-07-15 22:32.41 by mbirth
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki Contents powered by Club-Mate Contents powered by BassDrive.com Labelled with ICRA