Content Management System - CMS : eXV2 
Home
News
Forum
Downloads
Download Module
Sitemap
Partnerseiten
RSS News
Kontakt/Info
Sprache
EnglishFrench
Suchen
Login
Nickname
Passwort

Registrieren?
Passwort?
Navigation
 Home News  Forum Neueste Beiträge  Downloads Download Module eXV² Themes  Weblinks Tutorial Changelog 2.3.1 Jobcenter Gebrauchtmarkt OSMap  Sponsor Kalendersystem Sitemap Partnerseiten RSS News Kontakt/Info Webseiten Wetter
Willkommen im Free Web CMS : eXV² Forum!
  Forenarchiv
     eXV2 Module
  Buddyfriends v 2.4 convertieren

Forum : eXV2 Module

Titel : Buddyfriends v 2.4 convertieren

© 2004-2012 www.exv2.de
http://www.exv2.de

URL dieser Diskussion
http://www.exv2.de/modules/newbb_plus/viewtopic.php?topic_id=1890&forum=7


 Gast :

15.11.2004 18:36
 gibst überhaupt konventierung möglickeit wie konverter modul von XOOPS modul nach V2 ?

ich wollte nämlich Buddyfriends v 2.4 (XOOPS) umändern nach V2

 Nobse :

15.11.2004 19:38
 Einen Konverter gibt es nicht. Da ist Handarbeit angesagt ca 30 Min.
Converting Modules
Syntaxwise not much has been changed in how modules work, and should be just as easy to adapt as themes.

$xoopsDB = Database::getInstance();
$myts = MyTextSanitizer::getInstance();

Are both deprecated, instead, simply include $myts & $db in your global declaration if you need to make use of either of these. (see below)

As far as the database query syntax goes, a mysql style syntax was adapted, so instead of doing a $xoopsDB->fetchRow(), you'd simply do a $db->fetch_row().

All db syntax is standard mysql syntax, minus the mysql_ prefix at the beginning.

Basically you can just do a massive search & replace on any existing module:

Delete:
$xoopsDB =& Database::getInstance();
$myts =& MyTextSanitizer::getInstance();

Replace:
$xoopsDB with $db
and replace all sql functions as listed in the equivalence table below


Xoops <--> E-Xoops query syntax equivalences:

$xoopsDB->prefix() = $db->prefix()
$xoopsDB->fetchRow() = $db->fetch_row()
$xoopsDB->fetchArray() = $db->fetch_array()
$xoopsDB->getInsertId() = $db->insert_id()
$xoopsDB->getRowsNum() = $db->num_rows()
$xoopsDB->close() = $db->close()

$xoopsDB->queryF() = $db->query()
$xoopsDB->query() = $db->query()

queryF is deprecated.

$xoopsDB->error() = $db->error()
$xoopsDB->errno() = $db->error()

error() & errno() were merged and return a combination of both if called.

SQL syntax additions:

$db->field_name()
$db->field_type()
$db->num_fields()
$db->affected_rows()
$db->select_db()
$db->fetch_object()

See: http://www.php.net/manual/en/ref.mysql.php for syntax details


Extra:

$xoopsConfig['sitename'] & $xoopsConfig['slogan'], were both respectively replaced with $meta['title'] & $meta['slogan']

If you need to inject the either of these into the module, just be sure to declare 'global $meta;' in your function.

$meta['author'], $meta['copyright'], $meta['keywords'], $meta['description'], and a few more are also instantly availiable once 'global $meta;' is declared in your functions.

 Gast :

16.11.2004 11:02
 Thank you, I will try it and hope I bring to run it Smile

 Dj_PD :

08.12.2004 11:31
 kurze Frage diesbezüglich:

Zitat:

Basically you can just do a massive search & replace on any existing module:

Delete:
$xoopsDB =& Database::getInstance();
$myts =& MyTextSanitizer::getInstance();

Replace:
$xoopsDB with $db
and replace all sql functions as listed in the equivalence table below




Soll ich
$xoopsDB =& Database::getInstance();
$myts =& MyTextSanitizer::getInstance();
richtig löschen, oder soll ich $xoopsDB nur mit $db austauschen.
Also das das dann so aussieht:
$db =& Database::getInstance();
$myts =& MyTextSanitizer::getInstance();

Mein English ist wirklich nicht das beste, deswegen würde ich mich freuen wenn mir mal jemand etwas dazu schreiben könnte. (evtl. wenn es nicht zu viel arbeit ist, wäre es auch nicht schlecht wenn es bald ein deutschen Tutorial geben würde, so könnte ich viel mehr machen.)


Gruss
Dj_PD

 Nobse :

08.12.2004 11:43
 Wirklich löschen.
und da wo dieses in einer function steht
dann
global $db, $myts;
Partnerseiten
http://www.fr.exv2.eu/

Vote für eXV2
php
Kontakt/Info
  Kontakt
  Impressum
  Link zu uns
  AGB
  Datenschutzhinweis
Downloads
  eXV² Core
  Core Sprachfiles
eXV² Filecenter
  Downloads
  Download Module
  eXV² Themes
  Multilanguage Module
  Sprachfiles eXV² Module
eXV² Support
  France