xoops forums

Forum Index


Board index » All Posts (kurak_bu)




kurak_bu

Quite a regular
Posted on: 2009/10/5 15:39
kurak_bu
kurak_bu (Show more)
Quite a regular
Posts: 342
Since: 2005/9/5 1
#1

Re: Profile ['hasSearch'] ?

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.


kurak_bu

Quite a regular
Posted on: 2009/9/27 20:57
kurak_bu
kurak_bu (Show more)
Quite a regular
Posts: 342
Since: 2005/9/5 1
#2

Re: Profile ['hasSearch'] ?

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.


kurak_bu

Quite a regular
Posted on: 2009/9/27 18:32
kurak_bu
kurak_bu (Show more)
Quite a regular
Posts: 342
Since: 2005/9/5 1
#3

Profile ['hasSearch'] ?

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


kurak_bu

Quite a regular
Posted on: 2008/10/25 8:07
kurak_bu
kurak_bu (Show more)
Quite a regular
Posts: 342
Since: 2005/9/5 1
#4

Re: insert user into database and add to usergroup

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


kurak_bu

Quite a regular
Posted on: 2008/6/13 20:38
kurak_bu
kurak_bu (Show more)
Quite a regular
Posts: 342
Since: 2005/9/5 1
#5

Re: E-commerce options available to xoops

btesec, neither me


kurak_bu

Quite a regular
Posted on: 2008/6/13 14:39
kurak_bu
kurak_bu (Show more)
Quite a regular
Posts: 342
Since: 2005/9/5 1
#6

Re: E-commerce options available to xoops

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


kurak_bu

Quite a regular
Posted on: 2008/6/11 18:29
kurak_bu
kurak_bu (Show more)
Quite a regular
Posts: 342
Since: 2005/9/5 1
#7

Re: My tabs 1.0 alpha is released for feature requests

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


kurak_bu

Quite a regular
Posted on: 2008/5/27 8:20
kurak_bu
kurak_bu (Show more)
Quite a regular
Posts: 342
Since: 2005/9/5 1
#8

Re: Clickable Keywords

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


kurak_bu

Quite a regular
Posted on: 2008/5/26 16:57
kurak_bu
kurak_bu (Show more)
Quite a regular
Posts: 342
Since: 2005/9/5 1
#9

Re: Clickable Keywords

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


kurak_bu

Quite a regular
Posted on: 2008/5/23 12:52
kurak_bu
kurak_bu (Show more)
Quite a regular
Posts: 342
Since: 2005/9/5 1
#10

Re: Language: Front - Back ends

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 »