I do not understand the admin config.php. Have the template taken from the plugin _blank what I IMHO not needed, deleted. The features are not yet finished, I wanted to see if the form here works only. In the original is a form class, I just do not know what to do with it. I need the forms but where I wrote them. Texts $ text are only dummies to see if something happens when I click the links in $ adminmenu.
<?php
// das Herz einbinden
require_once("../../class2.php");
if (!getperms("P"))
{
e107::redirect('admin');
exit;
}
// Sprachdatei
include_lan(e_PLUGIN.'kk_videos/languages/'.e_LANGUAGE.'_admin.php');
class plugin_kk_video_admin extends e_admin_dispatcher
{
protected $modes = array(
'main' => array('controller' => 'plugin_kk_video_admin_ui',
'path' => null,
'ui' => 'plugin_kk_video_admin_form_ui', 'uipath' => null)
);
protected $adminMenu = array(
'main/listCat' => array('caption'=> LAN_PLUGIN_KK_VIDEO_01, 'perm' => '0'),
'main/createCat' => array('caption'=> LAN_PLUGIN_KK_VIDEO_02, 'perm' => '0'),
'other' => array('divider'=> true),
'main/listVid' => array('caption'=> LAN_PLUGIN_KK_VIDEO_03, 'perm' => '0'),
'main/createVid' => array('caption'=> LAN_PLUGIN_KK_VIDEO_04, 'perm' => '0')
);
protected $adminMenuAliases = array(
'main/edit' => 'main/list'
);
protected $menuTitle = LAN_PLUGIN_KK_VIDEO_MENUTITLE;
}
class plugin_kk_video_admin_ui extends e_admin_ui
{
// required
protected $pluginTitle = LAN_PLUGIN_KK_VIDEO_NAME;
/**
* plugin name or 'core'
*/
protected $pluginName = LAN_PLUGIN_KK_VIDEO_NAME;
public function listCatPage()
{
$sql = e107::getDb();
$ns = e107::getRender();
$text = "Ich bin die ListCat-Seite";
$ns->tablerender("Hello",$text);
}
// neue Kategorie erstellen
public function createCatPage()
{
$sql = e107::getDb();
$ns = e107::getRender();
$frm = e107::getForm();
if(isset($_POST['CatToDB']))
{
}
else
{
$frm -> open('CatCreate', 'post', e_REQUEST_URI, array('autocomplete' => 'on', 'class' => 'formclass'));
$frm->text('category', '', 50, array('size' => 'large'));
$frm->button('CatToDB', LAN_PLUGIN_KK_VIDEO_05);
$frm->close();
$ns->tablerender(LAN_PLUGIN_KK_VIDEO_02, $frm);
}
//$ns->tablerender(LAN_PLUGIN_KK_VIDEO_02, $text);
}
public function listVidPage()
{
$sql = e107::getDb();
$ns = e107::getRender();
$text = "Ich bin die ListVideo-Seite";
$ns->tablerender("Hello",$text);
}
public function createVidPage()
{
$sql = e107::getDb();
$ns = e107::getRender();
$frm = e107::getForm();
$text = "Ich bin die Erstelle Video-Seite";
$ns->tablerender("Hello",$text);
}
}
new plugin_kk_video_admin();
require_once(e_ADMIN."auth.php");
e107::getAdminUI()->runPage();
require_once(e_ADMIN."footer.php");
?>