31
Catzwolf
Re: Xoops FAQ V1.15 Beta Released
  • 2009/4/12 12:08

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


I did yesterday :)

32
Reintjan
Re: Xoops FAQ V1.15 Beta Released
  • 2009/4/12 13:18

  • Reintjan

  • Not too shy to talk

  • Posts: 144

  • Since: 2005/3/17


Thanks, unpacking now worked perfect... I'll try testing this as soon as possible
Be smart, stay smart. Stay one step ahead...

33
bumciach
Re: Xoops FAQ V1.15 Beta Released
  • 2009/4/15 12:26

  • bumciach

  • Not too shy to talk

  • Posts: 153

  • Since: 2007/6/25


Thanks for this work, Catz!
It's very helpfully for me to understand XoopsObject or XoopsObjectHandler, etc. Earlier I have spend a lot of time to looking for those infos and understand it.
I think it's what we need (especialy new developers) - at last! - simply, clean module to follow the example (coding standards, using new functions or methods and without deprecated ones, without a lot of messy code presented older modules).

xoopsFAQ works fine. Already no bugs, but if I have an error (intentionally) during saving content I get only "We have encountered an Error". Looking into the code, I should expected returning additionally list of occurred errors, right?

34
Catzwolf
Re: Xoops FAQ V1.15 Beta Released
  • 2009/4/15 19:52

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Quote:

bumciach wrote:
Thanks for this work, Catz!
It's very helpfully for me to understand XoopsObject or XoopsObjectHandler, etc. Earlier I have spend a lot of time to looking for those infos and understand it.
I think it's what we need (especialy new developers) - at last! - simply, clean module to follow the example (coding standards, using new functions or methods and without deprecated ones, without a lot of messy code presented older modules).

xoopsFAQ works fine. Already no bugs, but if I have an error (intentionally) during saving content I get only "We have encountered an Error". Looking into the code, I should expected returning additionally list of occurred errors, right?


Hiya,

You're welcome, I hope that this module will help a lot of people getting started, the same way my mentors at here at XOOPS did when I first started.

You should be getting any errors, when posting. If there is then it is most likely a bug. If this is a bug can you give me more information on it please and I will correct it.

Catz

35
bumciach
Re: Xoops FAQ V1.15 Beta Released
  • 2009/4/16 7:51

  • bumciach

  • Not too shy to talk

  • Posts: 153

  • Since: 2007/6/25


I don't know it's bug ;) I just noticed the difference between admin/index.php and admin/category.php.

category.php line 70
if ( is_object$obj ) ) {
            ...
            if ( 
$category_handler->insert$objtrue ) ) {
                
redirect_header'category.php'1_XO_LA_DBSUCCESS );
            }
        }
        
$category_handler->displayError_XO_LA_ERRORCOULDNOTADDCAT );


index.php line 70
if ( is_object$obj ) ) {
            ...
            
$ret $contents_handler->insert$objtrue );
            if ( 
$ret ) { 
                
redirect_header'index.php'1_XO_LA_DBSUCCESS );
            }
        }
        
$contents_handler->displayError$ret );


$ret return only contents_id. Maybe $obj->getErrors() or something instead?

36
demian
Re: Xoops FAQ V1.15 Beta Released
  • 2009/4/18 14:16

  • demian

  • Quite a regular

  • Posts: 225

  • Since: 2008/4/29


thanks for the module update

37
blackrx
Re: Xoops FAQ V1.15 Beta Released
  • 2010/2/7 12:00

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


anyone know where to download this module... xoosla.com is close

38
blackrx
Re: Xoops FAQ V1.15 Beta Released
  • 2010/2/7 12:06

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


nevermind


fount it here

http://www.frxoops.org/uploads/referentiel/modules/xoops_mod_xoopsfaq.v1.15.zip

39
blackrx
Re: Xoops FAQ V1.15 Beta Released
  • 2010/2/21 3:36

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


searching is not working...xoopsfaq is not listed in profile and also searching FAQ using search.php don't have any results



search.inc.php
<?php
/**
 * Name: search.inc.php
 * Description: Search function for XOOPS FAQ Module
 *
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license http://www.fsf.org/copyleft/gpl.html GNU public license
 * @package : XOOPS
 * @Module : XOOPS FAQ
 * @subpackage : Search Functions
 * @since 2.3.0
 * @author John Neill
 * @version $Id: search.inc.php 0000 10/04/2009 09:04:24 John Neill $
 */
defined'XOOPS_ROOT_PATH' ) or die( 'Restricted access' );

/**
 * xoopsfaq_search()
 *
 * @param mixed $queryarray
 * @param mixed $andor
 * @param mixed $limit
 * @param mixed $offset
 * @param mixed $userid
 * @return
 */
function xoopsfaq_search$queryarray$andor$limit$offset$userid ) {
    global 
$xoopsDB;
    
$ret = array();
    if ( 
$userid != ) {
        return 
$ret;
    }
    
$sql "SELECT contents_id, category_id, contents_title, contents_contents, contents_time FROM " $xoopsDB->prefix"xoopsfaq_contents" ) . " WHERE contents_visible=1 ";
    
// because count() returns 1 even if a supplied variable
    // is not an array, we must check if $querryarray is really an array
    
$count count$queryarray );
    if ( 
$count && is_array$queryarray ) ) {
        
$sql .= "AND ((contents_title LIKE '%$queryarray[0]%' OR contents_contents LIKE '%$queryarray[0]%')";
        for ( 
$i 1$i $count$i++ ) {
            
$sql .= $andor ";
            
$sql .= "(contents_title LIKE '%$queryarray[$i]%' OR contents_contents LIKE '%$queryarray[$i]%')";
        }
        
$sql .= ") ";
    }
    
$sql .= "ORDER BY contents_id DESC";
    
$result $xoopsDB->query$sql$limit$offset );
    
$i 0;
    while ( 
$myrow $xoopsDB->fetchArray$result ) ) {
        
$ret[$i]['image'] = "images/question2.gif";
        
$ret[$i]['link'] = "index.php?cat_id=" $myrow['category_id'] . "#" $myrow['contents_id'];
        
$ret[$i]['title'] = $myrow['contents_title'];
        
$ret[$i]['time'] = $myrow['contents_time'];
        
$i++;
    }
    return 
$ret;
}

?>

Login

Who's Online

113 user(s) are online (81 user(s) are browsing Support Forums)


Members: 0


Guests: 113


more...

Donat-O-Meter

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

Latest GitHub Commits