PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  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
vaudevillian
Worker
Worker


Joined: Jan 18, 2008
Posts: 139

PostPosted: Sat Jan 03, 2009 11:01 am Reply with quote Back to top

I am looking at a module that said it worked with 2.1 ravennuke. But I thought I reead somewhere in here about a db structure change.

In the module here is the global db calls
Code:


global $module_name, $admin, $admin_file, $user, $userinfo, $name;



But from what I can see is that user changed to username. Is that correct?

The module I speak of is Nuke Address Book 2.0.0 by Paul Brennan

I also was wondering if there is a db structure change can I get a list of the values that were changed then I dont need to ask this question ever again. Wink
View user's profile Send private message Send e-mail
Palbin
Site Admin


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

PostPosted: Sat Jan 03, 2009 11:32 am Reply with quote Back to top

What you posted has nothing to do with the db. They are just global variables.
View user's profile Send private message
jakec
Site Admin


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

PostPosted: Sat Jan 03, 2009 12:56 pm Reply with quote Back to top

There's a Sticky here to help convert older modules and blocks.
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message
vaudevillian
Worker
Worker


Joined: Jan 18, 2008
Posts: 139

PostPosted: Sun Jan 04, 2009 11:28 am Reply with quote Back to top

Ok I switched everything over in the module But I got a litte confused about something.

Old code

Code:

$result = sql_query("select company,role,area,city,state,country,author,access from ".$prefix."_address_book where author='$userinfo[0]' OR access='public'", $dbi);


new code

Code:

$result = $db->sql_query("select company,role,area,city,state,country,author,access from ".$prefix."_address_book where author='$userinfo[0]' OR access='public'", $db);


My question lays at the end of the statment.

Palbin said:

sql_query($sql,$dbi) to $db->sql_query($sql)


In my code there is no $sql at the end of the statment and only a $db, do I remove the $db and leave it or do I change it to $sql?
View user's profile Send private message Send e-mail
jakec
Site Admin


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

PostPosted: Sun Jan 04, 2009 1:25 pm Reply with quote Back to top

You should remove the $db because it is at the start of your query.

The $sql is just an example the variable might be called something else.
View user's profile Send private message
vaudevillian
Worker
Worker


Joined: Jan 18, 2008
Posts: 139

PostPosted: Sun Jan 04, 2009 2:03 pm Reply with quote Back to top

ty jake
View user's profile Send private message Send e-mail
jestrella
Moderator


Joined: Dec 01, 2005
Posts: 535
Location: Santiago, Dominican Republic

PostPosted: Sun Jan 04, 2009 3:51 pm Reply with quote Back to top

vaudevillian wrote:
In the module here is the global db calls
Code:

global $module_name, $admin, $admin_file, $user, $userinfo, $name;


But from what I can see is that user changed to username. Is that correct?


This global variable is set to identify whether the user have login or not. For example is_user($user) determines if the user have login to the system. cookie_decode($user) get some basic info about the user.
View user's profile Send private message Visit poster's website
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