21
Anonymous
Re: mxDirectory 3.0RC2???
  • 2008/12/27 0:20

  • Anonymous

  • Posts: 0

  • Since: 0


How to improve old modules to fix deprecated XoopsTree bug ?

22
trabis
Re: mxDirectory 3.0RC2???
  • 2009/1/16 14:02

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Old modules using xoopstree may not have classes and being so, they are not able to use tree.php (requires objects/classes).

In the new mytabs, plugins must use tree.php. Xoopstube(for example) does not have a class so I had to make a quick fix! Here is how I did it (I added a fake class):

le="color: #000000"><?php function xoopstube_catinfo($option, $selected_cat = 0) { global $xoopsDB; include_once XOOPS_ROOT_PATH.'/modules/mytabs/class/tree.php'; $sql = "SELECT * FROM " . $xoopsDB->prefix( 'xoopstube_cat' ); $result = $xoopsDB->query($sql); while ($row = $xoopsDB->fetchArray($result)) { $allTopics[] = new XoopstubeTemp($row); } $topic_tree = new MytabsObjectTree($allTopics, 'cid', 'pid'); $ret = $topic_tree->makeSelBox($option, 'title', '-- ', $selected_cat, false, 0, true); return $ret; } //we need a class for our MytabsObjectTree so let us create a simple one! class XoopstubeTemp extends XoopsObject { /** * constructor */ function XoopstubeTemp($row) { $this->XoopsObject(); $this->initVar("cid", XOBJ_DTYPE_INT, $row['cid']); $this->initVar("pid", XOBJ_DTYPE_INT, $row['pid']); $this->initVar('title', XOBJ_DTYPE_TXTBOX, $row['title']); } }


23
Anonymous
Re: mxDirectory 3.0RC2???
  • 2009/1/16 16:56

  • Anonymous

  • Posts: 0

  • Since: 0


Thanks trabis

Herve have other fix too .. check news 1.63

24
trabis
Re: mxDirectory 3.0RC2???
  • 2009/1/16 19:46

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


But news(although being old) has classes.
Here is the plugin I made for news:
le="color: #000000"><?php function news_catinfo($option, $selected_cat = 0) { global $xoopsDB; include_once XOOPS_ROOT_PATH.'/modules/mytabs/class/tree.php'; include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newstopic.php'; $topic_handler = new NewsTopic(); $ret = array(); $allTopics = $topic_handler->getAllTopics(false); $topic_tree = new MytabsObjectTree($allTopics, 'topic_id', 'topic_pid'); $ret = $topic_tree->makeSelBox($option, 'topic_title', '-- ', $selected_cat, false, 0, true); return $ret; }


25
btesec
Re: mxDirectory 3.0RC2???
  • 2009/5/7 17:02

  • btesec

  • Friend of XOOPS

  • Posts: 623

  • Since: 2007/2/20


Have we made any progress here? Thanks.

26
btesec
Re: mxDirectory 3.0RC2???
  • 2009/5/7 17:30

  • btesec

  • Friend of XOOPS

  • Posts: 623

  • Since: 2007/2/20


Hi all,

can someone send me a copy of mxDirectory 3.0RC2 since the site seems to be closed.

thanks.

27
wcrwcr
Re: mxDirectory 3.0RC2???
  • 2009/5/7 19:28

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


i need one too

28
blueadept
Re: mxDirectory 3.0RC2???
  • 2009/7/7 1:09

  • blueadept

  • Just popping in

  • Posts: 1

  • Since: 2009/6/8 2


Anyone able to send me a copy of MXDirectory since the site is gone?

29
Shiva
Re: mxDirectory 3.0RC2???
  • 2009/7/7 8:41

  • Shiva

  • Quite a regular

  • Posts: 280

  • Since: 2006/7/9 1


I have put it on my site - you can check it out here:
http://www.evucan.com/modules/mydownloads/viewcat.php?cid=2

30
pablo103
Re: mxDirectory 3.0RC2???
  • 2009/8/9 13:43

  • pablo103

  • Not too shy to talk

  • Posts: 181

  • Since: 2008/2/3 1


Error 500 when i try to display the module under XOOPS 2.3....