Mod wie ausbauen?? (datenbank einträge löschen?)

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
Akreb
Mitglied
Beiträge: 247
Registriert: 11.06.2006 12:09
Kontaktdaten:

Mod wie ausbauen?? (datenbank einträge löschen?)

Beitrag von Akreb »

Hallo,

habe den Last Visit Mod eingebaut und bin total unzufrieden damit.. Habe jetzt alles rückgängig gemacht, jedoch weiß ich nicht wie ich die Datenbank von den Last Visit Mod Tabellen säubere...

Das ist die last_visit_update.php

Code: Alles auswählen

<?php
#########################################################
## SQL commands to phpBB2
## Author: Paul Norman
## Nickname: acoolwelshbloke
## Email: acoolwelshbloke@tec2spec.co.uk
##
## Ver 1.0.9
##
## phpBB2 database update script for mods.
## This file is intended for use with phpBB2, when installing the Last Visit mod.
## After you run this file you may delete it, but remember only admin can use so it really doesen't matter.
## The script will look for whatever prefix you are using, and it will use the existing DB defined by congig.php
## The execution of these/this script(s) including the SQL commands are harmless, so you can run it as meny times you like.
## Please note, though the users last visit will be set back to his/her last login, 
## however this is a minor cosmetic isue, and it will correct itself next time the user logs in.
##
#########################################################

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);

###################################################################################################
##
## put the SQL commands below here, the SQL commands listed below are only exampels, substitude them with the one you need ##
##
###################################################################################################
$sql=array(
'ALTER TABLE '.USERS_TABLE.' ADD user_lastlogon INT (11) DEFAULT "0" not null',
'UPDATE '.USERS_TABLE.' SET user_lastlogon=user_lastvisit WHERE user_lastlogon="0"',
'INSERT INTO '.CONFIG_TABLE.' (config_name, config_value) VALUES ("hidde_last_logon", "0")',
'ALTER TABLE ' . USERS_TABLE .' ADD user_totaltime INT (11) DEFAULT "0"',
'ALTER TABLE ' . USERS_TABLE .' ADD user_totallogon INT (11) DEFAULT "0"',
'ALTER TABLE ' . USERS_TABLE .' ADD user_totalpages INT (11) DEFAULT "0"',
'UPDATE '. USERS_TABLE .' SET user_totaltime=(user_session_time-user_lastlogon) WHERE user_totaltime="0" AND user_lastlogon>0',
'UPDATE '. USERS_TABLE .' SET user_totallogon=1 WHERE user_totallogon="0" AND user_session_time<>"0"'
);


$mods = array ( 
'Last Visit PART 1 Mod','Last Visit PART 1 Mod','Last Visit PART 2 Mod','Last Visit PART 4 Mod','Last Visit PART 4 Mod','Last Visit PART 4 Mod','Last Visit PART 4 Mod','Last Visit PART 4 Mod'
);

############################################### Do not change anything below this line #######################################

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

if (!$userdata['session_logged_in'])
{
	header('Location: ' . append_sid("login.$phpEx?redirect=last_visit_db_update.$phpEx", true));
}

if ($userdata['user_level'] != ADMIN)
{
	message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
} 

$n=0;
$message="<b>This list is a result of the SQL queries needed for MOD</b><br/><br/>";
while($sql[$n])
{
	$message .= ($mods[$n-1] != $mods[$n]) ? '<p><b><font size=3>'.$mods[$n].'</font></b><br/>' : '';
	if(!$result = $db->sql_query($sql[$n])) 
	$message .= '<b><font color=#FF0000>[Already added]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
	else $message .='<b><font color=#0000fF>[Added/Updated]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
	$n++;
}
 message_die(GENERAL_MESSAGE, $message); 
?>
Wie bekomme ich diese Tabellen alle raus? Ich weiß nämlich nicht wo diese ganzen Tabellen sind und was falsch machen will ich auch nicht, habe schonmal das ganze Forum geschrottet weil ich was falsches gelöscht hatte.

Danke
phpmaik
Mitglied
Beiträge: 46
Registriert: 20.03.2009 10:25

Re: Mod wie ausbauen?? (datenbank einträge löschen?)

Beitrag von phpmaik »

Die Tabellen findest du in Deiner Datenbank!
Wenn ich Dich richtig verstanden habe :roll:
http://www.phpbb.de/kb/pma_faq
(an Update denken)
coolsoft
Mitglied
Beiträge: 433
Registriert: 29.08.2005 21:14
Wohnort: Irgendwo im Nirgendwo

Re: Mod wie ausbauen?? (datenbank einträge löschen?)

Beitrag von coolsoft »

solange die Datenbank-Tabellen nicht angesprochen werden - hast Du halt einfach einen toten Überhang - machs wie ich:
*schulterzuck & vergess*
Die paar bytes legen Deinen Webspace nicht lahm.
:grin:
Akreb
Mitglied
Beiträge: 247
Registriert: 11.06.2006 12:09
Kontaktdaten:

Re: Mod wie ausbauen?? (datenbank einträge löschen?)

Beitrag von Akreb »

Danke für die Antworten..

Also ich hätte die Datenbank Einträge eigendlich auch jetzt belassen aber ich habe gelesen, dass dieser Mod das Forum langsam macht, u.a. wegen der Datenbank Einträge...

Wenn da z.b. steht:

'ALTER TABLE ' . USERS_TABLE .' ADD user_totaltime INT (11) DEFAULT "0"',

Dann wurde in der Users Tabelle eine neue Zeile mit user_totaltime eingefügt?

Danke
Antworten

Zurück zu „phpBB 2.0: Mod Support“