Template zerschossen

Alles zu Styles, Templates, Icons und Smilies für phpBB 2.0, sowie allgemeine Designfragen zur Integration von phpBB in bestehende Websites.
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
Sumi

Template zerschossen

Beitrag von Sumi »

Hi
Kann meine Seite nicht mehr öffnen ,weil PHPBB das Template nicht öffnen kann...
Wie kann ich wieder auf ein funtionierendes Template umschalten...

Danke

Seid nachsichtig,wenn es so ähnlich schon mal gepostet wurde...
Acid
Ehrenadmin
Beiträge: 12195
Registriert: 26.04.2001 02:00
Wohnort: Berlin

Beitrag von Acid »

Code: Alles auswählen

<?php 
/*************************************************************************** 
*                                revert_style.php 
*                            ------------------- 
* 
***************************************************************************/ 

/*************************************************************************** 
* 
*   This program is free software; you can redistribute it and/or modify 
*   it under the terms of the GNU General Public License as published by 
*   the Free Software Foundation; either version 2 of the License, or 
*   (at your option) any later version. 
* 
***************************************************************************/ 

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

$style_id = ( !empty($HTTP_GET_VARS['style_id']) ) ? $HTTP_GET_VARS['style_id'] : -1; 
$username = ( !empty($HTTP_GET_VARS['username']) ) ? $HTTP_GET_VARS['username'] : ''; 

if ($style_id == -1) 
{ 
   die("Please specify a style id to be set... extend ?style_id=your_style_id to the URL"); 
} 

// 
// Check if it's a valid style id 
// 
$style_id = intval($style_id); 

$sql = "SELECT themes_id FROM " . THEMES_TABLE . " WHERE themes_id = " . $style_id; 

if ( !($result = $db->sql_query($sql) )) 
{ 
   die("Could not query themes table"); 
} 

if ($db->sql_numrows($result) == 0) 
{ 
   die ("The style id " . $style_id . " does not exist in your database."); 
} 

// 
// Update Style in Configs Table 
// 
$sql = "UPDATE " . CONFIG_TABLE . " SET config_value = '" . $style_id . "' WHERE config_name = 'default_style'"; 

if ( !($result = $db->sql_query($sql) )) 
{ 
   die ("Could not update config table"); 
} 

if ($username != '') 
{ 
   $sql = "UPDATE " . USERS_TABLE . " SET user_style = " . $style_id . " WHERE username = '" . $username . "'"; 

   if ( !($result = $db->sql_query($sql) )) 
   { 
      message_die(GENERAL_ERROR, "Could not update users table", "", __LINE__, __FILE__, $sql); 
   } 
} 

message_die(GENERAL_MESSAGE, "Finished updating the default style"); 

?> 
..speichere das in eine whatever.php, uploade sie auf Deinen Server und gib dann folgendes in der Adresszeile Deines Browser ein:

http://www.domain.de/phpbb/whatever.php?style_id=1 ...wenn Du das Standardtemplate mit der ID 1 wiederherstellen willst.
http://www.domain.de/phpbb/whatever.php ... n_username
...wenn Du nur Dein persönliches Template umstellen willst.

(c) by Acyd Burn
Sumi

Beitrag von Sumi »

Vielen Dank Acid

PS:Sorry fürs das Posting im falschen Forum :roll: :oops:
Antworten

Zurück zu „phpBB 2.0: Styles, Templates und Grafiken“