phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

How to change theme without entering UCP or ACP?


 
Search this topic... | Search General Support... | Search Box
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Author Message
Inception
Board Member



Joined: 22 Dec 2013

Posts: 7
Location: California


flag
PostPosted: Sat Dec 28, 2013 11:00 pm 
Post subject: How to change theme without entering UCP or ACP?

Well, long story short I messed up and now I get this because I deleted a theme I was making AFTER I set it as my theme:
phpBB : Critical Error

Could not open subSilverRed template config file

DEBUG MODE

Line : 503
File : functions.php

Stupid of me, right? Well, which file would I edit to change my style back(or change the option for the default style to override the user stye, because subSilver is still defaulted)
Back to top
dogs and things
Board Member



Joined: 18 Nov 2008

Posts: 621
Location: Spain


flag
PostPosted: Sat Dec 28, 2013 11:21 pm 
Post subject: Re: How to change theme without entering UCP or ACP?

Copy the following into a text file and name it fix.php
upload to your server and run in your browser:

Code:
<?php

define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

echo '<h1>reset style to subSilver</h1><BR><BR>';

if( !defined("PHPBB_INSTALLED") )
{
   echo 'Error: phpBB is not Installed!';
   die;
}

if( ($dbms != 'mysql') && ($dbms != 'mysql4') && ($dbms != 'mysqli') )
{
   echo 'Error: This Fix only works with a MySQL Database';
   die;
}

$db = mysqli_connect($dbhost,$dbuser,$dbpasswd);

if(!$db)
{
   echo 'Error: Could not connect to the MySQL Server';
   die;
}

$dbs = mysqli_select_db($dbname);

if(!$dbs)
{
   echo 'Error: Could not select Database';
   die;
}
echo 'Updating default style';

echo '<br>';

$query = "UPDATE ".CONFIG_TABLE." SET config_value = '1' WHERE config_name = 'override_user_style' LIMIT 1";
$result = mysqli_query($query,$db);

echo 'Updating Override User Style: ';

if(!$result)
{
    echo '<font color="#FF0000">FAILED</font>';
}
else
{
   if(mysqli_affected_rows($db)=='0')
   {
      echo '<font color="#999999">NOT UPDATED</font>';
   }
   else
   {
      echo '<font color="#009933">SUCCESS</font>';
   }
}

echo '<BR>';

$query = "UPDATE ".CONFIG_TABLE." SET config_value = '1' WHERE config_name = 'default_style' LIMIT 1";
$result = mysqli_query($query,$db);

echo 'Changing Default Theme ID: ';

if(!$result)
{
    echo '<font color="#FF0000">FAILED</font>';
}
else
{
   if(mysqli_affected_rows($db)=='0')
   {
      echo '<font color="#999999">NOT CHANGED</font>';
   }
   else
   {
      echo '<font color="#009933">SUCCESS</font>';
   }
}

echo '<BR><BR><b>Delete this File from your Server!</b>';

die;
?>

_________________
phpBB2 will never die, I hope!
Back to top
Inception
Board Member



Joined: 22 Dec 2013

Posts: 7
Location: California


flag
PostPosted: Sat Dec 28, 2013 11:34 pm 
Post subject: Re: How to change theme without entering UCP or ACP?

Warning: include(./includes/functions_display.php): failed to open stream: No such file or directory in /home/wyvern/public_html/fix.php on line 7

Warning: include(./includes/functions_display.php): failed to open stream: No such file or directory in /home/wyvern/public_html/fix.php on line 7

Warning: include(): Failed opening './includes/functions_display.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/wyvern/public_html/fix.php on line 7
reset style to subSilver



Warning: mysqli_connect(): (28000/1045): Access denied for user 'wyvern_phpbb'@'localhost' (using password: NO) in /home/wyvern/public_html/fix.php on line 23
Error: Could not connect to the MySQL Server

==Edit==
But is there a line I can edit in a specific file that changes whether the default theme overrides the user style? Because the default style is still subSilver
Back to top
Inception
Board Member



Joined: 22 Dec 2013

Posts: 7
Location: California


flag
PostPosted: Sun Dec 29, 2013 12:50 am 
Post subject: Re: How to change theme without entering UCP or ACP?

I fixed it! I went into phpMyAdmin and changed the value of "user_style" in phpbb_users and my username, I changed the value from 3 to 2
Back to top
Display posts from previous:   
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0263 seconds using 16 queries. (SQL 0.0022 Parse 0.0008 Other 0.0232)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo