Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help
Author Message
calnai08
New Member
New Member


Joined: Dec 21, 2008
Posts: 8

PostPosted: Sun Dec 21, 2008 5:15 am Reply with quote

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,
 
View user's profile Send private message
jakec
Site Admin


Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Sun Dec 21, 2008 8:14 am Reply with quote

Is the module itself set to display the right blocks?
 
View user's profile Send private message
calnai08
PostPosted: Sun Dec 21, 2008 8:16 am Reply with quote

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
PostPosted: Sun Dec 21, 2008 8:24 am Reply with quote

The autotheme problem I believe is due to it using $dbi instead of $db. This post here talks about the differences: Only registered users can see links on this board! Get registered or login!
 
jakec
PostPosted: Sun Dec 21, 2008 8:27 am Reply with quote

With regards to your other issue are any errors being displayed?
 
calnai08
PostPosted: Sun Dec 21, 2008 8:29 am Reply with quote

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
Only registered users can see links on this board! Get registered or login!

Perhaps you can make more heads and tails out of it than myself.
 
jakec
PostPosted: Sun Dec 21, 2008 8:31 am Reply with quote

So you have error reporting turned on in the config.php file
 
jakec
PostPosted: Sun Dec 21, 2008 8:34 am Reply with quote

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
PostPosted: Sun Dec 21, 2008 8:36 am Reply with quote

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
PostPosted: Sun Dec 21, 2008 8:38 am Reply with quote

Ah OK, I suspect this is similar to the Autotheme problem, you will probably find the SQL query is using $dbi.
 
jakec
PostPosted: Sun Dec 21, 2008 8:39 am Reply with quote

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
PostPosted: Sun Dec 21, 2008 8:40 am Reply with quote

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
PostPosted: Sun Dec 21, 2008 8:55 am Reply with quote

Autotheme will need the $dbi changing to $db queries. I would recommend posting at their forums, they really should update it.
 
jakec
PostPosted: Sun Dec 21, 2008 9:21 am Reply with quote

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
PostPosted: Sun Dec 21, 2008 9:26 am Reply with quote

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 .= "&nbsp;$a: <a href=\"modules.php?name=Web_Links&amp;l_op=viewlinkdetails&amp;lid=$lid&amp;ttitle=$title\">$title2</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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 .= "&nbsp;$a: <a href=\"modules.php?name=Downloads&amp;d_op=viewdownloaddetails&amp;lid=$lid&amp;title=$title\">$title2</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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
PostPosted: Sun Dec 21, 2008 9:28 am Reply with quote

Sorry left out the $ symbol before the db.

I'll edit the post above
 
calnai08
PostPosted: Sun Dec 21, 2008 9:37 am Reply with quote

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
PostPosted: Sun Dec 21, 2008 9:41 am Reply with quote

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
PostPosted: Sun Dec 21, 2008 9:41 am Reply with quote

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
PostPosted: Sun Dec 21, 2008 9:46 am Reply with quote

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.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©