<?php
$plugins->add_hook("admin_load", "ThemeLink_admin");
$plugins->add_hook("admin_style_menu", "ThemeLink_admin_nav");
$plugins->add_hook("admin_style_action_handler", "ThemeLink_action_handler");
function ThemeLink_info()
{
return array(
"name" => "Theme Link",
"description" => "to access links to the tables and capture in the DB",
"website" => "http://www.soportemybb.com",
"author" => "Edson Ordaz",
"authorsite" => "http://www.soportemybb.com",
"version" => "Private"
);
}
function ThemeLink_activate()
{
global $db, $mybb;
$db->query("ALTER TABLE `".TABLE_PREFIX."themes` ADD `themelink` TEXT NULL AFTER `name`");
rebuild_settings();
}
function ThemeLink_deactivate()
{
global $mybb, $db;
$db->query("ALTER TABLE ".TABLE_PREFIX."themes DROP `themelink`");
rebuild_settings();
}
function ThemeLink_action_handler(&$action)
{
$action['Theme_Link'] = array('active' => 'Theme_Link', 'file' => '');
}
function ThemeLink_admin_nav(&$sub_menu)
{
global $mybb;
$Name = "Theme Link";
$Url = "Theme_Link";
end($sub_menu);
$key = (key($sub_menu))+10;
if(!$key)
{
$key = '110';
}
$sub_menu[$key] = array('id' => $Url, 'title' => $Name, 'link' => "index.php?module=style/Theme_Link");
}
function ThemeLink_admin()
{
global $mybb, $db, $page, $cache, $Name;
$Name = "Theme Link";
$Url = "Theme_Link";
if($page->active_action != $Url)
{
return;
}
$page->add_breadcrumb_item($Name);
$page->output_header($Name);
$table = new Table;
$table->construct_header("Aqui abajo que muestre todos los temas como en estilos", array("width" => "100%"));
$table->construct_row();
$table->output($Name);
$page->output_footer();
}
?>
<?php
function ThemeLink_admin()
{
global $mybb, $db, $page, $cache, $Name;
$Name = "Theme Link";
$Url = "Theme_Link";
if($page->active_action != $Url)
{
return;
}
$page->add_breadcrumb_item($Name);
$page->output_header($Name);
$table = new Table;
$table->construct_header("Theme", array("width" => "80%"));
$table->construct_header("Link", array("class" => "align_center", "width" => "20%"));
$themes = cache_themes();
// print_r($themes);
foreach($themes as $theme)
{
$table->construct_cell($theme['name']);
$table->construct_cell('<a href="somefile.php?theme_id=' . $theme['tid'] . '" title="Link">Link</a>');
$table->construct_row();
}
$table->output($Name);
$page->output_footer();
}
Fatal error: Call to undefined function cache_themes() in C:\xampp\htdocs\1600\inc\plugins\ThemeLink.php on line 111
<?php
require_once MYBB_ADMIN_DIR."inc/functions_themes.php";
<?php
function ThemeLink_admin()
{
global $mybb, $db, $page, $cache, $Name;
$Name = "Theme Link";
$Url = "Theme_Link";
if($page->active_action != $Url)
{
return;
}
$page->add_breadcrumb_item($Name);
$page->output_header($Name);
$table = new Table;
$table->construct_header("Theme", array("width" => "80%"));
$table->construct_header("Link", array("class" => "align_center", "width" => "20%"));
require_once MYBB_ADMIN_DIR."inc/functions_themes.php";
$themes = cache_themes();
unset($themes['default']);
foreach($themes as $theme)
{
$table->construct_cell($theme['name']);
$table->construct_cell('<a href="somefile.php?theme_id=' . $theme['tid'] . '" title="Link">Link</a>');
$table->construct_row();
}
$table->output($Name);
$page->output_footer();
}