Author |
Message |
calnai08
New Member


Joined: Dec 21, 2008
Posts: 8
|
Posted:
Sun Dec 21, 2008 5:15 am |
|
Hi, ive just installed RN 2.30 and got most of it up and running ok.
Only problems i had was with GCalender but i wont loose any sleep over it.
My main problem is that im using a theme called GameTech, and i had it running fine on the old RN however since ive re-installed with the new version, ive had no right blocks on this theme.
And yes ive changed my Theme.php to show,
Code:if (defined('INDEX_FILE')) {
|
Any ideas on what this could be?
(also, has anyone had issue with Autotheme-Lite 0.87, it doesnt seem to like the new RN, so consiquently i cant use my lotr theme - just shows a blank white page when i set it as the default theme)
Kind Regards, |
|
|
|
 |
jakec
Site Admin

Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom
|
Posted:
Sun Dec 21, 2008 8:14 am |
|
Is the module itself set to display the right blocks? |
|
|
|
 |
calnai08

|
Posted:
Sun Dec 21, 2008 8:16 am |
|
Yes, i have about 3 blocks which appear on the right with the default fisubice theme which comes with RN, however as soon as i change to my Old Theme (which was backed up pre installation), the right blocks disappear.
Ive just tried changing the Themefooter function back to index===1 instead of INDEX_FILE and still no avail.
Also, do you know if there is any conflicts with AutoTheme and the newest RN.
I would very much like to be able to run my old theme (which required AT-Lite) - I May have found a work around for the other theme. |
|
|
|
 |
jakec

|
Posted:
Sun Dec 21, 2008 8:24 am |
|
|
|
 |
jakec

|
Posted:
Sun Dec 21, 2008 8:27 am |
|
With regards to your other issue are any errors being displayed? |
|
|
|
 |
calnai08

|
Posted:
Sun Dec 21, 2008 8:29 am |
|
No, there are no debug errors or SQL errors that i can see.
The site now has that bugged theme on and can be found at
http://www.enigma-gaming.net/index.php
Perhaps you can make more heads and tails out of it than myself. |
|
|
|
 |
jakec

|
Posted:
Sun Dec 21, 2008 8:31 am |
|
So you have error reporting turned on in the config.php file |
|
|
|
 |
jakec

|
Posted:
Sun Dec 21, 2008 8:34 am |
|
With regards to Autotheme, there are 9 instances of $dbi in the files which would need changing as per the post above. |
Last edited by jakec on Sun Dec 21, 2008 8:37 am; edited 1 time in total |
|
|
 |
calnai08

|
Posted:
Sun Dec 21, 2008 8:36 am |
|
I have enable error reporting now, just getting VB up and running so i can see line 121 is.
Line 121 shows
Code:$result = sql_query("select lid, title, hits from ".$prefix."_links_links order by date DESC limit 0,$maxshow", $dbi);
|
|
|
|
|
 |
jakec

|
Posted:
Sun Dec 21, 2008 8:38 am |
|
Ah OK, I suspect this is similar to the Autotheme problem, you will probably find the SQL query is using $dbi. |
|
|
|
 |
jakec

|
Posted:
Sun Dec 21, 2008 8:39 am |
|
Can you zip up the theme and PM the link to the file and I can have a look if you want? |
Last edited by jakec on Sun Dec 21, 2008 8:40 am; edited 1 time in total |
|
|
 |
calnai08

|
Posted:
Sun Dec 21, 2008 8:40 am |
|
Hm ok.
I currently have AT uninstalled as ive just done a clean install and dont want to start leaving legacy files on the server already.
Should i perhaps try to re-install?
EDIT-
Ok ive reinstalled AT and tried the Lotr theme.
It now displays a blank white page, with no errors. |
|
|
|
 |
jakec

|
Posted:
Sun Dec 21, 2008 8:55 am |
|
Autotheme will need the $dbi changing to $db queries. I would recommend posting at their forums, they really should update it. |
|
|
|
 |
jakec

|
Posted:
Sun Dec 21, 2008 9:21 am |
|
OK make the following changes to the theme.php
Find (around line 120):
Code:$result = sql_query("select lid, title, hits from ".$prefix."_links_links order by date DESC limit 0,$maxshow", $dbi);
|
and replace with:
Code:$result = $db->sql_query("select lid, title, hits from ".$prefix."_links_links order by date DESC limit 0,$maxshow");
|
Then find (around line 121):
Code:while(list($lid, $title, $hits) = sql_fetch_row($result, $dbi)) {
|
and replace with:
Code:while(list($lid, $title, $hits) = $db->sql_fetchrow($result)) {
|
Then find (around line 131):
Code:$result = sql_query("select lid, title, hits from ".$prefix."_downloads_downloads order by date DESC limit 0,$maxshow", $dbi);
|
and replace with:
Code:$result = $db->sql_query("select lid, title, hits from ".$prefix."_downloads_downloads order by date DESC limit 0,$maxshow");
|
Then find (around line 132):
Code:while(list($lid, $title, $hits) = sql_fetch_row($result, $dbi)) {
|
and replace with:
Code:while(list($lid, $title, $hits) = $db->sql_fetchrow($result)) {
|
|
Last edited by jakec on Sun Dec 21, 2008 9:29 am; edited 1 time in total |
|
|
 |
calnai08

|
Posted:
Sun Dec 21, 2008 9:26 am |
|
Ok ive made them changes, now showing,
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/mental/www/www/themes/GameTech/theme.php on line 121
The ThemeFooter function shows this.
Code:/************************************************************/
/* Function themefooter() */
/************************************************************/
function themefooter() {
global $index, $banners, $prefix, $dbi, $total_time, $start_time, $foot1, $foot2, $foot3, $foot4;
$maxshow = 10; // Number of downloads to dispaly in the block.
$a = 1;
$result = db->sql_query("select lid, title, hits from ".$prefix."_links_links order by date DESC limit 0,$maxshow");
while(list($lid, $title, $hits) = $db->sql_fetchrow($result)) {
$title2 = ereg_replace("_", " ", "<b>$title</b>");
$show .= " $a: <a href=\"modules.php?name=Web_Links&l_op=viewlinkdetails&lid=$lid&ttitle=$title\">$title2</a><br> <b><font class=\"content\">$hits</b><font class=\"copyright\"> times<br>";
$showlinks = " <A name= \"scrollingCode\"></A><MARQUEE behavior= \"scroll\" align= \"left\" direction= \"up\" height=\"100\" scrollamount= \"2\" scrolldelay= \"90\" onmouseover='this.stop()' onmouseout='this.start()'>$show";
$a++;
}
$maxshow = 10; // Number of downloads to display in the block.
$a = 1;
$result = db->sql_query("select lid, title, hits from ".$prefix."_downloads_downloads order by date DESC limit 0,$maxshow");
while(list($lid, $title, $hits) = $db->sql_fetchrow($result)) {
$title2 = ereg_replace("_", " ", "<b>$title</b>");
$show .= " $a: <a href=\"modules.php?name=Downloads&d_op=viewdownloaddetails&lid=$lid&title=$title\">$title2</a><br> <b><font class=\"content\">$hits</b><font class=\"content\"> times<br>";
$showdownloads = " <A name= \"scrollingCodedownloads\"></A><MARQUEE behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"100\" scrollamount= \"2\" scrolldelay= \"20\" onmouseover='this.stop()' onmouseout='this.start()'><table width=\"100%\"><tr> <td></td></tr>$show</table></marquee>";
$a++;
}
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$end_time = $mtime;
$total_time = ($end_time - $start_time);
$total_time = "".substr($total_time,0,5)." SECONDS";
$footer_message = " ";
if (defined('INDEX_FILE')) {
echo "</td>\n"
."<td width=\"5\" valign=\"top\" background=\"themes/GameTech/images/spacer.gif\"><img src=\"themes/GameTech/images/spacer.gif\" width=\"5\" height=\"1\" border=\"0\"></td>\n"
."<td width=\"170\" valign=\"top\">\n";
blocks(right);
}
include("themes/GameTech/footer.php");
}
|
|
|
|
|
 |
jakec

|
Posted:
Sun Dec 21, 2008 9:28 am |
|
Sorry left out the $ symbol before the db.
I'll edit the post above |
|
|
|
 |
calnai08

|
Posted:
Sun Dec 21, 2008 9:37 am |
|
Hm still the same error (strangely)
Would
Code:function themefooter() {
global $index, $banners, $prefix, $dbi, $total_time, $start_time, $foot1, $foot2, $foot3, $foot4;
|
Have anything to do with it. Perhaps adding the $db function in there (or replacing $dbi with $db)
Also, does the $Prefix function have anything quiffy about it, as i had some problems installing some core SQL queries due to this command, and had to manually copy/paste into the Import SQL in PhpMyAdmin |
|
|
|
 |
calnai08

|
Posted:
Sun Dec 21, 2008 9:41 am |
|
Aha that did it!
Added $db into the global function and i have my blocks back!
Cheers for the help!
(By the way, was there any way around the Autotheme problem, or is it purely an auther fault, and unless i want to sit and change every $dbi to $db i shouldnt bother sorta situation?) |
|
|
|
 |
jakec

|
Posted:
Sun Dec 21, 2008 9:41 am |
|
Yeah sorry missed that for some reason, the globals should now be $db instead of $dbi.
The install script may be using $dbi as well. |
|
|
|
 |
jakec

|
Posted:
Sun Dec 21, 2008 9:46 am |
|
This database layer has been used in patched versions of phpnuke for a while so they should be using $db, instead of $dbi. So I would ask the author to change it, but there are only 9 instances of $dbi in the AT lite package so you could give it a go yourself if you are happy messing with the code.
Read the post above and it tells you what needs changing etc. |
|
|
|
 |
|