Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Modules
Author Message
wiz
Involved
Involved



Joined: Oct 09, 2006
Posts: 413
Location: UK

PostPosted: Sun Apr 26, 2009 1:03 pm Reply with quote

For all those that may not know....

In /admin/modules/treasury.php
Find:
Code:
$result = sql_query("select radminsuper from ".$prefix."_authors where aid='$aid'", $dbi);


list($radminsuper) = sql_fetch_row($result, $dbi);


Replace with:

Code:
$sql="select radminsuper from ".$prefix."_authors where aid='$aid'";

 $result =$db->sql_query($sql);

list($radminsuper) = $db->sql_fetchrow($result);


It should be line 51.


Last edited by wiz on Tue Apr 28, 2009 12:54 pm; edited 1 time in total 
View user's profile Send private message Visit poster's website AIM Address
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Mon Apr 27, 2009 10:02 pm Reply with quote

Thanks!

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
wiz







PostPosted: Mon Apr 27, 2009 10:04 pm Reply with quote

No worries.. I sourced the info from this forum, but i thought that it is a module that many people actually use..so will cause problems for many too. Cheers
 
wiz







PostPosted: Mon Apr 27, 2009 10:07 pm Reply with quote

May i add.......
If you do not do this, Treasury will still work, donations will stlll come in. However, Admins will not be able to view or reconcile donations.

Cheers
WIZ
 
wiz







PostPosted: Tue Apr 28, 2009 8:13 am Reply with quote

correction... it is not fixed. I am struggling with this error..

Fatal error: Call to undefined function sql_fetch_row()

Code:
// $result = sql_query("select radminsuper from ".$prefix."_authors where aid='$aid'", $dbi);

$sql="select radminsuper from ".$prefix."_authors where aid='$aid'"; // Fix for RN 2.3
 $result =$db->sql_query($sql);

list($radminsuper) = sql_fetch_row($result, $dbi); //throwing error - WIZ


Cheers
WIZ
 
duck
Involved
Involved



Joined: Jul 03, 2006
Posts: 273

PostPosted: Tue Apr 28, 2009 11:09 am Reply with quote

change to $db->sql_fetchrow
 
View user's profile Send private message
wiz







PostPosted: Tue Apr 28, 2009 12:13 pm Reply with quote

nope, that doesnt do it.

Fatal error: Call to a member function sql_fetch_row() on a non-object
 
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Tue Apr 28, 2009 12:46 pm Reply with quote

Code:


list($radminsuper) = $db->sql_fetchrow($result);

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
wiz







PostPosted: Tue Apr 28, 2009 12:56 pm Reply with quote

FIXED
Thanks guys..i forgot that sql_fetch_row now becomes sql_fetchrow.

Original post modified to reflect the true solution.

Cheers
WIZ
 
sexycoder
Spammer and overall low life



Joined: Feb 02, 2009
Posts: 82

PostPosted: Wed Jun 03, 2009 3:23 am Reply with quote

What about this after

Search for

Code:
function Treasury()

{
    global $admin, $bgcolor2, $prefix, $dbi, $currentlang, $multilingual;


Replace with

Code:
function Treasury()

{
    global $admin, $bgcolor2, $prefix, $db, $currentlang, $multilingual;


One question I can see more like this in modules/Donations/admin/index.php

Can anybody tell me if this module should be converted all. Let me know please because I still see dbi Shocked
 
View user's profile Send private message
Guardian2003
Site Admin



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

PostPosted: Wed Jun 03, 2009 4:18 am Reply with quote

I have the module available on my site but it's $5
I have already done the $dbi conversion and also fixed a number of errors and made it XHTML 1.0 Transitional Compliant. I am in the middle of writing a new module to replace Treasury completely including multiple currency support, subscriptions and one-off payments but I have had to put it aside for now to finish some more urgent projects and client work.
 
View user's profile Send private message Send e-mail
sexycoder







PostPosted: Wed Jun 03, 2009 6:40 pm Reply with quote

Quote:
I have the module available on my site but it's $5


Crying or Very sad u dont accept free emails. I dont understand why not because I regret to use payment email account. What happens if I switch to another internet company then your email is gone. I dont understand what could be your limitations but I would like to have NT to see what u did with that old module.
 
luckson
New Member
New Member



Joined: Aug 02, 2008
Posts: 22
Location: NaGaLim

PostPosted: Wed Jun 03, 2009 8:50 pm Reply with quote

Guardian2003, That sounds like a good fix with just $5 however I have been jailed in your Sentinel for trying to hack! ? while trying to check your stuff in the site:p> eh lol. anyway...i have sent a PM for you.

Thanks
Luckson

_________________
Nagalim/Nagaland 
View user's profile Send private message Visit poster's website
Guardian2003







PostPosted: Wed Jun 03, 2009 9:24 pm Reply with quote

I replied to your PM. Just to clarify for other readers, I am occassionally having the same issue with the 406 error. It is not due to NukeSentinel (tm) but seems to be a server problem. I thought it was something unique to my ISP doing weird things with my NAT firewall or giving me a proxy IP as it resolves itself if I reboot my modem.
Now that you have made me aware you are having the same problem, I can take steps to resolve it.
Thank you for the PM and for letting me know.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Modules

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 ©