#
# Table structure for table `profiles`
#
CREATE TABLE `profiles` (
`id` int(11) NOT NULL auto_increment,
`approved` tinyint(4) NOT NULL default '0',
`viewable` tinyint(4) NOT NULL default '1',
`disabled` tinyint(4) NOT NULL default '0',
`uid` int(11) NOT NULL default '0',
`cid` int(11) NOT NULL default '0',
`name` varchar(50) NOT NULL default '',
`image` varchar(255) NOT NULL default '',
`uploadimage` varchar(255) NOT NULL default '',
`imagechoice` tinyint(4) NOT NULL default '0',
`url` varchar(255) NOT NULL default '',
`location` varchar(75) NOT NULL default '',
`list` varchar(255) NOT NULL default '',
`descript` text NOT NULL,
`descript2` text,
`linkprofile` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM COMMENT='Xoops Profiles Module';
#
# Table structure for table `xoops_profiles_cats`
#
CREATE TABLE `profiles_cats` (
`cid` int(11) NOT NULL auto_increment,
`name` varchar(75) NOT NULL default '',
`pid` int(11) NOT NULL default '0',
UNIQUE KEY `ID` (`cid`)
) TYPE=MyISAM COMMENT='Profiles Categories';
function comments_search($queryarray, $andor, $limit, $offset, $userid){
global $xoopsDB;
$sql = "SELECT com_id, com_pid, com_rootid, com_modid, com_itemid, com_created, com_uid, com_title, com_text, com_status FROM ".$xoopsDB->prefix("xoopscomments")." WHERE com_id>0 ";
if ( $userid != 0 ) {
$sql .= " AND com_uid=".$userid." ";
}
// because count() returns 1 even if a supplied variable
// is not an array, we must check if $querryarray is really an array
if ( is_array($queryarray) && $count = count($queryarray) ) {
$sql .= " AND ((com_title LIKE '%$queryarray[0]%' OR com_text LIKE '%$queryarray[0]%')";
for($i=1;$i<$count;$i++){
$sql .= " $andor ";
$sql .= "(com_title LIKE '%$queryarray[$i]%' OR com_text LIKE '%$queryarray[$i]%')";
}
$sql .= ") ";
}
$sql .= "ORDER BY com_created DESC";
$result = $xoopsDB->query($sql,$limit,$offset);
$module_handler =& xoops_gethandler('module');
$modules =& $module_handler->getObjects(new Criteria('hascomments', 1), true);
$ret = array();
$i = 0;
while($myrow = $xoopsDB->fetchArray($result)){
$com_id = $myrow[com_id];
$com_modid=$myrow[com_modid];
$com_pid=$myrow[com_pid];
$com_rootid=$myrow[com_rootid];
$com_itemid=$myrow[com_itemid];
$comment_config = array();
$comment_config = $modules[$com_modid]->getInfo('comments');
$link = "../".$modules[$com_modid]->getVar('dirname').'/';
$link .= $comment_config['pageName'].'?';
$link .= $comment_config['itemName'].'=';
$link .= $com_itemid.'&com_id='.$com_id.'&com_rootid='.$com_rootid;
$link .= '&com_mode=threadcomment'.$com_id;
$ret[$i]['image'] = "img.gif";
$ret[$i]['link'] = $link;
$ret[$i]['title'] = $myrow['com_title'];
$ret[$i]['time'] = $myrow['com_created'];
$ret[$i]['uid'] = $myrow['com_uid'];
$i++;
}
return $ret;
}
Well its been a long time....I'm a noob again.. I'm trying to use the comment search to search the <`list` varchar(255)> data in the profiles module.. I'm running out of hair.. I've tried to contact hyperpod via email, phone, Pm and contact. The website will not allow me to register as well.. Is this just to simple for me or what.. Any help would be great..
Sources :
Comments Search Module 1.01Profiles 0.91b