Jump to content
DevFuse Forums
Sign in to follow this  

New IPB 3.0.x code changes


While I'm converting my own mods I've been building a list of changes. I'll be updating this list as I add new code changes as well as new beta or RC changes. [b]This so far is compatible with IPB 3 Beta 3.[/b]

[b]Database Changes[/b]
Old: $this->ipsclass->DB->simple_contruct
New: $this->DB->build

Old: $this->ipsclass->DB->simple_exec
New: $this->DB->execute

Old: $this->ipsclass->DB->simple_exec_query
New: $this->DB->buildAndFetch

Old: $this->ipsclass->DB->get_num_rows
New: $this->DB->GetTotalRows

Old: $this->ipsclass->DB->fetch_row
New: $this->DB->fetch

Old: $this->ipsclass->DB->do_update
New: $this->DB->update

Old: $this->ipsclass->DB->do_delete
New: $this->DB->delete

Old: $this->ipsclass->DB->do_insert
New: $this->DB->insert


[b]Old Ipsclass[/b]
Old: $this->ipsclass->vars
New: $this->settings

Old: $this->ipsclass->lang
New: $this->lang->words

Old: $this->ipsclass->member
New: $this->memberData

Old: $this->ipsclass->cache
New: $this->caches

Old: $this->ipsclass->Error
New: $this->registry->output->showError
(Can pass the full text as the first parameter instead of an array with MSG in it.)


[b]Url Changes[/b]
Old: autocom=
New: app=

Old: code=
New: do=


IPB3 no longer uses the ipsclass in it's code. Instead the objects are setup and available in applications like above coding illustrates. Some parts of IPB3 require you to setup the objects on your construct function. Example of this is below.

[code]/* Make registry objects */
$this->registry = $registry;
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->lang = $this->registry->getClass('class_localization');
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();[/code]


Recommended Comments

There are no comments to display.

×