Hi ....
na dann mal los
##### SQL #####
++ In phpMyAdmin ausführen / Run in phpMyAdmin:
Code: Alles auswählen
INSERT INTO phpbb_introportalmod VALUES ('addonbox_active', '1')
oder dieses Script ausführen / or run this script:
Code: Alles auswählen
<?php
define('IN_PHPBB', 1);
$phpbb_root_path = './';
include_once($phpbb_root_path . 'extension.inc');
include_once($phpbb_root_path . 'config.'.$phpEx);
include_once($phpbb_root_path . 'common.'.$phpEx);
include_once($phpbb_root_path . 'includes/constants.'.$phpEx);
include_once($phpbb_root_path . 'includes/db.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
//
//
// Restrict to members:
if( !$userdata['session_logged_in'] )
{
message_die(GENERAL_MESSAGE, $lang['Not_Authorised'], $lang['Not_Authorised']);
exit;
}
//
//
if ( $userdata['user_level'] == ADMIN )
{
}
else
{
message_die(GENERAL_MESSAGE, $lang['Not_Authorised'], $lang['Not_Authorised']);
exit;
}
echo '<html>
<head>
<title>SQL-DB-Installer - Intro + Portal MOD - ADDON</title>
</head>
<body>
<h1>SQL-DB-Installer - Intro + Portal MOD - ADDON</h1>
<hr />';
if (!isset($HTTP_GET_VARS['install'])) {
echo '<a href="?install=1">Please click here | Bitte hier klicken</a>';
}
else {
$queries = array(
"INSERT INTO " . $table_prefix . "introportalmod VALUES ('addonbox_active', '1')"
);
$success = true;
foreach($queries as $query) {
if (!$db->sql_query($query)) {
echo '<font color="red">An error occurred ! Changes have not been entered successfully !
Es Fehler ist aufgetreten ! Änderung nicht erfolgreich eingetragen !</font>
';
echo mysql_error();
$success = false;
break;
}
}
if ($success) {
echo '<font color="green">DB-Changes have been entered successfully. You should delete this SQL-DB-Installer as soon as possible !
DB-Änderung wurde erfolgreich ausgeführt. Du solltest diesen SQL-DB-Installer sobald wie möglich löschen !';
}
}
?>
##### portal.php #####
++ Suche / Find:
++ Vorher anfügen / Add before:
Code: Alles auswählen
// SWITCH ADDONBOX START
if( $introportalmod_config['addonbox_active'] == "1" )
{
// PHP CODE START
// ... PHP CODE ...
// PHP CODE END
$template->assign_block_vars('switch_addonbox_active', array(
$template->assign_vars(array(
// TEMPLATE CODE VARS START
'ADDONBOX1' => $lang['addonbox1'],
'ADDONBOX2' => $lang['addonbox2']
// TEMPLATE CODE VARS END
))
));
}
// SWITCH ADDONBOX END
##### portal_body.tpl #####
++ Suche / Find:
++ Vorher anfügen / Add before:
Code: Alles auswählen
<!-- ##### ADDONBOX START ##### -->
<!-- BEGIN switch_addonbox_active -->
<table width="100%" border="0" cellpadding="1" cellspacing="1" style="border-collapse: collapse" class="forumline">
<tr>
<td class="catHead" colspan="2" height="25"><span class="cattitle">
{ADDONBOX1}:
</span></td>
</tr>
<tr>
<td colspan="2" height="1" class="row3"><img src="images/spacer.gif" width="1" height="1" alt="."></td>
</tr>
<tr>
<td align="center" nowrap="nowrap" class="row1"><span class="gensmall">
<!-- CODE -->
{ADDONBOX2}
<!-- CODE -->
</span></td>
</tr>
</table>
<!-- END switch_addonbox_active -->
<!-- ##### ADDONBOX END ##### -->
##### lang_german/lang_introportal.php #####
++ Suche / Find:
++ Danach anfügen / Add after:
Code: Alles auswählen
$lang['addonbox1'] = 'Überschrift AddonBox';
$lang['addonbox2'] = 'Text in der Box';
##### lang_english/lang_introportal.php #####
++ Suche / Find:
++ Vorher anfügen / Add before:
Code: Alles auswählen
$lang['addonbox1'] = 'Header AddonBox';
$lang['addonbox2'] = 'Text in Box';
##### admin/admin_introportalmod.php #####
++ Suche / Find:
Code: Alles auswählen
$google_active_yes = ($new['google_active']) ? 'checked="checked"' : '';
$google_active_no = (!$new['google_active']) ? 'checked="checked"' : '';
++ Vorher anfügen / Add before:
Code: Alles auswählen
$addonbox_active_yes = ($new['addonbox_active']) ? 'checked="checked"' : '';
$addonbox_active_no = (!$new['addonbox_active']) ? 'checked="checked"' : '';
++ Suche / Find:
++ Danach anfügen / Add after:
++ Suche / Find:
Code: Alles auswählen
"google_active_ENABLE" => $google_active_yes,
"google_active_DISABLE" => $google_active_no,
++ Vorher anfügen / Add before:
Code: Alles auswählen
"addonbox_active_ENABLE" => $addonbox_active_yes,
"addonbox_active_DISABLE" => $addonbox_active_no,
##### admin/introportalmod_body.tpl #####
++ Suche / Find:
Code: Alles auswählen
<tr>
<td class="row1">{IntroPortaltext25}:
<span class="gensmall">{IntroPortalAdmin22}</span></td></td>
<td class="row2"><input type="radio" name="google_active" value="1" {google_active_ENABLE} /> {L_ENABLED} <input type="radio" name="google_active" value="0" {google_active_DISABLE} /> {L_DISABLED}</td>
</tr>
++ Vorher anfügen / Add before:
Code: Alles auswählen
<tr>
<td class="row1">{ADDONBOX1}:
<span class="gensmall">{IntroPortalAdmin22}</span></td></td>
<td class="row2"><input type="radio" name="addonbox_active" value="1" {addonbox_active_ENABLE} /> {L_ENABLED} <input type="radio" name="addonbox_active" value="0" {addonbox_active_DISABLE} /> {L_DISABLED}</td>
</tr>
Das wars
Markus