1
sugar
RBFramework & RBTool - create module prototype eazy~
  • 2009/11/6 10:56

  • sugar

  • Just popping in

  • Posts: 26

  • Since: 2003/8/24


Chinese talking here please

RB Framework - simple manipulate sql order for XOOPS object handler
http://code.google.com/p/xoops-rb-framework/

RB Tool - Create XOOPS module prototype and use RB Framework object handler
http://code.google.com/p/xoops-rb-framework/wiki/rbTool

Resized Image


Resized Image

2
Mamba
Re: RBFramework & RBTool - create module prototype eazy~
  • 2009/11/6 12:28

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


I've installed, but the module is not accessible, i.e. when I click on the module image, nothing happens.

I tried to start it manually:

http://localhost/xoops240/modules/rbtool/

but I'm getting:

Quote:
Fatal error: Cannot redeclare load_object() (previously declared in S:\wamp\www\xoops240\Frameworks\rb\functions.ini.php:11) in S:\wamp\www\xoops240\Frameworks\art\functions.ini.php on line 45


Another thing - where can I download your ToDo Module? The link is broken now.

3
sugar
Re: RBFramework & RBTool - create module prototype eazy~
  • 2009/11/6 13:07

  • sugar

  • Just popping in

  • Posts: 26

  • Since: 2003/8/24


Fatal errorCannot redeclare load_object()

I fix this bug and upload new files
or you can
edit Frameworks/rb/functions.ini.php
find load_object replace to rb_load_object
find load_functions replace to rb_load_functions

edit Frameworks/rb/functions.php
find load_functions replace to rb_load_functions

edit modules/rbtool/include/functions.php
find load_object replace to rb_load_object

edit modules/rbtool/sample/functions.txt
find load_object replace to rb_load_object


=================

todo module can download here now
http://code.google.com/p/xoops-rb-framework/downloads/list

4
sugar
PHP5 Method Chaining
  • 2009/11/16 4:15

  • sugar

  • Just popping in

  • Posts: 26

  • Since: 2003/8/24


SQL
$sql 'SELECT * FROM '.$xoopsDB->prefix('article').' WHERE uid = 1 AND status = 1 ORDER BY created DESC LIMIT 0, 10';



with XoopsPersistableObjectHandler
$article_handler =& xoops_getmodulehandler('article''news');
$criteria = new CriteriaCompo(new Criteria('uid'1));
$criteria->add(new Criteria('status'1));
$criteria->setLimit(10);
$criteria->setStart(0);
$criteria->setSort('created''DESC');
$articles $article_handler->getObjects($criteriatrue);



with RbCrudHandler
$article_handler =& xoops_getmodulehandler('article''news');
$articles $article_handler->where('uid = 1 AND status = 1')->order_by('created DESC')->limit(100)->getObjects();


or
$article_handler =& xoops_getmodulehandler('article''news');
$article_handler->where('uid = 1');
$article_handler->where('status = 1');
$article_handler->order_by('created DESC');
$article_handler->limit(100);
$articles $article_handler->getObjects();


or
$condition = array();
$condition[] = 'uid = 1';
$condition[] = 'status = 1';

$article_handler =& xoops_getmodulehandler('article''news');
$article_handler->where($condition)->order_by('created DESC')->limit(100);
$articles $article_handler->getObjects();


or
$condition = array();
$condition[] = 'uid = 1';
$condition[] = 'status = 1';

$article_handler =& xoops_getmodulehandler('article''news');
$articles $article_handler->getObjects($condition'created DESC'10 ,0);


do as you like

5
bumciach
Re: RBFramework & RBTool - create module prototype eazy~
  • 2010/2/9 9:48

  • bumciach

  • Not too shy to talk

  • Posts: 153

  • Since: 2007/6/25


And what about joining tables? Does RBFramework will be brought something in this area.

Login

Who's Online

158 user(s) are online (52 user(s) are browsing Support Forums)


Members: 0


Guests: 158


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits