PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
calnai08
New Member
New Member


Joined: Dec 21, 2008
Posts: 8

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

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: 3028
Location: United Kingdom

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

Is the module itself set to display the right blocks?
View user's profile Send private message
calnai08
New Member
New Member


Joined: Dec 21, 2008
Posts: 8

PostPosted: Sun Dec 21, 2008 8:16 am Reply with quote Back to top

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


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

PostPosted: Sun Dec 21, 2008 8:24 am Reply with quote Back to top

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 to the forums!
View user's profile Send private message
jakec
Site Admin


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

PostPosted: Sun Dec 21, 2008 8:27 am Reply with quote Back to top

With regards to your other issue are any errors being displayed?
View user's profile Send private message
calnai08
New Member
New Member


Joined: Dec 21, 2008
Posts: 8

PostPosted: Sun Dec 21, 2008 8:29 am Reply with quote Back to top

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 to the forums!


Perhaps you can make more heads and tails out of it than myself.
View user's profile Send private message
jakec
Site Admin


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

PostPosted: Sun Dec 21, 2008 8:31 am Reply with quote Back to top

So you have error reporting turned on in the config.php file
View user's profile Send private message
jakec
Site Admin


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

PostPosted: Sun Dec 21, 2008 8:34 am Reply with quote Back to top

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
View user's profile Send private message
calnai08
New Member
New Member


Joined: Dec 21, 2008
Posts: 8

PostPosted: Sun Dec 21, 2008 8:36 am Reply with quote Back to top

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


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

PostPosted: Sun Dec 21, 2008 8:38 am Reply with quote Back to top

Ah OK, I suspect this is similar to the Autotheme problem, you will probably find the SQL query is using $dbi.
View user's profile Send private message
jakec
Site Admin


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

PostPosted: Sun Dec 21, 2008 8:39 am Reply with quote Back to top

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
View user's profile Send private message
calnai08
New Member
New Member


Joined: Dec 21, 2008
Posts: 8

PostPosted: Sun Dec 21, 2008 8:40 am Reply with quote Back to top

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


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

PostPosted: Sun Dec 21, 2008 8:55 am Reply with quote Back to top

Autotheme will need the $dbi changing to $db queries. I would recommend posting at their forums, they really should update it.
View user's profile Send private message
jakec
Site Admin


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

PostPosted: Sun Dec 21, 2008 9:21 am Reply with quote Back to top

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
View user's profile Send private message
calnai08
New Member
New Member


Joined: Dec 21, 2008
Posts: 8

PostPosted: Sun Dec 21, 2008 9:26 am Reply with quote Back to top

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=\"links.html&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");
}
View user's profile Send private message
jakec
Site Admin


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

PostPosted: Sun Dec 21, 2008 9:28 am Reply with quote Back to top

Sorry left out the $ symbol before the db.

I'll edit the post above
View user's profile Send private message
calnai08
New Member
New Member


Joined: Dec 21, 2008
Posts: 8

PostPosted: Sun Dec 21, 2008 9:37 am Reply with quote Back to top

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
View user's profile Send private message
calnai08
New Member
New Member


Joined: Dec 21, 2008
Posts: 8

PostPosted: Sun Dec 21, 2008 9:41 am Reply with quote Back to top

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


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

PostPosted: Sun Dec 21, 2008 9:41 am Reply with quote Back to top

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


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

PostPosted: Sun Dec 21, 2008 9:46 am Reply with quote Back to top

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.
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum