FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Manual Theme Rebuild
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
icon4.gif  Manual Theme Rebuild [message #27861] Wed, 28 September 2005 21:17 Go to next message
Jivicin is currently offline  Jivicin   United States
Messages: 6
Registered: September 2005
Karma: 0
Junior Member
If I have access to the server, is there anyway to manually rebuild the theme instead of accessing it via the admin control panel (i.e. Is there a PHP script I need to run)?
Re: Manual Theme Rebuild [message #27864 is a reply to message #27861] Wed, 28 September 2005 22:43 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You can write a script to do it, something a long the lines of:
<?php
require "/path/to/GLOBALS.php";
fud_use('db.inc');
fud_use('compiler.inc'true);
$data db_saq('SELECT theme, lang, name FROM mm_themes WHERE id='.$theme_id);
compile_all($data[0], $data[1], $data[2]);
?>


FUDforum Core Developer
Re: Manual Theme Rebuild [message #27874 is a reply to message #27864] Thu, 29 September 2005 01:15 Go to previous messageGo to next message
Jivicin is currently offline  Jivicin   United States
Messages: 6
Registered: September 2005
Karma: 0
Junior Member
Ok, well I'm a newb when it comes to PHP and mySQL (I'm actually taking a class on it now!), so I need some help.

Let's assume that I have a /FUDforum2 (Data Files) and a /FUDforum (Forum files). Let's assume I'm using the default theme with english. I tried tweaking that script to make it look like this:

<?php
require "GLOBALS.php";
fud_use('db.inc');
fud_use('compiler.inc', true);
$data = db_saq('SELECT default, english, default FROM mm_themes WHERE id='.$theme_id);
compile_all($data[0], $data[1], $data[2]);
?>

But it keeps yelling at me about:

Fatal error: SQL Error has occurred, please contact the <a href="mailto:bahalla(at)zoominternet(dot)net?subject=SQL%20Error">administrator</a> of the forum and have them review the forum's SQL query log in /home/jivicin/index-html/FUDforum/include/core.inc on line 184

Your thoughts?
Re: Manual Theme Rebuild [message #27875 is a reply to message #27874] Thu, 29 September 2005 01:27 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Did you set the value of the $theme_id variable?

FUDforum Core Developer
Re: Manual Theme Rebuild [message #27876 is a reply to message #27875] Thu, 29 September 2005 01:33 Go to previous messageGo to next message
Jivicin is currently offline  Jivicin   United States
Messages: 6
Registered: September 2005
Karma: 0
Junior Member
Well I added this:

<?php
require "GLOBALS.php";
fud_use('db.inc');
fud_use('compiler.inc', true);
$theme_id = "default";
$data = db_saq('SELECT default, english, default FROM mm_themes WHERE id='.$theme_id);
compile_all($data[0], $data[1], $data[2]);
?>

No effect.
Re: Manual Theme Rebuild [message #27877 is a reply to message #27876] Thu, 29 September 2005 01:49 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
the id is a NUMBER not a string.

FUDforum Core Developer
Re: Manual Theme Rebuild [message #27878 is a reply to message #27877] Thu, 29 September 2005 01:54 Go to previous messageGo to next message
Jivicin is currently offline  Jivicin   United States
Messages: 6
Registered: September 2005
Karma: 0
Junior Member
Ok well how do I determine the number for the default theme?

I tried 0, 1, and default without quotes. When I used default without quotes I got:

Quote:

Parse error: parse error, unexpected T_DEFAULT in /home/jivicin/index-html/FUDforum2/recompile.php on line 5

[Updated on: Thu, 29 September 2005 01:54]

Report message to a moderator

Re: Manual Theme Rebuild [message #27879 is a reply to message #27878] Thu, 29 September 2005 02:08 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Look inside theme manager.

FUDforum Core Developer
Re: Manual Theme Rebuild [message #28091 is a reply to message #27879] Tue, 11 October 2005 01:36 Go to previous message
ruzam is currently offline  ruzam   Canada
Messages: 44
Registered: July 2005
Karma: 0
Member
<?php
require "GLOBALS.php";
fud_use('db.inc');
fud_use('compiler.inc', true);
$theme_id = 1;
$data = db_saq('SELECT theme, lang, name FROM '. $GLOBALS['DBHOST_TBL_PREFIX'] . 'themes WHERE id='.$theme_id);
compile_all($data[0], $data[1], $data[2]);
?>

This did it for me. Don't forget the 'DBHOST_TBL_PREFIX'
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Item pub date missing in RDF feed
Next Topic: Step by step mailing list instructions
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 23:03:12 GMT 2024

Total time taken to generate the page: 0.02333 seconds