Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6 Bugs/Fixes
Author Message
webbi
Hangin' Around



Joined: Jun 21, 2008
Posts: 30

PostPosted: Sun Jan 11, 2009 8:54 am Reply with quote

Code:
Fatal error: Call to undefined function: sql_query() in /*Edited by Admin*/themes/Klyde/theme.php on line 191



Line 191 reads as:
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 Send e-mail Visit poster's website
jakec
Site Admin



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

PostPosted: Sun Jan 11, 2009 9:12 am Reply with quote

It looks like the problem may be caused by the $dbi issue that has been discussed here.

It you do a search on $dbi you should find a post discussing how to fix this.
 
View user's profile Send private message
webbi







PostPosted: Sun Jan 11, 2009 11:46 am Reply with quote

Are you refering to this thread:
[ Only registered users can see links on this board! Get registered or login! ] ?? (cuz there are 172 hits regarding $dbi)


Note: after reading all this stuff... gesh; trying to wrap my head around what exactly I am suppose to alter here. Have no clue at this point. Our old style theme probably needs code updates, as does the block I am attempting to show on the right side.
 
jakec







PostPosted: Sun Jan 11, 2009 12:06 pm Reply with quote

This is probably the best post:
[ Only registered users can see links on this board! Get registered or login! ]

The error you posted is related to the theme, so there need to be some code changes to the theme files.
 
webbi







PostPosted: Sun Jan 11, 2009 2:04 pm Reply with quote

Okay, I did change the 4 $dbi statement & 1 query statement... did not change results.
 
jakec







PostPosted: Sun Jan 11, 2009 2:05 pm Reply with quote

Are you still getting any errors?
 
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Sun Jan 11, 2009 7:16 pm Reply with quote

webbi if those where inside functions, did you remember to change $dbi to $db in the global statement?
 
View user's profile Send private message Send e-mail
webbi







PostPosted: Sun Jan 11, 2009 8:58 pm Reply with quote

Quote:
Are you still getting any errors?


Yes, same error as stated & still no right blocks.

Quote:
webbi if those where inside functions, did you remember to change $dbi to $db in the global statement?


Ummm in the "global" function I did change the $dbi to $db; yes and removed others from statement ends. Still no go. I probably did something wrong - maybe I should just post the theme code here instead; not like its a trade secret or anything.
 
jakec







PostPosted: Mon Jan 12, 2009 2:20 am Reply with quote

Can you post the code here that you have changed, there's no need to post the whole theme code.
 
webbi







PostPosted: Mon Jan 12, 2009 12:31 pm Reply with quote

Code:
// $result = sql_query("select lid, title, hits from ".$prefix."_links_links order by date DESC limit 0,$maxshow", $dbi);

$result = sql_query("select lid, title, hits from ".$prefix."_links_links order by date DESC limit 0,$maxshow");
//while(list($lid, $title, $hits) = sql_fetch_row($result, $dbi)) {
   while(list($lid, $title, $hits) = sql_fetch_row($result)) {
 
jakec







PostPosted: Mon Jan 12, 2009 12:52 pm Reply with quote

Ah, I think it shoud look more like this.

The first query should look like:

Code:
$result = $db->sql_query("select lid, title, hits from ".$prefix."_links_links order by date DESC limit 0,$maxshow");


and second query should be:

Code:
while(list($lid, $title, $hits) = $db->sql_fetchrow($result)


Were there any others?
 
webbi







PostPosted: Mon Jan 12, 2009 3:03 pm Reply with quote

Well... after really looking things over here. I see all kinds of query statements; trying hard to understand what they all mean.

The 2 I quoted above are from the "footer function".

This is from the "header function":
Code:


    $uresult = $db->sql_query("select user_id from ".$user_prefix."_users where username='$username'");
    list($uid) = $db->sql_fetchrow($uresult);
    $presult = $db->sql_query("select * from ".$prefix."_bbprivmsgs where privmsgs_to_userid='$uid' AND (privmsgs_type='0' OR privmsgs_type='1' OR privmsgs_type='3' OR privmsgs_type='5')");
    $pnumrow = $db->sql_numrows($presult);
 
jakec







PostPosted: Mon Jan 12, 2009 3:07 pm Reply with quote

You'll need to do a search of the files for $dbi and change every query to suit.

If you stick to the rules on the above post I mentioned you should be OK.

I use Notepad++ to search multiple files at a time.
 
webbi







PostPosted: Mon Jan 12, 2009 3:10 pm Reply with quote

Just so you know, I made those 2 changes you mentioned there & the site crashed. So I restored the original code before I edited anything. This sin't going too well.
 
jakec







PostPosted: Mon Jan 12, 2009 3:39 pm Reply with quote

When it crashed did you get any errors?
 
webbi







PostPosted: Mon Jan 12, 2009 3:45 pm Reply with quote

Nope... no errors at all; white page. (and yes, error checking is still enabled in config)

Wouldn't it be easier to just give you the file?
 
jakec







PostPosted: Mon Jan 12, 2009 3:53 pm Reply with quote

PM me a link to the file and I will try and have a look, but it may take me a few days.

If there are any other Admins/Mods who are able to look at this sooner please speak now. Wink
 
webbi







PostPosted: Fri Jan 30, 2009 11:20 am Reply with quote

You manage to have any luck with that theme yet Jake?
 
jakec







PostPosted: Fri Jan 30, 2009 11:24 am Reply with quote

Apologies this totally slipped my mind. Embarassed I will have a look this weekend and get back to you.
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6 Bugs/Fixes

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 ©