1
kurak_bu
Re: Profile ['hasSearch'] ?
  • 2009/10/5 15:39

  • kurak_bu

  • Quite a regular

  • Posts: 342

  • Since: 2005/9/5 1


Here is code of my search.inc.php if anyone would like to use it (may contain vulnerabilities!)

<?php
//thanks http://www.frxoops.org/modules/smartsection/item.php?itemid=179

function profile_search ($queryarray$andor$limit$offset$userid) {
global 
$xoopsDB;

// création de la requête
$sql "SELECT * FROM (".$xoopsDB->prefix("users")." join ".$xoopsDB->prefix("profile_profile")." on ".$xoopsDB->prefix("users.uid")."=".$xoopsDB->prefix("profile_profile.profile_id").") where uid>0 ";
// $sql .= " WHERE uid>0 ."";
if ( $userid != ) {
$sql .= " AND uid=".$userid." ";
}
if ( 
is_array($queryarray) && $count count($queryarray) ) {
$sql .= " AND ((uname LIKE '%$queryarray[0]%' OR user_intrest LIKE '%$queryarray[0]%' OR bio LIKE '%$queryarray[0]%' OR city LIKE '%$queryarray[0]%' OR club LIKE '%$queryarray[0]%' OR bussines LIKE '%$queryarray[0]%')";
for(
$i=1;$i $count;$i++){
$sql .= $andor " ;
$sql .= "(uname LIKE '%$queryarray[$i]%' OR user_intrest LIKE '%$queryarray[$i]%' OR bio LIKE '%$queryarray[$i]%' OR city LIKE '%$queryarray[0]%' OR club LIKE '%$queryarray[0]%' OR bussines LIKE '%$queryarray[0]%')" ; } $sql .= ") " ;
}
$sql .= "ORDER BY uid DESC" // si condition de tri
$result $xoopsDB->query($sql,$limit,$offset);

// création du tableau des résultats
$ret = array();
$i 0;
while(
$myrow $xoopsDB->fetchArray($result)){
$ret[$i]['image'] = "images/mymodule.gif";
$ret[$i]['link'] = "userinfo.php?uid=".$myrow['uid'].""// lien sur la page qui affichera le texte
$ret[$i]['title'] = $myrow['uname'];
//$ret[$i]['time'] = $myrow['created'];
//$ret[$i]['uid'] = $myrow['uid'];
$i++;
}
return 
$ret;

?>

city, club, bussines are custom fields made with profile module. Modify it to your needs.



2
kurak_bu
Re: Profile ['hasSearch'] ?
  • 2009/9/27 20:57

  • kurak_bu

  • Quite a regular

  • Posts: 342

  • Since: 2005/9/5 1


Thank you for reply,
unfortunately,http://dev.xoops.org/modules/phpwiki/index.php/SearchFunction doesn't work.
To be honest I had hope that someone made such hack before. This might be be too hard for me but I'll try, thank you.



3
kurak_bu
Profile ['hasSearch'] ?
  • 2009/9/27 18:32

  • kurak_bu

  • Quite a regular

  • Posts: 342

  • Since: 2005/9/5 1


Hello, is there any hack to make profiles (Profile module) searchable through /search.php ?

I am aware that /modules/profile/search.php exists however I would like to use just one search engine on site (google custom SE doesn't solve the issue)

//xoops 2.3.3



4
kurak_bu
Re: insert user into database and add to usergroup
  • 2008/10/25 8:07

  • kurak_bu

  • Quite a regular

  • Posts: 342

  • Since: 2005/9/5 1


Hello, take a look how XOOPS (register.php) is dealing with it.



5
kurak_bu
Re: E-commerce options available to xoops
  • 2008/6/13 20:38

  • kurak_bu

  • Quite a regular

  • Posts: 342

  • Since: 2005/9/5 1


btesec, neither me



6
kurak_bu
Re: E-commerce options available to xoops
  • 2008/6/13 14:39

  • kurak_bu

  • Quite a regular

  • Posts: 342

  • Since: 2005/9/5 1


I believe such topic has been discussed many times before. Anyway, maybe it is something new:
https://xoops.org.cn/modules/newbb/viewtopic.php?topic_id=15349&forum=3



7
kurak_bu
Re: My tabs 1.0 alpha is released for feature requests
  • 2008/6/11 18:29

  • kurak_bu

  • Quite a regular

  • Posts: 342

  • Since: 2005/9/5 1


I just wanted to say thank you for this module :)



8
kurak_bu
Re: Clickable Keywords
  • 2008/5/27 8:20

  • kurak_bu

  • Quite a regular

  • Posts: 342

  • Since: 2005/9/5 1


It seems you dont have Frameworks directory, read the readme file somewhere in tag module.



9
kurak_bu
Re: Clickable Keywords
  • 2008/5/26 16:57

  • kurak_bu

  • Quite a regular

  • Posts: 342

  • Since: 2005/9/5 1


Turn ON debug (inline) in site preferences and paste what did debug message told you.



10
kurak_bu
Re: Language: Front - Back ends
  • 2008/5/23 12:52

  • kurak_bu

  • Quite a regular

  • Posts: 342

  • Since: 2005/9/5 1


modules/xxx/language/xxx/admin.php
modules/xxx/language/xxx/modinfo.php
should be just for admin.

modules/xxx/language/xxx/main.php
contains strings used for user side

modules/xxx/language/xxx/blocks.php
may contain both I suppose




TopTop
(1) 2 3 4 ... 23 »



Login

Who's Online

169 user(s) are online (109 user(s) are browsing Support Forums)


Members: 0


Guests: 169


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