1
Nootje
Direct link to search query - xoopsmembers
  • 2004/3/17 9:14

  • Nootje

  • Just popping in

  • Posts: 15

  • Since: 2004/3/16


I've made added a couple of members to my site and gave a few of them certain values for their location:

UK
US
NL

United Kingdom, United States and Netherlands. Now i installed this xoopsmembers module and when i type in UK it shows me all the members which have UK as location.

Now i would like to make a direct link on my site that will do this automatically without showing the search form first.

So i would create 3 links to each one of them and when i click one of these links it would show me everyone in UK, US or NL, depending on what link i click.

How would i pull this off?

Nootje

2
Nootje
Re: Direct link to search query - xoopsmembers
  • 2004/3/17 15:19

  • Nootje

  • Just popping in

  • Posts: 15

  • Since: 2004/3/16


It doesn't even seem to react if i put ?whatever behind it...

Anyone?

3
Mithrandir
Re: Direct link to search query - xoopsmembers

The search form expects the variables to come through the POST method, i.e. not through GET variables in the URL.

You'll have to replace all $HTTP_POST_VARS with $_GET in modules/xoopsmembers/index.php

4
Nootje
Re: Direct link to search query - xoopsmembers
  • 2004/3/17 21:12

  • Nootje

  • Just popping in

  • Posts: 15

  • Since: 2004/3/16


Thanx for your reply Mithrandir,

I replaced all the $HTTP_POST_VARS with $_GET, but am i still supposed to be able to search? Because when i don't enter anything it used to show all users, but now it doesn't do anything and loads the page again. As if u would press Refresh. It also happens when i do enter something in the fields. So it doesn't do anything now with the $_GET.
Or do i have to use a link now? And if so what would that look like in my address bar?


5
Mithrandir
Re: Direct link to search query - xoopsmembers

do you send a variable called "op" with value "submit" along with the request?

6
Nootje
Re: Direct link to search query - xoopsmembers
  • 2004/3/17 22:47

  • Nootje

  • Just popping in

  • Posts: 15

  • Since: 2004/3/16


Yes, here small bit from the start of the index.php:

$op = "form";
if ( isset($HTTP_POST_VARS['op']) && $HTTP_POST_VARS['op'] == "submit" ) {
$op = "submit";
}

7
Nootje
Re: Direct link to search query - xoopsmembers
  • 2004/3/18 11:47

  • Nootje

  • Just popping in

  • Posts: 15

  • Since: 2004/3/16


BTW, the ['op'] is in a lot more places in the index.php, do i have to replace it with something?

8
Mithrandir
Re: Direct link to search query - xoopsmembers

Or change it to $_GET instead of $HTTP_POST_VARS

9
Nootje
Re: Direct link to search query - xoopsmembers
  • 2004/3/18 12:29

  • Nootje

  • Just popping in

  • Posts: 15

  • Since: 2004/3/16


So i'd have to get rid of the ['op'] alltogether?

$op = "form";
if ( isset($_GET) && $_GET == "submit" ) {
$op = "submit";
}

Like this?

10
Mithrandir
Re: Direct link to search query - xoopsmembers

like that

Login

Who's Online

200 user(s) are online (131 user(s) are browsing Support Forums)


Members: 0


Guests: 200


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